Getting DBPedia Infobox categories

后端 未结 4 1527
半阙折子戏
半阙折子戏 2021-01-02 18:41

I\'m currently looking for a way to query DBPedia\'s Infobox Onyology database via the SPARQL endpoint to get a list of the classes, the subclasses of a selected class, and

4条回答
  •  灰色年华
    2021-01-02 19:19

    It's quite possible that some of the properties aren't actually defined as such with:

    ?p a rdf:Property .

    but any term in the middle position is by definition a property. So you might get more results with:

    SELECT ?prop ?title WHERE {
         ?country a .
         ?country ?prop [] .
         ?prop rdfs:label ?title .
    } 
    ORDER BY DESC(COUNT(DISTINCT ?country))
    

    (reordered slightly, being selective at the start may improve performance)

提交回复
热议问题