Beispiel #1
0
 def create():
     return Folder(
         _id="folder_routing_sequences",
         label="ROUTING SEQUENCES",
         children=[
             GreetingAction.reset(),
             SmallTalkAction.set_to_zero(),
             Input(Grammar(watson_items=[
                 "out-of-scope movie topics", "$ (OTHER_MOVIE)={Topic}"
             ]),
                   children=[
                       TopicAction.set_to_value(),
                       Goto(ref="output_no_topic_lookup")
                   ]),
             Input(Grammar(watson_items=[
                 "by out-of-scope movie topics",
                 "$ (BY_OTHER_MOVIE)={Topic}"
             ]),
                   children=[
                       TopicAction.set_to_value(),
                       Goto(ref="output_2503370")
                   ]),
             Input(Grammar(watson_items=[
                 "unsupported genres", "$ (UNSUPPORTED_GENRES)={Topic}"
             ]),
                   children=[
                       TopicAction.set_to_value(),
                       Goto(ref="output_2510164")
                   ]),
             Input(Grammar(watson_items=[
                 "old movies", "$ old movies", "$ classic movies",
                 "$ oldies", "$ classics"
             ]),
                   children=[Goto(ref="output_2503380")]),
             Input(Grammar(watson_items=[
                 "Review", "$ review", "$ find movies by rating",
                 "$ look up movies by rating", "$ highest rating",
                 "$ highest rated", "$ best rating", "$ best rated",
                 "$ lowest rating", "$ lowest rated", "$ oscar winners",
                 "$ best movie", "$ best movies"
             ]),
                   children=[
                       GreetingAction.reset(),
                       SmallTalkAction.set_to_zero(),
                       Goto(ref="output_2469539")
                   ]),
             Input(Grammar(["Movie theaters", "$ movie theaters"]),
                   children=[Goto(ref="output_2503320")]),
             Input(Grammar(
                 watson_items=["trailer", "$ trailer", "$ trailers"]),
                   children=[
                       GreetingAction.reset(),
                       SmallTalkAction.set_to_zero(),
                       Goto(ref="output_2510290")
                   ])
         ])
    def create():
        from dialog.schema.factories.inputs import AfterSearchResults

        return Output(
            _id=AnythingElseCanHelpWith.__id(),
            prompt=Prompt(
                items=["Is there anything else I can help you with?"]
            ),
            children=[
                GetUserInput(
                    children=[
                        Input(
                            Grammar(
                                watson_items=[
                                    "Go back",
                                    "$ go back",
                                    "$ wait",
                                    "$ not done",
                                    "$ not finished"
                                ]
                            ),
                            children=[
                                Output(
                                    GenericPrompt.ok(),
                                    children=[AfterSearchResults.goto()]
                                )
                            ]
                        ),
                        Input(
                            GenericGrammar.yes(),
                            children=[
                                RequestSuccessAction.set_to_blank(),
                                TerminalExchangeAction.set_to_blank(),
                                TopicAction.set_to_blank(),
                                StylePreferenceAction.set_to_blank(),
                                ColorPreferenceAction.set_to_blank(),
                                RecencyPreferenceAction.set_to_blank()
                            ]
                        ),
                        Input(
                            GenericGrammar.no(),
                            children=[
                                Output(
                                    GenericGrammar.ok(),
                                    children=[Goto(ref="output_did_find_what_looking_for")]
                                )
                            ]
                        ),
                        Goto(ref="input_2456878")
                    ]

                )
            ]
        )
Beispiel #3
0
 def create():
     return Folder(
         _id="folder_routing_sequences",
         label="ROUTING SEQUENCES",
         children=[
             GreetingAction.reset(),
             SmallTalkAction.set_to_zero(),
             Input(
                 Grammar(
                     watson_items=[
                         "out-of-scope movie topics",
                         "$ (OTHER_MOVIE)={Topic}"
                     ]
                 ),
                 children=[
                     TopicAction.set_to_value(),
                     Goto(ref="output_no_topic_lookup")
                 ]
             ),
             Input(
                 Grammar(
                     watson_items=[
                         "by out-of-scope movie topics",
                         "$ (BY_OTHER_MOVIE)={Topic}"
                     ]
                 ),
                 children=[
                     TopicAction.set_to_value(),
                     Goto(ref="output_2503370")
                 ]
             ),
             Input(
                 Grammar(
                     watson_items=[
                         "unsupported genres",
                         "$ (UNSUPPORTED_GENRES)={Topic}"
                     ]
                 ),
                 children=[
                     TopicAction.set_to_value(),
                     Goto(ref="output_2510164")
                 ]
             ),
             Input(
                 Grammar(
                     watson_items=[
                         "old movies",
                         "$ old movies",
                         "$ classic movies",
                         "$ oldies",
                         "$ classics"
                     ]
                 ),
                 children=[Goto(ref="output_2503380")]
             ),
             Input(
                 Grammar(
                     watson_items=[
                         "Review",
                         "$ review",
                         "$ find movies by rating",
                         "$ look up movies by rating",
                         "$ highest rating",
                         "$ highest rated",
                         "$ best rating",
                         "$ best rated",
                         "$ lowest rating",
                         "$ lowest rated",
                         "$ oscar winners",
                         "$ best movie",
                         "$ best movies"
                     ]
                 ),
                 children=[
                     GreetingAction.reset(),
                     SmallTalkAction.set_to_zero(),
                     Goto(ref="output_2469539")
                 ]
             ),
             Input(
                 Grammar(
                     [
                         "Movie theaters",
                         "$ movie theaters"
                     ]
                 ),
                 children=[
                     Goto(ref="output_2503320")
                 ]
             ),
             Input(
                 Grammar(
                     watson_items=[
                         "trailer",
                         "$ trailer",
                         "$ trailers"
                     ]
                 ),
                 children=[
                     GreetingAction.reset(),
                     SmallTalkAction.set_to_zero(),
                     Goto(ref="output_2510290")
                 ]
             )
         ]
     )
