Skip to content

Jupyter + pywikibot tools for batch migration of properties on Wikidata, to facilitate deprecation of properties.

License

Notifications You must be signed in to change notification settings

deryckchan/wikidata_property_migrator

Repository files navigation

wikidata_property_migrator

These are Jupyter + pywikibot tools for batch migration of properties on Wikidata, to facilitate deprecation of properties.

Files

  • Property migrator.ipynb: Original property migrator. Migrate Q1 P2 Q3 / P4 Q5 for given P2 and P4, and replace P4 with another P6.
    • Property migrator development.ipynb: Test scripts from the development of the original property migrator, preserved for later users reference, consult at your own risk.
  • Property migrator 2.ipynb: Move instances of P1/qual:P2 to P3/qual:P4, preserving all other qualifiers, references, and rank
  • Property migrator 3.ipynb: Move instances of P1 to P3, preserving all qualifiers, references, and rank

History

In 2016-17, a group of Wikidata editors who have like-native fluency in both European and Asian languages raised a discussion that the then-existent "as" Wikidata property (ID: P794) was a European language grammatical construct that had no equivalent in most East Asian languages. However, efforts to deprecate the property was initially blocked because there were over 20,000 statements using P794 at the time, and deprecation was initially deemed infeasible.

As one of the editors who pushed for deprecation, I developed and wrote the original property migrator to demonstrate that semi-automatic migration was technically feasible. Hence, the point of the original tool is to try to migrate instances of Q1 P2 Q3 / P4 Q5 for given P2 and P4, and replace P4 with another P6. See the Wikidata discussion on P794 ("as") for full context (where P4 was the "as" property to be disused in the original use case). Filtering by P2, P3, and Q5 were performed using Sparql queries and direct filtering of Python dicts generated by pywikibot.

About

Jupyter + pywikibot tools for batch migration of properties on Wikidata, to facilitate deprecation of properties.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published