Shoutout to miguelmota for his intent-utterance-generator node module!
The syntax is very similar to the original syntax for making the utterances. You can check it out here. The only difference is that the new syntax makes it easier to create variations of utterances with parenthesis groups.
Input: "(hello|hi) world" Output: "hello world", "hi world"
You also can specify the parenthesis group to be 'optional', with the '|' symbol.
Input: "I (love|hate) (|big) dogs" Output: "I love big dogs", "I love dogs", "I hate big dogs", "I hate dogs"
Note that (|big|small)
would work the same as (big|small)
, but adding an empty space to the beginning makes it work as expected (i.e. ( |big|small)
). I'm working a fix at the moment.
If you want more examples, the original author of the node module, miguelmota, has some here!