hepple.postag
Class Lexicon

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap
          extended by 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


Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Field Summary
private  String encoding
           
 
Constructor Summary
Lexicon(URL lexiconURL)
          Constructor.
Lexicon(URL lexiconURL, String encoding)
          Constructor.
 
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
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

encoding

private String encoding
Constructor Detail

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
Method Detail

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.