Beispiel #4
0
    def create():
        return Folder(
            label="Main",
            children=[
                Output(
                    prompt=GenericPrompt.what_is_your_name(),
                    children=[
                        GetUserInput(
                            children=[
                                Input(
                                    Grammar(
                                        watson_items=[
                                            "Movies",
                                            "$ (Color)={Color_Preference}",
                                            "$ (Style)={Style_Preference}",
                                            "$ movies",
                                            "$ want to see something",
                                            "$ planning to go see",
                                            "$ planning to go to the",
                                            "$ going out to see",
                                            "$ planning to see",
                                            "$ want to go see",
                                            "$ thinking of seeing",
                                            "$ thinking we want to see",
                                            "$ what do you recommend",
                                            "$ can you recommend something",
                                            "$ what are your recommendations"
                                        ]
                                    ),
                                    children=[
                                        ColorPreferenceAction.set_to_value(),
                                        # CertificationPreferenceAction.set_to_value(),
                                        StylePreferenceAction.set_to_value(),
                                        TopicAction.set_to_shoes(),
                                        PreliminarySequencesSearch.goto()
                                    ]
                                ),
                                Input(
                                    Grammar(
                                        watson_items=[
                                            "Movie-related",
                                            "$ (OTHER_MOVIE)={Topic}",
                                            "$ (BY_OTHER_MOVIE)={Topic}",
                                            "$ showtimes",
                                            "$ theaters",
                                            "$ fandango",
                                            "$ reviews",
                                            "$ review",
                                            "$ critiques",
                                            "$ critique",
                                            "$ old movies",
                                            "$ classic movies",
                                            "$ oldies",
                                            "$ classics",
                                            "$ trailers",
                                            "$ reviews",
                                            "$ (DINING)={Topic}",
                                            "$ (WEATHER)={Topic}",
                                            "$ (TRAFFIC)={Topic}"
                                        ]
                                    ),
                                    children=[PreliminarySequencesSearch.goto()]
                                ),
                                Input(
                                    grammar=FeelingGrammar.create_preliminaries(),
                                    children=[

                                        PreliminarySequencesSearch.goto()
                                    ]
                                ),
                                Input(
                                    Grammar(
                                        watson_items=[
                                            "Why do you need to know?",
                                            "$ why",
                                            "$ need to know",
                                            "$ use it",
                                            "$ do with it"
                                        ]
                                    ),
                                    children=[
                                        Output(
                                            prompt=Prompt(
                                                items=["Just trying to be friendly."]
                                            ),
                                            children=[StartSearch.goto()]
                                        )
                                    ]
                                ),
                                Input(
                                    Grammar(
                                        watson_items=[
                                            "I don't want to give it!",
                                            "$ don't want",
                                            "$ no",
                                            "$ refuse",
                                            "$ none of your business"
                                        ]
                                    ),
                                    children=[
                                        Output(
                                            Prompt(items=["That's fine."]),
                                            children=[StartSearch.goto()]
                                        )
                                    ]
                                ),
                                Input(
                                    ProfileGrammar.create_my_name_is_dynamic_data(),
                                    children=[
                                        UserNameAction.set_to_source(),
                                        Output(
                                            prompt=Prompt(items=["Hi {User_Name}!"]),
                                            children=[StartSearch.goto()]
                                        )
                                    ],
                                    _id="input_user_knownas_name"
                                )
                            ],
                            _id="getUserInput_what_is_your_name"
                        ),
                        StartSearch.create(),
                        HowCanHelpYouOutput.create()
                    ],
                    _id="output_what_is_name"
                )
            ]
        )
Beispiel #5
0
 def create():
     return Input(
         _id="input_main_search_criteria",
         grammar=Grammar(
             watson_items=[
                 "Movies",
                 "$ (COLOR)={Color_Preference}",
                 "$ (STYLE)={Style_Preference}",
                 # "$ movies"
             ]
         ),
         children=[
             GreetingAction.reset(),
             SmallTalkAction.set_to_zero(),
             CurrentIndexAction.set_to_zero(),
             PageAction.set_to_new(),
             TopicAction.set_to_shoes(),
             ColorPreferenceAction.set_to_value(),
             StylePreferenceAction.set_to_value(),
             # DateTimeInput.create(),
             # CertificationPreferenceInput.create(),
             # FamilyFriendlyInput.create(),
             ColorPreferenceInput.create(StylePreferenceInput.goto()),
             StylePreferenceInput.create(Goto(ref="out_of_scope_topics")),
             # ZipcodeInput.create(),
             Input(
                 _id="out_of_scope_topics",
                 grammar=Grammar(
                     watson_items=[
                         "out-of-scope movie topics",
                         "$ (OTHER_MOVIE)={Topic}"
                     ]
                 ),
                 children=[
                     TopicAction.set_to_value(),
                     Goto(ref="output_no_topic_lookup")
                 ]
             ),
             StylePreferenceProfileCheck.create(),
             # GenrePreferenceProfileCheck.create(),
             ColorPreferenceProfileCheck.create(),
             Output(
                 _id="output_ok_do_search",
                 prompt=GenericPrompt.ok(),
                 children=[
                     Output(
                         _id="output_search_now",
                         prompt=Prompt(
                             items=["Search_Now"]
                         ),
                         children=[
                             Action(var_name="Last_Results", operator="SET_TO_NO"),
                             Action(var_name="First_Results", operator="SET_TO_NO"),
                             Action(var_name="Search_Now", operator="SET_TO_YES"),
                             Action(var_name="First_Time", operator="SET_TO_NO"),
                             Input(
                                 Grammar(
                                     watson_items=["UPDATE NUM_MOVIES"]
                                 ),
                                 children=[
                                     If(
                                         elements=[
                                             ResultsCountConditions.equals_zero(),
                                             Output(
                                                 Prompt(
                                                     items=[
                                                         "I'm afraid I found {%s} matching {Color_Preference} {Style_Preference}. Try changing your criteria." % NAME_RESULTS_COUNT]
                                                 ),
                                                 children=[
                                                     GetUserInput(
                                                         children=[
                                                             Input(
                                                                 GenericGrammar.ok(),
                                                                 children=[
                                                                     ColorPreferenceAction.set_to_blank(),
                                                                     StylePreferenceAction.set_to_blank(),
                                                                     StylePreferenceProfileCheck.goto(),
                                                                     RemoveColorInput.goto()
                                                                 ]
                                                             ),
                                                             RemoveColorInput.goto()
                                                         ]
                                                     )
                                                 ]
                                             )
                                         ]
                                     ),
                                     If(
                                         elements=[
                                             StyleConditions.is_blank(),
                                             ColorConditions.has_value(),
                                             Output(
                                                 Prompt(
                                                     items=[
                                                         "Good choice, {User_Name}! I found {%s} results for {Recency_Preference} {Color_Preference}-rated movies." % NAME_RESULTS_COUNT]
                                                 ),
                                                 children=[AfterSearchResults.goto()]
                                             )
                                         ]
                                     ),
                                     If(
                                         elements=[
                                             ColorConditions.is_blank(),
                                             StyleConditions.has_value(),
                                             Output(
                                                 Prompt(
                                                     items=[
                                                         "Good choice, {User_Name}! I found {%s} results for {Color_Preference} {Style_Preference} movies." % NAME_RESULTS_COUNT]
                                                 ),
                                                 children=[AfterSearchResults.goto()]
                                             )
                                         ]
                                     ),
                                     If(
                                         elements=[
                                             ColorConditions.is_blank(),
                                             StyleConditions.is_blank(),
                                             Output(
                                                 Prompt(
                                                     items=[
                                                         "I found {%s} results for ALL {Recency_Preference} movies." % NAME_RESULTS_COUNT]
                                                 ),
                                                 children=[AfterSearchResults.goto()]
                                             )
                                         ]
                                     ),
                                     Output(
                                         Prompt(
                                             items=[
                                                 "Good choices, {User_Name}! I found {%s} results for {Color_Preference} {Style_Preference} movies." % NAME_RESULTS_COUNT]
                                         ),
                                         children=[AfterSearchResults.create()]
                                     )
                                 ]
                             )
                         ]
                     )
                 ]
             )
         ]
     )
