|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.international.arabic.pipeline.DefaultLexicalMapper
public class DefaultLexicalMapper
Applies a default set of lexical transformations that have been empirically validated in various Arabic tasks. This class automatically detects the input encoding and applies the appropriate set of transformations.
Constructor Summary | |
---|---|
DefaultLexicalMapper()
|
Method Summary | |
---|---|
boolean |
canChangeEncoding(String parent,
String element)
Indicates whether child can be converted to another encoding. |
static void |
main(String[] args)
|
String |
map(String parent,
String element)
Maps from one string representation to another. |
void |
setup(File path)
Perform initialization prior to the first call to map . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultLexicalMapper()
Method Detail |
---|
public String map(String parent, String element)
Mapper
map
in interface Mapper
parent
- element
's context (e.g., the parent node in a parse tree)element
- The string to be transformed.
public void setup(File path)
Mapper
map
.
setup
in interface Mapper
path
- A filename for data on disk used during mappingpublic boolean canChangeEncoding(String parent, String element)
Mapper
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.
canChangeEncoding
in interface Mapper
parent
- element
's context (e.g., the parent node in a parse tree)element
- The string to be transformed.
public static void main(String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |