semantic web - SPARQL query not inferencing properties after class specified -
i running test query on sparql test inferencing. query follows:
prefix eem: <http://purl.org/eem#> prefix ns: <http://purl.org/net/ns/> prefix sc_data: <http://purl.org/net/ns/sc_data/> prefix dbp: <http://dbpedia.org/resource/> prefix dbpprop: <http://dbpedia.org/property/> prefix ex: <http://www.example.org/rdf#> select ?roa { service <http://dbpedia.org/sparql>{ ex:vaccine dbp:polio_vaccine. ex:vaccine dbpprop:routesofadministration ?roa. } }
i no results query when trying @ snorql page. when specify polio vaccine, shouldn't automatically inherit properties specified vaccine? need change?
in original query, ex:vaccine uri node, short <http://www.example.org/rdf#vaccine>. it's very unlikely dbpedia contains information it. while dbpedia endpoint may (or may not) include information inferrable dbpedia data, doesn't treat sparql query part assertion , part query.
you're literally saying "find values of ?roa such ?roa route of administration of ex:vaccine , ex:vaccine instance of dbp:polio_vaccine". ex:vaccine constant though, it's kind of saying, "find factors of 10, , way, 10 sum of 3 , 4." "10 sum of 3 , 4" isn't in data, though, there won't matches, if there recorded factors of 10. on top of that, dbp:polio_vaccine individual in dbpedia, not class, there won't instance of it.
instead, want ask values of dbpprop:routesofadministation property individual dbpedia:polio_vaccine. query need here (i'm using prefixes defined @ http://dbpedia.org/sparql, public endpoint):
select ?routes { dbpedia:polio_vaccine dbpprop:routesofadministration ?routes }
Comments
Post a Comment