How to pre process the user input before handing over it to rasa to process

I have a data processing pipeline that fix abbreviations, remove special chars, emoji removal, spell checker, handling mugging words and stuff…

I want that user input is processed through this pipeline before rasa handles the request. Is there any way to this?

Hello @ermarkar

Yes, you can do that by building your own NLU Pipeline component. If you like, you may even add this to the nlu-examples repo, as others might also be interested. Just create a PR.

In any case, the nlu-examples repo contains several examples on how to write your own component.

Your component should come before the tokenizer in the pipeline, or you may write it as your own Tokenizer.

thanks!! sure will raise PR.

1 Like