public static void RemoveLowFrequency(string statPath) { DoAndPrintTime(() => { var statistician = new TextStatistician(); statistician.Load(statPath); statistician.RemoveLowFrequency((int)(statistician.Total * MinRate)); statistician.Save(statPath); }, $"Remove low frequency ({MinRate}): {statPath}"); }
public static void AnalyzeFiles(IEnumerable <string> filePaths, string statPath, bool append = false) { var statistician = new TextStatistician(); if (append) { statistician.Load(statPath); } AnalyzeFiles(statistician, filePaths); statistician.RemoveLowFrequency((int)(statistician.Total * MinRate)); DoAndPrintTime(() => statistician.Save(statPath), $"Writing to file: {statPath}"); }