From: Dimitris K. <ji...@gm...> - 2013-02-24 06:56:49
|
Hi Gerard, (I added the mailing list in cc) this is normal SPARQL behavior. Since more than one of your predicates (in fact all of them: object, adres, objnr) have more than one values, SPARQL returns a combination for all of them. here's a simple explanation [1] and a few similar cases, but not exactly the same [2], [3], [4] Maybe you should use the list items inside the resource to get them (e.g. [5]) in a query like this: SELECT * WHERE { ?s dbpedia-owl:listItemOf dbpedia-nl:Lijst_van_gemeentelijke_monumenten_in_Haaksbergen . ?s dbpedia-owl:address ?address . ?s dbpedia-owl:municipalityCode ?mCode . } [1] http://www.franz.com/agraph/support/documentation/4.7/sparql-tutorial.html#header3-35 [2] http://stackoverflow.com/questions/5135577/dbpedia-query-returns-some-musicals-more-than-once-despite-filters [3] http://answers.semanticweb.com/questions/3488/duplicate-columns-in-sparql-result [4] http://answers.semanticweb.com/questions/20090/how-to-filter-out-duplicate-results-in-sparql-select-due-to-multiple-rdftypes [5] http://nl.dbpedia.org/page/Lijst_van_gemeentelijke_monumenten_in_Haaksbergen__Boerderij__1 On Sat, Feb 23, 2013 at 10:46 AM, Gerard Kuys <Ger...@bi...>wrote: > Hi Dimitris, > > Although undeniably we are making progress with the querying of lists, we > come across new problems to solve every time. After my initial enthousiasm > about the fact that we finally could query objects coming from a Wikipedia, > I had a closer look at the results. > > Take 'Lijst van gemeentelijke monumenten in Haaksbergen' for example. > > When I entert the following query: > > PREFIX prop-nl: <http://nl.dbpedia.org/property/> > > SELECT ?monument ?itemAdres ?itemObjnr WHERE > > { > > < > http://nl.dbpedia.org/resource/Lijst_van_gemeentelijke_monumenten_in_Haaksbergen> > prop-nl:object ?monument . > < > http://nl.dbpedia.org/resource/Lijst_van_gemeentelijke_monumenten_in_Haaksbergen> > prop-nl:adres ?itemAdres . > < > http://nl.dbpedia.org/resource/Lijst_van_gemeentelijke_monumenten_in_Haaksbergen> > prop-nl:objnr ?itemObjnr . > > } > > the results I get do not represent the single objects in the list. In > fact, what is happing is a multiplication of each element with each other > element. There are not so many "Grenspaal" objects in the list, nor do > "Grenspalen" have that many addresses nor that many object IDs. I don't > know whether it is easy or difficult to fix this one (of course I hope it > will be easy), but this is a rather important issue. Do you agree? > > Kind regards, > > Gerard > -- Kontokostas Dimitris |