static void Test(string path, string file, ITextConverter textConverter) { string root = Path.Combine(Constants.SPP_RootPath, @"model\sentiment\learning\"); string[] dirs = Directory.GetDirectories(root); int max = 0; foreach (string dir in dirs) { string name = Path.GetFileName(dir); bool run = true; foreach (char ch in name) { if (!char.IsDigit(ch)) { run = false; break; } } if (!run) { continue; } Console.ForegroundColor = ConsoleColor.Magenta; Console.WriteLine("C VALUE AT: {0}", c_coll[Int32.Parse(name)]); Console.ResetColor(); SECoreImpl learnCoreImpl = CreateLearningCoreImpl(path, Int32.Parse(name)); ISemanticTagger lexiconTagger = new LexiconSentimentTagger(textConverter.Tokenizer); SentimentEngine engine = new SentimentEngine(textConverter, lexiconTagger, learnCoreImpl); SentimentEvaluator evaluator = new SentimentEvaluator(engine); evaluator.Evaluate(file, true, true); if (++max >= c_coll.Length) { break; } } }
static void Test(string file, SentimentEngine engine) { SentimentEvaluator evaluator = new SentimentEvaluator(engine); evaluator.Evaluate(file); }