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 https://articlequality.readthedocs.io .
Compatible with Python 3.x only. Sorry.
- Install:
pip install articlequality - Models: https://github.com/wikimedia/articlequality/tree/master/models
- Documentation: https://articlequality.readthedocs.io
Basic usage
>>> 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}}
Install
Requirements
- Python 3.5, 3.6 or 3.7
- All the system requirements of revscoring
Installation steps
- clone this repository
- install the package itself and its dependencies
python setup.py install - You can verify that your installation worked by running
make enwiki_modelsto build the English Wikipedia article quality model ormake wikidatawiki_modelsto build the item quality model for Wikidata
Retraining the models
To retrain a model, run make -B MODEL e.g. make -B wikidatawiki_models. This will redownload the labels, re-extract the features from the revisions, and then retrain and rescore the model.
To skip re-downloading the training labels and re-extracting the features, it is enough touch the files in the datasets/ directory and run the make command without the -B flag.
Running tests
Example:
pytest -vv tests/feature_lists/test_wikidatawiki.py
Authors
- Aaron Halfaker -- https://github.com/halfak
- Morten Warncke-Wang -- https://github.com/nettrom
Metadata
Release files for articlequality 0.4.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| articlequality-0.4.4.tar.gz | 37.0 kB | Without provenance | Details for articlequality-0.4.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| articlequality-0.4.4-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for articlequality-0.4.4-py2.py3-none-any.whl |
Total release size: 93.1 kB
Release files / articlequality-0.4.4.tar.gz
| Download URL | articlequality-0.4.4.tar.gz |
|---|---|
| Size | 37.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2a5b504890e5e41db17e44cdc5b473da73dbaa094b004013af9b4d771717262
|
|
BLAKE2b-256 checksum How to use checksums |
bb34f0817607bff0e4b1f6da7c328cd06db69f6adbc5aec06be0b53ed06f0ca3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.1
|
Release files / articlequality-0.4.4-py2.py3-none-any.whl
| Download URL | articlequality-0.4.4-py2.py3-none-any.whl |
|---|---|
| Size | 56.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
eae688b3bf7d1c0b2a7b72e7c1bb92f18e40b604efb3ff138c091f68ed4e3b2d
|
|
BLAKE2b-256 checksum How to use checksums |
c471a732ea3f6296f8906956eaed94aeff6485890a49070528cc2f3088860946
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.1
|
Security for articlequality 0.4.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.