コード例 #1
0
        public GeneralLuis GetGeneralLuis(
            string userInput          = null,
            GeneralLuis.Intent intent = GeneralLuis.Intent.None)
        {
            var generalLuis = new GeneralLuis();

            generalLuis.Text    = userInput;
            generalLuis.Intents = new Dictionary <GeneralLuis.Intent, IntentScore>();
            generalLuis.Intents.Add(intent, new IntentScore()
            {
                Score = TopIntentScore
            });
            return(generalLuis);
        }
コード例 #2
0
        public static GeneralLuis CreateIntent(string userInput, GeneralLuis.Intent intent)
        {
            var result = new GeneralLuis {
                Text    = userInput,
                Intents = new Dictionary <GeneralLuis.Intent, IntentScore>()
            };

            result.Intents.Add(intent, new IntentScore()
            {
                Score = 0.9
            });

            result.Entities = new GeneralLuis._Entities {
                _instance = new GeneralLuis._Entities._Instance()
            };

            return(result);
        }