-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Never show QID, always show human-readable text #260
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
Comments
Hm, the first few items of the Wiki Needs Pictures CSV file is in Japanese I think? Interesting that some items have a QID and some have the translated name. Is this something we need to report to the Wiki Needs Pictures project, or can we fix it ourselves (say, by searching the Wikidata API for that QID or such?). |
I hadn't thought about implementation much. We should indeed add an enhancement request to wiki-needs-picture once we agree on what we need. |
One quick option would be to dynamically retrieve sitelinks (and perhaps up-to-date labels) using the Wikidata API. [1] For example, the jawiki sitelink of Q11661218 https://www.wikidata.org/w/api.php?action=wbgetentities&ids=Q11661218 gives you something similar to a Japanese label:
Even better, to avoid using data from every client, we could ask the project to include these sitelink titles in the CSV. [1] https://www.wikidata.org/w/api.php?action=help&modules=wbgetentities |
Another fallback would be to display the value of the p31 statement. Those should have the maximum amount of translations. So for a unknown bridge it would say: A bridge (from p31 = Q12280; https://www.wikidata.org/wiki/Property:P31 and https://www.wikidata.org/wiki/Q12280). |
I am wondering if it would be easier to switch to query.wikidata because we can customize the query in more ways, then through the list. This for example would allow more fallback languages and the user specifying the distance they want to search: We also get the instance-of target item, so we can match the Q-ID to the icon. It would also allow for really easy filtering. Only museums for example (in a 5 km radius): |
(edited) My comment here was rather unrelated to QIDs, so I posted as a new issue: |
I think the Wikidata approach is promising. Some optimization/caching strategies might have to be devised to reduce the frequency of querying, though. It seems that Wikidata queries take some time for the server to compute, not just the client to retrieve. It might be reasonable to do a "mid-size" query initially to construct a prefecture/city level table. The app can then show the (possibly a bit inaccurate) near-by list of the current location without delay, while simultaneously issuing a new query to update it and make it more accurate. It should also be possible to combine the current implementation and the idea of updating. Having two kinds of backends might be more complicated, though. |
@whym : Is it really too slow? |
Okay, with a more close look, it seems mostly workable without complicated caching. It just can be slow, depending on the query. http://tinyurl.com/hzt8glu 5 km radius for "Tokyo" - 1201 Results in 3881 ms It appears a bottleneck is the number of results. As tobias47n9e suggested, if you add a filter (like "musely only"), the results will be less and the response quicker. If we can allow the user to choose from various filters including entity types and radius sizes interactively, that would be great. (maybe with a hard limit on the number of results.) A 5 km radius might be too large (and too slow) for place like Berlin and Tokyo, while it shouldn't be too large for areas less covered by Wikidata. |
I asked about universal fallback but no satisfying answer yet: |
Sample showing how to get a Wikidata item's label in English if available and in any other language if no English label is available: |
I believe there's room in the UI for more data anyway. Some properties are more useful than others for identifying an object. Here are a few suggestions: *Label (if present; if not, try to find a label in a different language, or even resort to an Interwiki link) In the unlikely event that all these properties are present, maybe drop the least important ones. Or maybe just make more room vertically on the screen? PS: An option to open the Wikidata item in the browser, if all else fails, would also be welcome. |
Thanks for the feedback, good ideas! Note: Room in the UI is not a big problem. To get more space, when the item is clicked, a "details view" could open containing as many details as we want (Wikipedia article in a WebView frame, Wikidata properties in another tab, links to various map and streetview-type services, maybe even nearby existing Commons images, etc) |
This should have been fixed, yeah? |
Yes, this is fixed! |
In Nearby, https://www.wikidata.org/wiki/Q11661218 is shown as "Q11661218" because no English name is available.
In non-English speaking countries, most items don't have an English name.
Showing a QID is the most user-unfriendly thing, we should always show human-readable text, in this order of preference:
The text was updated successfully, but these errors were encountered: