Clone this repo:

Branches

  1. 499bddf Increments version to 0.3.1 by halfak · 8 years ago master
  2. f519fe0 Adds flexibility to revscoring requirement. by halfak · 8 years ago
  3. 50717e1 Merge pull request #18 from nettrom/master by Aaron Halfaker · 8 years ago
  4. e3b5b4c fix missing mwp import by Morten Wang · 8 years ago
  5. db874bc Add HTML comment detection and removal in WikiProject template paramters by Morten Wang · 8 years ago

Wikipedia article quality classification

This library provides a set of utilities for performing automatic detection of assessment classes of Wikipedia articles. For more information, see the full documentation at http://pythonhosted.org/wikiclass.

Compatible with Python 3.x only. Sorry.

Basic usage

>>> 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}}

Authors