static void Main(string[] args) { if (args.Length == 0) { PrintUsageAndExit(); } ITask task=null; switch (args[0]) { case "SampleStream": task = new SampleStream(); break; case "GenerateWords": IUrlExpander expander = new UrlExpander(); Tokenizer tokenizer = new Tokenizer(expander); task = new GenerateWords(tokenizer); break; case "PushToCouch": IUrlExpander expander1 = new UrlExpander(); Tokenizer tokenizer1 = new Tokenizer(expander1); task = new PushAllDataToCouch(tokenizer1); break; case "UpdateSimilarityScores": task = new UpdateSimilarityScores(); break; case "DownloadCandidatesData": task = new DownloadCandidatesData(); break; default: PrintUsageAndExit(); break; } task.Execute(); Environment.Exit(0); ; }
public PushAllDataToCouch(Tokenizer tokenizer) { _tokenizer = tokenizer; }
//Helper static method public static string[] GetWords(string source) { IUrlExpander expander = new UrlExpander(); Tokenizer tokenizer = new Tokenizer(expander); return new List<string>(tokenizer.Tokenize(source)).ToArray(); }