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

Method test_find_lemma

test/test_it.py:97–106  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

95 print "pattern.it.predicative()"
96
97 def test_find_lemma(self):
98 # Assert the accuracy of the verb lemmatization algorithm.
99 i, n = 0, 0
100 r = 0
101 for v1, v2 in it.inflect.verbs.inflections.items():
102 if it.inflect.verbs.find_lemma(v1) == v2:
103 i += 1
104 n += 1
105 self.assertTrue(float(i) / n > 0.81)
106 print "pattern.it.inflect.verbs.find_lemma()"
107
108 def test_find_lexeme(self):
109 # 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