FileDocCategorySizeDatePackage
PlainTextDictionary.javaAPI DocApache Lucene 2.2.02214Sat Jun 16 22:21:02 BST 2007org.apache.lucene.search.spell

PlainTextDictionary

public class PlainTextDictionary extends Object implements Dictionary
Dictionary represented by a text file.

Format allowed: 1 word per line:
word1
word2
word3

author
Nicolas Maisonneuve

Fields Summary
private BufferedReader
in
private String
line
private boolean
hasNextCalled
Constructors Summary
public PlainTextDictionary(File file)

    in = new BufferedReader(new FileReader(file));
  
public PlainTextDictionary(InputStream dictFile)

    in = new BufferedReader(new InputStreamReader(dictFile));
  
protected PlainTextDictionary(Reader reader)
Create a dictionary based on a reader. Used by the test case.

    in = new BufferedReader(reader);
  
Methods Summary
public java.util.IteratorgetWordsIterator()

    return new fileIterator();