Fuseki Sparql service not able to refer to external rdf resources - sparql

I am not able to refer my sparql query to external rdf resources. I do not get any results. I am using Apache Fuseki. Could there be anything wrong in my settings? Thx.
PREFIX dc: <http://purl.org/dc/elements/1.1/>
SELECT ?title
FROM <http://dig.csail.mit.edu/2008/webdav/timbl/foaf.rdf>
WHERE { ?s dc:title ?title .}

Not from within Fuseki where FROM/FROM NAMED refer to graphs in the dataset being queried. This is what most people want. Long ago, it did pull from the web but that wasn't popular.
It works from the command line.

Related

Wikipedia Linked Data Fragments endpoint fails

I am trying to get alternative names of given names in WikiData with the following simple query:
PREFIX ps: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
CONSTRUCT {?s rdfs:label ?o}
WHERE { ?s ps:P31 wd:Q202444. ?s rdfs:label ?o}
LIMIT 1000
Initially, the query was much more complex, but I was getting time-outs on the public WikiData SPARQL endpoint. I decided to use Linked Data Fragments to offload some filtering from the server to the client.
$comunica-sparql "https://query.wikidata.org/bigdata/ldf" -f query > given_names.n3
Could not retrieve https://query.wikidata.org/bigdata/ldf?subject=http%3A%2F%2Fwww.wikidata.org%2Fentity%2FQ21147790&predicate=http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23label&page=3 (500: unknown error)
(where query is a file with the SPARQL query shown above). Unfortunately, the client tries to get output from the 3rd page, I am getting the error. Following the link in fact returns HTTP 500 error with
The link points to the 3rd page. It works if you try to go to the second page.
 
Is this a bug or a limitation of a service?
This is definitely a bug; the server does not fulfill the Triple Pattern Fragments specification if pagination does not work.

Why dbpedia result is not consistant

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 inconsistent behavior when I execute through java code :
Query query = QueryFactory.create(sb.toString());
QueryExecution qexec =
QueryExecutionFactory.sparqlService("http://dbpedia.org/sparql", query);
The experimental DBpedia SPARQL endpoint is made available as a public service, but as such it has no Quality-of-Service (QoS) guarantees.
You can set up your own DBpedia mirror in the Amazon AWS cloud, by spinning up the pre-populated and dynamically updated AMI. You can also set up a local mirror, by manually loading the DBpedia datasets into your own Virtuoso or other triple or quad store instance.
(ObDisclaimer: OpenLink Software produces Virtuoso and the DBpedia AMI, provides and maintains the public DBpdia endpoint, and employs me.)

owl:equivalentProperty relations between DBPedia and Yago

Is there any graph that contains mappings between equivalent properties in DBPedia and Yago? My application requires to "merge" triples that express the same meaning in both datasets, but I couldn't find any.
The following query returns an empty result at the Yago endpoint and only very few entries at the DBPedia endpoint.
prefix owl: <http://www.w3.org/2002/07/owl#>
select ?s ?o
where {
?s owl:equivalentProperty ?o .
}
There are some tools that automatically generated mappings between classes and properties of DBpedia and Yago. You can download some of these files here:
Yago to DBpedia linking

Simple SPARQL query of foaf RDF not working

I'm new at semantic web, where I learn basics, but I'm stuck at the beginning.
After reading this link: http://www.cambridgesemantics.com/semantic-university/sparql-by-example, I try some examples by myself, but without success.
For example, using OpenLink Virtuoso SPARQL Query Editor http://demo.openlinksw.com/sparql, I put at Default Graph URI this http://njh.me/foaf.rdf and simple query
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
select ?name
where
{
?person foaf:name ?name .
}
to get name of a person who is owner of this RDF file. Also, if I put following query
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
select ?name
where
{
?OnlineAcount foaf:name ?name .
}
nothing is happening.
Where I make mistake?
The same situation is with https://ai.wu.ac.at/~polleres/foaf.rdf, http://richard.cyganiak.de/foaf.rdf for the first query.
Any help at the beginning of my semantic tour will be appreciated :)
Thanks in advance.
Below the query input pane, there's an option for Sponging. You need to select the option Retrieve remote RDF data for all missing source graphs. Then you'll get results. However, the file that you mentioned actually has lots of foaf:name triples, not just one for the creator of the file. You might try select ?person ?name to see what else is in that data.

DBpedia SPARQL and predicate connection

I've got a problem with the DBpedia SPARQL endpoint because the properties of the properties like the label of rdf:type are not stocked in the endpoint. So when I run this query:
SELECT *
WHERE{
<http://dbpedia.org/ontology/Place> ?predicat ?object .
OPTIONAL{?predicat rdfs:label ?label}
}
I've got nothing for ?label.
If someone got any idea to solve this problem it would be very helpful.
You can't get the real labels from DBpedia because the SPARQL endpoint doesn't have them. But you can take the local name of the property URI. So, for rdfs:subClassOf you'd get "subClassOf". That's better than nothing. This can be done using Virtuoso's (non-standard) bif:regexp_replace function.
SELECT DISTINCT (bif:regexp_replace(STR(?p), "^.*[/#]", "") AS ?label) WHERE {
<http://dbpedia.org/ontology/Place> ?p ?o .
}
I don't think there's a SPARQL solution. Dbpedia doesn't have the data you want, and I couldn't easily find a SPARQL endpoint for that RDF at W3C. And I don't think the Virtuoso dbpedia endpoint supports federation yet, even if we did find a SPARQL endpoint for W3C.
Happy to be proven wrong on any of those points.