什么的同义词?

时间:2018-09-27 13:31:21

标签: watson-assistant-solutions

我实现了regexp.json文件,如下所示,但我不确定同义词是用于意图还是用于实体。
同义词是什么?在这种情况下,能否请您显示一些同义词示例?

{
  "intents" : [
    {
      "name" : ["greetings"],
      "grammar" : [
        "[How|What] is the [current|] weather in {location}"
      ]
    }
  ],

  "entities" : {
    "name":"location"
  },

  "synonyms" : [
   [""]
  ]
}

2 个答案:

答案 0 :(得分:1)

我如下更新了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"]
  ]
}

答案 1 :(得分:0)

此文档有帮助吗? https://watson-personal-assistant.github.io/developer/further-topics/regexp_nlu/

如果没有,也让我们知道。

同义词只是这样,您不必为每个具有相似含义的单词提供所有示例语法。