own-pt / wql

WQL query language
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

The not interpretation on SPARQL #4

Open yfaria opened 3 years ago

yfaria commented 3 years ago

We need to think if what we want is the FILTER NOT EXISTS or MINUS as what we would expect from a negation. By now the code uses FILTER NOT EXISTS. If we'd search !x:_run*[]", we'd get the SPARQL:

PREFIX mrs: <http://www.delph-in.net/schema/mrs#> 
PREFIX erg: <http://www.delph-in.net/schema/erg#> 
PREFIX delph: <http://www.delph-in.net/schema/> 
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> 
SELECT ?x0 WHERE { ?x0 rdf:type mrs:MRS . FILTER NOT EXISTS { ?x0 mrs:hasEP ?x0 . ?x0 delph:hasPredicate ?x1 . ?x1 delph:predText <_run*> . } }

This means we would get all MRS instances which don't have an EP which has the predicate with text <_run*>. What would be the meaning if we used the MINUS?