Пример #1
0
 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}");
 }
Пример #2
0
        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}");
        }