Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Universal Dependencies v2 POS tags

__META_SOURCE_URL__=https://universaldependencies.org/u/pos/index.html
__META_TYPE_BASE__=de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.

*=POS
ADJ=POS_ADJ
ADP=POS_ADP
ADV=POS_ADV
AUX=POS_AUX
CCONJ=POS_CONJ
DET=POS_DET
INTJ=POS_INTJ
NOUN=POS_NOUN
NUM=POS_NUM
PART=POS_PART
PRON=POS_PRON
PROPN=POS_PROPN
PUNCT=POS_PUNCT
SCONJ=POS_SCONJ
SYM=POS_SYM
VERB=POS_VERB
X=POS_X
Original file line number Diff line number Diff line change
@@ -1,127 +1,5 @@
# Penn Treebank Tagset with Emory NLP extensions
# Penn Treebank Tagset with the extensions used by the Emory/ClearNLP models
#
# Source (PTB 1): http://faculty.washington.edu/dillon/GramResources/penntable.html
# Source (PTB 2): http://www.clips.ua.ac.be/pages/mbsp-tags
# Source (ClearNLP): http://clear.colorado.edu/compsem/documents/treebank_guidelines.pdf
# Source (Emory NLP4J): https://github.com/emorynlp/nlp4j/blob/master/md/components/part_of_speech_tagging.md

__META_TYPE_BASE__=de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.

*=POS
# punctuation mark, comma
,=POS_PUNCT
-=POS_PUNCT
# punctuation mark, sentence closer
.=POS_PUNCT
;=POS_PUNCT
?=POS_PUNCT
\!=POS_PUNCT
``=POS_PUNCT
''=POS_PUNCT
-LRB-=POS_PUNCT
-RRB-=POS_PUNCT
# punctuation mark, colon
\:=POS_PUNCT
# contextual separator, left paren
(=POS_PUNCT
# contextual separator, right paren
)=POS_PUNCT
\#=POS_PUNCT
# 1. CC Coordinating conjunction
CC=POS_CONJ
# 2. CD Cardinal number
CD=POS_NUM
# 3. DT Determiner
DT=POS_DET
# 4. EX Existential there
EX=POS_DET
# 5. FW Foreign word
FW=POS_X
# 6. IN Preposition or subordinating conjunction
IN=POS_ADP
# 7. JJ Adjective
JJ=POS_ADJ
# 8. JJR Adjective, comparative
JJR=POS_ADJ
# 9. JJS Adjective, superlative
JJS=POS_ADJ
# 10. LS List item marker
LS=POS_X
# 11. MD Modal
MD=POS_VERB
# 12. NN Noun, singular or mass
NN=POS_NOUN
# 13. NNS Noun, plural
NNS=POS_NOUN
# 14. NP Proper noun, singular (PTB 1)
NP=POS_PROPN
# 14. NP Proper noun, singular (PTB 2)
NNP=POS_PROPN
# 15. NPS Proper noun, plural (PTB 1)
NPS=POS_PROPN
# 15. NPS Proper noun, plural (PTB 2)
NNPS=POS_PROPN
# 16. PDT Predeterminer
PDT=POS_DET
# 17. POS Possessive ending
POS=POS_X
# 18. PP Personal pronoun
PP=POS_PRON
PRP=POS_PRON
# 19. PP$ Possessive pronoun
PP$=POS_PRON
PRP$=POS_PRON
# 20. RB Adverb
RB=POS_ADV
# 21. RBR Adverb, comparative
RBR=POS_ADV
# 22. RBS Adverb, superlative
RBS=POS_ADV
# 23. RP Particle
RP=POS_ADP
SENT=POS_PUNCT
# 24. SYM Symbol
SYM=POS_SYM
# 25. TO to
TO=POS_ADP
# 26. UH Interjection
UH=POS_INTJ
# 27. VB Verb, base form
VB=POS_VERB
# 28. VBD Verb, past tense
VBD=POS_VERB
# 29. VBG Verb, gerund or present participle
VBG=POS_VERB
# 30. VBN Verb, past participle
VBN=POS_VERB
# 31. VBP Verb, non-3rd person singular present
VBP=POS_VERB
# 32. VBZ Verb, 3rd person singular present
VBZ=POS_VERB
# 33. WDT Wh-determiner
WDT=POS_DET
# 34. WP Wh-pronoun
WP=POS_PRON
# 35. WP$ Possessive wh-pronoun
WP$=POS_PRON
# 36. WRB Wh-adverb
WRB=POS_ADV

# Additional tags in ClearNLP / EmoryNLP models
# HYPH - unbound hyphen (Warner et al., 2004)
HYPH=POS_PUNCT
# AFX - unbound affix (Warner et al., 2004)
AFX=POS_X
# GW - mistranscription (Taylor, 1996)
GW=POS_X
# XX - uninterpretable material (Mott et al., 2009)
XX=POS_X

# Additional tags in EmoryNLP models
# ADD - Email
ADD=POS_X
# NFP - Superfluous punctuation
NFP=POS_PUNCT
# $ - Dollar
$=POS_PUNCT
# These are the same extensions as in the English Web Treebank (EWT).

__META_REDIRECT__=classpath:/org/dkpro/core/api/lexmorph/tagset/en-ptb-ewt-pos.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# Penn Treebank Tagset with the extensions of the English Web Treebank (EWT)
#
# Used e.g. by the CoreNLP 4.x English POS tagger and dependency parser models.
#
# Source (PTB 1): http://faculty.washington.edu/dillon/GramResources/penntable.html
# Source (PTB 2): http://www.clips.ua.ac.be/pages/mbsp-tags
# Source: http://repository.upenn.edu/cis_reports/570/

