0

I am aware that you can download a Wikidata dump file from here

But is it possible to only include results for a specific language?I have in the past worked with a json dump file and used python to parse it as well as this library to get the labels of properties such as P106 in english ("occupation"). But is this something that can be done for other languages as well?

2
  • Are you only after property labels in the target language, or more general content?
    – Andrew
    Jul 19, 2022 at 18:50
  • The properties and their values would be useful for me
    – Pasqual
    Jul 20, 2022 at 9:16

1 Answer 1

0

The dump files should contain all language content - Wikidata does not have different language editions and so there are no language-specific dumps. In general all items and properties exist in all languages - the difference is in the labels which are applied to them. (There are a few plain-text fields which are language specific, but not for things like "occupation")

The python library you mention is not one I'm familiar with, and it's confusing me a bit - WD doesn't give any particular priority or special status to English, but this only seems to return English labels/descriptions, which suggests to me that maybe it has hard coded a language selector somewhere. I wonder if you might be able to tinker with the code and just switch eg 'fr' for 'en' somewhere. I couldn't work out where that is set, though.

Alternatively, rather than use this API wrapper to get labels for a given property/item, you could try using and parsing the Wikidata query service results, or the Wikidata MediaWiki API - this will give you much finer control over languages returned etc. The WD data access page gives an indication of the various endpoints.

It depends a little on what you're trying to do - for "all properties and values on a specific item with labels in a specific language", the MediaWiki API is probably best; for "all values of a single property across all items with labels in a specific language", the query service is best.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.