用于自动检测维基百科文章的评估类的库。
wikiclass的Python项目详细描述
#维基百科文章质量分类
这个库提供了一组实用程序,用于自动检测维基百科文章的评估类有关详细信息,请参阅http://pythonhosted.org/wikiclass上的完整文档。
仅与python 3.x兼容。抱歉。
- 安装:pip install wikiclass
- 型号:https://github.com/halfak/wikiclass/tree/master/models
- 文档:http://pythonhosted.org/wikiclass
##基本用法
>>> import wikiclass >>> from revscoring.scorer_models import MLScorerModel >>> >>> scorer_model = MLScorerModel.load(open("models/enwiki.wp10.rf.model", "rb")) >>> >>> text = "I am the text of a page. I have a <ref>word</ref>" >>> wikiclass.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