Reputation: 4514
I am trying to query dbpedia using sparql and running into a problem with brackets in the subject name. This query runs but returns nothing. If I try it on a similar Person without brackets it works.
PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>
SELECT * WHERE
{
<http://dbpedia.org/resource/Yves_Saint_Laurent_(designer)> dbpedia-owl:abstract ?abstract ;
dbpedia-owl:thumbnail ?thumbnail .filter(langMatches(lang(?abstract),"en"))
}
I have tried various characters to escape the brackets but nothing seems to works. Is there another way to get the data out?
Upvotes: 0
Views: 686
Reputation: 1441
I think that your problem is related to the fact that 'Yves Saint Laurent' doesn't have the property thumbnail.
Take a look at : Yves Saint Laurent on dbpedia
This query works :
PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>
SELECT * WHERE
{
<http://dbpedia.org/resource/Yves_Saint_Laurent_(designer)>
dbpedia-owl:abstract ?abstract
filter(langMatches(lang(?abstract),"en"))
}
I tested it on : http://dbpedia.org/sparql
Upvotes: 6