示例#1
0
文件: hot_word.py 项目: kelly6/tf-idf
 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
示例#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
示例#3
0
文件: hot_word.py 项目: kelly6/tf-idf
 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
示例#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