Package org.apache.lucene.search.suggest
Class FileDictionary
- java.lang.Object
-
- org.apache.lucene.search.suggest.FileDictionary
-
- All Implemented Interfaces:
Dictionary
public class FileDictionary extends Object implements Dictionary
Dictionary represented by a text file. Format allowed: 1 string per line, optionally with a tab-separated integer value:
word1 TAB 100
word2 word3 TAB 101
word4 word5 TAB 102
-
-
Constructor Summary
Constructors Constructor Description FileDictionary(InputStream dictFile)
FileDictionary(Reader reader)
Creates a dictionary based on a reader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TermFreqIterator
getWordsIterator()
Return all words present in the dictionary
-
-
-
Constructor Detail
-
FileDictionary
public FileDictionary(InputStream dictFile)
-
FileDictionary
public FileDictionary(Reader reader)
Creates a dictionary based on a reader.
-
-
Method Detail
-
getWordsIterator
public TermFreqIterator getWordsIterator()
Description copied from interface:Dictionary
Return all words present in the dictionary- Specified by:
getWordsIterator
in interfaceDictionary
- Returns:
- Iterator
-
-