public void Run() { DataProcessing dp = new DataProcessing(Cfg); string textFilePath = dp.ProcessFile(Cfg.EvaluateDataPath); Digitalize dgt = new Digitalize(Cfg); string dataFilePath = dgt.Run(textFilePath); string resultPath = Common.RunScripts(Cfg, Cfg.EvaluateScriptPath, dataFilePath, Cfg.EvaluateLabelPath, Cfg.TextClassificationModelPath); File.Copy(resultPath, Cfg.EvaluateResultPath, true); }
public void Run() { Cleanup(); Digitalize digit = new Digitalize(Cfg); digit.Run(); string dataStatus = string.Join("\t", Constants.NONSUP, Cfg.BatchName, Cfg.DataDescription); File.AppendAllLines(Cfg.UsedDataFile, new List <string> { dataStatus }); }
public void Run() { DataProcessing dataProcessing = new DataProcessing(Cfg); Digitalize digitalize = new Digitalize(Cfg); string prePath = Path.Combine(Cfg.TmpFolder, $"{TmpName}.{Cfg.Locale}.pre"); string wbrPath = Path.Combine(Cfg.TmpFolder, $"{TmpName}.{Cfg.Locale}.wbr"); string postPath = Path.Combine(Cfg.TmpFolder, $"{TmpName}.{Cfg.Locale}.post"); string dataPath = Path.Combine(Cfg.TmpFolder, $"{TmpName}.{Cfg.Locale}.data"); string resultPath = Path.Combine(Cfg.TmpFolder, $"{TmpName}.{Cfg.Locale}.result"); dataProcessing.PreProcessFile(Cfg.PredictTestPath, prePath); dataProcessing.WordBreakFile(prePath, wbrPath); dataProcessing.PostProcessFile(wbrPath, postPath); digitalize.Run(postPath, dataPath); RunPredict(dataPath, resultPath); var list = File.ReadLines(resultPath).Zip(File.ReadLines(postPath), (x, y) => x + "\t" + y); File.WriteAllLines(Cfg.PredictResultPath, list); }