| 31 | print "pattern.nl.pluralize()" |
| 32 | |
| 33 | def test_singularize(self): |
| 34 | # Assert the accuracy of the singularization algorithm. |
| 35 | from pattern.db import Datasheet |
| 36 | i, n = 0, 0 |
| 37 | for pred, attr, sg, pl in Datasheet.load(os.path.join(PATH, "corpora", "wordforms-nl-celex.csv")): |
| 38 | if nl.singularize(pl) == sg: |
| 39 | i +=1 |
| 40 | n += 1 |
| 41 | self.assertTrue(float(i) / n > 0.88) |
| 42 | print "pattern.nl.singularize()" |
| 43 | |
| 44 | def test_attributive(self): |
| 45 | # Assert the accuracy of the attributive algorithm ("fel" => "felle"). |