keyword_extraction.py 文件源码

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

项目:finance_news_analysis 作者: pskun 项目源码 文件源码
def initTfidfKeywords(self, idf_file=None):
        ''' ??TFIDF???????????????IDF?? '''
        self.words_idf = {}
        if idf_file is not None:
            jieba.analyse.set_idf_path(idf_file)
            '''
            for line in codecs.open(idf_file, 'r', 'utf-8'):
                word, idf_value = line.strip().split()
                self.words_idf[word] = float(idf_value)
            pass
            '''
        pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号