Closed yfaria closed 2 years ago
why renaming the variables in the first place? this is very confusing what not using the same variables from the WQL?
SELECT * WHERE {
?qeq1 mrs:lowHcons ?h2 .
?qeq1 mrs:highHcons ?h3 .
?x0 rdf:type mrs:MRS .
?x0 mrs:hasEP ?ep1 .
?x0 mrs:hasEP ?ep2 .
?ep1 mrs:rstr ?h2 .
?ep1 rdfs:label ?h1 .
?ep2 rdfs:label ?h3 .
}
Another problem is the use of rdfs:label
for the predication label... this is an error. The rdfs:label
has an specific meaning and the range is a literal. I don't think it would make sense to have the lbl and the h : ...
in the language. Note that:
[ _cat_n_1<4:7> LBL: h7 ARG0: x3 ]
has the fingerprint:
h7: _cat_n_1[ARG0 x3]
The variables are renamed because we are using hsparql to translate from WQL to SPARQL and it doesn't let us name the variables directly. We could fiddle with it to figure a way to change it for our needings, but I don't think that it's that important.
About the rdfs:label
, it's not about the label of an EP; the relation that is used for that is mrs:hasLabel
with domain on mrs:ElementaryPredication
and range on mrs:h
as declared here. The rdfs:label
is being used to get the predicate to highlight it on WSI.
Closing the issue because the HCONS problem was solved in 4a11506968059d205a2230c488a1ecb032c8495a. The problem was caused by the fact that the dictionary of variables that the program holds was associating the variable of a predication to the predication, not the the handle that labels the predication.
There is the problem of the naming of variables in the resulting SPARQL query and the problem with rdfs:label
, which should be put in other issue.
The WQL conversion to SPARQL when we have a handle constraint is not working properly. For example, the WQL query
translates to
in SPARQL. The problem is that
?x7
is an EP, not a handle; and the handle constraint links a hole to a handle. There should be something like?x7 mrs:hasLabel ?x12
and then the first line of the where clause changes to?x1 mrs:lowHcons ?x12 .
. An alternative is forcing the user to separate what is an predication and what is the handle. In this case, the WQL query would beand the query SPARQL generation would be more direct and closer to the WQL one.