aphp / edsnlp

Modular, fast NLP framework, compatible with Pytorch and spaCy, offering tailored support for French clinical notes.
https://aphp.github.io/edsnlp/
BSD 3-Clause "New" or "Revised" License
116 stars 30 forks source link

Several cases in which eds.measurement fails to associate the mesure to its value (weight, height and bmi) #277

Open JudithCo opened 8 months ago

JudithCo commented 8 months ago

Description

When the text contains several measures in a row with their respective values, without units, in sequence :

How to reproduce the bug

import spacy

nlp = spacy.blank("eds")
nlp.add_pipe("eds.measurements")

text_1 = "Poids (Kg) Taille (m) IMC\n57,0 1,70 22"
text_2 = "poids / IMC : 57imc22 taille : 170"
text_3 = "poids / IMC : 57/22 taille : 170"

doc_1 = nlp(text_1)
doc_2 = nlp(text_2)
doc_3 = nlp(text_3)

print(doc_1.spans)
print(doc_2.spans)
print(doc_3.spans)

Your Environment

OlivierHassanaly commented 3 months ago

another issue linked to this topic ; take text_4 = "Madame xxx yyy, âgée de xx ans, née le 06/12/1996, 97 kg, 175 cm"