Dementia[source]
The eds.dementia
pipeline component extracts mentions of dementia.
Details of the used patterns
# fmt: off
main_pattern = dict(
source="main",
regex=[
r"demence",
r"dementiel",
r"corps de le[vw]y",
r"deficits?.chroniques?.cognitif",
r"troubles?.mnesique?",
r"troubles?.praxique",
r"troubles?.attentionel",
r"troubles?.degeneratif.{1,15}fonctions.{1,5}sup",
r"maladies?.cerebrales?.degen",
r"troubles?.neurocogn",
r"deficits?.cognitif",
r"(trouble|dysfonction).{1,20} cogniti",
r"atteinte.{1,7}spheres?cogniti",
r"syndrome.{1,10}(frontal|neuro.deg)",
r"dysfonction.{1,25}cogni",
r"(?<!specialisee )alzheimer",
r"demence.{1,20}(\balz|\bpark)",
r"binswanger",
r"gehring",
r"\bpick",
r"de guam",
r"[kc]reutzfeld.{1,5}ja[ck]ob",
r"huntington",
r"korsako[fv]",
r"atrophie.{1,10}(cortico|hippocamp|cereb|lobe)",
],
)
acronym = dict(
source="acronym",
regex=[
r"\bSLA\b",
r"\bDFT\b",
r"\bDFT",
r"\bTNC\b",
],
regex_attr="TEXT",
exclude=dict(
regex=r"\banti", # anticorps
window=-15,
regex_attr="NORM",
),
)
charcot = dict(
source="charcot",
regex=[
r"maladie.{1,10}charcot",
],
exclude=dict(
regex=[
"pied de",
"marie.?tooth",
],
window=(-3, 3),
),
)
default_patterns = [
main_pattern,
acronym,
charcot,
]
# fmt: on
Extensions
On each span span
that match, the following attributes are available:
span._.detailed_status
: set to None
Examples
import edsnlp, edsnlp.pipes as eds
nlp = edsnlp.blank("eds")
nlp.add_pipe(eds.sentences())
nlp.add_pipe(
eds.normalizer(
accents=True,
lowercase=True,
quotes=True,
spaces=True,
pollution=dict(
information=True,
bars=True,
biology=True,
doctors=True,
web=True,
coding=True,
footer=True,
),
),
)
nlp.add_pipe(eds.dementia())
Below are a few examples:
text = "D'importants déficits cognitifs"
doc = nlp(text)
spans = doc.spans["dementia"]
spans
# Out: [déficits cognitifs]
text = "Patient atteint de démence"
doc = nlp(text)
spans = doc.spans["dementia"]
spans
# Out: [démence]
text = "On retrouve des anti-SLA"
doc = nlp(text)
spans = doc.spans["dementia"]
spans
# Out: []
text = "Une maladie de Charcot"
doc = nlp(text)
spans = doc.spans["dementia"]
spans
# Out: [maladie de Charcot]
Parameters
PARAMETER | DESCRIPTION |
---|---|
nlp | The pipeline TYPE: |
name | The name of the component TYPE: |
patterns | The patterns to use for matching DEFAULT: |
label | The label to use for the TYPE: |
span_setter | The span setter to use TYPE: |
Authors and citation
The eds.dementia
component was developed by AP-HP's Data Science team with a team of medical experts, following the insights of the algorithm proposed by Petit-Jean et al., 2024.
Petit-Jean T., Gérardin C., Berthelot E., Chatellier G., Frank M., Tannier X., Kempf E. and Bey R., 2024. Collaborative and privacy-enhancing workflows on a clinical data warehouse: an example developing natural language processing pipelines to detect medical conditions. Journal of the American Medical Informatics Association. 31, pp.1280-1290. 10.1093/jamia/ocae069