AutoSPARQL
AutoSPARQL copied to clipboard
houses with more than 2 bedrooms
Translates to and never returns results (because it never returns results, the "wrong" button doesn't show up :().
Found answer for "the number of entities ?z and the number of houses ?y such that ?y's number of bedroom is greater than ?z Moreover, it returns exclusively results such that ?x is equal to 2". Loading result..
The learned query is correct and also the query which is executed to fetch the relevant data: PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema# PREFIX rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
SELECT DISTINCT ?y1 ?label ?desc ?img ?price ?receptions ?street ?bathrooms ?locality ?bedrooms WHERE { ?y1 rdf:type http://diadem.cs.ox.ac.uk/ontologies/real-estate#House . ?y1 http://diadem.cs.ox.ac.uk/ontologies/real-estate#bedrooms 4 . ?y1 http://purl.org/goodrelations/v1#description ?z . ?y1 http://www.w3.org/2006/vcard/ns#street-address ?y . ?offer http://purl.org/goodrelations/v1#includes ?y1 . ?offer http://diadem.cs.ox.ac.uk/ontologies/real-estate#hasPrice ?price FILTER regex(?y, "Summertown", "i") FILTER regex(?z, "garden", "i") OPTIONAL { ?y1 http://purl.org/goodrelations/v1#name ?label . } OPTIONAL { ?y1 http://purl.org/goodrelations/v1#description ?desc . } OPTIONAL { ?y1 http://xmlns.com/foaf/0.1/depiction ?img . } OPTIONAL { ?y1 http://diadem.cs.ox.ac.uk/ontologies/real-estate#receptions ?receptions . } OPTIONAL { ?y1 http://www.w3.org/2006/vcard/ns#street-address ?street . } OPTIONAL { ?y1 http://diadem.cs.ox.ac.uk/ontologies/real-estate#bathrooms ?bathrooms . } OPTIONAL { ?y1 http://www.w3.org/2006/vcard/ns#locality ?locality . } OPTIONAL { ?y1 http://diadem.cs.ox.ac.uk/ontologies/real-estate#bedrooms ?bedrooms . } }
I found out that this is again a problem with the duplicates in the data, so the same URI can have several numbers of bedrooms. This of course also happens if I aks for 'houses in Summertown with 4 bedrooms'.