Beispiel #6
0
    def create():
        return Folder(
            label="PRELIMINARY SEQUENCES",
            _id=PreliminarySequencesFolder._id(),
            children=[
                GreetingAction.reset(),
                SmallTalkAction.set_to_zero(),
                Input(
                    Grammar(
                        watson_items=[
                            "Do you know",
                            "$ do you know",
                            "$ can you",
                            "$ do you have information",
                            "$ can I",
                            "$ can you tell",
                            "$ what kind of",
                            "$ what else do you know"
                        ]
                    ),
                    children=[
                        GreetingAction.reset(),
                        SmallTalkAction.set_to_zero(),
                        Input(
                            Grammar(
                                watson_items=[
                                    "out-of-scope movie topics",
                                    "$ (OTHER_MOVIE)={Topic}"
                                ]
                            ),
                            children=[
                                TopicAction.set_to_value(),
                                Input(
                                    Grammar(
                                        watson_items=[
                                            "what",
                                            "$ what"
                                        ]
                                    ),
                                    children=[Goto(ref="output_no_topic_lookup")]
                                ),
                                Output(
                                    Prompt(items=["No."]),
                                    children=[
                                        Output(
                                            _id="output_no_topic_lookup",
                                            prompt=Prompt(
                                                items=[
                                                    "I'm afraid I can't look up movies by {Topic}, only by Genre or MPAA Rating."]
                                            ),
                                            children=[
                                                GetUserInput(
                                                    children=[
                                                        Input(
                                                            GenericGrammar.ok(),
                                                            children=[
                                                                HowCanHelpYouOutput.goto()
                                                            ]
                                                        ),
                                                        PreliminarySequencesSearch.goto()
                                                    ]
                                                )
                                            ]
                                        )
                                    ]
                                )
                            ]
                        ),
                        Input(
                            Grammar(
                                watson_items=[
                                    "by out-of-scope movie topics",
                                    "$ (BY_OTHER_MOVIE)={Topic}"
                                ]
                            ),
                            children=[
                                TopicAction.set_to_value(),
                                Input(
                                    Grammar(
                                        watson_items=[
                                            "what",
                                            "$ what"
                                        ]
                                    ),
                                    children=[Goto(ref="output_2503370")]
                                ),
                                Output(
                                    Prompt(
                                        items=["No."]
                                    ),
                                    children=[
                                        Output(
                                            _id="output_2503370",
                                            prompt=Prompt(
                                                items=[
                                                    "I'm afraid I can't look up {Topic}, only Current and Upcoming movies by Genre or MPAA Rating.", ]
                                            ),
                                            children=[
                                                GetUserInput(
                                                    children=[
                                                        Input(
                                                            Grammar(watson_items=["Okay."]),
                                                            children=[HowCanHelpYouOutput.goto()]
                                                        ),
                                                        PreliminarySequencesSearch.goto()
                                                    ]
                                                )
                                            ]
                                        )
                                    ]
                                )
                            ]
                        ),
                        Input(
                            Grammar(
                                watson_items=[
                                    "unsupported genres",
                                    "$ (UNSUPPORTED_GENRES)={Topic}"
                                ]
                            ),
                            children=[
                                TopicAction.set_to_value(),
                                Input(
                                    grammar=Grammar(
                                        watson_items=[
                                            "what",
                                            "$ what"
                                        ]
                                    ),
                                    children=[Goto(ref="output_2510164")]
                                ),
                                Output(
                                    Prompt(items=["No."]),
                                    children=[
                                        Output(
                                            _id="output_2510164",
                                            prompt=Prompt(
                                                items=[
                                                    "I'm afraid {Topic} isn't a movie genre I know. Please try another one."]
                                            ),
                                            children=[
                                                GetUserInput(
                                                    children=[
                                                        Input(
                                                            grammar=Grammar(
                                                                watson_items=["Okay."]
                                                            ),
                                                            children=[HowCanHelpYouOutput.goto()]
                                                        ),
                                                        PreliminarySequencesSearch.goto()
                                                    ]
                                                )
                                            ]
                                        )
                                    ]
                                )
                            ]
                        ),
                        # {
                        #     (0, "grammar"): {
                        #         "item": [
                        #             "theaters",
                        #             "$ theaters",
                        #             "$ fandango"
                        #         ]
                        #     },
                        #     (1, "input"): {
                        #         (0, "grammar"): {
                        #             "item": [
                        #                 "what",
                        #                 "$ what"
                        #             ]
                        #         },
                        #         (1, "goto"): {
                        #             "@ref": "output_2503320"
                        #         }
                        #     },
                        #     (2, "output"): {
                        #         (0, "prompt"): {
                        #             "item": "No."
                        #         },
                        #         (1, "output"): {
                        #             "@id": "output_2503320",
                        #             (0, "prompt"): {
                        #                 "item": "I'm afraid I cannot look up theaters myself, but I can give you a link to Fandango.com where you can buy tickets in your ZIP code. ",
                        #                 "@selectionType": "RANDOM"
                        #             },
                        #             (1, "getUserInput"): {
                        #                 (0, "input"): {
                        #                     (0, "grammar"): GenericGrammar.ok(),
                        #                     (1, "goto"): HowCanHelpYouOutput.goto()
                        #                 },
                        #                 (1, "goto"): PreliminarySequencesSearch.goto()
                        #             }
                        #         }
                        #     }
                        # },
                        Input(
                            Grammar(
                                watson_items=["$ (STYLE)={Style_Preference}"]
                            ),
                            children=[
                                StylePreferenceAction.set_to_value(),
                                Goto(ref="search_2414740")
                            ]
                        ),
                        Input(
                            Grammar(
                                watson_items=[
                                    "genres",
                                    "$ genres"
                                ]
                            ),
                            children=[
                                Output(
                                    Prompt(
                                        items=[
                                            "Action, adventure, animated, comedy, crime, documentary, drama, family, fantasy, foreign, historical, horror, music, mystery, romance, science fiction, TV movie, thriller, war movies and western.  <br> <br>"]
                                    ),
                                    children=[
                                        GetUserInput(
                                            children=[
                                                Input(
                                                    GenericGrammar.ok(),
                                                    children=[HowCanHelpYouOutput.goto()]
                                                ),
                                                PreliminarySequencesSearch.goto()
                                            ]
                                        )
                                    ]
                                )
                            ]
                        ),
                        # {
                        #     (0, "grammar"): {
                        #         "item": [
                        #             "old movies",
                        #             "$ old movies",
                        #             "$ classic movies",
                        #             "$ oldies",
                        #             "$ classics"
                        #         ]
                        #     },
                        #     (1, "input"): {
                        #         (0, "grammar"): {
                        #             "item": [
                        #                 "what",
                        #                 "$ what"
                        #             ]
                        #         },
                        #         (1, "goto"): {
                        #             "@ref": "output_2503380"
                        #         }
                        #     },
                        #     (2, "output"): {
                        #         (0, "prompt"): {
                        #             "item": "No."
                        #         },
                        #         (1, "output"): {
                        #             "@id": "output_2503380",
                        #             (0, "prompt"): {
                        #                 "item": "I'm afraid I cannot look up Old Movies, only Current and Upcoming.",
                        #                 "@selectionType": "RANDOM"
                        #             },
                        #             (1, "getUserInput"): {
                        #                 (0, "input"): {
                        #                     (0, "grammar"): GenericGrammar.ok(),
                        #                     (1, "goto"): HowCanHelpYouOutput.goto()
                        #                 },
                        #                 (1, "goto"): PreliminarySequencesSearch.goto()
                        #             }
                        #         }
                        #     }
                        # },
                        Input(
                            Grammar(
                                watson_items=[
                                    "shoes",
                                    "$ shoes"
                                ]
                            ),
                            children=[
                                TopicAction.set_to_shoes(),
                                Input(
                                    Grammar(
                                        watson_items=[
                                            "what",
                                            "$ what"
                                        ]
                                    ),
                                    children=[
                                        Goto(ref="output_what_jemboo_knows")
                                    ]
                                ),
                                Output(
                                    prompt=Prompt(
                                        items=["Yes."]
                                    ),
                                    children=[
                                        Output(
                                            _id="output_what_jemboo_knows",
                                            prompt=Prompt(
                                                items=[
                                                    "I can look up current and upcoming movies by Genre or MPAA Rating and show you trailers for them. But I'm afraid I cannot search by number of stars or by movie titles or actor and director names at this time.", ]
                                            ),
                                            children=[
                                                GetUserInput(
                                                    children=[
                                                        Input(
                                                            GenericGrammar.ok(),
                                                            children=[HowCanHelpYouOutput.goto()]
                                                        ),
                                                        PreliminarySequencesSearch.goto()
                                                    ]
                                                )
                                            ]
                                        )
                                    ]
                                )
                            ]
                        ),
                        # {
                        #     (0, "grammar"): {
                        #         "item": [
                        #             "trailer",
                        #             "$ trailer",
                        #             "$ trailers"
                        #         ]
                        #     },
                        #     (1, "input"): {
                        #         (0, "grammar"): {
                        #             "item": [
                        #                 "what",
                        #                 "$ what"
                        #             ]
                        #         },
                        #         (1, "goto"): {
                        #             "@ref": "output_2510290"
                        #         }
                        #     },
                        #     (2, "output"): {
                        #         (0, "prompt"): {
                        #             "item": "Yes."
                        #         },
                        #         (1, "output"): {
                        #             "@id": "output_2510290",
                        #             (0, "prompt"): {
                        #                 "item": "After searching for movies, you can click on a particular movie result to watch its <i>trailer</i>, or video preview.",
                        #                 "@selectionType": "RANDOM"
                        #             },
                        #             (1, "getUserInput"): {
                        #                 (0, "input"): {
                        #                     (0, "grammar"): GenericGrammar.ok(),
                        #                     (1, "goto"): HowCanHelpYouOutput.goto()
                        #                 },
                        #                 (1, "goto"): PreliminarySequencesSearch.goto()
                        #             }
                        #         }
                        #     }
                        # },
                        Input(
                            Grammar(
                                watson_items=[
                                    "out-of-scope topics",
                                    "$ (DINING)={Topic}",
                                    "$ (WEATHER)={Topic}",
                                    "$ (TRAFFIC)={Topic}"
                                ]
                            ),
                            children=[
                                TopicAction.set_to_value(),
                                OutOfScopeCountAction.increment(),
                                If(
                                    elements=[
                                        OutOfScopeCountConditions.is_greater_then("2"),
                                        Output(
                                            Prompt(
                                                items=[
                                                    "I'm sorry I don't know about that. Can I look up some shoes for you?"]
                                            ),
                                            children=[
                                                GetUserInput(
                                                    children=[
                                                        Input(
                                                            GenericGrammar.yes(),
                                                            children=[
                                                                StylePreferenceProfileCheck.goto()
                                                            ]
                                                        ),
                                                        Input(
                                                            GenericGrammar.no(),
                                                            children=[
                                                                Action(var_name="Out-of-Scope_Count", operator="SET_TO",
                                                                       text="0"),
                                                                Output(
                                                                    prompt=GenericPrompt.ok_fine()
                                                                )
                                                            ]
                                                        ),
                                                        Input(
                                                            GenericGrammar.ok(),
                                                            children=[
                                                                StylePreferenceProfileCheck.goto()
                                                            ]
                                                        ),
                                                        PreliminarySequencesSearch.goto()
                                                    ]
                                                )
                                            ]
                                        )
                                    ]
                                ),
                                Input(
                                    Grammar(
                                        watson_items=[
                                            "what",
                                            "$ what"
                                        ]
                                    ),
                                    children=[Goto(ref="output_2497989")]
                                ),
                                Output(
                                    Prompt(items=["No."]),
                                    children=[

                                        Output(
                                            _id="output_2497989",
                                            prompt=Prompt(
                                                items=["I'm afraid I don't know much about {Topic}. Just movies."]),
                                            children=[
                                                GetUserInput(
                                                    children=[
                                                        Input(
                                                            Grammar(watson_items=["Okay."]),
                                                            children=[HowCanHelpYouOutput.goto()]
                                                        ),
                                                        PreliminarySequencesSearch.goto()
                                                    ]
                                                )
                                            ]
                                        )
                                    ]
                                )
                            ]
                        ),
                        Goto(ref="output_what_jemboo_knows")
                    ]
                )
            ]
        )
