简体   繁体   English

如何在regexp.json中添加同义词?

[英]How do I add synonyms in regexp.json?

After I added the following synonyms in regexp.json, regexp engine has failed to start. 在regexp.json中添加以下同义词后,regexp引擎无法启动。
How is the rule of adding synonyms in regexp.json? 在regexp.json中添加同义词的规则如何?

{
  "intents" : [
    {
      "name" : ["greetings"],
      "grammar" : [
      "morning"
  ]
}
 ],

  "entities" : {
  },

  "synonyms" : [
    "good-bye","hello"
  ]
}

synonyms should be a list of arrays within an array. 同义词应该是数组中数组的列表。 Try this 尝试这个

"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"] ] “同义词”:[[“再见”,“再见”,“再见再见”,“再见”,“好再见”,“然后再见”,“再见”,“ adieu”,“ adios”,“ au” ,“ ciao”,“ toodles”],[“ hi”,“ hello”,“ aloha”,“ bonjour”,“ buenous”,“ greetings”,“ Hey”,“ heya”,“ Hola”,“ yello” ,“ yo”]]

Does that work? 那样有用吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM