Skip tabs for proper statistic calculation.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sun, 19 Mar 2017 10:16:43 +0200
changeset 804 7aa283584ee6
parent 803 13f5485d81c6
child 805 7b885756eb1f
Skip tabs for proper statistic calculation.
py/gadict_freq.py
--- a/py/gadict_freq.py	Fri Mar 17 21:10:43 2017 +0200
+++ b/py/gadict_freq.py	Sun Mar 19 10:16:43 2017 +0200
@@ -40,8 +40,9 @@
             if not m:
                 raise Exception("Line {:d}: '{:s}' wrong format\n".format(self.lineno, line))
             tab = m.group(1)
-            if not tab:
-                self.cnt += 1
+            if tab:
+                continue
+            self.cnt += 1
             if self.limit and self.cnt > self.limit:
                 break
             headword = m.group(2).strip().lower()