edu.stanford.nlp.international.arabic.pipeline
Class UniversalPOSMapper

java.lang.Object
  extended by edu.stanford.nlp.international.arabic.pipeline.LDCPosMapper
      extended by 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

Field Summary
 
Fields inherited from class edu.stanford.nlp.international.arabic.pipeline.LDCPosMapper
endOfTagMap, mapping, numExpectedTokens, startOfTagMap, tagMap, tagsToEscape
 
Constructor Summary
UniversalPOSMapper()
           
 
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 edu.stanford.nlp.international.arabic.pipeline.LDCPosMapper
canChangeEncoding, main, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UniversalPOSMapper

public UniversalPOSMapper()
Method Detail

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 tag
terminal - 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 mapping
options - Variable length array of strings for options. Option format may vary for the particular class instance.


Stanford NLP Group