org.apache.lucene.analysis
public class WordlistLoader extends Object
Constructor and Description |
---|
WordlistLoader() |
Modifier and Type | Method and Description |
---|---|
static HashMap |
getStemDict(File wordstemfile)
Reads a stem dictionary.
|
static HashSet |
getWordSet(File wordfile)
Loads a text file and adds every line as an entry to a HashSet (omitting
leading and trailing whitespace).
|
static HashSet |
getWordSet(Reader reader)
Reads lines from a Reader and adds every line as an entry to a HashSet (omitting
leading and trailing whitespace).
|
public static HashSet getWordSet(File wordfile) throws IOException
wordfile
- File containing the wordlistIOException
public static HashSet getWordSet(Reader reader) throws IOException
reader
- Reader containing the wordlistIOException
public static HashMap getStemDict(File wordstemfile) throws IOException
word\tstem(i.e. two tab seperated words)
IOException
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.