Mikhail Korobov  committed e946fbc

minor presentational tweaks

  • Participants
  • Parent commits 494cf69

Comments (0)

Files changed (2)

File pymorphy2/opencorpora_dict/

             yield word, (para_id, idx)
-    logger.debug('collecting statistics for word suffixes..')
+    logger.debug('collecting word suffixes statistics..')
     words_info = _iter_words_info(iter_words(), paradigms, gramtab, suffixes)
     ending_counts, endings = _ending_stats(words_info, max_suffix_length, grammemes)
 def _show_progress(iterator, print_every):
     """ Print "NUM done" message every ``print_every`` iteration. """
     for index, el in enumerate(iterator):
-        if not (index % int(print_every)):
+        if index and not (index % int(print_every)):
             logger.debug("%d done", index)
         yield el

File pymorphy2/opencorpora_dict/

         tag_id = paradigm[tag_info_offset + idx]
         return self.gramtab[tag_id]
     def build_paradigm_info(self, para_id):
         Return a list of
         return res
     def build_normal_form(self, para_id, idx, fixed_word):
         Build a normal form.
         return normal_prefix + stem + normal_suffix
     def build_stem(self, paradigm, idx, fixed_word):
         Return word stem (given a word, paradigm and the word index).
             return fixed_word[len(prefix):]
     def word_is_known(self, word, strict_ee=False):
         Check if a ``word`` is in the dictionary.
             return bool(self.words.similar_keys(word,
     def iter_known_words(self, prefix=""):
         Return an iterator over ``(word, tag, normal_form, para_id, idx)``
             normal_form = self.build_normal_form(para_id, idx, word)
             yield word, tag, normal_form, para_id, idx
+    def __repr__(self):
+        return str("%s(%r)") % (self.__class__.__name__, self.path)
-    def __repr__(self):
-        return str("<%s>") % self.__class__.__name__