similar_doc.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:Information_retrieva_Projectl- 作者: Google1234 项目源码 文件源码
def calculate(self,doc_id,Top_numbers=10,multiple=10):
        title,content,url=self.index.get_data(doc_id)
        cut=jieba.cut_for_search(content)
        word_list=[]
        for word in cut:
            if  word not in self.punct and word not in self.Letters_and_numbers :
                #????????????????????
                if self.stopword.has_key(word.encode("utf-8")):
                    pass
                else:
                    word_list.append(word.encode("utf-8"))
    return self.FastCos.calculate(word_list,Top_numbers,multiple)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号