medkit.text.postprocessing
Contents
medkit.text.postprocessing#
APIs#
For accessing these APIs, you may use import like this:
from medkit.text.postprocessing import <api_to_import>
Classes:
|
Annotator to copy attributes from a source segment to its nested segments. |
Functions:
|
Return source segments aligned with its nested segments. |
- class AttributeDuplicator(attr_labels, uid=None)[source]#
Annotator to copy attributes from a source segment to its nested segments. For each attribute to be duplicated, a new attribute is created in the nested segment
Instantiate the attribute duplicator
- Parameters
attr_labels (
List[str]) – Labels of the attributes to copyuid (str) – Identifier of the annotator
Methods:
run(source_segments, target_segments)Add attributes from source segments to all nested segments.