Toloka documentation


toloka.client.project.template_builder.fields.TextAnnotationFieldV1 | Source code

    data: Optional[BaseComponent] = None,
    adjust: Optional[Union[BaseComponent, str]] = None,
    content: Optional[Union[BaseComponent, str]] = None,
    disabled: Optional[Union[BaseComponent, bool]] = None,
    labels: Optional[Union[BaseComponent, List[Union[BaseComponent, Label]]]] = None,
    hint: Optional[Any] = None,
    label: Optional[Any] = None,
    validation: Optional[BaseComponent] = None,
    version: Optional[str] = '1.0.0'

A component for text segmentation.

Use it to select multiple words, individual words, or letters in the text and label them with values. You can create multiple categories to label parts of the text, like all nouns and adjectives.

You can use plugin.field.text-annotation.hotkeys to assign keyboard shortcuts for selecting categories.

Parameters Description

Parameters Type Description
data Optional[BaseComponent]

Data with values that will be processed or changed.

adjust Optional[Union[BaseComponent, str]]

If the property value is set to words, only words can be selected in the text. If you don't use this property, any part of a line can be selected.

content Optional[Union[BaseComponent, str]]

The text where the performer has to select part of a line.

disabled Optional[Union[BaseComponent, bool]]

This property blocks the component. If true, the component is unavailable to the performer. The default value is false.

labels Optional[Union[BaseComponent, List[Union[BaseComponent, Label]]]]

A category.

hint Optional[Any]

Hint text.

label Optional[Any]

Label above the component.

validation Optional[BaseComponent]

Validation based on condition.