medacy.pipeline_components.annotation.gold_annotator_component module

class medacy.pipeline_components.annotation.gold_annotator_component.GoldAnnotatorComponent(spacy_pipeline, labels)[source]

Bases: medacy.pipeline_components.base.base_component.BaseComponent

A pipeline component that overlays gold annotations. This pipeline component sets the attribute ‘gold_label’ to all tokens to be used as the class value of the token when fed into a supervised learning algorithm.

_abc_impl = <_abc_data object>
dependencies = []
find_span(start, end, label, span, doc)[source]

Greedily searches characters around word to find a valid set of tokens the annotation likely corresponds to. :param start: index of token start :param end: index of token end :param label: :param span: :param doc: :return:

name = 'gold_annotator'