private void ProcessLine(String line, TrainingSet set, double value) { if (this.histogram.Count(line) >= Config.MINIMUM_WORDS_PRESENT) { double[] result = this.histogram.Compact(line); set.AddTrainingSet(result, value); this.currentSample++; } }
private void ProcessLines(String filename, TrainingSet set, double value) { this.currentSample = 0; String line = null; Stream s = File.OpenRead(filename); StreamReader r = new StreamReader(s); while ((line = r.ReadLine()) != null) { ProcessLine(line, set, value); } s.Close(); }
public TrainBot() { this.common = new CommonWords(Config.FILENAME_COMMON_WORDS); this.trainingSet = new TrainingSet(); }
public void Process(TrainingSet set, double value, String filename) { CountLines(filename); ProcessLines(filename, set, value); }