Show
Ignore:
Timestamp:
08/19/07 10:34:17 (13 months ago)
Author:
Tarek Ziad?? <tarek@…>
Message:

refactoring in progress

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • classifier/tokenizer/filters.py

    r157 r159  
    157157        lang = options['lang'] 
    158158        stopwords = self._getStopWords(lang) 
     159        if 'treshold' in options: 
     160            tres = options['treshold'] 
     161        else: 
     162            tres = self.treshold 
     163 
    159164        return [word for word in text if (word not in stopwords 
    160                 and len(word) > self.treshold)] 
     165                and len(word) > tres)] 
    161166 
    162167registerFilter(StopWords())