public string Run(string input)
 {
     if (Validate(input) == 1)
     {
         var response = LanguageUnderstandingService.GetIntent(input);
         return(response.Result);
     }
     else
     {
         return("");
     }
 }
Exemple #2
0
        public string Run(string input)
        {
            string replyText = "";

            if (input.Equals("Find something for me"))
            {
                replyText = "OK";
            }
            else if (input.Equals("I want to know the legislation change due to Corona"))
            {
                var response = textAnalyticService.KeyPhraseExtraction(input);
                foreach (string keyphrase in response)
                {
                    replyText += $"{keyphrase} \n";
                }
            }
            else
            {
                var response = LanguageUnderstandingService.GetIntent(input);
                replyText = $"This is {response.Result}";
            }
            return(replyText);
        }