Training Synonym in Rasa NLU


I have just started with RASA-X and I was working on training the Rasa NLU on different synonyms. I looked up at the examples that were provided as part of Rasa Docs and tried to implement an example of my own and also the example provided as part of the training snippet. I used the method-2, where we define synonym under a separate heading with the name of the synonym.



  • pink pig
  • savings
  • savings account

With this example, I trained the Rasa NLU but it is unable to pick any data from the synonym list. Is this the right way to train the synonyms or do we have to follow method-1 as specified in the link as given below:

If I have to follow method-1 then I have to train the intent containing utterances of all the synonyms.

It would of great help if anyone could suggest me with any alternate way or tell me the steps to effectively train the NLU on the synonyms list.

Thanks in advance!!!



Make sure you have the EntitySynonymMapper configured properly in your NLU pipeline. By default, if you are using one of the preconfigured pipelines it’ll be included.

If it is there, it should be picked up properly. If not, you can try deleting your existing models and retraining it from scratch (Seems to fix stuff for me sometimes).

Training should just be the same as you would usually do it.

Hi Mappi, - Thanks for the response. The rasa nlu version that I’m working on is 1.5.2 and I am using one of the per-configured pipeline called ‘supervised_embeddings’ and I am facing the issue while training the synonym list.

Seems weird. There is a note regarding the use of arrays when it comes to the synonym mapping:

Might have to do something with it.

Thanks Mappi. I’ll try it out.