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

Stephan Oepen oe at ifi.uio.no
Sat Dec 19 09:33:49 CET 2020


hi alexandre,

we are not actively working on the WeSearch Infrastructure at UiO, and i am
very happy for you to push this work further.

my recommendation would be to not worry too much about backward
compatibility in this space but maybe rather derive your own solution.  on
this path, i would suggest you coin different names, or at least make
explicit that, say, WQL 2.0 is different from the original query language
and search engine.

the original SemEval description remains available through the SDP site:

http://sdp.delph-in.net/2015/search.html

please bear in mind that the above is for the bi-lexical SDP frameworks
(CCD, DM, PAS, and PSD).  in the current WSI design, there are in fact
framework-specific interpretation rules for some elements of the query
language.  the ‘+’ (lemma), ‘/’ (pos), and ‘=’ (frame or sense) operators,
for example, do not apply to EDS or MRS, because these node properties are
not defined there.

conversely, identifiers are only interpreted as typed (‘h’, ‘i’, ‘e’, and
‘x’) in MRS; here, the underlying RDF graph topology is also quite
different, e.g. with typed variables as nodes in their own right.  the
query language hides some of the underlying differences: we use the same
node identifier operator (‘:’) to denote the LBL of an elementary
predication; node labels match its predicate symbol; and the syntax for
labeled outgoing edges queries role–argument pairs in the predication.

the WQL ‘^’ (top) operator is straightforwardly defined for the SDP
frameworks, and probably for EDS too, where there is an explicit notion of
the top node(s) in these graphs.  for MRS, i am actually not sure we have
defined this operator; i would think it should match the variable that is
the TOP element of the MRS.

finally, yes, the ErgSemantics fingerprint language is the WQL dialect for
MRS search.  i am afraid, i believe no documentation is available for this
dialect.

best wishes, oe


On Fri, 20 Nov 2020 at 22:43 Alexandre Rademaker <arademaker at gmail.com>
wrote:

> 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
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.delph-in.net/archives/developers/attachments/20201219/99849f5f/attachment-0001.html>


More information about the developers mailing list