MCPcopy Index your code
hub / github.com/clips/pattern / test_find_lemma

Method test_find_lemma

test/test_de.py:85–95  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

83 print "pattern.de.predicative()"
84
85 def test_find_lemma(self):
86 # Assert the accuracy of the verb lemmatization algorithm.
87 # Note: the accuracy is higher (88%) when measured on CELEX word forms
88 # (presumably because de.inflect.verbs has high percentage irregular verbs).
89 i, n = 0, 0
90 for v1, v2 in de.inflect.verbs.inflections.items():
91 if de.inflect.verbs.find_lemma(v1) == v2:
92 i += 1
93 n += 1
94 self.assertTrue(float(i) / n > 0.86)
95 print "pattern.de.inflect.verbs.find_lemma()"
96
97 def test_find_lexeme(self):
98 # Assert the accuracy of the verb conjugation algorithm.

Callers

nothing calls this directly

Calls 2

itemsMethod · 0.45
find_lemmaMethod · 0.45

Tested by

no test coverage detected