public interface Mapper
Modifier and Type | Method and Description |
---|---|
boolean |
canChangeEncoding(String parent,
String child)
Indicates whether
child can be converted to another encoding. |
String |
map(String parent,
String element)
Maps from one string representation to another.
|
void |
setup(File path,
String... options)
Perform initialization prior to the first call to
map . |
void setup(File path, String... options)
map
.path
- A filename for data on disk used during mappingoptions
- Variable length array of strings for options. Option format may
vary for the particular class instance.String map(String parent, String element)
parent
- element
's context (e.g., the parent node in a parse tree)element
- The string to be transformed.boolean canChangeEncoding(String parent, String child)
child
can 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.parent
- element
's context (e.g., the parent node in a parse tree)child
- The string to be transformed.