def process(self, lst): stemmer = self.stemmer result = [] for s in lst: try: s = unicode(s) except UnicodeDecodeError: pass else: s = stemmer.stem((s,))[0] result.append(s) return result
def processGlob(self, lst): stemmer = self.stemmer result = [] rxGlob = self.rxGlob for s in lst: if not rxGlob.search(s): try: s = unicode(s) except UnicodeDecodeError: pass else: s = stemmer.stem((s,))[0] result.append(s) return result