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

Reports require end punctuation #8

Open
kl2532 opened this issue Feb 13, 2019 · 1 comment
Open

Reports require end punctuation #8

kl2532 opened this issue Feb 13, 2019 · 1 comment

Comments

@kl2532
Copy link
Contributor

kl2532 commented Feb 13, 2019

Thanks for open sourcing your labeler! I'm running into the following error with the sample reports:

$ python label.py --reports_path sample_reports.csv
ERROR:root:Cannot process sentence 62 in 0
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

I believe the issue is due to the lack of punctuation at the end of the first sample report.

For example, if the input is:
Heart size normal and lungs are clear. No edema or pneumonia. No effusion,
then the labeled report output is:
Heart size normal and lungs are clear. No edema or pneumonia. No effusion,,,0.0,,,0.0,,0.0,,,1.0,,,

However, the example labeled_reports.csv has:
Heart size normal and lungs are clear. No edema or pneumonia. No effusion.,1.0,,0.0,,,0.0,,0.0,,,0.0,,,

We can achieve the example labels by modifying the input to Heart size normal and lungs are clear. No edema or pneumonia. No effusion. (added a period to the end of the report). The output is Heart size normal and lungs are clear. No edema or pneumonia. No effusion.,1.0,,0.0,,,0.0,,0.0,,,0.0,,,.

To summarize, do the radiology reports require punctuation at the end of each sentence?

@alistairewj
Copy link
Collaborator

This is likely a bug in NegBio - you can checkout my pull request and should find it works (I just tested it).

See ncbi-nlp/NegBio#20

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

No branches or pull requests

2 participants