Some cities aren't instances of city or big city? Odd behaviour of Wikidata

后端 未结 1 422
广开言路
广开言路 2020-11-27 23:39

While examining the results of the official example query \"Continents, countries, regions and capitals\" (on https://query.wikidata.org/, limited to Germany for your conven

相关标签:
1条回答
  • 2020-11-28 00:25

    These missing statements are not truthy:

    SELECT ?statement ?valueLabel ?rank ?best
    WHERE {
      wd:Q1733 p:P31 ?statement.
      ?statement ps:P31 ?value .
      ?statement wikibase:rank ?rank .
      OPTIONAL { ?statement a ?best . }
      SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
    }
    

    Try it!

    They are normal-rank statements, but there is a preferred-rank statement.

    Truthy statements represent statements that have the best non-deprecated rank for given property. Namely, if there is a preferred statement for property P2, then only preferred statements for P2 will be considered truthy. Otherwise, all normal-rank statements for P2 are considered truthy.

    Update

    I have decreased the rank of the preferred statement just now. Please test your query again.

    0 讨论(0)
提交回复
热议问题