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

Function wotan2penntreebank

pattern/text/nl/__init__.py:83–92  ·  view source on GitHub ↗

Converts a WOTAN tag to a Penn Treebank II tag. For example: bokkenrijders/N(soort,mv,neut) => bokkenrijders/NNS

(token, tag)

Source from the content-addressed store, hash-verified

81}
82
83def wotan2penntreebank(token, tag):
84 """ Converts a WOTAN tag to a Penn Treebank II tag.
85 For example: bokkenrijders/N(soort,mv,neut) => bokkenrijders/NNS
86 """
87 for k, v in wotan.iteritems():
88 if tag.startswith(k):
89 for a, b in v:
90 if a in tag:
91 return (token, b)
92 return (token, tag)
93
94def wotan2universal(token, tag):
95 """ Converts a WOTAN tag to a universal tag.

Callers 2

wotan2universalFunction · 0.85
find_tagsMethod · 0.85

Calls 1

iteritemsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…