public void ExtractFeatures() { var featureExtraction = new FeatureExtraction(); featureExtraction.ExtractFeatures(); //Insert //featureExtraction.ExtractWordBigramFeatures(); //Update }
private static bool RunJob(string jobCode) { var result = false; switch (jobCode) { case "FE": Console.WriteLine(string.Format("[{0}] {1} is starting...", DateTime.Now, _jobList[jobCode])); var stopWatch = new Stopwatch(); stopWatch.Start(); try { var featureExtraction = new FeatureExtraction(); featureExtraction.ExtractFeatures(); stopWatch.Stop(); var ts = stopWatch.Elapsed; var elapsedTime = string.Format("{0:00}:{1:00}:{2:00}.{3:00}", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10); Console.WriteLine(string.Format("[{0}] {1} has finished, in {2}.", DateTime.Now, _jobList[jobCode], elapsedTime)); result = true; } catch (Exception ex) { stopWatch.Stop(); var ts = stopWatch.Elapsed; var elapsedTime = string.Format("{0:00}:{1:00}:{2:00}.{3:00}", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10); Console.WriteLine(string.Format("[{0}] {1} has stopped, in {2}, with error: \n{3}", DateTime.Now, _jobList[jobCode], elapsedTime, ex.ToString())); result = false; } Console.WriteLine(); break; } return(result); }