Beispiel #7
0
 def create():
     return Folder(
         label="PRELIMINARY SEQUENCES",
         _id=PreliminarySequencesFolder._id(),
         children=[
             GreetingAction.reset(),
             SmallTalkAction.set_to_zero(),
             Input(
                 Grammar(watson_items=[
                     "Do you know", "$ do you know", "$ can you",
                     "$ do you have information", "$ can I",
                     "$ can you tell", "$ what kind of",
                     "$ what else do you know"
                 ]),
                 children=[
                     GreetingAction.reset(),
                     SmallTalkAction.set_to_zero(),
                     Input(
                         Grammar(watson_items=[
                             "out-of-scope movie topics",
                             "$ (OTHER_MOVIE)={Topic}"
                         ]),
                         children=[
                             TopicAction.set_to_value(),
                             Input(Grammar(watson_items=["what", "$ what"]),
                                   children=[
                                       Goto(ref="output_no_topic_lookup")
                                   ]),
                             Output(
                                 Prompt(items=["No."]),
                                 children=[
                                     Output(
                                         _id="output_no_topic_lookup",
                                         prompt=Prompt(items=[
                                             "I'm afraid I can't look up movies by {Topic}, only by Genre or MPAA Rating."
                                         ]),
                                         children=[
                                             GetUserInput(children=[
                                                 Input(
                                                     GenericGrammar.ok(),
                                                     children=[
                                                         HowCanHelpYouOutput
                                                         .goto()
                                                     ]),
                                                 PreliminarySequencesSearch.
                                                 goto()
                                             ])
                                         ])
                                 ])
                         ]),
                     Input(
                         Grammar(watson_items=[
                             "by out-of-scope movie topics",
                             "$ (BY_OTHER_MOVIE)={Topic}"
                         ]),
                         children=[
                             TopicAction.set_to_value(),
                             Input(
                                 Grammar(watson_items=["what", "$ what"]),
                                 children=[Goto(ref="output_2503370")]),
                             Output(
                                 Prompt(items=["No."]),
                                 children=[
                                     Output(
                                         _id="output_2503370",
                                         prompt=Prompt(items=[
                                             "I'm afraid I can't look up {Topic}, only Current and Upcoming movies by Genre or MPAA Rating.",
                                         ]),
                                         children=[
                                             GetUserInput(children=[
                                                 Input(Grammar(
                                                     watson_items=["Okay."
                                                                   ]),
                                                       children=[
                                                           HowCanHelpYouOutput
                                                           .goto()
                                                       ]),
                                                 PreliminarySequencesSearch.
                                                 goto()
                                             ])
                                         ])
                                 ])
                         ]),
                     Input(
                         Grammar(watson_items=[
                             "unsupported genres",
                             "$ (UNSUPPORTED_GENRES)={Topic}"
                         ]),
                         children=[
                             TopicAction.set_to_value(),
                             Input(
                                 grammar=Grammar(
                                     watson_items=["what", "$ what"]),
                                 children=[Goto(ref="output_2510164")]),
                             Output(
                                 Prompt(items=["No."]),
                                 children=[
                                     Output(
                                         _id="output_2510164",
                                         prompt=Prompt(items=[
                                             "I'm afraid {Topic} isn't a movie genre I know. Please try another one."
                                         ]),
                                         children=[
                                             GetUserInput(children=[
                                                 Input(grammar=Grammar(
                                                     watson_items=["Okay."
                                                                   ]),
                                                       children=[
                                                           HowCanHelpYouOutput
                                                           .goto()
                                                       ]),
                                                 PreliminarySequencesSearch.
                                                 goto()
                                             ])
                                         ])
                                 ])
                         ]),
                     # {
                     #     (0, "grammar"): {
                     #         "item": [
                     #             "theaters",
                     #             "$ theaters",
                     #             "$ fandango"
                     #         ]
                     #     },
                     #     (1, "input"): {
                     #         (0, "grammar"): {
                     #             "item": [
                     #                 "what",
                     #                 "$ what"
                     #             ]
                     #         },
                     #         (1, "goto"): {
                     #             "@ref": "output_2503320"
                     #         }
                     #     },
                     #     (2, "output"): {
                     #         (0, "prompt"): {
                     #             "item": "No."
                     #         },
                     #         (1, "output"): {
                     #             "@id": "output_2503320",
                     #             (0, "prompt"): {
                     #                 "item": "I'm afraid I cannot look up theaters myself, but I can give you a link to Fandango.com where you can buy tickets in your ZIP code. ",
                     #                 "@selectionType": "RANDOM"
                     #             },
                     #             (1, "getUserInput"): {
                     #                 (0, "input"): {
                     #                     (0, "grammar"): GenericGrammar.ok(),
                     #                     (1, "goto"): HowCanHelpYouOutput.goto()
                     #                 },
                     #                 (1, "goto"): PreliminarySequencesSearch.goto()
                     #             }
                     #         }
                     #     }
                     # },
                     Input(Grammar(
                         watson_items=["$ (STYLE)={Style_Preference}"]),
                           children=[
                               StylePreferenceAction.set_to_value(),
                               Goto(ref="search_2414740")
                           ]),
                     Input(
                         Grammar(watson_items=["genres", "$ genres"]),
                         children=[
                             Output(Prompt(items=[
                                 "Action, adventure, animated, comedy, crime, documentary, drama, family, fantasy, foreign, historical, horror, music, mystery, romance, science fiction, TV movie, thriller, war movies and western.  <br> <br>"
                             ]),
                                    children=[
                                        GetUserInput(children=[
                                            Input(GenericGrammar.ok(),
                                                  children=[
                                                      HowCanHelpYouOutput.
                                                      goto()
                                                  ]),
                                            PreliminarySequencesSearch.goto(
                                            )
                                        ])
                                    ])
                         ]),
                     # {
                     #     (0, "grammar"): {
                     #         "item": [
                     #             "old movies",
                     #             "$ old movies",
                     #             "$ classic movies",
                     #             "$ oldies",
                     #             "$ classics"
                     #         ]
                     #     },
                     #     (1, "input"): {
                     #         (0, "grammar"): {
                     #             "item": [
                     #                 "what",
                     #                 "$ what"
                     #             ]
                     #         },
                     #         (1, "goto"): {
                     #             "@ref": "output_2503380"
                     #         }
                     #     },
                     #     (2, "output"): {
                     #         (0, "prompt"): {
                     #             "item": "No."
                     #         },
                     #         (1, "output"): {
                     #             "@id": "output_2503380",
                     #             (0, "prompt"): {
                     #                 "item": "I'm afraid I cannot look up Old Movies, only Current and Upcoming.",
                     #                 "@selectionType": "RANDOM"
                     #             },
                     #             (1, "getUserInput"): {
                     #                 (0, "input"): {
                     #                     (0, "grammar"): GenericGrammar.ok(),
                     #                     (1, "goto"): HowCanHelpYouOutput.goto()
                     #                 },
                     #                 (1, "goto"): PreliminarySequencesSearch.goto()
                     #             }
                     #         }
                     #     }
                     # },
                     Input(
                         Grammar(watson_items=["shoes", "$ shoes"]),
                         children=[
                             TopicAction.set_to_shoes(),
                             Input(
                                 Grammar(watson_items=["what", "$ what"]),
                                 children=[
                                     Goto(ref="output_what_jemboo_knows")
                                 ]),
                             Output(
                                 prompt=Prompt(items=["Yes."]),
                                 children=[
                                     Output(
                                         _id="output_what_jemboo_knows",
                                         prompt=Prompt(items=[
                                             "I can look up current and upcoming movies by Genre or MPAA Rating and show you trailers for them. But I'm afraid I cannot search by number of stars or by movie titles or actor and director names at this time.",
                                         ]),
                                         children=[
                                             GetUserInput(children=[
                                                 Input(
                                                     GenericGrammar.ok(),
                                                     children=[
                                                         HowCanHelpYouOutput
                                                         .goto()
                                                     ]),
                                                 PreliminarySequencesSearch.
                                                 goto()
                                             ])
                                         ])
                                 ])
                         ]),
                     # {
                     #     (0, "grammar"): {
                     #         "item": [
                     #             "trailer",
                     #             "$ trailer",
                     #             "$ trailers"
                     #         ]
                     #     },
                     #     (1, "input"): {
                     #         (0, "grammar"): {
                     #             "item": [
                     #                 "what",
                     #                 "$ what"
                     #             ]
                     #         },
                     #         (1, "goto"): {
                     #             "@ref": "output_2510290"
                     #         }
                     #     },
                     #     (2, "output"): {
                     #         (0, "prompt"): {
                     #             "item": "Yes."
                     #         },
                     #         (1, "output"): {
                     #             "@id": "output_2510290",
                     #             (0, "prompt"): {
                     #                 "item": "After searching for movies, you can click on a particular movie result to watch its <i>trailer</i>, or video preview.",
                     #                 "@selectionType": "RANDOM"
                     #             },
                     #             (1, "getUserInput"): {
                     #                 (0, "input"): {
                     #                     (0, "grammar"): GenericGrammar.ok(),
                     #                     (1, "goto"): HowCanHelpYouOutput.goto()
                     #                 },
                     #                 (1, "goto"): PreliminarySequencesSearch.goto()
                     #             }
                     #         }
                     #     }
                     # },
                     Input(
                         Grammar(watson_items=[
                             "out-of-scope topics", "$ (DINING)={Topic}",
                             "$ (WEATHER)={Topic}", "$ (TRAFFIC)={Topic}"
                         ]),
                         children=[
                             TopicAction.set_to_value(),
                             OutOfScopeCountAction.increment(),
                             If(elements=[
                                 OutOfScopeCountConditions.is_greater_then(
                                     "2"),
                                 Output(Prompt(items=[
                                     "I'm sorry I don't know about that. Can I look up some shoes for you?"
                                 ]),
                                        children=[
                                            GetUserInput(children=[
                                                Input(
                                                    GenericGrammar.yes(),
                                                    children=[
                                                        StylePreferenceProfileCheck
                                                        .goto()
                                                    ]),
                                                Input(
                                                    GenericGrammar.no(),
                                                    children=[
                                                        Action(
                                                            var_name=
                                                            "Out-of-Scope_Count",
                                                            operator=
                                                            "SET_TO",
                                                            text="0"),
                                                        Output(prompt=
                                                               GenericPrompt
                                                               .ok_fine())
                                                    ]),
                                                Input(
                                                    GenericGrammar.ok(),
                                                    children=[
                                                        StylePreferenceProfileCheck
                                                        .goto()
                                                    ]),
                                                PreliminarySequencesSearch.
                                                goto()
                                            ])
                                        ])
                             ]),
                             Input(Grammar(watson_items=["what", "$ what"]),
                                   children=[Goto(ref="output_2497989")]),
                             Output(
                                 Prompt(items=["No."]),
                                 children=[
                                     Output(
                                         _id="output_2497989",
                                         prompt=Prompt(items=[
                                             "I'm afraid I don't know much about {Topic}. Just movies."
                                         ]),
                                         children=[
                                             GetUserInput(children=[
                                                 Input(Grammar(
                                                     watson_items=["Okay."
                                                                   ]),
                                                       children=[
                                                           HowCanHelpYouOutput
                                                           .goto()
                                                       ]),
                                                 PreliminarySequencesSearch.
                                                 goto()
                                             ])
                                         ])
                                 ])
                         ]),
                     Goto(ref="output_what_jemboo_knows")
                 ])
         ])
