new-words

diff new-words.py @ 41:4629e08b0d87

minifix: skip numbers as words
author Igor Chubin <igor@chub.in>
date Sun Jan 23 18:18:19 2011 +0100 (2011-01-23)
parents c3a50c0d2400
children 3ec83a7cc544
line diff
     1.1 --- a/new-words.py	Sun Jan 23 17:09:44 2011 +0100
     1.2 +++ b/new-words.py	Sun Jan 23 18:18:19 2011 +0100
     1.3 @@ -165,6 +165,8 @@
     1.4      for line in lines:
     1.5          words = words_from_line(line)
     1.6          for word in words:
     1.7 +            if re.match('[0-9]*$', word):
     1.8 +                continue
     1.9              result.setdefault(word, 0)
    1.10              result[word] += 1
    1.11      return result