Add metadata support in synonym key to enhance EntitySynonymMapper

I was thinking of extending and enhancing the EntitySynonymMapper component in rasa. what I wanted to do was a fuzzy match with the synonyms if a particular entity is not directly matched with the existing synonym dictionary.

But I wanted to avoid doing this fuzzy match across all the synonym words. Because we already know which entity was detected, the idea was to do this fuzzy matching with only the synonyms of the given entity. For this I wanted to know the entity type for each of these synonyms words.

based on the docs on Training Data about putting metadata in syonyms, I wanted to do something like this.

- synonym: nlp
     entity_type : course_name 
  examples: |
    - natural language processing
    - language processing  

but looks like this way of inserting metadata is only applicable for intents and not synonyms. I was getting parsing errors on training.

Is there any way to get the entity type info at the synonym dictionary. Any scope of adding the metadata key to synonyms as well in the future ?

Hi @dingusagar! First of all, sorry for the late reply!! Is your question still relevant?

We have an issue for this! Maybe you can double check if this is the same thing you’re talking about.

However, unfortunately it’s not our current priority to work on this soon.