How to train model to recognize diff entities that can come in both numbers and text

For example say I have a chat bot that talks about different movies in a cinema.

Spiderman is the first movie on list therefore, therefore intent can come in multiple ways,

intent of movie one

  • what is the story of [Movie 1] (spiderman) about?
  • what is the story of [Movie one] (spiderman) about?
  • what is [spiderman] (spiderman) about?
  • what is the [first movie] (spiderman) ?

similarly have one for a second movie intent of movie two

  • what is the story of [Movie 2] (batman) ?
  • what is the story of [movie two] (batman) about?
  • what is [batman] (batman) about?
  • what is the [second movie] (batman)?

i also have other movies, the bot however gets confused often when i use numerical number. for example If i say i want to say “what is movie 7 about” it always chooses movie 2 (batman).

Am I training my data wrong? I am using SpacyNLP, SpacyTokenizer and SpacyFeaturizer if that helps.

If the same movies will always be shown in the same order, you could define custom synonyms. This blog post has a nice walk through.

Thank you!

Hey although this has certainly helped is there a sure way I can detect alpha numerical synonym.

Currently the intent Movie 1 and Movie 3 always returns the ‘Movie 2’ response. I am using EntitySynonymMapper instead of NER_Synonym, could this be the problem? Is there anyway to fix this?

If you’re looking to get the number part, we recommend Duckling: Components