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

Termination improvement: Support for newline character #176

Open lbasseto opened 1 year ago

lbasseto commented 1 year ago

Hi,

Would you consider adding the newline character "\n" to the list of terminations (in edsnlp.pipelines.terminations)?

In a note like this:


pas de toux
NOVATREX

NOVATREX would for example qualify as a negation because the line above contains "pas". I have see this list structure with "\n" used as a separator and no punctuation a few times.

Also: Great work on the package! Thank you :)

Thomzoy commented 1 year ago

Hi Louis !

Thanks for bringing this up. In fact, we were discussing about another issue that is closely related to your problem. We're going to add an option to the sentences pipeline, where a \n followed by an uppercase character would constitute an end of sentence. This would also solve you problem since the negation pipeline only looks for cues inside each entity's sentence