Open jadecxliu opened 4 years ago
Hi, thanks for the bug report. I don't have time for a proper fix right now, but let's leave the issue open to remind me.
For now a workaround is to use a previous version of PyDelphin (preferably in a virtual environment):
pip install pydelphin==0.9.2
You also need Penman:
pip install penman==0.6.2
Let me know if you're still having issues.
Thanks for the useful instruction.
Only works until Python 3.9.
@arademaker thanks for the context. Python 0.9.2 was only supported through Python 3.7 (which is now the lowest active version of Python).
Hi,
Thanks for the great work!
I tried to run
mrs-to-penman.py
with 0.0.2 version of delphin (derived frompip install delphin
). However, it caused several import errors as below:from delphin.mrs.components import var_sort
:ImportError: No module named 'delphin.mrs.components'
from delphin.mrs import xmrs, simplemrs, penman, Dmrs
:ImportError: cannot import name 'xmrs','simplemrs','penman'
I founddelphin.xmrs
,delphin.simplemrs
anddelphin.codecs.dmrspenman
to replace the following, but it still doesn't work forTriple = penman.penman.Triple
,codec = penman.XMRSCodec(indent=2)
andmrs = simplemrs.loads_one(row[mrs_spec])
.It seems that the code has not updated in parallel with the current version of delphin. Could you update the code or give me some suggestions on transitioning the code to avoid ImportError? I would also appreciate it if you could provide the corresponding old version delphin.
Thanks.