Skip navigation

Sign up | Lost password? | Help

Semantic Web at Opera

The SPARQL Engine is back up

, ,

There has been many urgent matters that we have attended to upgrading the Opera Community, and therefore, the SPARQL engine fell into neglect for a while, but that was only temporary! It is now back up, with 15 million triples. Be warned however, that not all data may be there, even though it has grown substantially. Also, it is now too big to build the way it has been built in the past, so it needs to be rewritten, which will take some time to do. Thus, it remains an experimental service for now.

A new semweb widget...Semantic Web programmers to come together

Comments

dantesoft 23. November 2006, 12:22

Can you tell me what I'm doing wrong here ?

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>

SELECT ?user ?wherelat ?wherelong WHERE
{ ?user foaf:nick "dantesoft" .
?user geo:lat ?wherelat .
?user geo:long ?wherelong .
}

I can't seem to find examples of multiple prefixes... The following works

PREFIX foaf: <http://xmlns.com/foaf/0.1/>

SELECT ?user ?where WHERE
{ ?user foaf:nick "dantesoft" .
?user foaf:based_near ?where .
}

if from Location68630 I can extract coordonates :D


Also, on http://my.opera.com/community/sparql/ shouldn't haavard's query return more than only the last posted image ?

kjetilk 24. November 2006, 15:33

First, the geo stuff would need to be written as:


PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>

SELECT ?user ?wherelat ?wherelong WHERE
{ ?user foaf:nick "dantesoft" .
?user foaf:based_near ?point .
?point geo:lat ?wherelat .
?point geo:long ?wherelong .
}


This is because you're based near a geo:Point, so, geo:Point is the class of things that have properties longitude and latitude. Every layer you add of that type adds complexity, as you can see, so we're careful about that when we design vocabularies, but it is also very useful to model things in classes.

I don't know why why haavard's stuff doesn't show, I've replaced it with my own, which does work. There could be a number of reasons for that, but I think really getting it right would have to remain for the Big Rewrite.

dantesoft 29. November 2006, 17:13

Can you help again ? I can't get to the date of birth, anything more than:
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX bio: <http://purl.org/vocab/bio/0.1/>

SELECT * WHERE
{ ?user foaf:nick "dantesoft" .
?user bio:event ?whenEv .
}
fails. I tried to follow the geolocation example, this works:
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>

SELECT * WHERE
{ ?user foaf:nick "dantesoft" .
?user foaf:based_near ?point .
?point ?verb ?obj .
}
but this does not:
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX bio: <http://purl.org/vocab/bio/0.1/>

SELECT * WHERE
{ ?user foaf:nick "dantesoft" .
?user bio:event ?whenEv .
?whenEv ?aa ?bb .
}
and so I can't deduce what to put in. Obviously, my first idea (?whenEv bio:Birth ?dob) fails miserably.

Please point me in the right direction. Again. :smile:

kjetilk 13. December 2006, 13:11

Sorry it took so long to respond. Awful amount of work to do here! :-)

Anyway, you're right, there is something strange here.

Something like:


PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX bio: <http://purl.org/vocab/bio/0.1/>

SELECT ?user ?bb WHERE
{ ?user foaf:nick "dantesoft" .
?user bio:event ?whenEv .
?whenEv bio:date ?bb .
}


should have worked, but it didn't for me either. I saw a few error messages in the last database build, and it may be that due to database restructuring, the date of birth failed to be included in the SPARQL database. So, next rewrite...!

Write a comment

You must be logged in to write a comment. If you're not a registered member, please sign up.

December 2009
S M T W T F S
November 2009January 2010
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31