[developers] semantic representations in RDF

Alexandre Rademaker arademaker at gmail.com
Fri Jul 10 22:21:43 CEST 2020


Hi,

Sorry for this long email. I have written for Stephan many times this week, so I don’t want to keep disturbing (only! ;-)) him. So, I am sharing my finds about the WSI interface, maybe someone that worked with this code can share some information with me.

I am trying to reproduce the text entailment technique described in

[a0] https://www.aclweb.org/anthology/W15-2205.pdf

The basically idea is to convert EDS to RDF and after applying some transformations, use SPARQL to test the entailment between two structures. Given that, the first step is to have the RDF data from EDS representations. For that, the authors used the WSI code. That is why I am trying to understand the current status and the history behind the WSI interface/code. The file http://svn.delph-in.net/wsi/trunk/src/CHANGES.txt is not very informative! 

Maybe there are reasons for the problems I listed below. Maybe someone is still working on the code. Maybe the problems are well-know limitations and ideas that were never really implemented. I just want to know if it makes sense to invest time on trying to solve the problems I found. BTW, there is no license file, may I fork this SVN repository in a GitHub repository?


The relevant pages/articles are:

[w1] http://moin.delph-in.net/WeSearch/Rdf
[w2] http://moin.delph-in.net/ErgWeSearch
[w3] http://moin.delph-in.net/WeSearch/Interface
[w4] http://moin.delph-in.net/WeSearch/QueryLanguage
[a1] http://www.lrec-conf.org/proceedings/lrec2014/pdf/1166_Paper.pdf
[a2] https://www.aclweb.org/anthology/C14-2020.pdf

Problems:

1) The wiki pages [w3,w2] are not in sync with the README.txt in the code repository http://svn.delph-in.net/wsi/trunk/. For example, the directory `generic-gui` is now called `common-gui`.

2) The .nq file produced by the indexing is not valid. IRI likes `<9>` are not allowed in https://www.w3.org/TR/n-quads/. I was able to produce a temporary solution but it creates other problems.

3) The [a1,a2,w1] say nothing about how the URLs/IRIs are created. But as we can see for the output below, nodes like `x3` would have a single IRI shared for all sentences in the corpora. I understand the EDS node identifier are not variables, and that tiples are grouped in a graph, but, still, conceptually, in the dataset, there is no single x3, but many different ones in different sentences, right? I didn’t find the complete ontology that defines the EDS, MRS and DM representations. On [a1] the authors wrote only:

> The full MRS ontology (not discussed in detail here) distinguishes different types of nodes, corresponding to full predications vs. individual logical variables vs. hierarchically organized sub-properties of variables...

4) There is no rdfs:type (<http://www.w3.org/2000/01/rdf-schema#type>), the `type` predicate is defined in the http://www.w3.org/1999/02/22-rdf-syntax-ns# (prefix `rdf`).

5) If I fix the cases [4] and [2] in the RDF transformation code, the interface breaks. I am still investigating if the problem is in the SPARQL generation or in the page construction from the results.

6) The query language (WQL) documented in http://alt.qcri.org/semeval2015/task18/index.php?id=search and [w4] is not working in the current version of the interface: 

Accept =>    x: _*  [ARG* x]
Reject =>    x: _fight*  [ARG* x]     
Reject =>    /v[ARG* x]
Reject =>    +dog


Comments are welcome! ;-)

Best,
Alexandre



EDS:

{e2:
 _1:udef_q<0:3>[BV x3]
 e9:card<0:3>("2"){e SF prop, TENSE untensed, MOOD indicative, PROG -, PERF -}[ARG1 x3]
 x3:_dog_n_1<4:8>{x PERS 3, NUM pl, IND +, PT pt}[]
 e2:_fight_v_1<13:21>{e SF prop, TENSE pres, MOOD indicative, PROG +, PERF -}[ARG1 x3]
}


RDF predicates triples only for the EDS above:

% cat 1.nq  | grep "<1>" | grep "predicate"
<_1> <http://www.delph-in.net/rdf/eds#predicate> "udef_q"^^<http://www.w3.org/2001/XMLSchema#string> <1> .
<e9> <http://www.delph-in.net/rdf/eds#predicate> "card"^^<http://www.w3.org/2001/XMLSchema#string> <1> .
<x3> <http://www.delph-in.net/rdf/eds#predicate> "_dog_n_1"^^<http://www.w3.org/2001/XMLSchema#string> <1> .
<e2> <http://www.delph-in.net/rdf/eds#predicate> "_fight_v_1"^^<http://www.w3.org/2001/XMLSchema#string> <1> .


