CRF and Regex for a comment entity


I am trying to add an entity called comments which will be always encoded in double quotes. example: “Please solve this”.

I tried using regex to solve this. But Rasa is not able to extract the entity.

Regex Pattern I have used is “([^\”]|\")*". Please help me with this.

Thanks in advance

Hi @pranavinu. Regular expressions help the CRF model learn to recognise entities but do not guarantee the model will extract them. I think the last line of the docs section might be useful for you:

If you just want to match regular expressions exactly, you can do this in your code, as a postprocessing step after receiving the response from Rasa NLU.

1 Like

okay @tyd. Will check that. thank you.

1 Like