new-words

diff new-words.py @ 52:abd4080ee583

logging (fixme: hardcoded log filename) + answers shorthand (you press key instead of fullanswer)
author Igor Chubin <igor@chub.in>
date Sun May 01 20:27:36 2011 +0200 (2011-05-01)
parents 4e931db74618
children f583256b7ab1
line diff
     1.1 --- a/new-words.py	Fri Mar 25 22:35:44 2011 +0200
     1.2 +++ b/new-words.py	Sun May 01 20:27:36 2011 +0200
     1.3 @@ -29,7 +29,9 @@
     1.4          stemmer_algorithm = {
     1.5              'de' : 'german',
     1.6              'en' : 'english',
     1.7 +            'es' : 'spanish',
     1.8              'ru' : 'russian',
     1.9 +            'it' : 'italian',
    1.10              'uk' : 'ukrainian',
    1.11          }
    1.12          self.stemmer = Stemmer.Stemmer(stemmer_algorithm[language])
    1.13 @@ -60,12 +62,12 @@
    1.14              key=lambda x:x[0],
    1.15              reverse=True))[0]
    1.16  
    1.17 +        return best_match
    1.18 +
    1.19          suggestions = self.dictionary_suggestions(best_match)
    1.20          if len(suggestions) == 1:
    1.21              return best_match
    1.22  
    1.23 -        #return best_match
    1.24 -
    1.25          verb = False
    1.26          corrected_best_match = best_match
    1.27          if best_match[-2:] == 'et':