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

Method test_attributive

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

Source from the content-addressed store, hash-verified

42 print "pattern.nl.singularize()"
43
44 def test_attributive(self):
45 # Assert the accuracy of the attributive algorithm ("fel" => "felle").
46 from pattern.db import Datasheet
47 i, n = 0, 0
48 for pred, attr, sg, pl in Datasheet.load(os.path.join(PATH, "corpora", "wordforms-nl-celex.csv")):
49 if nl.attributive(pred) == attr:
50 i +=1
51 n += 1
52 self.assertTrue(float(i) / n > 0.96)
53 print "pattern.nl.attributive()"
54
55 def test_predicative(self):
56 # Assert the accuracy of the predicative algorithm ("felle" => "fel").

Callers

nothing calls this directly

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected