|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.analysis.WordlistLoader
public class WordlistLoader
Loader for text files that represent a list of stopwords.
Constructor Summary | |
---|---|
WordlistLoader()
|
Method Summary | |
---|---|
static HashMap<String,String> |
getStemDict(File wordstemfile)
Reads a stem dictionary. |
static HashSet<String> |
getWordSet(File wordfile)
Loads a text file and adds every line as an entry to a HashSet (omitting leading and trailing whitespace). |
static HashSet<String> |
getWordSet(File wordfile,
String comment)
Loads a text file and adds every non-comment line as an entry to a HashSet (omitting leading and trailing whitespace). |
static HashSet<String> |
getWordSet(Reader reader)
Reads lines from a Reader and adds every line as an entry to a HashSet (omitting leading and trailing whitespace). |
static HashSet<String> |
getWordSet(Reader reader,
String comment)
Reads lines from a Reader and adds every non-comment line as an entry to a HashSet (omitting leading and trailing whitespace). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WordlistLoader()
Method Detail |
---|
public static HashSet<String> getWordSet(File wordfile) throws IOException
wordfile
- File containing the wordlist
IOException
public static HashSet<String> getWordSet(File wordfile, String comment) throws IOException
wordfile
- File containing the wordlistcomment
- The comment string to ignore
IOException
public static HashSet<String> getWordSet(Reader reader) throws IOException
reader
- Reader containing the wordlist
IOException
public static HashSet<String> getWordSet(Reader reader, String comment) throws IOException
reader
- Reader containing the wordlistcomment
- The string representing a comment.
IOException
public static HashMap<String,String> getStemDict(File wordstemfile) throws IOException
word\tstem(i.e. two tab seperated words)
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |