什么的同义词?
Synonyms for what?
我按如下方式实现了 regexp.json 文件,但我不确定同义词是针对意图还是针对实体。
什么是同义词?你能给我看一些这种情况下的同义词例子吗?
{
"intents" : [
{
"name" : ["greetings"],
"grammar" : [
"[How|What] is the [current|] weather in {location}"
]
}
],
"entities" : {
"name":"location"
},
"synonyms" : [
[""]
]
}
这个文档有帮助吗? https://watson-personal-assistant.github.io/developer/further-topics/regexp_nlu/
如果没有,也请告诉我们。
同义词只是为了让您不必为每个具有相似含义的单词提供每个示例语法。
我更新了 regexp.json 如下。效果不错。
{
"intents" : [
{
"name" : ["weather"],
"grammar" : [
"$ [What is|How is] the weather in {location}"
]
}
],
"entities" : {
"location":["tokyo","osaka","kyoto"]
},
"synonyms" : [
["What is","What's","What","what"],
["How is","How's","How","how"],
["tokyo","Tokyo"],
["osaka","Osaka"],
["kyoto","Kyoto"]
]
}
我按如下方式实现了 regexp.json 文件,但我不确定同义词是针对意图还是针对实体。
什么是同义词?你能给我看一些这种情况下的同义词例子吗?
{
"intents" : [
{
"name" : ["greetings"],
"grammar" : [
"[How|What] is the [current|] weather in {location}"
]
}
],
"entities" : {
"name":"location"
},
"synonyms" : [
[""]
]
}
这个文档有帮助吗? https://watson-personal-assistant.github.io/developer/further-topics/regexp_nlu/
如果没有,也请告诉我们。
同义词只是为了让您不必为每个具有相似含义的单词提供每个示例语法。
我更新了 regexp.json 如下。效果不错。
{
"intents" : [
{
"name" : ["weather"],
"grammar" : [
"$ [What is|How is] the weather in {location}"
]
}
],
"entities" : {
"location":["tokyo","osaka","kyoto"]
},
"synonyms" : [
["What is","What's","What","what"],
["How is","How's","How","how"],
["tokyo","Tokyo"],
["osaka","Osaka"],
["kyoto","Kyoto"]
]
}