neuralset.events.transforms.text.AddSentenceToWords

pydantic model neuralset.events.transforms.text.AddSentenceToWords[source][source]

Adds sentence-level information to word events based on Text rows.

This transform processes a DataFrame containing word-level (Word) and text-level (Text) events. For each sentence found in the Text rows, it:

  1. Creates a new Sentence row for each sentence.

  2. Assigns sentence, sentence_char, and text_char annotations to Word rows.

Parameters:
  • max_unmatched_ratio (float) – Maximum ratio of words without a character-positioned match.

  • override_sentences (bool, default=False) – Whether to replace existing Sentence rows if they are already present.

Fields:
field max_unmatched_ratio: float = 0.0[source]
field override_sentences: bool = False[source]
requirements: tp.ClassVar[tuple[str, ...]] = ()[source]