protected todoLuis GetToDoIntent(
            string userInput            = null,
            todoLuis.Intent intents     = todoLuis.Intent.None,
            double[] ordinal            = null,
            double[] number             = null,
            string[] containsAll        = null,
            string[] listType           = null,
            string[] taskContentML      = null,
            string[] shopContent        = null,
            string[] taskContentPattern = null,
            string[][] foodOfGrocery    = null,
            string[][] shopVerb         = null)
        {
            var intent = new todoLuis();

            intent.Text    = userInput;
            intent.Intents = new Dictionary <todoLuis.Intent, IntentScore>();
            intent.Intents.Add(intents, new IntentScore()
            {
                Score = TopIntentScore
            });
            intent.Entities                 = new todoLuis._Entities();
            intent.Entities._instance       = new todoLuis._Entities._Instance();
            intent.Entities.ordinal         = ordinal;
            intent.Entities.ContainsAll     = containsAll;
            intent.Entities.ListType        = listType;
            intent.Entities.TaskContent     = taskContentML;
            intent.Entities.TaskContent_Any = taskContentPattern;
            intent.Entities.FoodOfGrocery   = foodOfGrocery;
            intent.Entities.ShopVerb        = shopVerb;

            return(intent);
        }
 private todoLuis GetBaseShowTasksIntent(
     string userInput,
     todoLuis.Intent intents = todoLuis.Intent.ShowToDo,
     string[] listType       = null)
 {
     return(GetToDoIntent(
                userInput,
                intents,
                listType: listType));
 }
Пример #3
0
 private todoLuis GetBaseDeleteToDoIntent(
     string userInput,
     todoLuis.Intent intents     = todoLuis.Intent.DeleteToDo,
     double[] ordinal            = null,
     double[] number             = null,
     string[] listType           = null,
     string[] containsAll        = null,
     string[] taskContentPattern = null,
     string[] taskContentML      = null)
 {
     return(GetToDoIntent(
                userInput,
                intents,
                ordinal: ordinal,
                number: number,
                listType: listType,
                containsAll: containsAll,
                taskContentPattern: taskContentPattern,
                taskContentML: taskContentML));
 }
Пример #4
0
 private todoLuis GetBaseAddTaskIntent(
     string userInput,
     todoLuis.Intent intents     = todoLuis.Intent.AddToDo,
     string[] listType           = null,
     string[] taskContentML      = null,
     string[] shopContent        = null,
     string[] taskContentPattern = null,
     string[][] foodOfGrocery    = null,
     string[][] shopVerb         = null)
 {
     return(GetToDoIntent(
                userInput,
                intents,
                listType: listType,
                taskContentML: taskContentML,
                shopContent: shopContent,
                taskContentPattern: taskContentPattern,
                foodOfGrocery: foodOfGrocery,
                shopVerb: shopVerb));
 }