Find the Wikidata element corresponding to an entity we know in DBPedia

Suppose we are interested in an entity in DBPedia, for example:

http://fr.dbpedia.org/resource/Mus%C3%A9e_Carnavalet (associated web page http://fr.dbpedia.org/page/Mus%C3%A9e_Carnavalet)

which describes the Caranavalet Museum.

We want to automatically find a possible entity in Wikidata describing the same entity.

In DBPedia, an entity is always associated with the Wikipedia page that was used to generate the DBPedia entity. This page is designated by the value associated with the property http://www.w3.org/ns/prov#wasDerivedFrom which makes it possible to give provenance information of the entity.

Here, the value is:

http://fr.wikipedia.org/wiki/Mus%C3%A9e_Carnavalet?oldid=110401968

By following this link, we can retrieve the corresponding Wikipedia page (and, by the way, all the original text). What will interest us is a tag with the id “t-wikibase”, if present, it’s a link to a Wikidata entity corresponding to the page. This link is in the href property of the <a> tag contained in the element with id “t-wikibase”.

<li id ​​= "t-wikibase">
  <a
    href = "https://www.wikidata.org/wiki/Special:EntityPage/Q640447"
    title = "Link to the repository item of the connected data [g]"
    accesskey = "g"> Wikidata element </a>
</ Li>

 

Its good. We found the Wikidata entity searched for:

https://www.wikidata.org/wiki/Special:EntityPage/Q640447

which redirect to the entity:

https://www.wikidata.org/entity/Q640447

 

This entry was posted in Data&Musée. Bookmark the permalink.