Hi all,
I'm new to DBPedia and am working on a project that needs statistics
about countries. DBPedia seems to be the perfect resource for this data
as it's all there - I just seem to be having trouble getting at it! This
query worked the other day but out of the blue has stopped working and I
don't know why!
The query gets all of the properties for a specific country all the
associated values. Some of these properties are URIs and instead of
returning these I just wanted a string of text associated with that URI.
With this in mind the query is split into two parts, the first which
finds all of the URIs and finds the label associated with it. The second
part gets all of the properties that aren't URIs. I then union the two
to retrieve everything I want.
SELECT ?title ?value WHERE {
{
?country ?prop ?uri.
?country a<http://dbpedia.org/ontology/Country>.
?country rdfs:label ?label.
?prop rdf:type rdf:Property.
?prop rdfs:label ?title.
?uri rdfs:label ?value.
FILTER (lang(?value) = "en")
} UNION
{
?country ?prop ?value.
?country a<http://dbpedia.org/ontology/Country>.
?country rdfs:label ?label.
?prop rdf:type rdf:Property.
?prop rdfs:label ?title.
} FILTER (?label = "United States"@en && !isURI(?value))
}
Individually these work but the union, which worked a couple of days
ago, appears to break it.
For those who are interested the working prototype can be seen at
http://webapp.macrohard.co.uk
If you have any ideas what I'm doing wrong any help would be appreciated!
Many thanks,
Sam
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Dbpedia-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion