Help in using regex feature in rasa_nlu

Hello Friends, Can someone help me in using regex feature for recognising the entities. I want to use zipcode as location entity. I am creating training data in markdown format. please find my nlu.md file.

nlu.md (1.5 KB)

hey @Teluguntla123 i checked your nlu.md file, its correct what is the problem you are facing?

Thank you @JiteshGaikwad for responding. I want to know how does the regex feature works. I want nlu to consider every five digit number as zipcode and as location entity. Can you tell me how could I do that?

hey @Teluguntla123 Regex documentation explains how it works
https://rasa.com/docs/nlu/master/entities/#regular-expressions-regex

if you want some more clarification you can read this article :

:smiley:

okay thank you @JiteshGaikwad. I will go through them. For the time being, I just wanted to know the code that required or changes that need to make to recognise every five digit number as zipcode and location entity. Can you help me in this?

okay. Then we don’t need to define that nlu.md file? I want to bind that to location entity.

okay. Then how should I train the model. I need to add something in the nlu.md file right??

Adding just this: regex:zipcode [0-9]{5} in nlu.md file is enough. and adding entity zipcode in domain.yml is enough?

hey @Teluguntla123, check out this link hope it helps you

okay @JiteshGaikwad. I will go through it. Do you have any idea how to use action_restart action i.e. If the user breaks in the middle of the story and goes to beginning, then I want bot to restart. I have been looking for this in document. I didn’t find any use case.

hey @Teluguntla123 i haven’t done this usecase but as per i think, you can write a story,if user breaks in the middle of the story

is it? I am building a chatbot for my company. I am very much new to python and Rasa stack framework. Can you just guide me in how to write a story if a user breaks in the middle. Thank you