Skip to main content

Answer Objects

class Answer(ABC, Generic[ValueType, AttributeType])
An internal helper class for the LabelRowV2 class. This class is not meant to be used directly by users.

unset

def unset() -> None
Remove the value from the answer

to_encord_dict

def to_encord_dict(
        ranges: Optional[Ranges] = None) -> Optional[Dict[str, Any]]
A low level helper to convert to the Encord JSON format. For most use cases the get_answer function should be used instead.

TextAnswer Objects

class TextAnswer(Answer[str, TextAttribute])

set

def set(value: str,
        manual_annotation: bool = DEFAULT_MANUAL_ANNOTATION) -> None
Returns the object itself

ChecklistAnswer Objects

@dataclass
class ChecklistAnswer(Answer[List[FlatOption], ChecklistAttribute])
Checkboxes behave slightly different from the other answer types. When the checkbox is unanswered, it will be the equivalent of not having selected any checkbox answer in the Encord platform. The initial state will be every checkbox unchecked.