Package edu.stanford.nlp.trees.treebank
Class DefaultMapper
- java.lang.Object
-
- edu.stanford.nlp.trees.treebank.DefaultMapper
-
-
Constructor Summary
Constructors Constructor Description DefaultMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanChangeEncoding(String parent, String child)Indicates whetherchildcan be converted to another encoding.Stringmap(String parent, String element)Maps from one string representation to another.voidsetup(File path, String... options)Perform initialization prior to the first call tomap.
-
-
-
Method Detail
-
canChangeEncoding
public boolean canChangeEncoding(String parent, String child)
Description copied from interface:MapperIndicates whetherchildcan be converted to another encoding. In the ATB, for example, if a punctuation character is labeled with the "PUNC" POS tag, then that character should not be converted from Buckwalter to UTF-8.- Specified by:
canChangeEncodingin interfaceMapper- Parameters:
parent-element's context (e.g., the parent node in a parse tree)child- The string to be transformed.- Returns:
- True if the string encoding can be changed. False otherwise.
-
map
public String map(String parent, String element)
Description copied from interface:MapperMaps from one string representation to another.
-
-