Create a story with spelling check conditional response

Hi team,

I have to create a story with intent request_slot_value. So i am taking user input if user put input woth correct spelling then i do a next action accordingly. But if user put incorrect spelling then i have write a custom action “action_spelling_check” and give options for correct spelling input. So i have to take a correct user input again.

Ex .

  1. Correct spelling Input

    Userinput - Indian

    Response - Next action(search restaurant)

  2. InCorrect spelling Input

    Userinput - Indan.

    Response -

                   action spelling check
                    "Please select correct cuisine"
                    1. Indian

    Userinput - Indian

    Response - Next action(search restaurant)

So in above ex you can understand if user put correct input then do not check action spelling check. if incorrect then check spelling give option and take again input from user

Hi @swapnil1,

I understood your examples and what you want to do, but I didn’t get your problem and what exactly not working with you ?

Hi @wafaa I want to create stories for conversation flow as per above example. I am getting problem with stories like if i train multiple stories with action spelling check then chatbot follow for spellcheck with correct input. or if train without spelling check then chatbot follows same stories for spell mistake

As I got, you don’t know when the user enter a misspelled word.

  • you can use ‘spellchecker’ library in custom action:

    take user message and correct it with the lib, if the output id different so tell user to correct it.

  • or you can use the lib to correct the message direct without tell the user to correct anything and proceed with the are corrected message.

Yes i have created spellchecker program and taking input from the user if incorrect spell. But when i put correct spelling then also it goes for spellchecker and take input again. So i want to solve this like if slot fill with correct spell then do not go for spellchecker and take input again.

Hi Team, Can someone please respond to my query ?

Hi Team, Can someone please respond to my query ?

Hi Team, Resolved, by myself

Thank you for no responses

Hi @swapnil1, sorry we missed your question, usually one of us gets tagged to respond. In the future, it can help to tag one of us. If you want to confirm an intent or entity with the user you can follow the way we do this for Sara, our demo-bot. It sounds like you can do a two-stage fallback here.