(This page is still under construction.)
Some help (such as sample SPARQL queries) can be found on
answers.semanticweb.com and/or
Stack Overflow. The most recent 10 posts for each site should be seen in the Feeds section, lower down on this page. Full searches are linked here --
-
answers.semanticweb.com entries tagged with dbpedia
-
answers.semanticweb.com entries mentioning dbpedia
-
Stack Overflow entries tagged with dbpedia
-
Stack Overflow entries mentioning dbpedia
If the information you need cannot be found there, you can:
- create a new post on one of the Overflow sites and use the tag dbpedia
- check the DBpedia support page .
Feeds
(Still not displayed correctly, we are working on aggregating the feed)
How can I extract data from Wikipedia's list pages?
Essentially, what I am trying to achieve is extract the name and country of birth of every composer from this Wikipedia list. This is my first attempt ever at using SPARQL, but here's what I've managed so far:
SELECT ?name ?birthplace WHERE {
?person foaf:name ?name .
?person dbpedia2:placeOfBirth ?birthplace .
?person <http://purl.org/dc/terms/subject> <http://dbpedia.org/resource/Category:Women_classical_composers> .
?country rdf:type dbpedia-owl:Country .
FILTER (str(?birthplace) = str(?country))
}
ORDER BY ?name
I'm running this through dbpedia's SNORQL and while I get an output in the format I want, I'm only using results from the "Women classical composers" Wikipedia category which only covers a portion of what is displayed in the "List of female composers by name" list. I've tried finding categories common to all the composers in the list which would allow me to select them with relative ease, but couldn't find any which were truly all-encompassing.
I do realise my question is rather similar to this one, but I unfortunately could not figure out my problem after reading this.
cleaning dbpedia 3.7 dump to load into virtuoso local server
I am trying to load the triples of dbpedia 3.7 dump (english only) in my local virtuoso server, the files are huge when uncompressed, when I'm using SQL commands to load files one by one like:
DB.DBA.TTLP_MT_LOCAL_FILE ('./geo_coordinates_en.nt','', 'geoCoordinates');
it soemtimes returns error inside the files themselves, after doing some research, I found that some urls in the triples are much larger than 1024 characters,
I found that some people run scripts on the files to clean them from such faults, but still some other errors of another kinds appear when uploading triple files to the virtuoso server using the above commands
this is an example of errors when loading the images_en.nt file
*** Error 37000: [OpenLink][Virtuoso ODBC Driver][Virtuoso Server]SP029: TURTLE RDF loader, line 1806041: Invalid characters in angle-bracketed name; this error can be suppressed by parser flags at < http://upload.wikimedia.org/wikipedia/com mons/thumb/e/e3/Guitar %28Zappa%29.jpg/200px-Guitar %28Zappa%29.jpg>
I'm wondering is there's a 'clean' virtuoso-friendly version of the dbpedia dump??
Uploading dbpedia .net dump files to local Virtuoso server
I have set up my virtuoso server on windows, now it works on 'localhost:8890' , the dashboard at 'localhost:8890/conductor' works fine, now I'm trying to upload the dbpedia triples dump files to the server.
I tried the conductor 'semantic web' tab to upload triple files, it works fine with the small triple files , but on most files it returns invalid input file error
I also tried the API function through CMD:
DB.DBA.TTLP_MT_LOCAL_FILE ('./geo_coordinates_en.nt','', 'geoCoOrdinates');
it mostly works, but sometimes also it returns an error in a certain triple in a file and stops uploading the whole file
I finally tried to put all the .nt files in a folder in the database folder of the virtuoso folder, then I made the following through the API:
SQL> ld_dir ('tmp', '.', 'http://dbpedia.org');
Done. -- 47 msec.
SQL> rdf_loader_run ();
and it's still running since last night (about 14 hours now) , I'm not sure it's still working or something happened, but the dashboard takes forever to load and doesn't load.
Am I on the right track or not ? The files are about 17GB total, normally the 1.5GB file loaded in 10 minutes...
sparql, dbpedia search movies by keywords in title?
I search by keywords in the field title and I get "The group does not contain triple pattern with '$film_title' object before bif:contains() predicate". Only the search by keywords in the film abstract works. What am I doing wrong?
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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 dc: <http://purl.org/dc/elements/1.1/>
PREFIX : <http://dbpedia.org/resource/>
PREFIX dbpedia2: <http://dbpedia.org/property/>
PREFIX dbpedia: <http://dbpedia.org/>
PREFIX ont: <http://dbpedia.org/ontology/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT DISTINCT ?film_title ?film_abstract ?cinematography ?gross ?editing ?narrator
WHERE {
?film_title rdf:type <http://dbpedia.org/ontology/Film> .
?film_title rdfs:comment ?film_abstract .
OPTIONAL {?film_title ont:cinematography ?cinematography .}
OPTIONAL {?film_title ont:gross ?gross .}
OPTIONAL {?film_title ont:editing ?editing .}
OPTIONAL {?film_title ont:narrator ?narrator .}
OPTIONAL {?film_title ont:editing ?editing .}
FILTER(bif:contains(?film_abstract, "war")) .
FILTER(bif:contains(?film_title, "war"))
}
Sparql Query: how to retrieve Wiki link for person?
I am searching for famous people on Wiki with the query below. How can i also SELECT the link to the Wiki page of the ?person ?
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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 dc: <http://purl.org/dc/elements/1.1/>
PREFIX : <http://dbpedia.org/resource/>
PREFIX dbpedia2: <http://dbpedia.org/property/>
PREFIX dbpedia: <http://dbpedia.org/>
PREFIX ont: <http://dbpedia.org/ontology/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name ?date (bif:substring(STR(?date), 1, 4) AS ?year) WHERE {
?person ont:birthDate ?date .
?person foaf:name ?name
. FILTER ( (fn:string-length(STR(?date)) = 10) && (bif:substring(STR(?date), 9, 2) = '06') && (bif:substring(STR(?date), 6, 2) = '02') && (?date > "1868-01-02"^^xsd:date) && (?date < "2003-01-01"^^xsd:date) )
}
Retrieving DBpedia resource using text keywords search
I have been trying to get a DBpedia resource using keyword search in the SPARQL. I tried FILTER but it caused query timeout everytime I executed query. I was a bit successful using bif:contains function, however, I couldn't get that query working using Jena ARQ API as Virtuoso has not yet opened the SPARQL port for DBpedia yet. The query I'm trying looks something like this
PREFIX dbprop: <http://dbpedia.org/property/>
PREFIX dbpont: <http://dbpedia.org/Ontology>
SELECT *
{
?orgnzn a <http://dbpedia.org/ontology/Organisation>.
?orgnzn rdfs:label ?lbl.
FILTER(regex(?lbl,"Harvard University","i")).
?orgnzn dbpont:City ?city.
?orgnzn dbrop:Country ?country
}
LIMIT 5
Description:Find a university whose name matches with ($string), and get me the City and Country of that university. 'university' is an example, but it could be any 'organization'. And the ($string) is multi-word.
How can I get this query working on DBpedia endpoint?
The broad information need: I want retrieve a DBpedia resource of any type of organization and fetch its City & Country information. So this organization could be anything eg 'Harvard University'/'Microsoft'/'Dell',etc. I thought I could get its location info from DBpedia. So do reply if there are other ways/sources to get this info too.
Thanks!
simple sparql query not working, dates comparison
I get "SR171: Transaction timed out" on the dbpedia sparql endpoint, for the following simple query: Why do I get this error? I don't set any timeout - it's on 0.
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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 dc: <http://purl.org/dc/elements/1.1/>
PREFIX : <http://dbpedia.org/resource/>
PREFIX dbpedia2: <http://dbpedia.org/property/>
PREFIX dbpedia: <http://dbpedia.org/>
PREFIX ont: <http://dbpedia.org/ontology/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name ?date (bif:substring(STR(?date), 1, 4) AS ?year) WHERE {
?person ont:birthDate ?date .
?person foaf:name ?name
. FILTER ( (fn:string-length(STR(?date)) = 10) && (bif:substring(STR(?date), 9, 2) = '05') && (bif:substring(STR(?date), 6, 2) = '02') && (?date > "1868-01-01"^^xsd:date) && (?date < "2005-01-01"^^xsd:date) )
Transitive DBPedia/virtuoso instance queries in sparql
Is there a way to get from dbpedia's virtuoso's server all instances of a type <class> and of the subclasses of this <class>. I found some documentation about transitive queries in virtuoso but not sure how to use it.
If there isn't a way to get all of that with a single sparql query, what will then be the preferred query sequence?
Authoritative dbpedia URIs corresponding to country codes
Is there a service that provides the authoritative dbpedia URI corresponding to the two letter country code. Further, is there a service that provides any authoritative URI corresponding to a country code?
Thanks
Both DBpedia and Freebase support the concept of redirection. DBpedia has the dbpontology:wikiPageRedirect property, and freebase has fbase:/dataworld/gardening_hint/replaced_by.
I think both of these predicates mean that "the topic formerly known as ?subject is now known as ?object", it's like the message you get on the phone when a phone number has changed. Is there some ?standardProperty such that
dbpontology:wikiPageRedirect,fbase:/dataworld/gardening_hint/replaced_by
rdfs:subPropertyOf ?standardProperty .
?
It seems that the redirection concept is related to the 300-family status codes in HTTP, which specify 4 types of redirect with specific semantics for the client. It seems also that redirection could be made more specific as to the reason for the redirection -- I could see either having N different redirection predicates or otherwise reifying the redirection event.
Is there anything out there, simple or complex, to represent redirection that isn't tied to a particular product?
How to access permanently removed pages using SPARQL?
deserializing json object from SPARQL query by gson error
When will the next (3.8 or later) set of DBPedia dumps be available?
sparql query with special characters
502 Timeout while querying dbpedia with the Jena framework
out of memory exception while loading a huge DBpedia dump
downloading and setting up the dbpedia dump
POST Response Length is Non-Zero, but Read is Empty
Information
Last Modification:
2011-07-24 20:04:59 by Sebastian Hellmann