org.apache.lucene.search.spell
Class PlainTextDictionary

java.lang.Object
  extended by org.apache.lucene.search.spell.PlainTextDictionary
All Implemented Interfaces:
Dictionary

public class PlainTextDictionary
extends java.lang.Object
implements Dictionary

Dictionary represented by a text file.

Format allowed: 1 word per line:
word1
word2
word3


Constructor Summary
  PlainTextDictionary(java.io.File file)
           
  PlainTextDictionary(java.io.InputStream dictFile)
           
protected PlainTextDictionary(java.io.Reader reader)
          Create a dictionary based on a reader.
 
Method Summary
 java.util.Iterator getWordsIterator()
          Return all words present in the dictionary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlainTextDictionary

public PlainTextDictionary(java.io.File file)
                    throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

PlainTextDictionary

public PlainTextDictionary(java.io.InputStream dictFile)

PlainTextDictionary

protected PlainTextDictionary(java.io.Reader reader)
Create a dictionary based on a reader. Used by the test case.

Method Detail

getWordsIterator

public java.util.Iterator getWordsIterator()
Description copied from interface: Dictionary
Return all words present in the dictionary

Specified by:
getWordsIterator in interface Dictionary
Returns:
Iterator


Copyright © 2000-2009 Apache Software Foundation. All Rights Reserved.