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(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 |
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 |
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).
|
public static HashSet getWordSet(File wordfile) throws IOException
wordfile
- File containing the wordlistIOException
public static HashSet getWordSet(File wordfile, String comment) throws IOException
wordfile
- File containing the wordlistcomment
- The comment string to ignoreIOException
public static HashSet getWordSet(Reader reader) throws IOException
reader
- Reader containing the wordlistIOException
public static HashSet getWordSet(Reader reader, String comment) throws IOException
reader
- Reader containing the wordlistcomment
- The string representing a comment.IOException
public static HashMap getStemDict(File wordstemfile) throws IOException
word\tstem(i.e. two tab seperated words)
IOException
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.