Wikibase extensions on Wikidata.org

September 20, 2018 0 By addshore

Wikidata.org runs on MediaWiki with the Wikibase extension. But there is more to it than just that. The Wikibase extension itself is split into 3 different sections, being Lib, Repo and Client. There are also 6 other extensions all providing extra functionality to the site and it’s sisters. The extensions are also loaded on a different combination of Clients (such a Wikipedia) and the Repo itself (wikidata.org).

A diagram of current dependencies between the various Wikibase extensions running on wikidata.org

Of course wikidata.org runs even more extensions than this, but they are not specific to Wikibase functionality. The full list can be found on the Special:Version page. That page also provides a list of all libraries used on the site, many of which are specific to the Wikibase extensions being used, for example all data-values/*, and wikibase/* libraries.

Wikibase itself

The Wikibase extension can be thought of as the main element of the Wikibase machine. It is split into 3 rough sections, being repo, client and lib. Repo allows storing of structured entities within MediaWiki pages. The client allows access to the data stored within entities from regular MediaWiki pages (even from other sites). And Lib contains shared code that is used by both of these.

Wikidata itself is both a Repo and a Client, whereas sister sites such as Wikipedia and Wiktionary only run the Client code.

The Wikidata repo as standard contains the Item and Property entity types.

Q36875340

Quality extensions

WikibaseQuality and WikibaseQualityConstraints are two of three extensions created by a students bachelor project at Hasso-Plattner-Institute in Potsdam, Germany. The third extension, WikibaseQualityExternalValidation, was never loaded onto wikidata.org and is currently in the process of being archived.

WikibaseQuality aims to be the ‘Lib’ of the three extensions containing code shared between them, and thus must be loaded when either of the others is. However the current plan is to merge the two remaining extensions into a single WikibaseQuality extension.

The QualityConstraints extension helps users to ensure the quality of data within a Wikibase by running various constraint checks across entities on their statements.

An example constraint report page
File:Douglas Adams Constraint Violation.png
An example on page constraint violation (by 
Lucas Werkmeister CC BY-SA 4.0)

PropertySuggester

PropertySuggester does exactly what it says on the tin, it suggests properties to use for statements on entities. For example, if you create an item and give it a statement saying that it is an instance of human, it is highly likely that you will want to also set the “sex or gender” value.

Lexeme & MediaInfo

These two extensions provide extra entity types with specific uses in mind.

WikibaseLexeme is the new development providing Lexeme entities allowing structured lexicographical data. It could be thought of as a more structured Wiktionary. The Lexeme entities introduced a collection of new concepts, such as Forms, Senses, Glosses and more.

L4

WikibaseMediaInfo is currently in development by the Wikimedia Foundation and will be used on Wikimedia Commons to provide structured information within file pages.

Wikidata.org & WikimediaBadges

Finally we have the two smallest extensions.

Wikidata.org provides a small amount of message customization for wikidata.org itself, as well as some custom assets that we want to have loaded.

WikimediaBadges provides badge icons to be used on Wikimedia client sites in the “In other languages” sidebar.

These badges can differ from site to site, and if you want to make use of the sitelink badges functionality provided by wikibase you will probably have to load some assets in a similar way.