Beispiel #8
0
 def create():
     from dialog.schema.factories.folder.sequences import SystemInitiatedSequences
     return Folder(
         selection_type="RANDOM",
         label="SMALL TALK SEQUENCES",
         children=[
             SmallTalkAction.create_increment(),
             Input(
                 Grammar(watson_items=[
                     "What is your name?", "$ your name", "$ you called",
                     "$ they call you", "$ what can I call you"
                 ]),
                 children=[
                     SmallTalkConditions.too_much_small_talk_goto(),
                     Output(
                         Prompt(items=["My name is Jemboo."]),
                         children=[
                             If(elements=[
                                 UserNameConditions.is_blank(),
                                 Output(
                                     Prompt(items=["What's your name?"]),
                                     children=[
                                         Goto(
                                             ref=
                                             "getUserInput_what_is_your_name"
                                         )
                                     ])
                             ]),
                             GetUserInput(children=[
                                 Input(Grammar(watson_items=[
                                     "Okay", "okay", "hi", "hi jemboo"
                                 ]),
                                       children=[
                                           Goto(ref="output_what_is_name")
                                       ]),
                                 Input(
                                     Grammar(
                                         watson_items=[
                                             "My name is", "$ my name",
                                             "$ call me", "$ I'm called",
                                             "$ I am called", "$ known as"
                                         ]),
                                     children=[
                                         Goto(ref="input_user_knownas_name")
                                     ]),
                                 PreliminarySequencesSearch.goto()
                             ])
                         ])
                 ]),
             Input(
                 Grammar(
                     watson_items=["Siri", "$ (VIRTUAL_AGENTS)={Topic}"]),
                 children=[
                     TopicAction.set_to_value(),
                     SmallTalkConditions.too_much_small_talk_goto(),
                     Input(
                         Grammar(watson_items=[
                             "is better", "$ better", "$ smarter"
                         ]),
                         children=[
                             Output(Prompt(
                                 items=["Now you're hurting my feelings."]),
                                    children=[
                                        GetUserInput(children=[
                                            Input(Grammar(watson_items=[
                                                "Okay", "$ sorry"
                                            ]),
                                                  children=[
                                                      SystemInitiatedSequences
                                                      .goto()
                                                  ]),
                                            PreliminarySequencesSearch.goto(
                                            )
                                        ])
                                    ])
                         ])
                 ]),
             Input(
                 Grammar(watson_items=[
                     "Do you speak English", "$ speak English",
                     "$ understand English", "$ know English",
                     "$ get English"
                 ]),
                 children=[
                     SmallTalkConditions.too_much_small_talk_goto(),
                     Output(
                         Prompt(items=[
                             "I'm sorry, English is my second language. My native tongue is Binary. 01110011 01101111 01110010 01110010 01111001"
                         ]),
                         children=[
                             GetUserInput(children=[
                                 Input(Grammar(watson_items=["haha", "ok"]),
                                       children=
                                       [SystemInitiatedSequences.goto()]),
                                 Input(Grammar(watson_items=[
                                     "01101110 01110000",
                                     "01101110 01101111 00100000 01110000 01110010 01101111 01100010 01101100 01100101 01101101",
                                     "01101110 01110000",
                                     "01100100 01101111 01101110 00100111 01110100 00100000 01110111 01101111 01110010 01110010 01111001"
                                 ]),
                                       children=[
                                           Output(
                                               Prompt(
                                                   items=[
                                                       "haha, you're good!"
                                                   ]),
                                               children=[
                                                   SystemInitiatedSequences.
                                                   goto()
                                               ])
                                       ]),
                                 PreliminarySequencesSearch.goto()
                             ])
                         ])
                 ])
         ])
