dbpedia

SPARQL query of Person using EasyRdf on DBpedia

白昼怎懂夜的黑 提交于 2019-12-12 06:14:28
问题 I want to get all information about a Person from the DBpedia SPARQL API. First problem is, the request took too long time. Second, I don't get back any information about the person I looked for. I don't know what I am doing wrong? My Code: require_once "EasyRdf.php"; require_once "html_tag_helpers.php"; // Setup some additional prefixes for DBpedia EasyRdf_Namespace::set('category', 'http://dbpedia.org/resource/Category:'); EasyRdf_Namespace::set('dbpedia', 'http://dbpedia.org/resource/');

RiotException when loading a Model using Jena 2.12.1

亡梦爱人 提交于 2019-12-12 06:10:06
问题 I've created this simple class named RDFReader for loading a model from a URI from DBpedia: import com.hp.hpl.jena.rdf.model.Model; import com.hp.hpl.jena.util.FileManager; public class RDFReader { public static Model readFromURL(String URL){ try{ return (new FileManager()).loadModel(URL); }catch(Exception e){ e.printStackTrace(); } return null; } public static void main(String[] args) { RDFReader.readFromURL("http://dbpedia.org/resource/Pacific_Rim_(film)"); } } I've used Jena v2.12.1 as

Why dbpedia result is not consistant

淺唱寂寞╮ 提交于 2019-12-12 02:08:48
问题 I'm executing the below SPARQL query PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?resource WHERE { ?resource a <http://dbpedia.org/ontology/Place> . {?resource rdfs:label 'Paris'@en.} UNION { ?resource rdfs:label 'France'@en.} } I'm executing this here. Sometimes I am getting required result and sometimes it returns 502 error ( I get the message that website is under maintenance.....) Can you please let me know why result is not consistent and how can I avoid this? Also

SPARQL query returning incomplete/inconsistent results

时光怂恿深爱的人放手 提交于 2019-12-12 01:47:12
问题 I am trying to run the following query to get all the properties of a resource: select distinct ?property where { <http://dbpedia.org/resource/Bildøy> ?property ?value } on http://dbpedia.org/snorql/ However, I only get a few results, and not the ones I was expecting. Most of the properties on this page are missing http://dbpedia.org/page/Bild%C3%B8y Could this be because of the ø-letter in the URI? The query seems to be working fine with other resources, but having the same problem with

Obtaining start and end date from a DBPedia CareerStation

天涯浪子 提交于 2019-12-11 23:35:59
问题 I am trying to write a query that will return my all CareerStation objects that are associated with Arsenal FC. Then I want to be able to get the start and end dates of these CareerStations, currently I can only get the start date. It may be that only the start date is in the DB but this doesn't make much sense to me. Also I would like to know if there is a way of formatting the date so to remove the parts that aren't the actual year. Thanks in advance for any pointers. PREFIX p: <http:/

Receiving HTTP header 406 error

半世苍凉 提交于 2019-12-11 20:22:36
问题 I am trying to invoke http://dbpedia.org/page/Los_Angeles in PHP with HTTP headers for an educational assignment I have been given. It must be this URL i.e. I am not allowed to use the JSON URL directly. <?php // Create a stream $opts = array( 'http'=>array( 'method'=>"POST", 'header'=>"Accept: application/json" ) ); $context = stream_context_create($opts); $url = "http://dbpedia.org/page/Los_Angeles"; $data = file_get_contents($url,false,$context); echo $data; ?> I'm facing this error:

Select a property value from dbpedia resource with SPARQL

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 19:49:44
问题 i'm trying to use SPARQL query on DBpedia. I can retrieve all information about a resource with this query: PREFIX db: <http://dbpedia.org/resource/ PREFIX prop: <http://dbpedia.org/property/> PREFIX onto: <http://dbpedia.org/ontology/> SELECT ?property ?value WHERE { db:Luciano_Ligabue ?property ?value }; Now I want to retrieve the value of just one property such as dbpedia-owl: birthDate. I'm trying in different way, but i can't retrieve the information needed. Can someone help me, please?

Results filtered out even though the data is there

ぐ巨炮叔叔 提交于 2019-12-11 17:33:18
问题 Here's my query: PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX : <http://dbpedia.org/resource/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT DISTINCT ?resource ?parentOrSpouse WHERE { ?resource a dbo:Royalty ; rdfs:label ?label ; dbo:parent ?parent ; dbo:birthDate ?bd ; dbo:birthPlace ?bp . ?bp dbo:isPartOf :England . FILTER(?bd < '1900-01-01'^^xsd:dateTime) . FILTER(?bd

How to check if a person exists on Wikipedia?

安稳与你 提交于 2019-12-11 17:22:52
问题 So I need a function. An example input would be like "donald trump" (I don't want it to be case-sensitive) If an article about the person exists on Wikipedia, function returns a summary and a picture. If not returns false Is this even possible? I couldn't figure out the correct API call. I've tried Wikidata API. It returns multiple objects for some inputs and I didn't know how to redirect it. 回答1: I created simple repo. You can check how it work on GitHub Page. This is search function: $('

Query DBpedia to get abstract for different inputs

空扰寡人 提交于 2019-12-11 16:26:09
问题 I have a question I need to build a single query to DBpedia such that, If I give any one of these as input like a City name or a person name or a Institute name or a Instrument name can I get its abstract as a output??? For instance, New York- New York is a state in the Northeastern and Mid-Atlantic regions of the United States...... Mars- Mars is the fourth planet from the Sun and the second smallest planet in the Solar System.... Michael Jackson- Michael Joseph Jackson was an American