We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This affects pyDelphin v0.4.1.
Parsing a single MRS works:
>>> from delphin.mrs import simplemrs >>> gen = simplemrs.loads('[ TOP: h0 RELS: < [ "_rain_v_1_rel" LBL: h1 ARG0: e2 ] > HCONS: < h0 qeq h1 > ]') >>> next(gen) <Xmrs object (rain) at 140066960825312>
But requesting the next object gives an XmrsDeserializationError, because the final ] was not consumed:
XmrsDeserializationError
]
>>> next(gen) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/goodmami/repos/pydelphin/delphin/mrs/simplemrs.py", line 185, in deserialize yield _read_mrs(tokens, version, errors) File "/home/goodmami/repos/pydelphin/delphin/mrs/simplemrs.py", line 202, in _read_mrs _read_literals(tokens, '[') File "/home/goodmami/repos/pydelphin/delphin/mrs/simplemrs.py", line 195, in _read_literals 'Expected \'{}\': {}'.format(tok, ' '.join([tok] + list(tokens))) delphin._exceptions.XmrsDeserializationError: Expected '[': [
A StopIteration exception is expected for the second next(gen) call.
StopIteration
next(gen)
Also, the exception message is confusing, because it says the expected character is the one received, which isn't true.
The text was updated successfully, but these errors were encountered:
3ea412e
No branches or pull requests
This affects pyDelphin v0.4.1.
Parsing a single MRS works:
But requesting the next object gives an
XmrsDeserializationError
, because the final]
was not consumed:A
StopIteration
exception is expected for the secondnext(gen)
call.Also, the exception message is confusing, because it says the expected character is the one received, which isn't true.
The text was updated successfully, but these errors were encountered: