dialoguekit.core.annotated_utterance¶
Interface extending utterances with annotations.
Classes¶
Represents an utterance, with annotations. |
Module Contents¶
- class dialoguekit.core.annotated_utterance.AnnotatedUtterance¶
Bases:
dialoguekit.core.utterance.Utterance
Represents an utterance, with annotations.
The AnnotatedUtterance is a Utterance with additional information. In some cases we want to send an utterance with dialogue acts and/or Annotations. Dialogue acts are a specific type of annotation.
- dialogue_acts: List[dialoguekit.core.dialogue_act.DialogueAct]¶
- 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_dialogue_acts(dialogue_acts: List[dialoguekit.core.dialogue_act.DialogueAct]) None ¶
Adds dialogue acts to the utterance.
- Parameters:
dialogue_acts – List of dialogue acts.
- get_intents() List[dialoguekit.core.intent.Intent] ¶
Returns utterance’s intents.
- num_dialogue_act_annotations() int ¶
Returns the number of slot-value annotations in dialogue acts.
- 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.