用于自动检测维基百科文章的评估类的库。
articlequalit的Python项目详细描述
维基百科文章质量分类
此库提供一组实用程序,用于执行 维基百科文章的评估类。有关详细信息,请参见 文档位于http://pythonhosted.org/wikiclass。
仅与python 3.x兼容。抱歉。
- 安装:
pip install wikiclass
- 型号:https://github.com/wikimedia/articlequality/tree/master/models
- 文档:http://pythonhosted.org/wikiclass
基本用法
>>> import articlequality
>>> from revscoring import Model
>>>
>>> scorer_model = Model.load(open("models/enwiki.nettrom_wp10.gradient_boosting.model", "rb"))
>>>
>>> text = "I am the text of a page. I have a <ref>word</ref>"
>>> articlequality.score(scorer_model, text)
{'prediction': 'stub',
'probability': {'stub': 0.27156163795807853,
'b': 0.14707452309674252,
'fa': 0.16844898943510833,
'c': 0.057668704007171959,
'ga': 0.21617801281707663,
'start': 0.13906813268582238}}
作者
- 亚伦·哈法克——https://github.com/halfak
- 莫滕·沃克·王——http://www-users.cs.umn.edu/~morten