public class FileDictionary extends Object implements Dictionary
Format allowed: 1 entry per line:
An entry can be:
fieldDelimiter weightfieldDelimiter weight fieldDelimiter payloadfieldDelimiter is "\t"NOTE:
fieldDelimiter
Example:
word1 word2 TAB 100 TAB payload1
word3 TAB 101
word4 word3 TAB 102
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_FIELD_DELIMITER
Tab-delimited fields are most common thus the default, but one can override this via the constructor
|
| Constructor and Description |
|---|
FileDictionary(InputStream dictFile)
Creates a dictionary based on an inputstream.
|
FileDictionary(InputStream dictFile,
String fieldDelimiter)
Creates a dictionary based on an inputstream.
|
FileDictionary(Reader reader)
Creates a dictionary based on a reader.
|
FileDictionary(Reader reader,
String fieldDelimiter)
Creates a dictionary based on a reader.
|
public static final String DEFAULT_FIELD_DELIMITER
public FileDictionary(InputStream dictFile)
DEFAULT_FIELD_DELIMITER as the
field seperator in a line.
NOTE: content is treated as UTF-8
public FileDictionary(Reader reader)
DEFAULT_FIELD_DELIMITER as the
field seperator in a line.public FileDictionary(Reader reader, String fieldDelimiter)
fieldDelimiter to seperate out the
fields in a line.public FileDictionary(InputStream dictFile, String fieldDelimiter)
fieldDelimiter to seperate out the
fields in a line.
NOTE: content is treated as UTF-8
public InputIterator getEntryIterator()
DictionarygetEntryIterator in interface DictionaryCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.