medkit.text.ner.edsnlp_tnm_matcher
medkit.text.ner.edsnlp_tnm_matcher#
This module needs extra-dependencies not installed as core dependencies of medkit. To install them, use pip install medkit-lib[edsnlp].
Classes:
|
TNM (Tumour/Node/Metastasis) string matcher based on EDS-NPL's tnm pipeline <https://aphp.github.io/edsnlp/latest/pipelines/ner/tnm/>. |
- class EDSNLPTNMMatcher(output_label='TNM', attrs_to_copy=None, uid=None)[source]#
TNM (Tumour/Node/Metastasis) string matcher based on EDS-NPL’s tnm pipeline <https://aphp.github.io/edsnlp/latest/pipelines/ner/tnm/>.
For each TNM string that is found, an entity will be created with an
TNMAttribute
attribute attached to it containing normalized values of the TNM components.- Parameters
output_label (
str
) – Label to use for TNM entities created (the label of the attributes will always be “TNM”)attrs_to_copy (
Optional
[List
[str
]]) – Labels of the attributes that should be copied from the input segment to the created TNM entity. Useful for propagating context attributes (negation, antecedent, etc).uid (str) – Identifier of the matcher
Methods:
run
(segments)Find and return TNM entities for all segments
set_prov_tracer
(prov_tracer)Enable provenance tracing.
Attributes:
Contains all the operation init parameters.
- property description: medkit.core.operation_desc.OperationDescription#
Contains all the operation init parameters.
- Return type
- set_prov_tracer(prov_tracer)#
Enable provenance tracing.
- Parameters
prov_tracer (
ProvTracer
) – The provenance tracer used to trace the provenance.