private void button4_Click(object sender, EventArgs e) { var inputText = systemAnswer_TB.Text; string log = ""; var botResualt = new NLPControler().testAnalizer(inputText, out log, questionInput_TB.Text); drawTree(botResualt, answerTreeView); inputText = userAnswer_TB2.Text; var botResualt2 = new NLPControler().testAnalizer(inputText, out log, questionInput_TB.Text); drawTree(botResualt2, userAnswerTreeView); QAEngin qna = new QAEngin(); string str; var subQuestion = new SubQuestion(); subQuestion.questionText = questionInput_TB.Text; subQuestion.answerText = systemAnswer_TB.Text; subQuestion.flags = "need1"; var match = qna.matchAnswers(subQuestion, userAnswer_TB2.Text); var answerText = "Score:" + match.score + Environment.NewLine; foreach (var ent in match.missingEntitis) { answerText += "Missing Entity:" + ent.entityValue + Environment.NewLine; } foreach (var ans in match.answersFeedbacks.Where(x => x.score < 75)) { answerText += "Missing Answer:" + ans.answer + Environment.NewLine; } var res = qnaCont.createFeedBack(match); foreach (var s in res) { answerText += s + Environment.NewLine; } resualt_TB3.Text = answerText; }
private void send_BTN_Click(object sender, EventArgs e) { var inputText = input_TB.Text; text_TB.AppendText("User:"******"Bot:" + Environment.NewLine); string log = ""; var botResualt = new NLPControler().testAnalizer(inputText, out log); var httpCtrl = new OuterAPIController(); //foreach (var line in new string[] { input.ToString() }) //{ // text_TB.AppendText(line + Environment.NewLine); //} answer1 = botResualt; drawTree(botResualt, treeView); text_TB.AppendText(log + Environment.NewLine); }
public void ConversationControllerTest() { initializeObject(); nlpCtrl = new NLPControler(); nlpCtrl.Ma = MorfAnalizer; }
public void ConversationControllerTest() { initializeMocksObject(); nlpCtrl = new NLPControler(); nlpCtrl.Ma = mockMorfAnalizer.Object; }