vivekanon
vivekanon

Reputation: 1823

How to use DucklingHTTPExtractor in RASA?

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!

Upvotes: 3

Views: 2359

Answers (1)

Rabin Poudyal
Rabin Poudyal

Reputation: 778

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

Upvotes: 0

Related Questions