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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileDictionary
public FileDictionary(InputStream dictFile)
FileDictionary
public FileDictionary(Reader reader)
- Creates a dictionary based on a reader.
getWordsIterator
public TermFreqIterator getWordsIterator()
- Description copied from interface:
Dictionary
- Return all words present in the dictionary
- Specified by:
getWordsIterator
in interface Dictionary
- Returns:
- Iterator
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.