示例#1
0
        public void Init()
        {
            qae = new QAEngin();


            initializeMocksObject();
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            QAEngin qna = new QAEngin();
            string  str;
            var     subQuestion = new SubQuestion();

            subQuestion.questionText = questionBox.Text;
            subQuestion.answerText   = input_TB.Text;
            subQuestion.flags        = "need1";
            var match = qna.matchAnswers(subQuestion,
                                         input_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 + Environment.NewLine;
            }



            var res = qnaCont.createFeedBack(match);

            foreach (var s in res)
            {
                answerText += s + Environment.NewLine;
            }

            text_TB3.Text = answerText;
        }
示例#3
0
        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;
        }