great-ai/great_ai/views/outputs/sequence_labeling_output.py
Andras Schmelczer c55eba2077
All checks were successful
Publish documentation / publish (push) Successful in 51s
Check / Test on Python 3.10 (push) Successful in 1m1s
Check / Lint, format & type checks (push) Successful in 1m9s
Check / Test on Python 3.11 (push) Successful in 51s
Check / Test on Python 3.12 (push) Successful in 58s
Check / Test on Python 3.13 (push) Successful in 55s
Add max deps and bump old ones
2026-06-06 22:29:16 +01:00

15 lines
387 B
Python

from typing import Any, List, Literal, Optional
from ..hashable_base_model import HashableBaseModel
class LabeledToken(HashableBaseModel):
token: str
tag: Literal["B", "I", "O", "E", "S"]
confidence: float
explanation: Optional[Any] = None
class SequenceLabelingOutput(HashableBaseModel):
labeled_tokens: List[LabeledToken]
explanation: Optional[Any] = None