org.apache.solr.spelling.suggest
Class FileDictionary

java.lang.Object
  extended by org.apache.solr.spelling.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
FileDictionary(InputStream dictFile)
           
FileDictionary(Reader reader)
          Creates a dictionary based on a reader.
 
Method Summary
 TermFreqIterator getWordsIterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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()
Specified by:
getWordsIterator in interface Dictionary


Copyright © 2011 Apache Software Foundation. All Rights Reserved.