Ejemplo n.º 1
0
        public IActionResult Predict([FromBody] PredictViewModel vm)
        {
            var predict = _ml.CreatePredictionEngine();
            var result  = _ml.Predict(predict, vm.Question);

            return(Ok(result));
        }
Ejemplo n.º 2
0
        public void get_question_intent_successed()
        {
            var data = FakeQuestions();

            ml.BuildAndTrainModel(data);
            var question = "��Һ�ѽ";
            var pe       = ml.CreatePredictionEngine();
            var result   = ml.Predict(pe, question);

            Assert.Equal("�ʺ�", result.Intent);
        }