|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.AbstractMap | +--java.util.HashMap | +--edu.stanford.nlp.trees.TagMapper
A POS tag to POS tag mapper. Both 1->many and 1->1 mappings are supported. Current implementation doesn't allow for sensitivity to the specific word being mapped. Considerable room exists for refinement.
Constructor Summary | |
TagMapper()
The 0-argument constructor is a default map for crude BNC->Penn Treebank tagset mapping. |
|
TagMapper(HashMap t)
The 1-argument constructor allows you to use your own tagmap |
Method Summary | |
Object |
apply(Object in)
appy() is based on the 1->1 mapping. |
static void |
main(String[] args)
|
String[] |
mapTagOneToMany(String l)
The one to many map is straightforward, but at time of writing (December 5, 2002) doesn't have any multi-tagged word class to plug into. |
String |
mapTagOneToOne(String l)
one to one map is achieved by just taking the first tag from the list of possible tags and making it the new tag. |
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 |
Constructor Detail |
public TagMapper(HashMap t)
public TagMapper()
Method Detail |
public String[] mapTagOneToMany(String l)
public String mapTagOneToOne(String l)
public Object apply(Object in)
apply
in interface Appliable
public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |