我已使用以下命令将从 LUIS 应用程序下载的 json 迁移到 RASA 格式:python -m rasa_nlu.train -c config_spacy.json
我的配置文件如下所示:
{
"path" : "./models",
"data" : "./data/examples/rasa/BookACab.json",
"pipeline" : ["nlp_spacy", "tokenizer_spacy", "intent_featurizer_spacy",
"ner_crf", "ner_synonyms", "intent_classifier_sklearn",
"ner_duckling"]
}
使用 RASA 格式的 json 生成模型,如下所示。但是,当我使用查询此模型时
返回与我输入的文本及其所有相关实体相关的正确高分意图。但是当我尝试另一个文本时:
http://localhost:5000/parse?q=我今天下午 5 点要去骑
返回的意图是正确的,但它的实体对象是空的。正如您在下面的 json 中看到的,这个话语也有实体映射到它,类似于工作示例。
请帮助我知道这是否对每个使用 RASA 的人来说都是一个问题,还是我做错了什么?谢谢你!
{
"rasa_nlu_data": {
"common_examples": [
{
"entities": [
{
"entity": "RideTime",
"value": "later",
"start": 0,
"end": 5
}
],
"intent": "None",
"text": "later"
},
{
"entities": [],
"intent": "ServiceRequestEnquiry",
"text": "wake up"
},
{
"entities": [],
"intent": "ConfirmationNo",
"text": "no not now"
},
{
"entities": [],
"intent": "ConfirmationNo",
"text": "not sure"
},
{
"entities": [],
"intent": "ConfirmationNo",
"text": "no bot"
},
{
"entities": [],
"intent": "ConfirmationNo",
"text": "no goride bot"
},
{
"entities": [
{
"entity": "RideTime",
"value": "later",
"start": 12,
"end": 17
}
],
"intent": "BookCab",
"text": "book a ride later"
},
{
"entities": [
{
"entity": "RideTime",
"value": "now",
"start": 21,
"end": 24
}
],
"intent": "BookCab",
"text": "i want go for a ride now"
},
{
"entities": [
{
"entity": "RideTime",
"value": "today",
"start": 12,
"end": 17
}
],
"intent": "BookCab",
"text": "book a ride today"
},
{
"entities": [
{
"entity": "RideTime",
"value": "today 5pm",
"start": 18,
"end": 27
}
],
"intent": "BookCab",
"text": "I want to go ride today 5pm"
},
{
"entities": [
{
"entity": "RideTime",
"value": "today",
"start": 12,
"end": 17
}
],
"intent": "BookCab",
"text": "book a ride today 5pm"
},
{
"entities": [
{
"entity": "RideTime",
"value": "later",
"start": 13,
"end": 18
}
],
"intent": "BookCab",
"text": "book shuttle later"
},
{
"entities": [
{
"entity": "RideTime",
"value": "now",
"start": 15,
"end": 18
}
],
"intent": "None",
"text": "i want to book now"
},
{
"entities": [
{
"entity": "RideTime",
"value": "booknow",
"start": 10,
"end": 17
}
],
"intent": "None",
"text": "i want to booknow"
},
{
"entities": [
{
"entity": "RideTime",
"value": "book later",
"start": 10,
"end": 20
}
],
"intent": "None",
"text": "i want to book later"
}
],
"regex_features": []
}
}