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