Is there an easy way to get a lot of synonyms into rasa x?

I’m working on a form that should fill a slot with one out of four values. Each of these four values has got a lot of synonyms. Actually, the four values are product categories and the synonyms are products in those categories.

F.e. product category “Computers and electrics”, product “SSD”. So, “Computers and electronics” as the synonym for value “SSD”.

I am not interested in the products, only in the categories. But I know, my users are going to use the product names, not the productgroup.

I started in rasa open source by putting all the synonyms (i.e. “products”) for one entity value (i.e. “productgroep”) into one .md file. f.e. “computers_electronics. md”:

## synonym: Computers en elektronica
- barcodeprinters
- barcodescanners
- batterijen
- beamers
- beeldscherm

Once done, I started rasa x (from command line). But then I noticed that the training data / NLU / synonyms tab was empty. So, I concluded that I couldn’t use the .md file seperated from the nlu.md file wich holds the intents.

I’ve got three questions:

  1. Am I right, i.e. Rasa X can’t read the seperated synonym file?
  2. Is there a way to import synonym files in Rasa x, just like the look-up tables. Reason for this question: If I want to at a lot of synonyms (100 products to one productgroup), I don’t want to bother my users to do it by hand. And I don’t want them to use command line, they just have to stick to Rasa X.
  3. I wonder if using synoyms is the Rasa way for my case. Or do you suggest another approach?

Notes:

  1. Rasa open source 1.9.5, rasa-x 0.27.6, both command line, not Docker.
  2. I realize in some of the sentences above I use ‘synonym’ the other way around than the Rasa docs: 100 proucts are synonyms for 1 productgroup.
  3. I’ve got no users yet: just preparing Rasa and the bot. But when I’m going live, I want to make it as easy as possible for my users!
1 Like

After one night sleeping on it :slightly_smiling_face:, I think my solution is not the desired one.

After all, wat I thought to be synonyms actually are different entity (types).

F.e. “SSD” is the entity ‘product’ and “Computers and electroniscs” is the entity ‘catagory’

So I’ll extract the entity ‘product’ and I’ll use a look-up in actions.py to get the category by the extracted product.

And of-course, when my bot is going live, the look-ups will be stored inproduct-database