Converts a Parole tag to a universal tag. For example: importantísimo/AQ => importantísimo/ADJ
(token, tag)
| 138 | return (token, parole.get(tag, tag)) |
| 139 | |
| 140 | def 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 | |
| 152 | ABBREVIATIONS = 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.", |
no test coverage detected
searching dependent graphs…