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 |
java.lang.String |
map(java.lang.String posTag,
java.lang.String terminal)
First map to the LDC short tags. |
void |
setup(java.io.File path,
java.lang.String... options)
Perform initialization prior to the first call to map . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
UniversalPOSMapper
public UniversalPOSMapper()
map
public java.lang.String map(java.lang.String posTag,
java.lang.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(java.io.File path,
java.lang.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