0

I want to use wikidata for MultiLabelClassify. I don't understand the struct of wikidata, I want get all the labels from a entity of wikidata. Could you give me some suggestion?

  • 2
    Does this answer your question? [How to get Wikidata labels by ID using SPARQL?](https://stackoverflow.com/questions/40268148/how-to-get-wikidata-labels-by-id-using-sparql) – Kiran Dash Dec 23 '19 at 09:16

1 Answers1

0

Either use Wikidata Query Service (see link by Kiran) oder use the MediaWiki API.

With the MediaWiki API, you can get all labels of an entity by calling: https://www.wikidata.org/w/api.php?action=wbgetentities&props=labels&ids=ENTITYID

For example for entity Q42: https://www.wikidata.org/w/api.php?action=wbgetentities&props=labels&ids=Q42

Pascalco
  • 2,481
  • 2
  • 15
  • 31