简体   繁体   中英

How do I add synonyms in regexp.json?

After I added the following synonyms in regexp.json, regexp engine has failed to start.
How is the rule of adding synonyms in 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"] ]

Does that work?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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