edu.stanford.nlp.international.arabic.pipeline
Class UniversalPOSMapper
java.lang.Object
edu.stanford.nlp.international.arabic.pipeline.LDCPosMapper
edu.stanford.nlp.international.arabic.pipeline.UniversalPOSMapper
- All Implemented Interfaces:
- Mapper
public class UniversalPOSMapper
- extends LDCPosMapper
Maps LDC-provided Bies mappings to the Universal POS tag set described in
Slav Petrov, Dipanjan Das and Ryan McDonald. "A Universal Part-of-Speech Tagset."
Includes optional support for adding morphological annotations via the setup method.
- Author:
- Spence Green
Method Summary |
String |
map(String posTag,
String terminal)
First map to the LDC short tags. |
void |
setup(File path,
String... options)
Perform initialization prior to the first call to map . |
UniversalPOSMapper
public UniversalPOSMapper()
map
public String map(String posTag,
String terminal)
- First map to the LDC short tags. Then map to the Universal POS. Then add
morphological annotations.
- Specified by:
map
in interface Mapper
- Overrides:
map
in class LDCPosMapper
- Parameters:
posTag
- The preterminal tagterminal
- The optional terminal, which may be used for context
- Returns:
- The transformed string
setup
public void setup(File path,
String... options)
- Description copied from interface:
Mapper
- Perform initialization prior to the first call to
map
.
- Specified by:
setup
in interface Mapper
- Overrides:
setup
in class LDCPosMapper
- Parameters:
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.
Stanford NLP Group