Beispiel #9
0
 def create():
     return Input(
         _id="input_main_search_criteria",
         grammar=Grammar(watson_items=[
             "Movies",
             "$ (COLOR)={Color_Preference}",
             "$ (STYLE)={Style_Preference}",
             # "$ movies"
         ]),
         children=[
             GreetingAction.reset(),
             SmallTalkAction.set_to_zero(),
             CurrentIndexAction.set_to_zero(),
             PageAction.set_to_new(),
             TopicAction.set_to_shoes(),
             ColorPreferenceAction.set_to_value(),
             StylePreferenceAction.set_to_value(),
             # DateTimeInput.create(),
             # CertificationPreferenceInput.create(),
             # FamilyFriendlyInput.create(),
             ColorPreferenceInput.create(StylePreferenceInput.goto()),
             StylePreferenceInput.create(Goto(ref="out_of_scope_topics")),
             # ZipcodeInput.create(),
             Input(
                 _id="out_of_scope_topics",
                 grammar=Grammar(watson_items=[
                     "out-of-scope movie topics", "$ (OTHER_MOVIE)={Topic}"
                 ]),
                 children=[
                     TopicAction.set_to_value(),
                     Goto(ref="output_no_topic_lookup")
                 ]),
             StylePreferenceProfileCheck.create(),
             # GenrePreferenceProfileCheck.create(),
             ColorPreferenceProfileCheck.create(),
             Output(
                 _id="output_ok_do_search",
                 prompt=GenericPrompt.ok(),
                 children=[
                     Output(
                         _id="output_search_now",
                         prompt=Prompt(items=["Search_Now"]),
                         children=[
                             Action(
                                 var_name="Last_Results",
                                 operator="SET_TO_NO"),
                             Action(
                                 var_name="First_Results",
                                 operator="SET_TO_NO"),
                             Action(
                                 var_name="Search_Now",
                                 operator="SET_TO_YES"),
                             Action(
                                 var_name="First_Time",
                                 operator="SET_TO_NO"),
                             Input(
                                 Grammar(
                                     watson_items=["UPDATE NUM_MOVIES"]),
                                 children=[
                                     If(elements=[
                                         ResultsCountConditions.equals_zero(
                                         ),
                                         Output(Prompt(items=[
                                             "I'm afraid I found {%s} matching {Color_Preference} {Style_Preference}. Try changing your criteria."
                                             % NAME_RESULTS_COUNT
                                         ]),
                                                children=[
                                                    GetUserInput(children=[
                                                        Input(
                                                            GenericGrammar.
                                                            ok(),
                                                            children=[
                                                                ColorPreferenceAction
                                                                .
                                                                set_to_blank(
                                                                ),
                                                                StylePreferenceAction
                                                                .
                                                                set_to_blank(
                                                                ),
                                                                StylePreferenceProfileCheck
                                                                .goto(),
                                                                RemoveColorInput
                                                                .goto()
                                                            ]),
                                                        RemoveColorInput.
                                                        goto()
                                                    ])
                                                ])
                                     ]),
                                     If(elements=[
                                         StyleConditions.is_blank(),
                                         ColorConditions.has_value(),
                                         Output(Prompt(items=[
                                             "Good choice, {User_Name}! I found {%s} results for {Recency_Preference} {Color_Preference}-rated movies."
                                             % NAME_RESULTS_COUNT
                                         ]),
                                                children=[
                                                    AfterSearchResults.goto(
                                                    )
                                                ])
                                     ]),
                                     If(elements=[
                                         ColorConditions.is_blank(),
                                         StyleConditions.has_value(),
                                         Output(Prompt(items=[
                                             "Good choice, {User_Name}! I found {%s} results for {Color_Preference} {Style_Preference} movies."
                                             % NAME_RESULTS_COUNT
                                         ]),
                                                children=[
                                                    AfterSearchResults.goto(
                                                    )
                                                ])
                                     ]),
                                     If(elements=[
                                         ColorConditions.is_blank(),
                                         StyleConditions.is_blank(),
                                         Output(Prompt(items=[
                                             "I found {%s} results for ALL {Recency_Preference} movies."
                                             % NAME_RESULTS_COUNT
                                         ]),
                                                children=[
                                                    AfterSearchResults.goto(
                                                    )
                                                ])
                                     ]),
                                     Output(Prompt(items=[
                                         "Good choices, {User_Name}! I found {%s} results for {Color_Preference} {Style_Preference} movies."
                                         % NAME_RESULTS_COUNT
                                     ]),
                                            children=[
                                                AfterSearchResults.create()
                                            ])
                                 ])
                         ])
                 ])
         ])
Beispiel #10
0
    def create():
        from dialog.schema.factories.folder.sequences import SystemInitiatedSequences
        return Folder(
                selection_type="RANDOM",
                label="SMALL TALK SEQUENCES",
                children=[
                    SmallTalkAction.create_increment(),
                    Input(
                            Grammar(
                                    watson_items=[
                                        "What is your name?",
                                        "$ your name",
                                        "$ you called",
                                        "$ they call you",
                                        "$ what can I call you"
                                    ]
                            ),
                            children=[
                                SmallTalkConditions.too_much_small_talk_goto(),
                                Output(
                                        Prompt(items=["My name is Jemboo."]),
                                        children=[If(
                                                elements=[
                                                    UserNameConditions.is_blank(),
                                                    Output(
                                                            Prompt(items=["What's your name?"]),
                                                            children=[Goto(ref="getUserInput_what_is_your_name")]
                                                    )
                                                ]
                                        ),
                                            GetUserInput(
                                                    children=[
                                                        Input(
                                                                Grammar(
                                                                        watson_items=[
                                                                            "Okay",
                                                                            "okay",
                                                                            "hi",
                                                                            "hi jemboo"
                                                                        ]
                                                                ),
                                                                children=[
                                                                    Goto(ref="output_what_is_name")
                                                                ]
                                                        ),
                                                        Input(
                                                                Grammar(
                                                                        watson_items=[
                                                                            "My name is",
                                                                            "$ my name",
                                                                            "$ call me",
                                                                            "$ I'm called",
                                                                            "$ I am called",
                                                                            "$ known as"
                                                                        ]
                                                                ),
                                                                children=[
                                                                    Goto(ref="input_user_knownas_name")
                                                                ]
                                                        ),
                                                        PreliminarySequencesSearch.goto()
                                                    ]
                                            )]
                                )
                            ]
                    ),
                    Input(
                            Grammar(
                                    watson_items=[
                                        "Siri",
                                        "$ (VIRTUAL_AGENTS)={Topic}"
                                    ]
                            ),

                            children=[
                                TopicAction.set_to_value(),
                                SmallTalkConditions.too_much_small_talk_goto(),
                                Input(
                                        Grammar(
                                                watson_items=[
                                                    "is better",
                                                    "$ better",
                                                    "$ smarter"
                                                ]
                                        ),
                                        children=[
                                            Output(
                                                    Prompt(items=["Now you're hurting my feelings."]),
                                                    children=[GetUserInput(
                                                            children=[
                                                                Input(
                                                                        Grammar(watson_items=["Okay", "$ sorry"]),
                                                                        children=[SystemInitiatedSequences.goto()]
                                                                ),
                                                                PreliminarySequencesSearch.goto()
                                                            ]
                                                    )]
                                            )
                                        ]
                                )
                            ]
                    ),
                    Input(
                            Grammar(
                                    watson_items=[
                                        "Do you speak English",
                                        "$ speak English",
                                        "$ understand English",
                                        "$ know English",
                                        "$ get English"
                                    ]
                            ),
                            children=[
                                SmallTalkConditions.too_much_small_talk_goto(),
                                Output(
                                        Prompt(items=[
                                            "I'm sorry, English is my second language. My native tongue is Binary. 01110011 01101111 01110010 01110010 01111001"]
                                        ),
                                        children=[GetUserInput(
                                                children=[
                                                    Input(
                                                            Grammar(watson_items=["haha", "ok"]),
                                                            children=[SystemInitiatedSequences.goto()]
                                                    ),
                                                    Input(
                                                            Grammar(
                                                                    watson_items=[
                                                                        "01101110 01110000",
                                                                        "01101110 01101111 00100000 01110000 01110010 01101111 01100010 01101100 01100101 01101101",
                                                                        "01101110 01110000",
                                                                        "01100100 01101111 01101110 00100111 01110100 00100000 01110111 01101111 01110010 01110010 01111001"
                                                                    ]
                                                            ),
                                                            children=[
                                                                Output(
                                                                        Prompt(items=["haha, you're good!"]),
                                                                        children=[SystemInitiatedSequences.goto()]
                                                                )
                                                            ]
                                                    ),
                                                    PreliminarySequencesSearch.goto()
                                                ]
                                        )]
                                )
                            ]
                    )
                ]
        )
