medkit.core.operation
medkit.core.operation#
Classes:
|
Abstract operation directly executed on text documents. |
|
Abstract class for all annotator modules |
- class Operation(uid=None, name=None, **kwargs)[source]#
Abstract class for all annotator modules
- Common initialization for all annotators:
assigning identifier to operation
storing class name, name and config in description
- Parameters
uid (str) – Operation identifier
name – Operation name (defaults to class name)
kwargs – All other arguments of the child init useful to describe the operation
Examples
In the __init__ function of your annotator, use:
>>> init_args = locals() >>> init_args.pop('self') >>> super().__init__(**init_args)
Methods:
set_prov_tracer
(prov_tracer)Enable provenance tracing.
Attributes:
Contains all the operation init parameters.
- set_prov_tracer(prov_tracer)[source]#
Enable provenance tracing.
- Parameters
prov_tracer (
ProvTracer
) – The provenance tracer used to trace the provenance.
- property description: medkit.core.operation_desc.OperationDescription#
Contains all the operation init parameters.
- Return type
- class DocOperation(uid=None, name=None, **kwargs)[source]#
Abstract operation directly executed on text documents. It uses a list of documents as input for running the operation and creates annotations that are directly appended to these documents.
- Common initialization for all annotators:
assigning identifier to operation
storing class name, name and config in description
- Parameters
uid (str) – Operation identifier
name – Operation name (defaults to class name)
kwargs – All other arguments of the child init useful to describe the operation
Examples
In the __init__ function of your annotator, use:
>>> init_args = locals() >>> init_args.pop('self') >>> super().__init__(**init_args)
Attributes:
Contains all the operation init parameters.
Methods:
set_prov_tracer
(prov_tracer)Enable provenance tracing.
- 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.