sparql

Get all nodes in a transitive relation

巧了我就是萌 提交于 2019-12-18 08:35:26
问题 Is it somehow possible to get the list of nodes connected through a transitive relation with SPARQL? I have elements that are connected in this way: ?a g:eastOf ?b ?b g:eastOf ?c … Not all nodes are connected with each other, because some are further down south. Only when nodes are vertically in the same plane there might be a g:eastOf relationship. This means there are several groups of nodes that are not connected with each other. I'd like to get all these groups of nodes (basically a list

Getting hyperlinks of a Wikipedia page using DBpedia

耗尽温柔 提交于 2019-12-18 07:17:29
问题 I have two resources in DBPedia: dbr:Diabetes_mellitus and dbr:Hyperglycemia. In Wikipedia, the corresponding pages are wikipedia-en:Diabetes_mellitus and wikipedia-en:Hyperglycemia. In Wikipedia there is a hyperlink from Diabetes_mellitus page to Hyperglycemia page. But when I try to find the link between the 2 resources in DBpedia, I cannot find it. I tried to find the link using the following SPARQL query. SELECT ?prop WHERE { { dbr:Diabetes_mellitus ?prop dbr:Hyperglycemia } UNION { dbr

Work around to query DBpedia for two keywords

一世执手 提交于 2019-12-18 06:58:09
问题 I want to query DBpedia for multiple keywords, apparently I have to search for an exact substring, so if I want the page about Egyptian Pyramids , searching for Egypt Pyramids won't work, but that's exactly what I need.. So I was thinking maybe I can see if the concept "Pyramids" has anything to do with "Egypt", by searching through the relations, but I am finding it difficult to come up with the sparql query needed for that BTW I query through: http://dbpedia.org/sparql 回答1: Trying to

Using SPARQL to locate a subject with multiple occurrences of same property

笑着哭i 提交于 2019-12-18 06:54:33
问题 I am trying to use SPARQL to return triples where the same subject has multiple objects for the same property, like so: example:subject1 example:property example:object1 example:subject1 example:property example:object2 I feel like such a query should make use of property paths: SELECT ?subject WHERE { ?subject example:property{2} ?object . } I'm running this property-path query using Jena 2.6.4, but I'm not getting any results. Is this due to Jena? Or am I phrasing the query incorrectly? The

Load DBpedia locally using Jena TDB?

梦想的初衷 提交于 2019-12-18 03:35:35
问题 I need to perform a query against DBpedia: SELECT DISTINCT ?poi ?lat ?long ?photos ?template ?type ?label WHERE { ?poi <http://www.w3.org/2000/01/rdf-schema#label> ?label . ?poi <http://www.w3.org/2003/01/geo/wgs84_pos#lat> ?lat . ?poi <http://www.w3.org/2003/01/geo/wgs84_pos#long> ?long . ?poi <http://dbpedia.org/property/hasPhotoCollection> ?photos . OPTIONAL {?poi <http://dbpedia.org/property/wikiPageUsesTemplate> ?template } . OPTIONAL {?poi <http://www.w3.org/1999/02/22-rdf-syntax-ns

Get all properties for a DBpedia class

♀尐吖头ヾ 提交于 2019-12-17 23:38:19
问题 How to get a list of properties for a specific class? Consider the class dbpedia-owl:Person. All instances of the Person class have some properties prefixed with dbpprop: . How can I get all the dbpprop: properties that we may find for all the instance of the Person class? 回答1: The one that works is: select distinct ?property where { ?property <http://www.w3.org/2000/01/rdf-schema#domain> <http://dbpedia.org/ontology/Person> . } In this query you are asking for all the properties that have

What is the semantic web? [closed]

て烟熏妆下的殇ゞ 提交于 2019-12-17 21:40:07
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 years ago . I've heard a lot about the semantic web but I'm still not exactly sure what it is. How will it be different to the web we know now? 回答1: How will it be different to the web we know now? Right now the HTML+CSS is centered more on structure and presentation. Semantics is about the

Sparql insert data not working

女生的网名这么多〃 提交于 2019-12-17 20:55:20
问题 I'm a newbie to Sparql, but I am unable even to make a simple insert data query, or so it seems. I'm using Apache Fuseki as working server; I'm in a graph, and I'm trying to make this query work: PREFIX oa: <http://www.w3.org/ns/oa#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> INSERT DATA{ [ a oa:Annotation ; rdfs:label "Title"; ] . } But it doesn't matter what I do, I keep getting this error: Error 400: SPARQL Query: No 'query=' parameter This is even a semplified code, I tried many

Querying a Graph path in SPARQL

依然范特西╮ 提交于 2019-12-17 20:41:24
问题 I am trying to write a SPARQL query to return a path from a source to a destination. Below is the Turtle file representing the data set. @prefix node: <http://prism.uvsq.fr/>. @prefix edge: <http://prism.uvsq.fr#>. node:a edge:p node:b. node:a edge:q node:f. node:a edge:p node:g. node:b edge:p node:c. node:c edge:q node:h. node:c edge:p node:i. node:c edge:p node:d. node:d edge:p node:e. node:f edge:p node:g. node:f edge:q node:l. node:f edge:p node:k. node:g edge:p node:c. node:g edge:p node

obtain the matrix in protege

馋奶兔 提交于 2019-12-17 20:26:19
问题 My work is about library book of recommendation systems . that as input I need book Classification ontology . in my ontology classify library books. this classification has 14 categories, beside the sibling classes Author, book, Isbn. Individuals in book class are book’s subject(about 600 subjects) , and individuals in author class are name’s author and also isbn class. I design this ontology with protege 4.1. also I collected and Have got in part of belong book to categories manually. That a