public void FinishTesting() { int total_word_count = 0; // всего обработано слов int total_C_count = 0; int error_count = 0; int B_instead_of_C_count = 0; int C_instead_of_B_count = 0; FinishTesting(out total_word_count, out total_C_count, out error_count, out B_instead_of_C_count, out C_instead_of_B_count); Console.WriteLine("CONTEXT_SPAN={0}", CONTEXT_SPAN); Console.WriteLine("SUFFIX_LEN={0}", SUFFIX_LEN); Console.WriteLine("total_word_count={0}", total_word_count); Console.WriteLine("Segmentation error count={0}, i.e. {1}%", error_count, PercentFormatter.Percent(error_count, total_word_count)); Console.WriteLine("B_instead_of_C_errors={0}%", PercentFormatter.Percent(B_instead_of_C_count, total_C_count)); using (System.IO.StreamWriter wrt = new System.IO.StreamWriter("model-training.txt", true)) { wrt.WriteLine("{0} TOKENIZER n_learn_samples={1} n_train_patterns={2} total_recognition_error={3} B_instead_of_C_errors={4}", DateTime.Now.ToString("dd.MM.yyyy"), n_learn_samples, n_train_patterns, PercentFormatter.Percent(error_count, total_word_count), PercentFormatter.Percent(B_instead_of_C_count, total_C_count) ); } return; }
public void PrintTestResults() { System.Console.WriteLine("total_check_word_count={0}", total_word_count); System.Console.WriteLine("error_count_no_filter={0}, i.e. {1}%", error_count_no_filter, PercentFormatter.Percent(error_count_no_filter, total_word_count)); System.Console.WriteLine("error_count_with_ngram={0}, i.e. {1}%", error_count_with_ngram, PercentFormatter.Percent(error_count_with_ngram, total_word_count)); return; }
public void PrintTestResults() { System.Console.WriteLine("total_check_word_count={0}", total_word_count); System.Console.WriteLine("raw_model_error_count={0}, i.e. {1}%", raw_model_error_count, PercentFormatter.Percent(raw_model_error_count, total_word_count)); System.Console.WriteLine("error_count_no_filter={0}, i.e. {1}%", error_count_no_filter, PercentFormatter.Percent(error_count_no_filter, total_word_count)); System.Console.WriteLine("error_count_with_ngram={0}, i.e. {1}%", error_count_with_ngram, PercentFormatter.Percent(error_count_with_ngram, total_word_count)); using (System.IO.StreamWriter wr = new System.IO.StreamWriter("report.txt")) { wr.WriteLine("total_check_word_count={0}", total_word_count); wr.WriteLine("raw_model_error_count={0}, i.e. {1}%", raw_model_error_count, PercentFormatter.Percent(raw_model_error_count, total_word_count)); wr.WriteLine("error_count_no_filter={0}, i.e. {1}%", error_count_no_filter, PercentFormatter.Percent(error_count_no_filter, total_word_count)); wr.WriteLine("error_count_with_ngram={0}, i.e. {1}%", error_count_with_ngram, PercentFormatter.Percent(error_count_with_ngram, total_word_count)); } return; }