nlu.neural_nlu¶
Module Contents¶
Classes¶
Helper class that provides a standard way to create an ABC using |
Attributes¶
- class nlu.neural_nlu.NeuralNLU(config: Dict[str, Any], path: str | None = _DEFAULT_MODEL_PATH)¶
Bases:
moviebot.nlu.nlu.NLUHelper class that provides a standard way to create an ABC using inheritance.
- generate_dacts(user_utterance: moviebot.core.utterance.utterance.UserUtterance, options: moviebot.core.core_types.DialogueOptions = None, dialogue_state: moviebot.dialogue_manager.dialogue_state.DialogueState = None) List[moviebot.dialogue_manager.dialogue_act.DialogueAct]¶
Processes the utterance according to dialogue state and generate a user dialogue act for Agent to understand.
- Parameters:
user_utterance – User utterance class containing user input.
options – A list of options provided to the user to choose from. Defaults to None.
dialogue_state – The current dialogue state, if available. Defaults to None.
- Returns:
A list of dialogue acts.
- annotate_utterance(user_utterance: moviebot.core.utterance.utterance.UserUtterance) Tuple[str, list]¶
Annotates the utterance with intent and slot information.
- Parameters:
user_utterance – User utterance class containing user input.
- Returns:
A tuple of the intent and slot information.
- get_constraint_operator(text: str) moviebot.nlu.annotation.operator.Operator¶
Gets the operator based on the text. Only supports negation for now.
- Parameters:
text – The text to analyze.
- Returns:
The operator.
- nlu.neural_nlu.nlu¶