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

Feature request: date cues and context #253

Open cvinot opened 7 months ago

cvinot commented 7 months ago

Feature type

Date detection pattern enhancement and/or cues to let know which tokens indicated mentions of date properties (mode, period, bound, direction) in a given date span. Context of the relative date if known (contextual, enunciation).

Description

I'm working on various use cases on dates, which I'm struggling to make work with your package, due to it requiring additional properties or cues on date pattern detection.

I would like to know

I could also try to work on modifying your date model etc... I just don't know exactly what are your plans on that subject, and wouldn't want to produce work in the wrong direction.

Some of these use cases:

age/relative date disambiguation: "Je vois ce jour le patient à deux mois du premier cycle par ..." => relative date -2 months "On note un cancer du poumon chez sa mère à 48 ans" => age mention. "Diagnostique à 35 ans. Stabilisation de la maladie puis récidive à 40 ans" => age mentions

disambiguation "contextual vs enunciation" context on relative dates Some date mentions clearly identify a date of reference which can be contextual or at the date of enunciation depending on the formulation used. In your patterns they are mixed up.

Ex: "Il y à 4 ans...", "Depuis 4 ans..." "l'an dernier" => refers to the enunciation context "4 ans auparavant/avant/après..." => refers to the contextual date

Let me know !