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
112 stars 29 forks source link

Full-hour matching error #225

Open percevalw opened 9 months ago

percevalw commented 9 months ago

Description

Cc @paul-bssr, thank you for reporting this. Full hours are not correctly matched (time is not part of the matched span)

How to reproduce the bug

import edsnlp

nlp = edsnlp.blank('eds')
nlp.add_pipe('eds.normalizer')
nlp.add_pipe('eds.sentences')
nlp.add_pipe('eds.dates')

assert str(nlp("17/10/2023 18:37").spans['dates'][0]) == "17/10/2023 18:37"
assert str(nlp("17/10/2023 18:00").spans['dates'][0]) == "17/10/2023 18:00"   # Fails here