dbpedia - Difference in count result of a SPARQL query -


i have query:

prefix rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>  prefix foaf: <http://xmlns.com/foaf/0.1/>  prefix dbpedia-owl: <http://dbpedia.org/ontology/> select  ?nom ?resource ?url (count( distinct (?o) ?nb))  {    ?resource rdfs:label ?nom.    ?resource foaf:isprimarytopicof ?url.    ?resource rdf:type ?p.    ?resource dbpedia-owl:wikipageexternallink  ?o filter ( langmatches( lang(?nom), "en" )). ?nom <bif:contains> "apple". minus { ?resource dbo:wikipageredirects|dbo:wikipagedisambiguates ?dis   }       }group  ?nom ?resource ?url  

now if replace line

    select  ?nom ?resource ?url (count( distinct (?o) ?nb)) 

by:

    select  ?nom ?resource ?url (count( (?o) ?nb)) 

it give me different results: example first example:

| "simon apple"@en            | <http://dbpedia.org/resource/simon_apple>           | <http://en.wikipedia.org/wiki/simon_apple>           | 4   | | "golden orange (apple)"@en  | <http://dbpedia.org/resource/golden_orange_(apple)> | <http://en.wikipedia.org/wiki/golden_orange_(apple)> | 1   | | "apple watch"@en            | <http://dbpedia.org/resource/apple_watch>           | <http://en.wikipedia.org/wiki/apple_watch>           | 1   | 

the second example give me:

and result of seconde one:

| "simon apple"@en            | <http://dbpedia.org/resource/simon_apple>           | <http://en.wikipedia.org/wiki/simon_apple>           | 80   | | "golden orange (apple)"@en  | <http://dbpedia.org/resource/golden_orange_(apple)> | <http://en.wikipedia.org/wiki/golden_orange_(apple)> | 14   | | "apple watch"@en            | <http://dbpedia.org/resource/apple_watch>           | <http://en.wikipedia.org/wiki/apple_watch>           | 4   | 

what difference? in advance


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -