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

Discussion: Improve the Contextual Matcher #122

Closed aricohen93 closed 2 years ago

aricohen93 commented 2 years ago

Draft

Starting example:

When looking for ADICAP codes, some notes showed multiples codes:

"adicap : OHGSA7B1, OHGSA7B3"

Using he ContextualMatcher as of today, only the last code will be retrieved.

Proposition

Maybe a replace option in the assing dictionary might be useful:

Examples

"Le patient a un diabète insulinorequérent de type I et II"

No replace, no expand, reduce_mode=None

replace expand reduce_mode
False False False

| Entity | Assign value | |diabète| type=[I, II] |

percevalw commented 2 years ago

Merged in #124