ad-freiburg / aqqu-frontend

An easy to use frontend for Aqqu
Apache License 2.0
2 stars 0 forks source link

Why is there no tooltip for 'Tokyo' or 'Asia'? #5

Closed graue70 closed 4 years ago

graue70 commented 4 years ago

Both cases can be seen with the query 'What is the capital of Japan?'.

graue70 commented 4 years ago

Both are part of the file 'qid_to_wikipedia_info.tsv'.

flackbash commented 4 years ago

Aqqu returns Freebase MIDs which then need to be mapped to Wikidata QIDs in order to provide tooltip information via the qid_to_wikipedia_info.tsv file. Aqqu returns the MID m.07dfk for the entity Tokyo which does not exist in the mid_to_qid15_combined.tsv mapping. The same holds for Asia.

However, by now, the Wikidata entity corresponding to Tokyo does have m.07dfk as a value for the property Freebase ID. So an update of our mid to qid mapping would probably not hurt.

hannahbast commented 4 years ago

@flackbash When you refer to "our mid to qid mapping", do you mean a particular file on our file system? The mapping can be easily computed on http://qlever.informatik.uni-freiburg.de/Wikidata_Full with the following SPARQL query

SELECT ?wikidata_id ?freebase_id WHERE {
  ?wikidata_id <http://www.wikidata.org/prop/direct/P646> ?freebase_id .
}
flackbash commented 4 years ago

Yes, I mean a particular file, namely /nfs/students/natalie-prange/wikidata_mappings/mid_to_qid15_combined.tsv

This mapping is a combination of several MID to QID mappings for Wikidata entities with a sitelink count >= 15: the Wikidata inherent MID to QID mapping (although a rather old version of it, at least a year old), the Samsung mapping and the SimpleQuestions mapping that @graue70 pointed me to. The Wikidata inherent part should probably be updated using your query.

flackbash commented 4 years ago

Additionally to the mapping being outdated, there were two problems with the generation of the mapping file. 1) To save space, the MID to QID mapping should only contain MIDs that map to a QID which appears in the qid_to_wikipedia_info.tsv file. However, the mapping was created for a previous version of the qid_to_wikipedia_info.tsv file which was missing some QIDs. Therefore the MID to QID mapping was missing some MIDs. 2) For QIDs that had several MIDs assigned to them (this was the case for Tokyo), only one of them was included in the mapping.

Both problems should be fixed now. Thanks for pointing it out!