Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

houses with more than 2 bedrooms #12

Open
timfu opened this issue Aug 17, 2012 · 1 comment
Open

houses with more than 2 bedrooms #12

timfu opened this issue Aug 17, 2012 · 1 comment

Comments

@timfu
Copy link

timfu commented Aug 17, 2012

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..

@LorenzBuehmann
Copy link
Contributor

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'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants