public class OnMemoryDictionary extends Dictionary
Dictionary.Entry| Constructor and Description |
|---|
OnMemoryDictionary() |
| Modifier and Type | Method and Description |
|---|---|
void |
load(File file) |
void |
load(Reader in)
Load Dictionary from
java.io.Reader object |
Dictionary.Entry |
lookup(int pos)
look for a dictionary entry matching the token sequence beginning at
token
pos. |
void |
lookupStart(String[] tokens)
initializes the dictionary look-up process for the text consisting of
tokens
tokens. |
lookuppublic void load(File file) throws IOException, DictionaryFormatException
IOExceptionDictionaryFormatExceptionpublic void load(Reader in) throws IOException, DictionaryFormatException
java.io.Reader objectin - resource for the dictionaryIOException - if an I/O error occursDictionaryFormatException - if illegal format occurspublic void lookupStart(String[] tokens)
tokens.lookupStart in class Dictionarypublic Dictionary.Entry lookup(int pos)
pos.lookup in class Dictionarypos - the position within the token array passed to lookupStartnull if no entry matchesCopyright © 2016 New York University. All rights reserved.