Package org.apache.lucene.search.spell
Class PlainTextDictionary
- java.lang.Object
-
- org.apache.lucene.search.spell.PlainTextDictionary
-
- All Implemented Interfaces:
Dictionary
public class PlainTextDictionary extends Object implements Dictionary
Dictionary represented by a text file. Format allowed: 1 word per line:
word1
word2
word3
-
-
Constructor Summary
Constructors Constructor Description PlainTextDictionary(File file)
PlainTextDictionary(InputStream dictFile)
PlainTextDictionary(Reader reader)
Creates a dictionary based on a reader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BytesRefIterator
getWordsIterator()
Return all words present in the dictionary
-
-
-
Constructor Detail
-
PlainTextDictionary
public PlainTextDictionary(File file) throws FileNotFoundException
- Throws:
FileNotFoundException
-
PlainTextDictionary
public PlainTextDictionary(InputStream dictFile)
-
PlainTextDictionary
public PlainTextDictionary(Reader reader)
Creates a dictionary based on a reader.
-
-
Method Detail
-
getWordsIterator
public BytesRefIterator getWordsIterator() throws IOException
Description copied from interface:Dictionary
Return all words present in the dictionary- Specified by:
getWordsIterator
in interfaceDictionary
- Returns:
- Iterator
- Throws:
IOException
-
-