own-pt / delphin-rdf

RDF specifications for DELPH-IN semantic representations and a Pydelphin plugin for RDF generation.
MIT License
2 stars 3 forks source link

gifferent graphs definition #30

Closed FredsoNerd closed 2 years ago

FredsoNerd commented 2 years ago

Hello. While working in https://github.ibm.com/alexrad/extended-glosstag we had a problem in finding a DRMS by type. After that, I noticed that the DMRS node type definition was made using another context than that from the rest of the DMRS analisys.

In the following example we got a piece of an output in n-quads of a single DMRS annotation, for the sentence 'capable of reproducing; '. Notice the first line is defined in the context _:Nd959b4e2979f439abb3775916655aaae and the rest in the context <http://wordnet.princeton.edu/pwn30/01001689-a-1>.

<http://wordnet.princeton.edu/pwn30/01001689-a-1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.delph-in.net/schema/dmrs#DMRS> _:Nd959b4e2979f439abb3775916655aaae .
<http://wordnet.princeton.edu/pwn30/01001689-a-1#node-10004> <http://www.delph-in.net/schema/hasSortInfo> <http://wordnet.princeton.edu/pwn30/01001689-a-1#sortinfo-10004> <http://wordnet.princeton.edu/pwn30/01001689-a-1> .
<http://wordnet.princeton.edu/pwn30/01001689-a-1#node-10003> <http://www.delph-in.net/schema/hasPredicate> <http://wordnet.princeton.edu/pwn30/01001689-a-1#predicate-10003> <http://wordnet.princeton.edu/pwn30/01001689-a-1> .
<http://wordnet.princeton.edu/pwn30/01001689-a-1#annotation-10001> <http://www.delph-in.net/schema/lemma> "capable%3" <http://wordnet.princeton.edu/pwn30/01001689-a-1> .
...

It look like you're defining in a BlankNode context, and occur in all the cases:

...
<http://wordnet.princeton.edu/pwn30/01000442-a-1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.delph-in.net/schema/dmrs#DMRS> _:Nee6cb2e565ae4abe9406881e8504e405 .
<http://wordnet.princeton.edu/pwn30/01000442-a-3> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.delph-in.net/schema/dmrs#DMRS> _:Nee6cb2e565ae4abe9406881e8504e405 .
<http://wordnet.princeton.edu/pwn30/01000737-a-1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.delph-in.net/schema/dmrs#DMRS> _:Nee6cb2e565ae4abe9406881e8504e405 .
...

Did you guys get this problem?

yfaria commented 2 years ago

Hey @FredsoNerd! It was built that way to not declare the type of a node inside his own context, but in the latest discussions we had about it we decided that it wasn't a problem. Fixed it in cadf3434e34f2dc6733a4053a095a4c58a7b9581

arademaker commented 2 years ago

It is not a problem, there are many rooms for interpretations in RDF semantics.. But I agree that it is easier for now to have the type defined inside the same named graph:

Current code produces:

S <http://wordnet.princeton.edu/pwn30/01002055-a-1> 
P <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
O <http://www.delph-in.net/schema/dmrs#DMRS> 
C <http://wordnet.princeton.edu/pwn30/01002055-a-1> .

I will open a new issue for starting a related discussion.