1. Mikhail Korobov
  2. pymorphy2

Commits

Mikhail Korobov  committed a0bbfa8

Починил скрипты. Fix #2.

  • Participants
  • Parent commits 37a46dc
  • Branches default

Comments (0)

Files changed (3)

File pymorphy2/cli.py

View file
 
 def make_test_suite(dict_filename, out_filename, word_limit=100):
     """
-    Makes a test suite from OpenCorpora dictionary.
+    Makes a test suite from (unparsed) OpenCorpora dictionary.
     """
     return test_suite_generator.make_test_suite(
         dict_filename, out_filename, word_limit=int(word_limit))

File pymorphy2/opencorpora_dict.py

View file
 
         paradigm = paradigms[para_id]
         tag = gramtab[paradigm[len(paradigm) // 3 + idx]]
-        cls = tagset.get_POS(tag)
+        cls = tuple(tag.replace(' ', ',', 1).split(','))[0]
 
         for i in 1,2,3,4,5:
             word_end = word[-i:]

File pymorphy2/test_suite_generator.py

View file
 # -*- coding: utf-8 -*-
-from __future__ import absolute_import
+from __future__ import absolute_import, unicode_literals
 import logging
 import collections
 import itertools
 import copy
+import re
 
 from pymorphy2.opencorpora_dict import _load_json_or_xml_dict