Closed Soulou closed 6 years ago
I think the best you can do with the DSL as is is the following:
patterns = [
[:city, RDF.type, dbpo + "Place"],
[:city, RDF::RDFS.label, :name],
[:city, dbpo + "country", :country],
[:city, dbpo + "abstract", :abstact],
[:city, grs + "point", :coords]
]
sparql.ask.where(*patterns).
filter("regex(?name, 'Abiline, Texas')").
filter("langmatches(lang(?name), 'EN')").
filter("langmatches(lang(?abstract), 'EN')")
Extending the DSL to allow constructing filters would be useful.
I'm looking to do this kind of SQPARQL query: (to http://dbpedia.org/sparql/ )
I've tried some way to write it with the select/where/filter methods, but without success. Is it possible it with them? Otherwise I'll stay on
Thank you