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

Method test_predicative

test/test_nl.py:55–64  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

53 print "pattern.nl.attributive()"
54
55 def test_predicative(self):
56 # Assert the accuracy of the predicative algorithm ("felle" => "fel").
57 from pattern.db import Datasheet
58 i, n = 0, 0
59 for pred, attr, sg, pl in Datasheet.load(os.path.join(PATH, "corpora", "wordforms-nl-celex.csv")):
60 if nl.predicative(attr) == pred:
61 i +=1
62 n += 1
63 self.assertTrue(float(i) / n > 0.96)
64 print "pattern.nl.predicative()"
65
66 def test_find_lemma(self):
67 # Assert the accuracy of the verb lemmatization algorithm.

Callers

nothing calls this directly

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected