Skip to content

datalee/python-jieba-keywords

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

python-jieba-keywords

import jieba import jieba.analyse #jieba实现提取关键词 content = u'该同学来电反映学校食堂趁刮台风涨价,建议拨打12345'

#基于TF-IDF keywords = jieba.analyse.extract_tags(content,topK = 10,withWeight = True,allowPOS = ('n','nr','ns')) for item in keywords:
print item[0],item[1]

#基于TextRank结果: keywords = jieba.analyse.textrank(content,topK = 10,withWeight = True,allowPOS = ('n','nr','ns')) for item in keywords:
print item[0],item[1]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published