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

Method test_find_lexeme

test/test_es.py:88–98  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

86 print "pattern.es.inflect.verbs.find_lemma()"
87
88 def test_find_lexeme(self):
89 # Assert the accuracy of the verb conjugation algorithm.
90 i, n = 0, 0
91 for v, lexeme1 in es.inflect.verbs.infinitives.items():
92 lexeme2 = es.inflect.verbs.find_lexeme(v)
93 for j in range(len(lexeme2)):
94 if lexeme1[j] == lexeme2[j]:
95 i += 1
96 n += 1
97 self.assertTrue(float(i) / n > 0.85)
98 print "pattern.es.inflect.verbs.find_lexeme()"
99
100 def test_conjugate(self):
101 # Assert different tenses with different conjugations.

Callers

nothing calls this directly

Calls 3

lenFunction · 0.85
itemsMethod · 0.45
find_lexemeMethod · 0.45

Tested by

no test coverage detected