0

Rasa v - 0.15

OS - Mac OS

text - set an alarm at 3 am

entity = CARDINAL

value = 3

We can see that expected entities 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" pipeline: - name: "SpacyNLP" model: "en_core_web_sm" case_sensitive: false - name: "WhitespaceTokenizer" - name: "SpacyEntityExtractor" - name: "CRFEntityExtractor" - name: "EntitySynonymMapper" - name: "CountVectorsFeaturizer" - name: "EmbeddingIntentClassifier"

2 Answers 2

1

I'm not familiar with the elements of the stack that are not Spacy, but as far as Spacy goes: the models are not always correct. They use probabilistic approaches to determine the category of a Named Entity.

You can experiment with larger models (such as en_core_web_lg), but they are more expensive computationally. Alternatively, you can think about training the NER-model to be better fit for your purpose. Spacy.io offer a tool for this, it is called Prodigy I think. Either way - without extensive training it is still a challenge to create totally robust Named Entity Recognition.

1

I would recommend to try out rasa/duckling. This is using the entity extractor from wit.ai and it is very nice and powerful for extracting time and date entities. For this, it is necessary to run a separated docker container and include it in your pipeline configuration in your nlu_config.yml and to specify the endpoint of this docker container in your endpoints.yml

1
  • we can't use duckling in our internal environment May 7, 2019 at 11:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.