Beispiel #11
0
    def create():
        from dialog.schema.factories.folder.sequences import SystemInitiatedSequences

        return Folder(
                label="REPAIR SEQUENCES",
                children=[
                    Input(
                            Grammar(
                                    watson_items=[
                                        "Help",
                                        "$ help",
                                        "$ how does this work",
                                        "$ what do I do",
                                        "$ what can I do",
                                        "$ don't know",
                                        "$ I'm not sure"
                                    ]
                            ),
                            children=[
                                Output(
                                        Prompt(
                                                items=[
                                                    "Say <i>Never mind</i> or <i>nvm</i> to start over.\nSay <i>okay</i> or <i>thanks</i> if my response is acceptable.\nSay <i>What does X mean?</i> for a definition of X.\nSay <i>got to go</i> or <i>bye</i> when you're finished."
                                                ]
                                        )
                                )
                            ]
                    ),
                    Input(
                            Grammar(
                                    watson_items=[
                                        "Say that again",
                                        "$ say that again",
                                        "$ say again",
                                        "$ what did you say",
                                        "$ come again",
                                        "$ say what"
                                    ]
                            ),
                            children=[
                                Output(
                                        Prompt(items=["I said..."]),
                                        children=[Goto(ref="##special_DNR_GUI_PREVIOUS_OUTPUT_NODE_ID")]
                                )
                            ]
                    ),
                    Input(
                            Grammar(
                                    watson_items=[
                                        "Never mind",
                                        "$ Nevermind",
                                        "$ Never mind",
                                        "$ nvm",
                                        "$ start over",
                                        "$ start again",
                                        "$ restart",
                                        "$ redo",
                                        "$ do over",
                                        "$ start from * beginning",
                                        "$ clear * selections"
                                    ]
                            ),
                            children=[
                                Output(
                                        Prompt(items=["Okay. Whatever you say, {User_Name}!"]),
                                        children=[SystemInitiatedSequences.goto()]
                                )
                            ]
                    ),
                    Input(
                            Grammar(
                                    watson_items=[
                                        "what does * mean",
                                        "$ what does * mean",
                                        "$ what does * stand for",
                                        "$ do you mean by ",
                                        "$ what are examples of",
                                        "$ what is an example of"
                                    ]
                            ),
                            children=[
                                Input(
                                        Grammar(
                                                watson_items=[
                                                    "trailers",
                                                    "$ trailer",
                                                    "$ trailers"
                                                ]
                                        ),
                                        children=[
                                            Output(
                                                    Prompt(
                                                            items=[
                                                                "<i>Trailers</i> are video previews for movies. <br> <br>"]
                                                    ),
                                                    children=[
                                                        GetUserInput(
                                                                children=[
                                                                    Input(
                                                                            Grammar(watson_items=["okay"]),
                                                                            children=[
                                                                                Output(
                                                                                        Prompt(items=[
                                                                                            "Sure, happy to help. <br> <br>"]),
                                                                                        children=[Goto(
                                                                                                ref="##special_DNR_GET_USER_INPUT_NODE_ID")]
                                                                                )
                                                                            ]
                                                                    )
                                                                ]
                                                        )
                                                    ],
                                                    is_insert_DNR_statement=True
                                            )
                                        ]
                                ),
                                Input(
                                        Grammar(
                                                watson_items=[
                                                    "genre",
                                                    "$ genre",
                                                    "$ genres"
                                                ]
                                        ),
                                        children=[
                                            Output(
                                                    Prompt(
                                                            items=[
                                                                "The <i>genre</i> is the category of movie, like Drama, Comedy, Action, etc. <br> <br>"
                                                            ]
                                                    )
                                            )
                                        ]
                                ),
                                Input(
                                        Grammar(
                                                watson_items=[
                                                    "rating",
                                                    "$ rating",
                                                    "$ ratings",
                                                    "$ mpaa"
                                                ]
                                        ),
                                        children=[
                                            Output(
                                                    Prompt(
                                                            items=[
                                                                "The <i>rating</i> is a recommendation by the Motion Picture Association of America about the suitability of a movie's content for particular age groups. For example, G is for general audiences, while R is restricted to people 17 and older.<br> <br>"]
                                                    )
                                            )
                                        ]
                                ),
                                Input(
                                        Grammar(
                                                watson_items=[
                                                    "G",
                                                    "$ G"
                                                ]
                                        ),
                                        children=[
                                            Output(
                                                    Prompt(
                                                            items=[
                                                                "G stands for <i>General Audience</i> and is appropriate for everyone.", ]
                                                    )
                                            )
                                        ]
                                ),
                                Input(
                                        Grammar(
                                                watson_items=[
                                                    "PG-13",
                                                    "$ PG-13"
                                                ]
                                        ),
                                        children=[
                                            Output(
                                                    Prompt(
                                                            items=[
                                                                "PG-13 means <i>Parents Strongly Cautioned</i> or that some material may not be suitable for children under 13 years old.",
                                                            ]
                                                    )
                                            )
                                        ]
                                ),
                                Input(
                                        Grammar(
                                                watson_items=[
                                                    "Current",
                                                    "$ current"
                                                ]
                                        ),
                                        children=[
                                            Output(
                                                    Prompt(
                                                            items=[
                                                                "<i>Current</i> movies are those that have been playing for the past 28 days."
                                                            ]
                                                    )
                                            )
                                        ]
                                ),
                                Input(
                                        Grammar(
                                                watson_items=[
                                                    "Upcoming",
                                                    "$ upcoming"
                                                ]
                                        ),
                                        children=[
                                            Output(
                                                    Prompt(
                                                            items=[
                                                                "<i>Upcoming</i> movies are those that will come out within the next 6 months."
                                                            ]
                                                    )
                                            )
                                        ]
                                ),
                                Input(
                                        Grammar(
                                                watson_items=[
                                                    "$ (GENRE)={Topic}",
                                                    "$ (UNSUPPORTED_GENRES)={Topic}"
                                                ]
                                        ),
                                        children=[
                                            TopicAction.set_to_value(),
                                            Output(
                                                    Prompt(
                                                            items=[
                                                                "I'm afraid I don't have definitions of the different genres."
                                                            ]
                                                    )
                                            )
                                        ]
                                )
                            ]
                    ),
                    Input(
                            Grammar(
                                    watson_items=[
                                        "I already told you!",
                                        "$ already told you",
                                        "$ already said it"
                                    ]
                            ),
                            children=[
                                Output(
                                        Prompt(
                                                items=["I'm sorry, please repeat it for me."]
                                        ),
                                        children=[Goto(ref="getUserInput_how_can_i_help_you")]
                                )
                            ]
                    )
                ]
        )