I want to set my slot value using regular expression. any one please help me on that.
My slot was movie name, can’t train all movie names so i used regular expression pattern.
here my regular expression nlu data:
- regex: moviename examples: | - (.*) - intent: movies examples: | - [dabangg](moviename) - [sholay](moviename) - [pink](moviename) - [stalin](moviename) - [racha](moviename)
here is my slot in domain.yml:
intents: - movies: use_entities:  entities: - moviename slots: movie: type: text influence_conversation: false requested_slot: type: text influence_conversation: false
here is my actions.py:
class ActionMovieName(Action): def name(self): return "action_movie_name" def run(self, dispatcher, tracker, domain): movie = tracker.latest_message['text'] return [SlotSet("movie", movie)]
Here is my story path:
- story: happy path steps: - intent: greet - action: action_ask_movie_name - slot_was_set: - requested_slot: movie - intent: movies - action: action_movie_name