Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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
`PlainTextDictionary(File file)` Creates a dictionary based on a File.
`PlainTextDictionary(InputStream dictFile)` Creates a dictionary based on an inputstream.
`PlainTextDictionary(Reader reader)` Creates a dictionary based on a reader.

Method Summary
`BytesRefIterator` | `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(File file)
                        throws IOException

  Creates a dictionary based on a File.

  NOTE: content is treated as UTF-8

  Throws:
    `IOException`

### PlainTextDictionary

    public PlainTextDictionary(InputStream dictFile)

  Creates a dictionary based on an inputstream.

  NOTE: content is treated as UTF-8

### 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 interface `Dictionary`
  Returns:
    Iterator
  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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