dbpedia

Query DBpedia with Sparql using VALUES

邮差的信 提交于 2019-12-25 18:43:27
问题 When I run this code in java I am getting error, I think the error occurred because of "String values". I am not sure about adding it but I got this idea from my previous question's answer which I asked in this site Query DBpedia to get abstract for different inputs public static void DbpediaResultSparql() { String values = "New York"; String service = "http://dbpedia.org/sparql"; String sparqlQueryString2 = "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>"+ "PREFIX dbpedia-owl: <http:/

how to find classes from dbpedia?

三世轮回 提交于 2019-12-25 18:33:51
问题 I need a sparql query that given a free text (user input), it finds me from dbpedia all the classes related to it. How do it? 回答1: Also asked here. Accepted answer said -- When you say classes, are you mean about types? If yes, try something like SELECT ?uri ?label ?type WHERE { ?uri rdfs:label ?label . ?uri <http://dbpedia.org/ontology/type> ?type . FILTER regex(str(?label), "Leipzig") . } limit 10 I couldn't let this go... PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX virtdrf:

Can't get any results from this SPARQL query

我怕爱的太早我们不能终老 提交于 2019-12-25 18:28:44
问题 I've asked a question before here Generate an incremental SPARQL query and thank god I manage to solve it. Here is my solution: private String completeQuery(String coreQuery){ String completeQuery = ""; completeQuery += "SELECT * WHERE {"+ "\n"; completeQuery += coreQuery + "\n"; completeQuery =completeQuery + "}" + "\n" +"limit 5" ; return completeQuery; } public String link(String object1, String object2, int distance){ if(distance == 1){ String Quer = "<http://dbpedia.org/resource/"

Trying to get the name of charity organisations with their locations-SPARQL

烂漫一生 提交于 2019-12-25 18:24:56
问题 I am trying to create a SPARQL query which gets the charity organisations and their location from DBpedia. Here is the link to one charity -- http://dbpedia.org/page/Stonewall_(charity). I am trying to get all the charities that exist with the names and location. I want to retrieve dbp:name along with dbo:headquarter . 回答1: You could try this: select distinct ?name (group_concat(?headquarter;separator=",")) where {?s a dbo:Organisation. ?s dbo:status "Charity". ?s dbp:name ?name. ?s dbo

filter out certain properties from sparql query result

蹲街弑〆低调 提交于 2019-12-25 17:28:05
问题 I'm trying to filter out certain properties (e.g dbpprop: ones) from the result of a sparql query. I'm querying dbpedia sparql endoint. More precisely what I'd like to do is expressed by the following pseudo code : quantity_of_interest, property, value, property_type = sparqlQuery(query) if property_type == rdf:Property: pass else: return quantity_of_interest, property, value For now, I filter out the properties afterwards in some python code and I use the following sparql query : SELECT

filter out certain properties from sparql query result

ぃ、小莉子 提交于 2019-12-25 17:27:09
问题 I'm trying to filter out certain properties (e.g dbpprop: ones) from the result of a sparql query. I'm querying dbpedia sparql endoint. More precisely what I'd like to do is expressed by the following pseudo code : quantity_of_interest, property, value, property_type = sparqlQuery(query) if property_type == rdf:Property: pass else: return quantity_of_interest, property, value For now, I filter out the properties afterwards in some python code and I use the following sparql query : SELECT

Virtuoso 42000 Error when using dbpedia sparql

大憨熊 提交于 2019-12-25 16:54:57
问题 I wrote a query in DBpedia SPARQL: select distinct ?s where { ?s rdf:type dbo:Writer. ?s rdf:type yago:LivingPeople. ?s dbo:birthDate ?year. FILTER (?year > 1964-01-01). } but it is showing: Virtuoso 42000 Error The estimated execution time 82850 (sec) exceeds the limit of 240 (sec). What is the problem? How can I solve this? 回答1: The error message tells you the problem -- processing the query is expected to take 82850 seconds, but the server is set to only run for 240 seconds. You can solve

SPARQL - select from skos:category - Virtuoso 37000

▼魔方 西西 提交于 2019-12-25 08:39:35
问题 I have problem with SPARQL. I want to select something from category. For example subjects. I make query like this in http://dbpedia.org/snorql. SELECT ?category ?subject WHERE { ?category a skos:Concept . ?category skos:Concept: American_punk_rock_guitarists. ?category dct:subject ?subject . } LIMIT 1000 I have error Virtuoso 37000. I don't understand why. P.S. Is it good book for beginnier in SPARQL - Learning SPARQL, 2nd Edition Querying and Updating with SPARQL 1.1 ? 回答1: You have at

Finding corresponding State for POIs using skos:broader

牧云@^-^@ 提交于 2019-12-25 03:34:04
问题 I am trying to collect POIs per State in the United States. The original query was select distinct ?s ?state where { ?s a dbpedia-owl:Place; dcterms:subject/skos:broader{,9} ?state . ?state skos:broader category:Buildings_and_structures_in_the_United_States_by_state . filter contains(str(?state),'_in_') . filter(!contains(str(?state),'United_States')) } The filter portion was to find the US states(shown below) such that, at the end we know each POI belongs to what state. The approach did not

Federated SPARQL query in dbpedia and wikidata: Few questions

让人想犯罪 __ 提交于 2019-12-25 00:28:24
问题 I have following query: # endpoint used: https://query.wikidata.org/ # # PREFIX wd: <http://www.wikidata.org/entity/> # PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbp: <http://dbpedia.org/resource/> SELECT DISTINCT ?musicianLabel WHERE { { # *** dbpedia *** SERVICE <http://dbpedia.org/sparql> { #SERVICE <http://lod.openlinksw.com/sparql> { ?musician a dbo:Person . { # person, who has musical genre xy ?musician dbo:genre ?genre . }