__META_TYPE_BASE__=de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.

# punctuation mark, comma
,=POS_PUNCT
# punctuation mark, sentence closer
.=POS_PUNCT
# dollar
$=POS_PUNCT
# dash
-=POS_PUNCT
# semi-colon
;=POS_PUNCT
# question mark
?=POS_PUNCT
# exclamation mark
\!=POS_PUNCT
# opening quotes
``=POS_PUNCT
# closing quotes
''=POS_PUNCT
# punctuation mark, colon
\:=POS_PUNCT
# contextual separator, left paren
-LRB-=POS_PUNCT
# contextual separator, left paren
(=POS_PUNCT
# contextual separator, right paren
-RRB-=POS_PUNCT
# contextual separator, right paren
)=POS_PUNCT
\#=POS_PUNCT
# sentence end marker
SENT=POS_PUNCT
# 1. CC Coordinating conjunction
CC=POS_CONJ
# 2. CD Cardinal number
CD=POS_NUM
# 3. DT Determiner
DT=POS_DET
# 4. EX Existential there
EX=POS_DET
# 5. FW Foreign word
FW=POS_X
# 6. IN Preposition or subordinating conjunction
IN=POS_ADP
# 7. JJ Adjective
JJ=POS_ADJ
# 8. JJR Adjective, comparative
JJR=POS_ADJ
# 9. JJS Adjective, superlative
JJS=POS_ADJ
# 10. LS List item marker
LS=POS_X
# 11. MD Modal
MD=POS_VERB
# 12. NN Noun, singular or mass
NN=POS_NOUN
# 13. NNS Noun, plural
NNS=POS_NOUN
# 14. NP Proper noun, singular (PTB 1)
NP=POS_PROPN
# 14. NP Proper noun, singular (PTB 2)
NNP=POS_PROPN
# 15. NPS Proper noun, plural (PTB 1)
NPS=POS_PROPN
# 15. NPS Proper noun, plural (PTB 2)
NNPS=POS_PROPN
# 16. PDT Predeterminer
PDT=POS_DET
# 17. POS Possessive ending
POS=POS_X
# 18. PP Personal pronoun
PP=POS_PRON
PRP=POS_PRON
# 19. PP$ Possessive pronoun
PP$=POS_PRON
PRP$=POS_PRON
# 20. RB Adverb
RB=POS_ADV
# 21. RBR Adverb, comparative
RBR=POS_ADV
# 22. RBS Adverb, superlative
RBS=POS_ADV
# 23. RP Particle
RP=POS_ADP
# 24. SYM Symbol
SYM=POS_SYM
# 25. TO to
TO=POS_ADP
# 26. UH Interjection
UH=POS_INTJ
# 27. VB Verb, base form
VB=POS_VERB
# 28. VBD Verb, past tense
VBD=POS_VERB
# 29. VBG Verb, gerund or present participle
VBG=POS_VERB
# 30. VBN Verb, past participle
VBN=POS_VERB
# 31. VBP Verb, non-3rd person singular present
VBP=POS_VERB
# 32. VBZ Verb, 3rd person singular present
VBZ=POS_VERB
# 33. WDT Wh-determiner
WDT=POS_DET
# 34. WP Wh-pronoun
WP=POS_PRON
# 35. WP$ Possessive wh-pronoun
WP$=POS_PRON
# 36. WRB Wh-adverb
WRB=POS_ADV

# Additional tags in the English Web Treebank
#
# Source: https://catalog.ldc.upenn.edu/LDC2012T13 (English Web Treebank guidelines)
# Source: https://universaldependencies.org/treebanks/en_ewt/index.html (XPOS)

# ADD - e-mail address or URL
ADD=POS_X
# AFX - unbound affix
# Mapped to X as in the CoreNLP UniversalPOSMapper
AFX=POS_X
# GW - "goes with": part of a word that was split
GW=POS_X
# HYPH - hyphen
HYPH=POS_PUNCT
# NFP - superfluous punctuation, emoticons
NFP=POS_PUNCT
# XX - uninterpretable material, typos
XX=POS_X

*=POS
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Universal Dependencies v2 POS tags

__META_SOURCE_URL__=https://universaldependencies.org/u/pos/index.html
__META_TYPE_BASE__=de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.

*=POS
ADJ=POS_ADJ
ADP=POS_ADP
ADV=POS_ADV
AUX=POS_AUX
CCONJ=POS_CONJ
DET=POS_DET
INTJ=POS_INTJ
NOUN=POS_NOUN
NUM=POS_NUM
PART=POS_PART
PRON=POS_PRON
PROPN=POS_PROPN
PUNCT=POS_PUNCT
SCONJ=POS_SCONJ
SYM=POS_SYM
VERB=POS_VERB
X=POS_X
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,24 @@ public String getTagTypeName(String aTag)
return type;
}

/**
* Checks whether there is an explicit mapping for the given tag, i.e. whether the tag would be
* mapped without resorting to the fallback ({@code *}) mapping.
*
* @param aTag
* a tag.
* @return whether the tag is explicitly mapped. If no mapping could be loaded, this is always
* {@code false}.
*/
public boolean isExplicitlyMapped(String aTag)
{
if (notFound || getResource() == null) {
return false;
}

return getResource().containsKey(getTag(aTag));
}

public Set<String> getTags()
{
return MappingUtils.stripMetadata(getResource().keySet());
Expand Down
Loading
Loading