public class LDCPosMapper extends java.lang.Object implements Mapper
| Modifier and Type | Field and Description |
|---|---|
protected java.util.regex.Pattern |
endOfTagMap |
protected java.util.regex.Pattern |
mapping |
protected int |
numExpectedTokens |
protected java.util.regex.Pattern |
startOfTagMap |
protected java.util.Map<java.lang.String,java.lang.String> |
tagMap |
protected java.util.Set<java.lang.String> |
tagsToEscape |
| Constructor and Description |
|---|
LDCPosMapper() |
LDCPosMapper(boolean addDeterminer) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canChangeEncoding(java.lang.String parent,
java.lang.String element)
Indicates whether
child can be converted to another encoding. |
static void |
main(java.lang.String[] args) |
java.lang.String |
map(java.lang.String posTag,
java.lang.String terminal)
Maps from one string representation to another.
|
void |
setup(java.io.File path,
java.lang.String... options)
Perform initialization prior to the first call to
map. |
java.lang.String |
toString() |
protected java.util.regex.Pattern startOfTagMap
protected java.util.regex.Pattern endOfTagMap
protected java.util.regex.Pattern mapping
protected int numExpectedTokens
protected final java.util.Map<java.lang.String,java.lang.String> tagMap
protected final java.util.Set<java.lang.String> tagsToEscape
public LDCPosMapper()
public LDCPosMapper(boolean addDeterminer)
public java.lang.String map(java.lang.String posTag,
java.lang.String terminal)
Mapperpublic void setup(java.io.File path,
java.lang.String... options)
Mappermap.public boolean canChangeEncoding(java.lang.String parent,
java.lang.String element)
Mapperchild 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.canChangeEncoding in interface Mapperparent - element's context (e.g., the parent node in a parse tree)element - The string to be transformed.public java.lang.String toString()
toString in class java.lang.Objectpublic static void main(java.lang.String[] args)