neuralset.events.etypes.BaseText

class neuralset.events.etypes.BaseText(*, start: float, timeline: str, duration: Annotated[float, Ge(ge=0)] = 0.0, extra: dict[str, Any] = {}, text: Annotated[str, MinLen(min_length=1)], language: str = '', context: str = '', modality: Literal['heard', 'read', 'imagined', 'typed', 'written', 'caption'] | None = None)[source][source]

Base class for text-based events.

Parameters:
  • language (str, optional) – ISO language code (e.g., ‘en’, ‘fr’). Default: “”

  • text (str) – The text content (must be non-empty)

  • context (str, optional) – Contextual information (e.g., preceding words). Default: “”

  • modality (Literal["heard", "read", "imagined", "typed", "written", "caption"], optional) – Modality of the text event. Default: None

Raises:

ValidationError – If text is empty (min_length=1)