I am trying to leverage the Spacy lemmatizer to ensure that I can use the lemma of a word when using synonyms. For instance, I have set the below synonyms:
- synonym: submit
examples: |
- initiate
- generate
- raise
When I input this sample query: “I cannot seem to generate a request” Rasa correctly identifies “generate” as a entity with value “submit”. However, if I write “I am having an issue generating a request” it seems that Rasa actually identifies the entity as “generating” rather than as “submit”. I actually have not even annotated my training data with any examples for “generating” so I am not sure why:
1.) The synonym “submit” is not generated
2.) A new entity value of “generating” is created
Here is my config (I tried to use the Spacy lemmatizer, but it does not seem to make a difference):
pipeline:
- name: SpacyNLP
model: "en_core_web_md"
case_sensitive: False
- name: SpacyTokenizer
use_lemma: True
intent_tokenization_flag: False
intent_split_symbol: "_"
- name: RegexEntityExtractor
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
analyzer: char_wb
min_ngram: 1
max_ngram: 4
use_lemma: True
- name: DIETClassifier
epochs: 100
- name: EntitySynonymMapper
- name: ResponseSelector
epochs: 100
Thank you very much