public async Task WelcomeGreeting(IDialogContext context, string messageText)
        {
            QureyController qc  = new QureyController();
            string          ans = qc.GetAnswer(messageText, "Greetings", "0.8", "0");
            await context.PostAsync(ans);

            context.Done(true);
        }
        public async Task Advice(IDialogContext context, IAwaitable <IMessageActivity> activity, LuisResult result)
        {
            QureyController qc  = new QureyController();
            string          ans = qc.GetAnswer(result.Query, "Advice", result.TopScoringIntent.Score.ToString(), "0");
            await context.PostAsync("Here are my thoughts for you : ");

            await context.PostAsync(ans);

            context.Wait(MessageReceived);
        }
        public async Task Joke(IDialogContext context, IAwaitable <IMessageActivity> activity, LuisResult result)
        {
            QureyController qc = new QureyController();

            qc.PostQuestionOne(result.Query, result.TopScoringIntent.Intent, result.TopScoringIntent.Score.ToString(), "0");
            if (result.TopScoringIntent.Score < 0.4)
            {
                string ans = "";
                ans = qc.GetTrainedAnswer(result.Query);
                qc.PostAnswerOne(ans, result.TopScoringIntent.Intent);
                await context.PostAsync(ans);

                context.Wait(MessageReceived);
            }
            else
            {
                await context.PostAsync("Here is one joke... ");

                await context.PostAsync(qc.GetAnswer(result.Query, "Joke", result.TopScoringIntent.Score.ToString(), "0"));

                context.Wait(MessageReceived);
            }
        }
        public async Task Movies(IDialogContext context, LuisResult result)
        {
            QureyController qc        = new QureyController();
            string          ans       = "";
            bool            savedData = false;

            qc.PostQuestionOne(result.Query, result.TopScoringIntent.Intent, result.TopScoringIntent.Score.ToString(), "0");

            if (result.TopScoringIntent.Score < 0.4)
            {
                ans       = qc.GetTrainedAnswer(result.Query);
                savedData = true;
            }

            if (ans == "" || ans == "Hmmm ...")
            {
                ans       = qc.GetAnswer(result.Query, "Movies", result.TopScoringIntent.Score.ToString(), "0");
                savedData = true;
            }

            if (ans == "")
            {
                var options      = new MovieChoice[] { MovieChoice.PopularMovie, MovieChoice.SearchMovie };
                var descriptions = new string[] { "List Popular Movies", "Search for movie" };
                PromptDialog.Choice <MovieChoice>(context, ResumeAfterMovieChoiceSelection,
                                                  options, "What would you like to choose about movies?", descriptions: descriptions);
            }

            if (savedData)
            {
                qc.PostAnswerOne(ans, result.TopScoringIntent.Intent);
                savedData = false;
                await context.PostAsync(ans);

                context.Wait(MessageReceived);
            }
        }