iai-group / MovieBot

IAI MovieBot
https://iai-group.github.io/MovieBot/
MIT License
8 stars 10 forks source link

Unclear intent conversion in NLU #199

Open IKostric opened 1 year ago

IKostric commented 1 year ago
    def _convert_deny_to_inquire(
        self, user_utterance: UserUtterance
    ) -> List[DialogueAct]:
        """Converts deny intent to inquire intent.

        Args:
            user_utterance: User utterance.

        Returns:
            A list of dialogue acts.
        """
        # TODO: It is unclear the purpose of this function. It should be
        # removed or refactored.
        deny_dact = self.intents_checker.check_basic_intent(
            user_utterance, UserIntents.DENY
        )
        if deny_dact:
            deny_dact[0].intent = UserIntents.INQUIRE
        return deny_dact