Sometimes the DucklingEntityExtractor doesn’t pick extract year as time entity.
Example 1: if I provide year before the month
? Your input -> magazine_name 2020 jan
? Is the intent 'download_magazine' correct for '[magazine_name](magazine) 2020 [jan]{"entity": "
time", "value": "2023-01-01T00:00:00.000+00:00"}' and are all entities labeled correctly? (Y
/n)
But if I provide month and year after that then it works.
? Your input -> magazine_name jan 2020
? Is the intent 'download_magazine' correct for '[magazine_name](magazine) [jan 2020]{"entity": "
time", "value": "2020-01-01T00:00:00.000+00:00"}' and are all entities labeled correctly? (Y
/n)
Example 2: If only a year is provided. 2020
should have been marked as an year.
? Your input -> magazine_name 2020
? Is the intent 'download_magazine' correct for '[magazine_name](magazine) 2020' and are all enti
ties labeled correctly? (Y/n)
Can anybody please suggest what changes can I do to get the entities marked as time in the above examples
The pipeline configuration is as follows:
pipeline:
# # No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model.
# # If you'd like to customize it, uncomment and adjust the pipeline.
# # See https://rasa.com/docs/rasa/tuning-your-model for more information.
- name: WhitespaceTokenizer
- name: RegexFeaturizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer
analyzer: char_wb
min_ngram: 1
max_ngram: 4
- name: DIETClassifier
epochs: 100
constrain_similarities: true
- name: EntitySynonymMapper
- name: ResponseSelector
epochs: 100
constrain_similarities: true
- name: FallbackClassifier
threshold: 0.3
ambiguity_threshold: 0.1
- name: "DucklingEntityExtractor"
url: "http://localhost:8000"
dimensions: ["time"]
timezone: "Asia/kolkata"
The NLU data for the intent is as follows:
version: "3.0"
nlu:
- intent: download_magazine
examples: |
- download [magazine_name](magazine) 2020 Jan
- [magazine_name](magazine) February 2022
- last month [magazine_name](magazine)
- download [magazine_name](magazine) last december
- download [magazine_name](magazine) March 2018
- [magazine_name](magazine)