MegaScenes / dataset

70 stars 0 forks source link

Where can I find the WikiData class? #3

Open gmberton opened 4 weeks ago

gmberton commented 4 weeks ago

Hi, in the paper at Fig. 3 on the left it is shown "the frequency of scenes grouped by WikiData class", where the classes are things like "religious building" and "monument". Where can I find the WikiData class for each scene? I downloaded the wikidata directory but can't find it even there

jot-jt commented 3 weeks ago

Hi, thanks for bringing this up. Sorry, the metadata was not uploaded before. I uploaded the scene hierarchy at s3://megascenes/metadata/scene_taxonomy.json (HTTPS URL).

This file is a dictionary. The key is the child, and the value is a list of parents that the child is a direct instance of. Each string is formatted as {name}_{qid}. For example, one (key, value) pair is

'Franzensfeste_Fortress_Q212164': [
    'fortress_Q57831',
    'real property_Q684740',
    'specialised museum_Q58632302',
    'military museum building_Q112132534',
    'history museum_Q16735822',
    'historical park museum_Q112132527'
]

Franzensfeste_Fortress_Q212164, represents the Wikidata page for Franzensfeste Fortress, and each item in the list of parents has its own entry in the dictionary. The parent can be recursively used as the key until the highest part of the hierarchy is reached.