Skip to content

Github mirror of wikibase/property-suggester-scripts - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)

License

Notifications You must be signed in to change notification settings

wikimedia/wikibase-property-suggester-scripts

Repository files navigation

Build Status Coverage Status

PropertySuggester Scripts

Contains scripts for PropertySuggester to preprocess the wikidata dump

Install

Run the command:

sudo apt-get install build-essential python-pip python-dev
python setup.py install

Usage

  • use dumpconverter.py to convert a wikidata JSON dump to csv (this can be obtained using extensions/Wikibase/repo/maintenance/dumpJson.php)
  • use analyzer.py to create a csv file with the suggestion data that can be loaded into a sql table
  • the PropertySuggester extension provides a maintenance script (maintenance/UpdateTable.php) that allows to load the csv into the database
python scripts/dumpconverter.py latest-all.json.bz2 dump.csv
python scripts/analyzer.py dump.csv wbs_propertypairs.csv
php extensions/PropertySuggester/maintenance/UpdateTable.php --file wbs_propertypairs.csv

Run tests

pytest .

Release Notes

3.0.0

  • Restructure repository
  • Using pytest instead of nosetests

2.0.0

  • Consider classifying Properties
  • use Json dumps for analysis

1.1

  • Generate associationrules for qualifier and references
  • Improve ranking to avoid suggestions of human properties
  • remove very unlikely rules (<1%)

1.0

  • Converts a wikidata dump to a csv file with associationrules between properties

About

Github mirror of wikibase/property-suggester-scripts - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages