Skip to content
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

SimpleDMRS codec fails if index is not present. #334

Closed
goodmami opened this issue Sep 3, 2021 · 0 comments
Closed

SimpleDMRS codec fails if index is not present. #334

goodmami opened this issue Sep 3, 2021 · 0 comments
Labels
Milestone

Comments

@goodmami
Copy link
Member

goodmami commented Sep 3, 2021

The index is not a required feature of SimpleDMRS (or any other codec, I think), but currently the codec fails if it is missing:

>>> from delphin.codecs import simpledmrs
>>> simpledmrs.decode('dmrs { [top=10000] 10000 [ _rain_v_1 e tense=past]; }')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/goodmami/delphin/pydelphin/delphin/codecs/simpledmrs.py", line 105, in decode
    return _decode_dmrs(lexer)
  File "/home/goodmami/delphin/pydelphin/delphin/codecs/simpledmrs.py", line 197, in _decode_dmrs
    index=int(index),
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

This call should succeed.

@goodmami goodmami added the bug label Sep 3, 2021
@goodmami goodmami added this to the v1.6.0 milestone Sep 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant