Cheers for your reply! Aaah, I see that the current public version of the
program doesn’t pull the data to the right place on the display (so you can’t
see it at the minute) but that should be fixed shortly.
The issue is that I don’t particularly want the URI itself, just the text.
For now we’ve got a work around which does the two queries and combines them
our end which does the job so don’t worry too much - it’d just be interesting
to know why it doesn’t work!
Many thanks,
Sam
From: Kingsley Idehen
Sent: Wednesday, 12 June 2013 16:50
To: [email protected]
On 6/12/13 11:24 AM, Sam Esgate wrote:
> 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
We'll look into what happening here. In the meantime, if you application
is using DBpedia URIs, why can I actually access those URIs? For
instance, have you look at some of the guidelines for attributing use of
DBpedia?
You simply need to do one of the following:
1. anchor labels with DBpedia URIs using <a/>
2. use <link/> via @rel in <head/> to associate your HTML pages with
DBpedia URIs that are data sources for the HTML page
3. ditto using "Link: " response headers .
In your case, I think you are close to #1 if you could replace the local
identifiers with DBpedia URIs.
Kingsley
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> 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
>
>
--
Regards,
Kingsley Idehen
Founder & CEO
OpenLink Software
Company Web: http://www.openlinksw.com
Personal Weblog: http://www.openlinksw.com/blog/~kidehen
Twitter/Identi.ca handle: @kidehen
Google+ Profile: https://plus.google.com/112399767740508618350/about
LinkedIn Profile: http://www.linkedin.com/in/kidehen------------------------------------------------------------------------------
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