【问题标题】:How to use DucklingHTTPExtractor in RASA?如何在 RASA 中使用 DucklingHTTPExtractor?
【发布时间】:2019-08-24 11:23:52
【问题描述】:

我正在尝试使用 `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/

谢谢!

【问题讨论】:

  • 小鸭是否正确拾取实体?您可以使用rasa shell nlu 进行测试。还有你的训练数据是什么样的?如果您想让小鸭填充它,则不应将“明天”注释为日期实体(您不希望 CRF 拾取该实体)

标签: rasa duckling


【解决方案1】:

要使其发挥作用,请确保您已完成以下事项:

  1. 确保小鸭在后台运行
  2. 确保您已在配置文件中传递了小鸭服务器端点
  3. 确保您还在 rasa 配置文件中添加了相关尺寸
  4. 确保在actions.py文件中添加了相关逻辑

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多