[spambayes-dev] Question about tokenize_word andTokenizer.tokenize_body

Skip Montanaro skip at pobox.com
Wed Nov 10 23:44:41 CET 2004


>             for w in text.split():
>                 n = len(w)
>                 # Make sure this range matches in tokenize_word().
>                 if 3 <= n <= maxword:
>                     yield w
> 
>                 elif n >= 3:
>                     for t in tokenize_word(w):
>                         yield t

Maybe to make the intent clearer, the elif test should be

    elif n > maxword:

Skip


More information about the spambayes-dev mailing list