SpacyEntityExtractor is not recognising the entities correctly

Rasa v - 0.15

OS - Mac OS

text - set an alarm at 3 am

entity = CARDINAL

value = 3

We can see that expected output from text should be-

entity = TIME

value = 3am

Why it showing wrong result?

Model used in spacy - 'en_core_web_md'

Pipeline that I am using is -

language: "en"
- name: "SpacyNLP"
  model: "en_core_web_sm"
  case_sensitive: false
- name: "WhitespaceTokenizer"
- name: "SpacyEntityExtractor"
- name: "CRFEntityExtractor"
- name: "EntitySynonymMapper"
- name: "CountVectorsFeaturizer"
- name: "EmbeddingIntentClassifier"

Hey there @raovikash, it’s highly recommended to use duckling for entity extraction of numbers and times. It’s much more robust than spacy in this case. Unfortunately rasa has no influence on how Spacy picks up your entities.

We can’t use duckling in our internal environment.

I see. Sorry that spacy isn’t doing it’s job, but we can’t really influence that. You could try annotating things manually and using the CRFEntityExractor to pick up those entities, but that might be a lot of work and you’ll need more examples.