How to convert user text to lowercase before NLU starts?

Is there an option to convert a user’s message to lowercase before the NLU processing starts?

For instance, if a user sends What a Beautiful DAY I would like it to be converted to what a beautiful day and then allow my components to identify intents and extract entities.

Also, is there any way to map special characters to something else? e.g ό to o, or ϊ to ι. Does anyone know which file(s) should I edit to achieve this special character mapping?

hey @stavr

convert a user’s message to lowercase

if you’re using whitespace tokenizer, then you can set the case_sensitive to false.

map special characters to something else

for that specific case with umlauts you can configure CountVectorFeaturizer, and set strip_accents to unicode. More info here .

I hope that helps!

hey @degiz,

I actually managed to achieve the special character mapping by defining a custom method in file which detects any special characters in user’s text and replaces them with predefined values inside a dictionary. It seems to work fine so far.

Thank you for replying and providing your solution! :slightly_smiling_face:

1 Like