【发布时间】: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 拾取该实体)