コード例 #1
0
ファイル: PairsAnalysis.cs プロジェクト: bellal89/cqa_medical
        public void TestNonCorrectPairsFactCorrectness()
        {
            var analysis = new PairsAnalysis();
            var noncorrectSum = analysis.GetNonCorrectPairs(150).Sum(it => it.Item3.Count);
            var correctExtractedSum = (double)(analysis.GetCorrectExtracted().Sum(it => it.Item3.Count) + noncorrectSum);
            var correctExtractedCount = (double) (analysis.GetCorrectExtracted().Count + analysis.GetNonCorrectPairs(150).Count());

            Console.WriteLine("Correct extracted with handy tuning:" + correctExtractedCount/analysis.GetExtraced().Count);
            Console.WriteLine("Correct extracted sum:" + correctExtractedSum / analysis.GetExtraced().Sum(it => it.Item3.Count));
        }
コード例 #2
0
ファイル: PairsAnalysis.cs プロジェクト: bellal89/cqa_medical
 public void TestCreation()
 {
     var analysis = new PairsAnalysis();
     File.WriteAllText("PairsNonCorrectQuestions.txt", String.Join("\n---\n---\n",
                                                                   analysis.GetIncorrectPairQuestions(100).Select(
                                                                   	it =>
                                                                   	analysis.GetMkb().GetDesease(it.Item1).Name + "\n" +
                                                                   	it.Item2 + "\n" +
                                                                   	it.Item3 + "\n" + it.Item4.WholeText + "\n===\n" +
                                                                   	String.Join("\n",
                                                                   	            it.Item4.GetAnswers().Select(a => a.Text)))));
 }