Lee Feigenbaum wrote:
> Kingsley Idehen wrote:
>> Ed Summers wrote:
>>> I was just playing around w/ some SPARQL using dbpedia's endpoint and
>>> noticed that:
>>>
>>> SELECT *
>>> WHERE {
>>> ?person rdf:type <http://dbpedia.org/ontology/Person> .
>>> ?person rdfs:label ?personName .
>>> ?person <http://dbpedia.org/ontology/birthplace> ?place .
>>> ?place rdfs:label ?placeName .
>>> FILTER (lang(?personName) = "en")
>>> FILTER (lang(?placeName) = "en")
>>> }
>>>
>>> returns some hits but this returns 0:
>>>
>>> SELECT COUNT(*)
>>> WHERE {
>>> ?person rdf:type <http://dbpedia.org/ontology/Person> .
>>> ?person rdfs:label ?personName .
>>> ?person <http://dbpedia.org/ontology/birthplace> ?place .
>>> ?place rdfs:label ?placeName .
>>> FILTER (lang(?personName) = "en")
>>> FILTER (lang(?placeName) = "en")
>>> }
>>>
>>> Is there something wrong here either in my query or my expectation
>>> that the count query return > 0 ?
>>>
>>> //Ed
>>>
>>> ------------------------------------------------------------------------------
>>>
>>>
>>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>>> 30-Day trial. Simplify your report design, integration and
>>> deployment - and focus on what you do best, core application coding.
>>> Discover what's new with Crystal Reports now.
>>> http://p.sf.net/sfu/bobj-july
>>> _______________________________________________
>>> Dbpedia-discussion mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion
>>>
>>>
>> Ed,
>>
>> It's your query, you need optionals in there. Here is a quick mod
>> that focuses on the typical culprits (rdfs:label values):
>>
>> SELECT COUNT(*)
>> WHERE {
>> ?person rdf:type <http://dbpedia.org/ontology/Person> .
>> optional {?person rdfs:label ?personName} .
>> ?person <http://dbpedia.org/ontology/birthplace> ?place .
>> optional {?place rdfs:label ?placeName} .
>> FILTER (lang(?personName) = "en")
>> FILTER (lang(?placeName) = "en")
>> }
>
> Kingsley, can you explain this further? If Ed's original query (no
> optionals) returns results, why would the same query with COUNT(*)
> return zero?
>
> Lee
>
>
>
Lee,
I only ran the one that returned zero results, and then added optionals.
Clearly this is a bug :-(
--
Regards,
Kingsley Idehen Weblog: http://www.openlinksw.com/blog/~kidehen
President & CEO
OpenLink Software Web: http://www.openlinksw.com
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Dbpedia-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion