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

error in the graph #29

Closed arademaker closed 3 years ago

arademaker commented 3 years ago
% python mapping.py ~/work/wn/glosstag/data/annotation-aaa.jl
01001689-a def capable of reproducing;
[{'form': 'capable', 'kind': ['wf'], 'lemmas': ['capable%3'], 'meta': {'pos': 'JJ'}, 'senses': ['capable%3:00:00::'], 'tag': 'man', 'begin': 0, 'end': 7}, {'form': 'of', 'kind': ['wf'], 'lemmas': ['of'], 'meta': {'pos': 'IN'}, 'tag': 'ignore', 'begin': 8, 'end': 10}, {'form': 'reproducing', 'kind': ['wf'], 'lemmas': ['reproduce%2'], 'meta': {'pos': 'VBG', 'sep': ''}, 'tag': 'un', 'begin': 11, 'end': 22}, {'form': ';', 'kind': ['wf'], 'meta': {'pos': ':', 'type': 'punc'}, 'tag': 'ignore', 'begin': 22, 'end': 23}]
NOTE: parsed 1 / 1 sentences, avg 3110k, time 0.58293s
Traceback (most recent call last):
  File "/Users/ar/work/wn/glosstag-evaluation/mapping.py", line 169, in <module>
    for t in process(s,s._id):
  File "/Users/ar/work/wn/glosstag-evaluation/mapping.py", line 137, in process
    graph1 = rdf.dmrs_to_rdf(d, "http://wordnet.princeton.edu/pwn30",v)
  File "/Users/ar/venv/lib/python3.9/site-packages/delphin/rdf/_dmrs_parser.py", line 39, in dmrs_to_rdf
    dmrsGraph = Graph(store=defaultGraph.store, identifier=DMRSI)
AttributeError: 'str' object has no attribute 'store'
yfaria commented 3 years ago

It seems that you are passing v not as a ConjunctiveGraph, but as a string. Can you check the v definition?

arademaker commented 3 years ago

Yes, I noticed that you change the signature of the function. It does not receive the IDS anymore, right? Just the base URI of the DMRS...