dialoguekit.core.annotated_utterance¶
Interface extending utterances with annotations.
Classes¶
Represents an utterance, with additional annotations. |
Module Contents¶
- class dialoguekit.core.annotated_utterance.AnnotatedUtterance¶
Bases:
dialoguekit.core.utterance.Utterance
Represents an utterance, with additional annotations.
The AnnotatedUtterance is a Utterance with additional information. In some cases we want to send an utterance with the Intent and or Annotations.
- intent: dialoguekit.core.intent.Intent¶
- annotations: List[dialoguekit.core.annotation.Annotation]¶
- metadata: Dict[str, Any]¶
- get_utterance() dialoguekit.core.utterance.Utterance ¶
Returns the annotated utterance as a utterance.
- classmethod from_utterance(utterance: dialoguekit.core.utterance.Utterance)¶
Creates an instance of AnnotatedUtterance from an utterance.
- add_annotations(annotations: List[dialoguekit.core.annotation.Annotation]) None ¶
Adds annotations to the utterance.
- Parameters:
annotations – List of annotations.
- get_text_placeholders() str ¶
Replaces the utterance text with placeholders.
- Returns:
The utterance text with annotations replaced with placeholders.