Skip to content

Use this tool if you'd like to generate hundreds and thousands of variant utterances for your Alexa skills.

License

Notifications You must be signed in to change notification settings

KayLerch/alexa-utterance-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alexa Utterance Generator

Use this tool if you'd like to generate hundreds and thousands of variant utterances for your Alexa skills.

How to

Create a new txt-file in /src/main/resources/utterances and start writing down generic utterances. The magic comes with using placeholders in curly brackets. You need to set the chosen filename as a key in the UtteranceGenerator code-file or hand it in as a parameter when running this application from cli.

Value placeholders

help me {get|book} a {taxi|room|table}

results in six utterances (help me get a taxi, help me book a room etc.)

Resource placeholders

If you have a lot of values for your placeholders it's worth maintaining them in a file. Create one to many new txt-files in src/main/resources/placeholders and use the chosen file-name as the placeholder-name. If the name cannot be resolved to a placeholder-file the script treats it as a value placeholder.

Assume you created a file named "city.txt" that contains

Boston
Berlin
Bristol

an utterance like

help me {get|book} a {taxi|room|table} in {city}

results in 18 variants (help me get a taxi in Boston, help me book a room in Berlin etc.)

Value ranges

The generator is also able to resolve numeric ranges defined in placeholders.

help me {get|book} a {taxi|room|table} in {city} at {1-12} {AM|PM}

Blank values

It's worth mentioning that blank values in value placeholders are supported.

{|please} help me {get|book} a {taxi|room|table} in {city} at {1-12} {AM|PM}

results in 864 variants (help me get a taxi in Boston at 1 AM, please help me get a taxi in Boston at 1 AM etc.)

Escape placeholders

Placeholders follow the same syntax as slots in regular utterances. You might want to keep a {slot} in generated utterances without having it resolved by this script.

{|please} help me {get|book} a {taxi|room|table} in {{city}} at {1-12} {AM|PM}

returns utterances like "help me get a taxi in {city} at 1 AM".

Deduplication

Don't care about duplicated utterances in your output. The generator will eliminate them in case you define overlapping patterns.

About

Use this tool if you'd like to generate hundreds and thousands of variant utterances for your Alexa skills.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages