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
15 lines
387 B
Python
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
|