| 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"). |