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

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

Open
JudithCo opened this issue Mar 22, 2024 · 1 comment

Comments

@JudithCo
Copy link

Description

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

  • the pipe associates the first value with the last measure mentioned
  • and does not associate each type of measurement with its associated value.

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

  • Operating System:
  • Python Version Used: 3.7.13
  • spaCy Version Used: 3.7.2
  • EDS-NLP Version Used: 0.10.7
  • Environment Information:
@OlivierHassanaly
Copy link

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"

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