I am using the default pipeline as advised in the RASA documentation (See “The Short Answer” at Choosing a Pipeline, but could not get EntitySynonymMapper to work properly directly.
I had defined the following synonym for distance
synonym:distance
- km
- kms
- kilometre
- kilometres
- mile
- miles
- distance
for intent that should recognise questions about distance, such as:
- Tell me the distance I walked today?
However, when I say “Tell me the kilometres I walked today”, the system (DIETClassifier) would identify “kilomet” as entity “unit” instead of mapping it to “distance” as it is supposed to happen. I understand that the underlying components are using word stems to perform natural language understanding. However, I do not understand why the “DIETClassifier” entity extractor returns the word stem instead of the whole word. Further, I also could not find anywhere in the documentation that we are supposed to use word stems in the synonym mapping definition. I think this is a bug, please correct me if I am wrong. Further, to fix all synonyms in my current version, please let me know which word stemmer the system is exactly using. I noticed that the Lancaster stemmer converts the word “kilometres” to “kilomet”. Is this what is being used?
Thank you