edsnlp.pipes.ner.frailty.base
FrailtyDomainMatcher [source]
Bases: DisorderMatcher
Base class for matching frailty mentions in clinical texts. Subclass of DisorderMatcher.
For each domain of frailty as defined by the geriatric assessment standard, a dedicated subclass with corresponding regex has been developped. As a general rule, those components try to ascertain if their corresponding domain has been evaluated in the clinical test, and when possible give indications regarding the severity of the alteration (or lack thereof) for this domain. They try to avoid acute episodes, to focus more on the underlying frailty of the patient.
Parameters
| PARAMETER | DESCRIPTION |
|---|---|
nlp | spaCy TYPE: |
domain | The frailty domain to match. Will override the name and the label if those are set to None. TYPE: |
name | The name of the pipe TYPE: |
patterns | The configuration dictionary TYPE: |
normalize_spaces | Whether to normalize the spaces in the regex patterns, ie to replace all " " by "\s". Allows for more readable regex files.
|
process [source]
Sets the frailty status of the matched spans.
Parameters
| PARAMETER | DESCRIPTION |
|---|---|
doc | spaCy Doc object TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
List[Span] | List of detected spans. |