> I'm trying to learn how to query the datasets but got a hard time
> getting my own queries working. I do not understand for example
> why that query below, linked from the Datasets page on the site,
> does not work (no result):
>
> SELECT ?subject ?label ?released ?abstract WHERE {
> ?subject rdf:type
> <http://dbpedia.org/class/yago/MotionPictureFilm103789400>.
> ?subject dbpedia2:starring <http://dbpedia.org/resource/Tom_Cruise>.
> ?subject rdfs:comment ?abstract.
> ?subject rdfs:label ?label.
> FILTER(lang(?abstract) = 'en' && lang(?label) = 'en').
> ?subject dbpedia2:released ?released.
> FILTER(xsd:date(?released) < '2000-01-01'^^xsd:date).
> } ORDER BY ?released
> LIMIT 20
>
> Any idea?


I fiddled with the query, simplifying it until I found one that
brought results back through <http://dbpedia.org/sparql> ...
formatted here with whitespace, so it's a bit more clear what's
being queried --

   PREFIX dbpedia: <http://dbpedia.org/property/>
   SELECT ?subject
          ?label
          ?released
          ?abstract
   WHERE
     {
       ?subject
          dbpedia:starring
             <http://dbpedia.org/resource/Tom_Cruise> .
       ?subject
          rdfs:comment
             ?abstract                                .
       ?subject
          rdfs:label
             ?label                                   .
       FILTER (lang(?abstract) = 'en'
          && lang(?label) = 'en')                     .
       ?subject
          dbpedia:starring
             ?released
     }
   ORDER BY ?released
   LIMIT 20


What I discovered was, simply ... the data's broken.

Values for ?released are not dates, but star URIs, e.g.,
<http://dbpedia.org/resource/Alfred_Molina>


You can see this for yourself, if you visit my query's results (yes,
this is a very long URL -- it includes the entire query above, minus
the extra whitespace) --

<http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&should-sponge=&query=PREFIX+dbpedia%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fproperty%2F%3E+SELECT+%3Fsubject+%3Flabel+%3Freleased+%3Fabstract+WHERE+{+%3Fsubject+dbpedia%3Astarring+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2FTom_Cruise%3E+.+%3Fsubject+rdfs%3Acomment+%3Fabstract+.+%3Fsubject+rdfs%3Alabel+%3Flabel+.+FILTER+(lang(%3Fabstract)+%3D+%27en%27+%26%26+lang(%3Flabel)+%3D+%27en%27)+.+%3Fsubject+dbpedia%3Astarring+%3Freleased+}+ORDER+BY+%3Freleased+LIMIT+20+&format=text%2Fhtml&debug=on>


Be seeing you,

Ted

--

A: Yes.                      http://www.guckes.net/faq/attribution.html
| Q: Are you sure?
| | A: Because it reverses the logical flow of conversation.
| | | Q: Why is top posting frowned upon?

Ted Thibodeau, Jr.           //               voice +1-781-273-0900 x32
Evangelism & Support         //        mailto:[EMAIL PROTECTED]
OpenLink Software, Inc.      //              http://www.openlinksw.com/
                                 http://www.openlinksw.com/weblogs/uda/
OpenLink Blogs              http://www.openlinksw.com/weblogs/virtuoso/
                               http://www.openlinksw.com/blog/~kidehen/
    Universal Data Access and Virtual Database Technology Providers




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Dbpedia-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to