About Regex use in gobot model

Hi, I use DeepPavlov since february and I have an doubt in use of gobot. I’m making an dataset simillar of the DSTC2 used in tutorial and I wanna know if RegEx expressions can be used in model.

If my doubt is taken, I thank for the community.

Best regards,
Gilberto Fernandes

Hi Gilberto,

Nice to have you in deeppavlov users’ clan.

Where do you intend to use regular expressions?
If your motivation is to write some template-based rules that activate specific bot actions (along or without network predictions of actions), it is possible to do.

For example, you can add you python implemented rules to GoalOrientedBot.__call__(https://github.com/deepmipt/DeepPavlov/blob/master/deeppavlov/models/go_bot/network.py) method.
__call__ takes minibatch of input utterances and outputs responses.

Best,
Mariia

Thank you very much for the response. But, I have a doubt: where do I put this rules in the GoalOrientedBot.__call__ method?
Best regards,
Gliberto Fernandes

GoalOrientedBot.__call__ method calls _infer method which inputs contexts (batch of dictionaries with context info) and returns textual bot response.

You should replace text returned by _infer with your own text.