Listing entities in intents like Dialogflow and Watson

I am facing a real issue, I don’t what I am looking for is not provided by rasa or it is just I can’t find it.

Now, I was using IBM Watson and Dialogflow. Entities are divided into:

  • Entities
  • Sub-entities
  • Synanoms for each sub-entity

and when you refer to intents training data you just type the entity name or sub-entity name and one time only

example: Entity: iPhone Sub-entitiies:

  1. iphone7

synanoms: iphone seven, iPhone 7, i Phone 7, iPhone svn 2) iphone8

synanoms: iphone eight, iPhone 8, i Phone 8, iPhone eight 3) iPhone12

synanoms: iphone twelce, iPhone 12, i Phone 12, iPhone 12

intent training sample: I want to buy @iphone

but in rasa the only possible way is to add it like that: (just for clarification)

I want to buy [iphone seven]{“entity”: “iPhone”, “value”: “iphone7”}

I want to buy [iphone seven] (iPhone)

I want to buy [iPhone 7] {“entity”: “iPhone”, “value”: “iphone7”}

I want to buy [i Phone 7] {“entity”: “iPhone”, “value”: “iphone7”}

I want to buy [iphone eight] {“entity”: “iPhone”, “value”: “iphone8”} … … etc

Listing entities in intents by this way is an absolute hassle, especially that I have already huge data set and it will make my intents increase 100x times and I believe it will cause overfitting.

Is there any way to list my entities as I list them in Watson or Dialogflow?

Are you looking for https://rasa.com/docs/rasa/nlu-training-data/#synonyms in Rasa?

no, i have read the documentation pretty well and it didn’t reply to my question

From the example you have given, you can define the synonyms as -

nlu:
- synonym: iphone7
  examples: |
    - iphone seven
    - iPhone 7
    - i Phone 7

and have a couple of training examples which includes some of those synonyms instead of listing all of them.

@Nermeen - I have an open pull request that unpacks the watson style data into Rasa trainable format.

if you would like to test my branch with watson data and provide feedback that would be great

Sir i know very well how to add the nlu data and it is not my concern. please read my question carefully.

Thank u for ur response

Hi,

I recently ran into the same problem as @Nermeen.
Has anybody found the solution since then?

Anyone who made a format converter to Rasa format must have handle it in some way. Either duplicating sentences like @Nermeen did and risking overfitting or just ignoring some entity examples and losing on entity extraction perfomance or maybe another way ?

@souvikg10, what did you do in your Watson data importer ?
@dakshvar22, could you ask people at Rasa who knows how their DF->Rasa importer was made ?

Wish you all a good day!