flair.data.Label#
- class flair.data.Label(data_point, value, score=1.0, **metadata)View on GitHub#
Bases:
object
This class represents a label.
Each label has a value and optionally a confidence score. The score needs to be between 0.0 and 1.0. Default value for the score is 1.0.
- __init__(data_point, value, score=1.0, **metadata)View on GitHub#
Methods
__init__
(data_point, value[, score])set_value
(value[, score])to_dict
()Attributes
- set_value(value, score=1.0)View on GitHub#
- property value: str#
- property score: float#
- to_dict()View on GitHub#
- property shortstring#
- property metadata_str: str#
- property labeled_identifier#
- property unlabeled_identifier#