如何在 regexp.json 中添加同义词?
How do I add synonyms in regexp.json?
我在regexp.json中添加了以下同义词后,正则表达式引擎无法启动。
regexp.json中添加同义词的规则如何?
{
"intents" : [
{
"name" : ["greetings"],
"grammar" : [
"morning"
]
}
],
"entities" : {
},
"synonyms" : [
"good-bye","hello"
]
}
synonyms 应该是数组中的数组列表。试试这个
"synonyms" : [
[ "goodbye", "bye", "bye bye", "bye now","ok bye","then bye","bye then","adieu","adios", "au","ciao", "toodles" ],
[ "hi", "hello", "aloha", "bonjour", "buenous", "greetings", "Hey", "heya", "Hola", "yello","yo"]
]
这样行吗?
我在regexp.json中添加了以下同义词后,正则表达式引擎无法启动。
regexp.json中添加同义词的规则如何?
{
"intents" : [
{
"name" : ["greetings"],
"grammar" : [
"morning"
]
}
],
"entities" : {
},
"synonyms" : [
"good-bye","hello"
]
}
synonyms 应该是数组中的数组列表。试试这个
"synonyms" : [ [ "goodbye", "bye", "bye bye", "bye now","ok bye","then bye","bye then","adieu","adios", "au","ciao", "toodles" ], [ "hi", "hello", "aloha", "bonjour", "buenous", "greetings", "Hey", "heya", "Hola", "yello","yo"] ]
这样行吗?