EntitySynonymMapper

How do you use synonyms ?
I use them as follows but it doesn’t work

NLU

## intent:NYIntent
- algun dia vivire en [new york](NYEntity)
- me gustaria ir a [new york](NYEntity)
- lo mejor de [new york](NYEntity) son los casinos
- [new york](NYEntity)

## synonym:new york
- NY
- nueva york
- NYC

Config

language: en
pipeline:
  - name: WhitespaceTokenizer
    case_sensitive: False
  - name: RegexFeaturizer
  - name: LexicalSyntacticFeaturizer
  - name: EntitySynonymMapper
  - name: CountVectorsFeaturizer
  - name: DIETClassifier
    epochs: 100
  - name: EntitySynonymMapper
  - name: ResponseSelector
    epochs: 100

The usage looks correct :+1:

Can you please elaborate what it doesn’t work means?

The bot’s supposed to detect a synonym and my entity whenever I enter “I will live in NYC”. However, It doesn’t detect them.

I don’t know what I’m doing wrong and I was wondering if you could tell me what to do in order to make it work.

Is it detecting the entity? If it doesn’t detect the entity in the first place, then the synonym can’t be mapped. In that case you need to add more training data.

It did not detect the entity with the synonym, but it was doing more testing adding the synonyms into the entity value and thus the entities and synonyms worked.

My question is, in the intent it is necessary to add the synonyms in the value of the intent so that it is detected?

Example:

## intent:NYIntent
- algun dia vivire en [new york](NYEntity)
- me gustaria ir a [nueva york](NYEntity)
- lo mejor de [NY](NYEntity) son los casinos
- [NYC](NYEntity)

## synonym:new york
- NY
- nueva york
- NYC

What happens is that it works that way, but I can’t find the use of synonyms in this example.
I really appreciate your help Tobias