How to use DucklingHTTPExtractor?

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

- 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", "currency"]
  # 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 :

- input_date

- date

    type: unfeaturized

  - text: '{date}'


## 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 :


Can you run the server with --debug? Is there any log output in there?

I got this one to work Trying to extract another entity type - money.

Input value : $3356

Getting the value for the slot amount-of-money in a custom action, can we get the currency in a slot as well ?


@souvikg10 suggestions please ?

We did it through a custom action , setting the currency after extracting it from the entities object of the tracker.

1 Like

Did you define an entity and add annotated examples for the currency? Couldn’t make that work with duckling plugged in.

Weird, for us we used duckling and it provided amount-of-money, i even wrote the duckling regex in the official repo for amount-of-money (for dutch and french)

1 Like

You need to change DucklingEntittyExtractor url as Rasa providing it as publicly available server.