一直在使用 rasa nlu 为我的聊天机器人分类意图和实体。一切都按预期工作(经过大量培训),但对于实体,它似乎可以根据单词的确切位置和长度来预测值。这适用于实体有限的场景。但是,当机器人需要识别一个单词(长度不同且尚未训练,例如新名称)时,它无法检测到。有没有一种方法可以让 rasa 根据单词的相对位置识别实体,或者更好的是,插入一个单词列表,该列表成为特定于实体的域以查找匹配项(如 LUIS 中的短语列表)?
{"q":"i want to buy a Casio SX56"}
{
"project": "default",
"entities": [
{
"extractor": "ner_crf",
"confidence": 0.7043648832678735,
"end": 26,
"value": "Casio SX56",
"entity": "watch",
"start": 16
}
],
"intent": {
"confidence": 0.8835646513829762,
"name": "buy_watch"
},
"text": "i want to buy a Casio SX56",
"model": "model_20180522-165141",
"intent_ranking": [
{
"confidence": 0.8835646513829762,
"name": "buy_watch"
},
{
"confidence": 0.07072182459497935,
"name": "greet"
}
]
}
但如果卡西欧 SX56 被西铁城 M1 取代:
{"q":"i want to buy a Citizen M1"}
{
"project": "default",
"intent": {
"confidence": 0.8710909096729019,
"name": "buy_watch"
},
"text": "i want to buy a Citizen M1",
"model": "model_20180522-165141",
"intent_ranking": [
{
"confidence": 0.8710909096729019,
"name": "buy_watch"
},
{
"confidence": 0.07355588750895545,
"name": "greet"
}
]
}
谢谢!