NLPatVCU / medaCy

:hospital: Medical Text Mining and Information Extraction with spaCy
GNU General Public License v3.0
432 stars 91 forks source link

medacy_model_clinical_notes not able to predict Dosage info for the README example #179

Closed rbhambriiit closed 4 years ago

rbhambriiit commented 4 years ago

Description

I tried to run the standard example (post setup using development branch as described on https://github.com/NLPatVCU/medaCy/issues/173 )

I get the prediction output: [('Drug', 40, 45, 'Advil'), ('Duration', 46, 56, 'for 5 days')]

Info for Dosage/Form described on https://github.com/NLPatVCU/medaCy seems to be missing.

Steps/Code to Reproduce

pip install git+https://github.com/NLPatVCU/medaCy.git@development

pip install git+https://github.com/NLPatVCU/medaCy_model_clinical_notes.git

from medacy.model.model import Model

model = Model.load_external('medacy_model_clinical_notes')
annotation = model.predict("The patient was prescribed 1 capsule of Advil for 5 days.")
print(annotation)

Expected Results

[ ('Drug', 40, 45, 'Advil'), ('Dosage', 27, 28, '1'), ('Form', 29, 36, 'capsule'), ('Duration', 46, 56, 'for 5 days') ]

Actual Results

[('Drug', 40, 45, 'Advil'), ('Duration', 46, 56, 'for 5 days')]

Versions

Python 3.6.8 

NumPy 1.18.1

SciPy 1.4.1

medacy 1.0.0
swfarnsworth commented 4 years ago

The sample output was created with an older version of that model. The current version has been demonstrated to be more performant overall, but evidently it might be less performant for Dosage and Form.