Closed HarsheetKakar closed 4 years ago
import sys; print("Python", sys.version) Python 3.6.9 (default, Nov 7 2019, 10:44:02) [GCC 8.3.0] import numpy; print("NumPy", numpy.version) NumPy 1.18.1 import scipy; print("SciPy", scipy.version) SciPy 1.4.1 import medacy; print("medacy", medacy.version) medacy 1.0.0
I got the similar result.
@HarsheetKakar ya i got what's your problem is, since medacy is a spacy based model it scans from left to right of the sentence if it gets the name of the drugs from there it will extract all the information even by mistake you leave a extra space between the words it wont able to extract the information
i have modified you sentence a little bit except dosage everything came here is the code
from medacy.model.model import Model
model = Model.load_external('medacy_model_clinical_notes') annotation = model.predict("The patient was prescribed Advil 1 capsule for 5 days.") print(annotation)
and the result is ('Drug', 27, 32, 'Advil') ('Strength', 33, 34, '1') ('Form', 35, 42, 'capsule') ('Duration', 43, 53, 'for 5 days')
Thank you.
On Fri, 6 Mar 2020, 10:09 Sherwin P, notifications@github.com wrote:
@HarsheetKakar https://github.com/HarsheetKakar ya i got what's your problem is, since medacy is a spacy based model it scans from left to right of the sentence if it gets the name of the drugs from there it will extract all the information even by mistake you leave a extra space between the words it wont able to extract the information
i have modified you sentence a little bit except dosage everything came here is the code
from medacy.model.model import Model
model = Model.load_external('medacy_model_clinical_notes') annotation = model.predict("The patient was prescribed Advil 1 capsule for 5 days.") print(annotation)
and the result is ('Drug', 27, 32, 'Advil') ('Strength', 33, 34, '1') ('Form', 35, 42, 'capsule') ('Duration', 43, 53, 'for 5 days')
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NLPatVCU/medaCy/issues/183?email_source=notifications&email_token=ABXKGXBZGRFQ5E4DTJE3NODRGB5BVA5CNFSM4K4VSP22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOABLCA#issuecomment-595596680, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXKGXHMKF2T7FYR73SVBT3RGB5BVANCNFSM4K4VSP2Q .
Description
The example provided showed that Drug, Dosage, Form, and Duration are extracted from the given clinical text. After installing the library (Developer branch) only Drug and Duration was extracted from the given text.
Steps/Code to Reproduce
Expected Results
Actual Results
Versions