[developers] WQL query language (the WSI interface query language)

Alexandre Rademaker arademaker at gmail.com
Fri Nov 20 22:41:19 CET 2020


Hi Stephan,

The WSI interface points to [1] for the documentation of the query language. In [2] we also have some more limited documentation. 

1. The semeval 2015 page is not working properly, images and CSS can’t be loaded.

2. One particular operator not well defined is the ^ . In [1] we have

> The following query demonstrates the use of the top operator (‘^’), to retrieve graphs rooted in a coordinate structure, i.e. where the top node has an outgoing dependency matching the pattern ‘_*_c’ (again, assuming the DM representations); here, specification of the role value can be omitted, as there is no predication constraining the argument node:
> 
> ^[_*_c]

First the WQL should be representation independent, right? Why the comment about DM? So in an MRS, I am assuming this ^ operator should match the TOP predication, am I right? But the pattern inside the bracket should match the TOP predicate? If so, should I also be able to use other patterns such as lemma pattern, like ‘^[+bark]’?

I didn’t understand the fragment 'the role value can be omitted, as there is no predication constraining the argument node’. How the role values would be supplied? Is it talking about the roles of _*_c predicate in the example? Why not restrict the argument of the ^ operator to an node id? If I search for sentences where the TOP predicate has lemma bark, I could use:

^[x]
x:+bark

Does it make sense? 

3. There is no proviso for querying VarSort? For instance, find representations where a given verb has as argument a node that is first person singular. We can’t search for verbs in a specific tense or aspect.

4. The ERS fingerprints (http://moin.delph-in.net/ErgSemantics) and WQL are very related, right? Do we have any document that describes ERS fingerprints?


My idea is to reimplement the parser of WDL and the transformation to SPARQL [3]. I would like to support MRS, DMRS and EDS initially. The reimplementation will match the new RDF encoding for the semantic structures that I am proposing. The RDF vocabulary is still under construction, in particular, there are parts of the semantic structure that are grammar dependent (for example, the VarSort) and I am still not sure how to deal with that.

This is my first very preliminar draft of the WQL BNF is:

WQL := predexp 
predexp := predication | predexp OP predexp | ( predexp ) | ! predexp
OP := “|" | “ "
predication := [id “:”] pattern [ “[" arglist “]” ]
arglist := argument | argument “," arglist
argument:= rolelabel id
rolelabel := wdpattern
pattern := wdpattern | lemma_pattern | pos_pattern | sense_pattern
lemma_pattern := “+" wdpattern
pos_pattern := “/" wdpattern
sense_pattern := “=" wdpattern
wdpattern := [^?* ][\w]+


Ps: can I potentially implement a HPSG grammar to parse any context free grammar like the one above, right? It would be funny to have grammars to parse this DSL.


[1] https://alt.qcri.org/semeval2015/task18/index.php?id=search
[2] http://moin.delph-in.net/WeSearch/QueryLanguage
[3] https://www.w3.org/TR/sparql11-query/


Best,
Alexandre




More information about the developers mailing list