Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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
            });
        }
Ejemplo n.º 3
0
        public void Run()
        {
            string posPath = Cleanup(Cfg.PositiveFolder, "Pos");
            string negPath = Cleanup(Cfg.NegativeFolder, "Neg");

            MergeData(posPath, negPath);

            Digitalize dgt = new Digitalize(Cfg);

            Common.FolderTransport(Cfg.SupTextFolder, Cfg.SupDataFolder, dgt.Run);

            string dataStatus = string.Join("\t", Constants.SUP, 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);
        }