hepple.postag
Class Lexicon
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap
hepple.postag.Lexicon
- All Implemented Interfaces:
- Serializable, Cloneable, Map
class Lexicon
- extends HashMap
A HashMap that maps from lexical entry
(String) to possible POS categories
(List
|
Method Summary |
void |
setEncoding(String encoding)
Deprecated. The lexicon file is read at construction time, so setting the
encoding later will have no effect. Use the two argument constructor to
set the encoding. |
| Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
encoding
private String encoding
Lexicon
public Lexicon(URL lexiconURL)
throws IOException
- Constructor.
- Parameters:
lexiconURL - an URL for the file contianing the lexicon.
- Throws:
IOException
Lexicon
public Lexicon(URL lexiconURL,
String encoding)
throws IOException
- Constructor.
- Parameters:
lexiconURL - an URL for the file contianing the lexicon.encoding - the character encoding to use for reading the lexicon.
- Throws:
IOException
setEncoding
public void setEncoding(String encoding)
- Deprecated. The lexicon file is read at construction time, so setting the
encoding later will have no effect. Use the two argument constructor to
set the encoding.