Complete RDF from the EDS above:

<_1> <http://www.delph-in.net/rdf/eds#predicate> "udef_q"^^<http://www.w3.org/2001/XMLSchema#string> <1> .
<_1> <http://www.delph-in.net/rdf/eds#bv> <x3> <1> .
<_1> <http://www.delph-in.net/rdf/eds#role> <x3> <1> .
<e9> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#E> <1> .
<e9> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#I> <1> .
<e9> <http://www.delph-in.net/rdf/eds#SF> <e9_SF> <1> .
<e9_SF> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#sf> <1> .
<e9_SF> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#prop> <1> .
<e9> <http://www.delph-in.net/rdf/eds#TENSE> <e9_TENSE> <1> .
<e9_TENSE> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#tense> <1> .
<e9_TENSE> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#untensed> <1> .
<e9> <http://www.delph-in.net/rdf/eds#MOOD> <e9_MOOD> <1> .
<e9_MOOD> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#mood> <1> .
<e9_MOOD> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#indicative> <1> .
<e9> <http://www.delph-in.net/rdf/eds#PROG> <e9_PROG> <1> .
<e9_PROG> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#bool> <1> .
<e9_PROG> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#False> <1> .
<e9> <http://www.delph-in.net/rdf/eds#PERF> <e9_PERF> <1> .
<e9_PERF> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#bool> <1> .
<e9_PERF> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#False> <1> .
<e9> <http://www.delph-in.net/rdf/eds#predicate> "card"^^<http://www.w3.org/2001/XMLSchema#string> <1> .
<e9> <http://www.delph-in.net/rdf/eds#carg> "2"^^<http://www.w3.org/2001/XMLSchema#string> <1> .
<e9> <http://www.delph-in.net/rdf/eds#arg1> <x3> <1> .
<e9> <http://www.delph-in.net/rdf/eds#role> <x3> <1> .
<x3> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#X> <1> .
<x3> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#P> <1> .
<x3> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#I> <1> .
<x3> <http://www.delph-in.net/rdf/eds#PERS> <x3_PERS> <1> .
<x3_PERS> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#pers> <1> .
<x3_PERS> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#3> <1> .
<x3> <http://www.delph-in.net/rdf/eds#NUM> <x3_NUM> <1> .
<x3_NUM> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#num> <1> .
<x3_NUM> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#pl> <1> .
<x3> <http://www.delph-in.net/rdf/eds#IND> <x3_IND> <1> .
<x3_IND> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#bool> <1> .
<x3_IND> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#True> <1> .
<x3> <http://www.delph-in.net/rdf/eds#PT> <x3_PT> <1> .
<x3_PT> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#pt> <1> .
<x3_PT> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#pt> <1> .
<x3> <http://www.delph-in.net/rdf/eds#predicate> "_dog_n_1"^^<http://www.w3.org/2001/XMLSchema#string> <1> .
<e2> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#E> <1> .
<e2> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#I> <1> .
<e2> <http://www.delph-in.net/rdf/eds#SF> <e2_SF> <1> .
<e2_SF> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#sf> <1> .
<e2_SF> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#prop> <1> .
<e2> <http://www.delph-in.net/rdf/eds#TENSE> <e2_TENSE> <1> .
<e2_TENSE> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#tense> <1> .
<e2_TENSE> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#pres> <1> .
<e2_TENSE> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#non-past> <1> .
<e2_TENSE> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#tensed> <1> .
<e2> <http://www.delph-in.net/rdf/eds#MOOD> <e2_MOOD> <1> .
<e2_MOOD> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#mood> <1> .
<e2_MOOD> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#indicative> <1> .
<e2> <http://www.delph-in.net/rdf/eds#PROG> <e2_PROG> <1> .
<e2_PROG> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#bool> <1> .
<e2_PROG> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#True> <1> .
<e2> <http://www.delph-in.net/rdf/eds#PERF> <e2_PERF> <1> .
<e2_PERF> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#bool> <1> .
<e2_PERF> <http://www.w3.org/2000/01/rdf-schema#type> <http://www.delph-in.net/rdf/eds#False> <1> .
<e2> <http://www.delph-in.net/rdf/eds#predicate> "_fight_v_1"^^<http://www.w3.org/2001/XMLSchema#string> <1> .
<e2> <http://www.delph-in.net/rdf/eds#arg1> <x3> <1> .
<e2> <http://www.delph-in.net/rdf/eds#role> <x3> <1> .
<e2> <http://www.delph-in.net/rdf/eds#top> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> <1> .





More information about the developers mailing list