Entity extraction without synonyms

Hi, community. In my nlu data, I Have an entity like Bachelor of Engineering (Electrical) Degree with Electrical Engineering Technology Advanced Diploma. For the sentence with keyword Degree with Electrical Engineering if I want to fetch it then how can I do that.

In-sort I want Bachelor of Engineering (Electrical) Degree with Electrical Engineering Technology Advanced Diploma = Degree with Electrical Engineering

I can’t use synonyms. Because like the above example there are a lot of programs available and for each program, a lot of synonyms may possible. Is there any pipeline which can do the job.

@Emma @amn41 @Juste @akelad , please assist

You will have to use synonyms for that, because it won’t be clear where the entity starts/stops otherwise.

Alternatively, you could, every time the entity “Degree with Electrical Engineering” is present, extract the full degree title in a custom action from the user message. But that will be tricky, because you again have to assume the user starts/stops with a certain word

Hey @capgos17. Synonyms is the way to go here because what you are after is data normalisation.

I would doubt there are thousands of possible diplomas out there haha. How many distinct entities are you dealing with?

150+ distinct entities Basically these entities are the names of the programs offered by a college

@akelad the same I assumed. Why because when a user comes to our bot he doesn’t know the exact whole name. So If Somehow rasa fetches the entity then I can use %LIKE% for fetching the data from sql.