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

Function parole2universal

pattern/text/es/__init__.py:140–150  ·  view source on GitHub ↗

Converts a Parole tag to a universal tag. For example: importantísimo/AQ => importantísimo/ADJ

(token, tag)

Source from the content-addressed store, hash-verified

138 return (token, parole.get(tag, tag))
139
140def parole2universal(token, tag):
141 """ Converts a Parole tag to a universal tag.
142 For example: importantísimo/AQ => importantísimo/ADJ
143 """
144 if tag == "CS":
145 return (token, CONJ)
146 if tag == "DP":
147 return (token, DET)
148 if tag in ("P0", "PD", "PI", "PP", "PR", "PT", "PX"):
149 return (token, PRON)
150 return penntreebank2universal(*parole2penntreebank(token, tag))
151
152ABBREVIATIONS = set((
153 u"a.C.", u"a.m.", u"apdo.", u"aprox.", u"Av.", u"Avda.", u"c.c.", u"D.", u"Da.", u"d.C.",

Callers 1

find_tagsMethod · 0.85

Calls 2

penntreebank2universalFunction · 0.90
parole2penntreebankFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…