THUTag是清华大学自然语言处理与社会人文计算实验室实现的,具有关键词抽取与社会标签推荐工具包,提供关键词抽取、社会标签推荐功能,包括TextRank、ExpandRank、Topical PageRank(TPR)、Tag-LDA、Word Trigger Model、Word Alignment Model等算法。
Xinxiong Chen, Deming Ye, Xiance Si, Zhiyuan Liu and Maosong Sun. THUTag: A Package for Keyphrase Extraction and Social Tag Suggestion. 2016.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
其readme文档提供的算法准确率如下:
其自带数据“Douban Post Dataset (M_d=3,select the three tags with the highest value),数据格式:
dataType=DoubanPost :
{"doubanTags":{"tag1":weight,"tag2":weight,"tag3":weight,...},"id":"document id","content":"document content","tags":[empty],"timestamp":0,"resourceKey":"","title":"document title","userId":"","extras":""} (Focus on books)
Example :
{"doubanTags":{"文化":5,"献给非哲学家的小哲学":6,"哲学":29,"法国":17},"id":"1000047","content":"全球化是必然趋势?仁者见仁,智者见智。有人惊呼:“狼来了!”有人担忧:“怎么办?”还有人在思考:“对世界来说,经济可以全球化,甚至货币也可以一体化,但文化则要鼓励多元化。”是的,只有本着文化多元化的精神,在尊重其他民族文化的同时,自身才能获得不断的发展与丰富。法国人做出了自己的探索与努力。今天,您面前的这一套“法兰西书库·睿哲系列”为您打开了一扇沟通的窗口。他山之石,可以攻玉。我们希望这样的对话可以走得越来越远。","tags":[],"timestamp":0,"resourceKey":"","title":"献给非哲学家的小哲学 睿哲系列","userId":"","extras":""} (Demo file is bookPost70000.dat)”
测试结果如下:
Algorithm Precision Recall F1
PMI 0.38962 0.45730 0.36692
WTM 0.36828 0.45131 0.35410
KNN 0.33910 0.37885 0.31103
TAM 0.30758 0.34045 0.28093
NaiveBayes 0.27064 0.30223 0.24671
NoiseTagLdaModel 0.20956 0.20757 0.18054
TagLdaModel 0.15756 0.16646 0.14054
对于关键字抽取算法,其readme文档中提供的准确率结果如下:
其自带数据集“Post Dataset ,(M_d=2,select the two keywords with the highest value),数据格式:(之前认为是解析html,后来发现错了,解析的是json,尴尬)
dataType=KeywordPost :
{"date": "news date","summary":"news summary","source":"news source","id":"document id","content":"document content","title":"news title","resourceKey":"","extras":"","userId":"","tags":["tag1","tag2","tag3",...]} (Focus on news)
Example :
{"date":"2010-6-12 3:39:39","summary":"核心提示:重庆市政府公众信息网发布消息