public static float CreateFinalStats(string filename) { int error = GlobalStats.errors; int docs = GlobalStats.total; float result = (1.0f - ((float)error / (float)docs)) * 100; string text = $"Article precision: {result.ToString("00.00")}% \nArticles processed: {docs} \nArticles With Error: {error} \n\n{GlobalStats.text}"; VirtualFS.FileWriteAllText(filename, text); return(result); }
void CalculatePrecision(int docs, int error) { GlobalStats.errors += error; GlobalStats.total += docs; float result = (1.0f - ((float)error / (float)docs)) * 100; string text = $"Article precision: {result.ToString("00.00")}% \nArticles processed: {docs} \nArticles With Error: {error}"; VirtualFS.FileWriteAllText($"{logDir}/ArticlePrecision.txt", text); GlobalStats.text += $" \n\n{currentName} - {text}"; }