Semanticmediawiki: Wikidata and SMW

Created on 18 Aug 2019  路  7Comments  路  Source: SemanticMediaWiki/SemanticMediaWiki

This tread is intended to discuss possible integrations of SMW instances with Wikidata

Out of the box

Out of the box it is possible to use datatype external identifyer or service links [1] when you define a property e. g. "Wikidata ID" and (manually) add the Q-numbers of Wikidata.

However, there should be better options:

Page forms input

Using the page forms and external data extensions, it should be possible to query the Wikidata API to make form inputs autocomplete on values from Wikidata, e. g. a list of countries.

Importing vocuabulary

SMW is pretty awesome at being able to very easily importing vocabulary [2]. This can probably be extended to Wikidata ontologies.

Reconciliation

There is a openrefine reconciliation service available [3]. This could be used in SMW, maybe in a separate extension. The use case is e. g. to define a category "Persons" in your wiki and to have the opportunity to reconcile for matching items in wikidata. Usage of this could probably be done by defining special properties on propert pages, as it is done with allows pattern [4]

Pushing data to Wikidata

Via the Wikidata API, SMW based installations could push annotations to Wikidata.

I'm interested to hear what others think...

[1] https://www.semantic-mediawiki.org/wiki/Help:Service_links#Difference_between_Service_links_and_External_identifier
[2] https://www.semantic-mediawiki.org/wiki/Help:Import_vocabulary
[3] https://github.com/OpenRefine/OpenRefine/wiki/Reconciliation
[4] https://www.semantic-mediawiki.org/wiki/Help:Special_property_Allows_pattern

question seeks developer

Most helpful comment

Further reference: https://commons.wikimedia.org/wiki/File:Research_Report_%E2%80%93_Use_of_Wikidata_in_GLAM_institutions_(2019-11).pdf

All 7 comments

Page forms input
Using the page forms and external data extensions, it should be possible to query the Wikidata API to make form inputs autocomplete on values from Wikidata, e. g. a list of countries.

While this maybe relevant to a wider circle, page forms and external data extensions are not part of the SMW environment and therefore cannot be lied upon to be used as part of any SMW specific solution or discussion that targets the "Wikidata and SMW" premise.

As to why, using extensions that are not directly part of the SMW environment would create an indirect dependency with proposed solutions suddenly introduce a hard requirement on those. Solutions may recommend some extension to ease the user input but should only be discussed as addendum but not be part of any integrative solution that targets a technical or process solution.

On the other hand, if you create an extension that explicitly targets some of the points raised in terms of creating a tighter integration then this would be appropriate given the extension has one specific purpose meaning to improve the integration between Wikibase (and/or Wikidata) and SMW.

Pushing data to Wikidata
Via the Wikidata API, SMW based installations could push annotations to Wikidata.

I think we need to distinguish here, Wikidata is the instance that is run by the WMF to collect structured data to be used in WMF projects (and beyond as data hub). Wikibase is the software that powers Wikidata, so I think pushing data from some (arbitrary) SMW instance to Wikidata seems rather misleading where instead if you talk about a local Wikibase installation to require some data exchange that seems a more probable and likely scenario.

From a technical point you are right: it would be pushing data into a wikibase instance (in my example:Wikibase). From a use-case-scenario it is more likely as Wikibase already exists and Wikibase instances outside of WMF are rare at the moment.
A SMW instance can very easily provide machine-readable data with an CC0-license making it perfect for addint it to wikidata, but there is no decent process currently (you can import an JSON-result format in openrefine, do some foo with it and push it into wikidata). But I guess, a simpler and integrated opton would be a great feature for SMW and reduce the need for external wikibase instances.

Of course, pulling data from Wikidata to complement (or automate) the declaration of properties to be used by SMW is a different matter.

Is the first comment still accurate after this discussion so far?

For reference: Lessons Learned from Project Passage describes a evaluation project of Wikibase/Wikidata for libraries.

Further reference: https://commons.wikimedia.org/wiki/File:Research_Report_%E2%80%93_Use_of_Wikidata_in_GLAM_institutions_(2019-11).pdf

Was this page helpful?
0 / 5 - 0 ratings