-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't use eds.loads to obtain a EDS from the result of eds.dumps #203
Comments
There are a number of issues with the code as posted, but I'll assume those were just accidentally made when posting the issue. I can reproduce the problem with the following MWE: >>> from delphin.mrs import eds
>>> from delphin.interfaces import rest
>>> text = 'Successful American business owners do the same thing.'
>>> res = rest.parse(text, params={'eds':'json'})
>>> x = res.result(0).eds()
>>> raw = eds.dumps(x, properties=True, single=True)
>>> list(eds.loads(raw))
[] I suspect that the EDS parser is failing to parse the raw representation and giving up (the empty list just means that no EDS representations were found in the input string, but clearly that's not the case here). Perhaps due to the empty property list on In the meantime, what is it you want to accomplish? It seems the JSON parser of EDS is working fine, so you could work with that representation, or maybe the PENMAN one, if it's easier? |
Thank you for your help. What I need here is a EDS parser for raw text representation, since I have many such kind of things(from deepbank). However, before parsing them I found this problem. |
Hi,
I use HTTP request to parse a sentence to EDS. And I use eds.dumps() to dump it to raw string. But when I use eds.loads() to recover it, I found no output result.
Below is my code:
Why?
The text was updated successfully, but these errors were encountered: