dialoguekit.nlg.nlg_abstract¶
Abstract interface for NLG.
Classes¶
Represents a Natural Language Generation (NLG) component. |
Module Contents¶
- class dialoguekit.nlg.nlg_abstract.AbstractNLG¶
Bases:
abc.ABC
Represents a Natural Language Generation (NLG) component.
- abstract generate_utterance_text(dialogue_acts: List[dialoguekit.core.dialogue_act.DialogueAct], annotations: List[dialoguekit.core.annotation.Annotation] | None | None = None, force_annotation: bool = False) dialoguekit.core.annotated_utterance.AnnotatedUtterance | bool ¶
Turns a structured utterance into a textual one.
This method is supposed to be implemented in a way that takes the arguments and returns a textual utterance, based on the arguments.
- Parameters:
dialogue_acts – Dialogue acts of the utterance to be generated.
annotations – If provided, these annotations should be considered during generation.
force_annotation – A flag to indicate whether annotations should be forced or not.
- Returns:
Generated response using templates. If generation fails, False should be returned.
- Raises:
NotImplementedError – If not implemented in derived class.