Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include English preflabel when searching Wikidata entities #1196

Open
rschalkrce opened this issue Dec 21, 2023 · 5 comments
Open

Include English preflabel when searching Wikidata entities #1196

rschalkrce opened this issue Dec 21, 2023 · 5 comments
Assignees

Comments

@rschalkrce
Copy link
Contributor

rschalkrce commented Dec 21, 2023

Users remark that they cannot find all entities in Wikidata because some only have an English preflabel. E.g. https://www.wikidata.org/wiki/Q110519238

Seems to me a good idea to also include English preflabels in the Wikidata search query?

@coret
Copy link
Contributor

coret commented Dec 21, 2023

I cannot reproduce this issue?

image

@rschalkrce
Copy link
Contributor Author

That is the wrong one: it should also give http://www.wikidata.org/entity/Q110519238 (Agnes van Reede) not only https://www.wikidata.org/wiki/Q76021380 (Agnes van Reede van Drakesteijn)

@rschalkrce
Copy link
Contributor Author

It also goes for this one: https://www.wikidata.org/wiki/Q11834071 (also no Dutch label)

@rschalkrce
Copy link
Contributor Author

rschalkrce commented Dec 21, 2023

Proposed solution for the search query:

FILTER(LANG(?rdfs_label) = "nl" || LANG(?rdfs_label) = "en") OPTIONAL { ?item skos:altLabel ?altLabel . FILTER(LANG(?altLabel) = "nl" || LANG(?altLabel) = "en")}

This retrieves both of the provided Q entities that only have an English label

@EnnoMeijers
Copy link
Contributor

This works indeed despite of the option bd:serviceParam mwapi:language "nl" in the query. Can somebody explain what the effect is of this option?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants