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

Fix errors and reformat ptb2ud.py #20

Merged
merged 6 commits into from
Feb 20, 2019
Merged

Conversation

alistairewj
Copy link
Contributor

Sometimes ptb2ud.py would raise the following error:

Traceback (most recent call last):
  File "NegBio/negbio/pipeline/ptb2ud.py", line 109, in convert_doc
    self.add_lemmas)
  File "NegBio/negbio/pipeline/ptb2ud.py", line 183, in convert_dg
    ann = annotations[annotation_id_map[node.index]]
IndexError: list index out of range

Fairly sure this was due to self.add_lemmas being interpreted as an annotation offset in the new code, which I've fixed in this PR. I also took the opportunity to change the try/except to not continue the loop on keyboard interrupt.

@yfpeng yfpeng merged commit 7a2be81 into ncbi-nlp:master Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants