Commits

ivirabyan  committed 2c41de2

Only nouns, adjectives and participles can be agreed with numbers

  • Participants
  • Parent commits 0d86ebe

Comments (0)

Files changed (2)

File pymorphy2/tagset.py

         else:
             index = 2
 
+        if self.POS not in ('NOUN', 'ADJF', 'PRTF'):
+            return set([])
+
         if self.POS == 'NOUN' and self.case != 'nomn':
             if index == 0:
                 grammemes = set(['sing', self.case])

File tests/test_numeral_agreement.py

     # причастия
     ("летящий", ["летящий", "летящих", "летящих"]),
     ("летящая", ["летящая", "летящие", "летящих"]),
+
+    # остальное части речи мы никак не согласовываем с числами
+    ("играет", ["играет", "играет", "играет"])
 ])
 def test_plural_forms(word, result):
     parsed = morph.parse(word)