MCPcopy Create free account
hub / github.com/clips/pattern / penntreebank2universal

Function penntreebank2universal

pattern/text/it/__init__.py:74–80  ·  view source on GitHub ↗

Converts a Penn Treebank II tag to a universal tag. For example: che/IN => che/CONJ

(token, tag)

Source from the content-addressed store, hash-verified

72))
73
74def penntreebank2universal(token, tag):
75 """ Converts a Penn Treebank II tag to a universal tag.
76 For example: che/IN => che/CONJ
77 """
78 if tag == "IN" and token.lower() in _subordinating_conjunctions:
79 return CONJ
80 return _penntreebank2universal(token, tag)
81
82ABBREVIATIONS = [
83 "a.C.", "all.", "apr.", "art.", "artt.", "b.c.", "c.a.", "cfr.", "c.d.",

Callers 5

wotan2universalFunction · 0.90
find_tagsMethod · 0.90
parole2universalFunction · 0.90
stts2universalFunction · 0.90
find_tagsMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…