(self)
| 53 | print "pattern.en.inflect.pluralize()" |
| 54 | |
| 55 | def test_singularize(self): |
| 56 | # Assert the accuracy of the singularization algorithm. |
| 57 | from pattern.db import Datasheet |
| 58 | i, n = 0, 0 |
| 59 | for sg, pl in Datasheet.load(os.path.join(PATH, "corpora", "wordforms-en-celex.csv")): |
| 60 | if en.inflect.singularize(pl) == sg: |
| 61 | i +=1 |
| 62 | n += 1 |
| 63 | self.assertTrue(float(i) / n > 0.95) |
| 64 | print "pattern.en.inflect.singularize()" |
| 65 | |
| 66 | def test_find_lemma(self): |
| 67 | # Assert the accuracy of the verb lemmatization algorithm. |