Raccoon.SE
Class WordCleaner

java.lang.Object
  extended byRaccoon.SE.WordCleaner

public class WordCleaner
extends java.lang.Object

This class is not meant to be instanciated all of its methods are static. It is simply a utility class to strip punctuatoin off of words. It also initilizes the stop word list (negative dictionary) and has a method that quickly tells you if a word is in the list.


Field Summary
static java.lang.String DEFAULT_STOP_FILE
           
 
Method Summary
static void initStopWord(java.lang.String fileName)
          Initilizes the stopword list.
static void main(java.lang.String[] args)
          For Testing only
static boolean stop_Word(java.lang.String word)
          initStopWord Must be called before this method can be used.
static java.lang.String stripPunc(java.lang.String old)
          Null in Null out This method returns the orignal string with all of the leading and trailing puncuation stripped off Numbers are considered punctuation here.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_STOP_FILE

public static java.lang.String DEFAULT_STOP_FILE
Method Detail

main

public static void main(java.lang.String[] args)
For Testing only


stripPunc

public static java.lang.String stripPunc(java.lang.String old)
Null in Null out This method returns the orignal string with all of the leading and trailing puncuation stripped off Numbers are considered punctuation here.

Parameters:
old - String to strip punctionation from
Returns:
A lowercase string will all of the leading and trailing whitespace gone

initStopWord

public static void initStopWord(java.lang.String fileName)
                         throws java.io.IOException
Initilizes the stopword list.

Parameters:
fileName - name of the file that contains the stopwords
Throws:
java.io.IOException

stop_Word

public static boolean stop_Word(java.lang.String word)
initStopWord Must be called before this method can be used. Returns true if word is in the list false if it is not.

Returns:
True if word is in the list false if it is not.
See Also:
initStopWord(String)