Ejemplo n.º 1
0
 def is_rubbish(self, word):
     if word in self.rubbish_set:
         return 1
     if self.word_dic.has_key(word):
         return 0
     result = fast_search.findall(self.rubbish_hd, word)
     if result:
         return 1
     else:
         return 0
Ejemplo n.º 2
0
 def is_rubbish(self, word):
     if word in self.rubbish_set:
         return 1
     if self.word_dic.has_key(word):
         return 0
     result = fast_search.findall(self.rubbish_hd, word)
     if result:
         return 1
     else:
         return 0
Ejemplo n.º 3
0
 def s_filter(self, s):
     result = fast_search.findall(hot_word.short_url_hd, s)
     if result:
         s = hot_word.url_re.sub("", s)
     return s
Ejemplo n.º 4
0
 def s_filter(self, s):
     result = fast_search.findall(self.short_url_hd, s)
     if result:
         s = self.url_re.sub("", s)
     return s