Code Monkey home page Code Monkey logo

alexa-utterance-generator's People

Contributors

kaylerch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

alexa-utterance-generator's Issues

Samples for slots

Some of our slots have samples defined, is there any way to generate samples for slots?

So for example like this:

{
  "name": "MyIntent",
  "slots": [{
    "name": "mySlot",
    "type": "mySlotType",
    "samples": [
      "My {mySlot}",
      "The {mySlot}",
      "{mySlot}"
    ]
  }]
}

Support for multiple locales

I've glanced through the code and there doesn't seem to be any way to support multiple locales, have I missed anything or is there no way to do this?

Support for required slots with speech promts

I miss support for required slots with speech prompts.
In the json it should look like:
..
"prompts": [
{
"id": "Confirm.Intent.538741843711",
"variations": [
{
"type": "PlainText",
"value": "Wollen Sie die Menge wirklich auf {prozent} Prozent ändern?"
}
]
},
{

At the moment, I have no idea how to figure out the intent ID. Maybe that is the problem...

Generating alexa utterances from sample phrases

Hi,

I wanted to ask you if there is any way to create alexa utterances from basic sample phrases. Let's say I have three utterances as an input:
"why is it happening tonight",
"where is it happening tonight",
"when is it happening tonight"

and as output I want to get an alexa similar utterance syntax that "compresses" my utterances:
"(why|where|when) is it happening tonight"
Is something like this possible to create using your library? I'd appreciate your feedback and help. Thank you!

Best regards,
Ana

References are not expanded fully when alternatives are present

This is a super useful library :). I found a little inconsistency though.

I'm currently using the jar file you checked in that's linked to for the command line example (https://github.com/KayLerch/alexa-utterance-generator/blob/master/bin/alexa-generate.jar). The reason for this is that the 2.0.0 jar file in Maven doesn't seem to support -p for some reason.

When multiple alternative statements are present in a reference, they are not expanded correctly.

Input when no reference is present:
DummyIntent: some phrase {a|b} {c|d}
Output:
some phrase a c
some phrase a d
some phrase b c
some phrase b d

This is expected.

Input when reference is present that has more than one alternative group:
DummyIntent: some phrase {reference}
{reference}: {a|b} {c|d}
Output:
some phrase a
some phrase b c
some phrase d

Expected: Both syntaxes produce the same output since they are equivalent once fully resolved.
Actual: Both syntaxes do not produce the same output.

Alternate Phrasing for Custom Slots?

First off, thank you for writing this tool! It's really easy and comfortable to use :)

Do you think it would be possible to support alternative phrasing also in custom slots? I have some different ways of phrasing for one slot id, and writing them all by hand is tiresome. If I could instead do something like {cellphone:{|a|the}{smartphone|cell phone|celly}}, it would be a great help.

Add usage info to the README

It seems this library is not published to maven central or any other major repository which leads to the conclusion that you should clone this library and compile it yourself, is that correct?

Slots in placeholder values

Thanks for this great tool!

I wonder if it's possible (and how to) add slots in placeholder values. E.g.:

Intent: I want {object}

{object}:
a {{product:product}}
{{number:AMAZON.NUMBER}} {{product:product}}

So output samples are:

I want a {product}
I want {number} {product}

Low performance while generating millions of utterances

I noticed that the performance get very low when you generate a lot of permutations. The issue is that you validate every new sentence with every generated so far.

The performance issue is located in UtteranceGenerator.store(). For my usage I removed the check and added a post processing check.

Please consider to move the check out of the storage.

Wrong detection of slot type alternatives

I have a sample utterances like:

I own a {{cat}|{dog}|{bird}|{fish}} with the name {search_term}

(While cat, dog, bird and fish are slot types for animal breeds)

The parser cannot handle the "{{" correctly (jump to code), since this is something which is impossible to parse with a regular expression (like regex and html).

Check also this online example where you can see that it is not correctly parsed: https://regex101.com/r/YdvLPX/1

The solution would be to parse the utterance and count the brackets, this would be also very helpful to detect typos like the wrong type of bracket { vs [ vs (

Allow explicit names for slots

Currently the slot name is generated from the slot type. It should be possible to define a custom name for the slot name.

Suggestions

MyIntent: I want to travel to {{city=AMAZON.US_CITY}}
MyIntent: I want to travel to {{city<AMAZON.US_CITY>}}
MyIntent: I want to travel to {{city[AMAZON.US_CITY]}}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.