Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utterances not keeping braces around slot names #6

Open
brandtdaniels opened this issue Jan 1, 2016 · 4 comments
Open

utterances not keeping braces around slot names #6

brandtdaniels opened this issue Jan 1, 2016 · 4 comments

Comments

@brandtdaniels
Copy link

utterances not keeping braces around slot names when generating content.
Also slots are optional, please remove if empty.

From this:

    {
        "slots": {"date": "AMAZON.DATE", "city": "AMAZON.US_CITY"},
        "utterances": [
            "what movies are playing {on |} {date}",
            "what movies are playing {in|near|around} {city}",
            "what movies are playing {in|near|around} {city} {on |} {date}",
            "what movies are playing {on |} {date} {in|near|around} {city}"
        ]
    }

Generates this:

{
   "intents": [
      {
         "intent": "AMAZON.HelpIntent",
         "slots": []
      },
      {
         "intent": "AMAZON.StopIntent",
         "slots": []
      },
      {
         "intent": "AMAZON.CancelIntent",
         "slots": []
      },
      {
         "intent": "GetMoviesIntent",
         "slots": [
            {
               "name": "date",
               "type": "AMAZON.DATE"
            },
            {
               "name": "city",
               "type": "AMAZON.US_CITY"
            }
         ]
      }
   ]
}

GetMoviesIntent what movies are playing on date
GetMoviesIntent what movies are playing date
GetMoviesIntent what movies are playing in city
GetMoviesIntent what movies are playing near city
GetMoviesIntent what movies are playing around city
GetMoviesIntent what movies are playing in city on date
GetMoviesIntent what movies are playing near city on date
GetMoviesIntent what movies are playing around city on date
GetMoviesIntent what movies are playing in city date
GetMoviesIntent what movies are playing near city date
GetMoviesIntent what movies are playing around city date
GetMoviesIntent what movies are playing on date in city
GetMoviesIntent what movies are playing date in city
GetMoviesIntent what movies are playing on date near city
GetMoviesIntent what movies are playing date near city
GetMoviesIntent what movies are playing on date around city
GetMoviesIntent what movies are playing date around city
@MaxwellPayne
Copy link
Contributor

I don't know if master currently supports outputting curly braced slot names in the utterance list. You could look at #5 to see if it accomplishes what you are looking for. In that PR I introduce a special syntax where typing {-|city} in the input string would produce {city} in the output list every time it shows up.

@brandtdaniels
Copy link
Author

I really think it could be coded in an intelligent matter where it automatically adds the braces to the slot keys if they are not already present, or keeps them if they are.

@MaxwellPayne
Copy link
Contributor

If you have an intelligent fix, go ahead and submit a PR. Either way, this repo needs to come to some sort of consensus on how to handle the curly brace expressions. #2 also offers a potential fix, but so far none has been incorporated.

@mreinstein
Copy link
Contributor

this repo needs to come to some sort of consensus on how to handle the curly brace expressions

Agreed. I've been meaning to dive into this in more detail, but haven't yet had time with the holidays. The biggest concern I have is introducing new syntax, or doubling up on functionality that alexa already provides. I'll need to read up on the new amazon feature to understand the consequences, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants