2

我正在尝试使用 DucklingHTTPExtractor 提取实体。以下是相关代码:

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"

领域:

intents:
- input_date

entities:
- date

slots:
  date:
    type: unfeaturized

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

故事:

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

当我输入“明天”时 - 机器人将日期槽设置为“明天”。

我如何让小鸭将其设置为明天的日期:

2019 年 8 月 21 日,星期三

就像这里一样:https ://duckling.wit.ai/

谢谢!

4

1 回答 1

0

要使其正常工作,请确保您已完成以下操作:

  1. 确保你有小鸭在后台运行
  2. 确保您已在配置文件中传递了小鸭服务器端点
  3. 确保您还在 rasa 配置文件中添加了相关维度
  4. 确保您在 actions.py 文件中添加了相关逻辑
于 2020-11-03T09:31:09.613 回答