3

I’m trying to extract entities using `DucklingHTTPExtractor. Here is the relevant code:

pipeline: 
- name: "SpacyNLP"
- name: "SpacyTokenizer"
- name: "RegexFeaturizer"
- name: "SpacyFeaturizer"
- name: "CRFEntityExtractor"
- name: "EntitySynonymMapper"
- name: "SklearnIntentClassifier"
- name: "DucklingHTTPExtractor"
  # url of the running duckling server
  url: "http://localhost:8000"
  # dimensions to extract
  dimensions: ["email", "time", "date", "amount-of-money", "distance"]
  # allows you to configure the locale, by default the language is
  # used
  locale: "NL_Nothing"
  # if not set the default timezone of Duckling is going to be used
  # needed to calculate dates from relative expressions like "tomorrow"
  timezone: "US/Pacific"

Domain:

intents:
- input_date

entities:
- date

slots:
  date:
    type: unfeaturized

templates:
  utter_date:
  - text: '{date}'

Stories:

## test
* input_date{"date" : "tomorrow"}
 - utter_date
Duckling server is running on 8000.

When i enter “tomorrow” - the bot sets the date slot to “tomorrow”.

How do i make duckling set it to the tomorrow’s date :

Wednesday, 21 August 2019

as it does here : https://duckling.wit.ai/

Thanks!

vivekanon
  • 1,813
  • 3
  • 22
  • 44
  • 1
    Is duckling correctly picking up the entity? You can test that with `rasa shell nlu`. Also what does your training data look like? You shouldn't annotate "tomorrow" as a date entity if you want duckling to fill it (you don't want the CRF to pick up that entity) – Ella Rohm-Ensing Sep 12 '19 at 09:00

1 Answers1

0

To make it work, make sure you have the following things done:

  1. Make sure you have duckling running in background
  2. Make sure you have passed duckling server endpoint in config file
  3. Make sure you have also added the relevant dimensions in rasa config file
  4. Make sure you have added the relevant logic in actions.py file
Rabin Poudyal
  • 717
  • 6
  • 20