private void Train(WordPartOfSpeech item) { WordStatistics.GetOrCreate(item.Word).GetOrCreate(item.PartOfSpeech); WordStatistics[item.Word][item.PartOfSpeech]++; PartOfSpeechStatistics.GetOrCreate(item.PartOfSpeech); PartOfSpeechStatistics[item.PartOfSpeech]++; }
private void Train(WordPartOfSpeech current, WordPartOfSpeech successor) { Statistics .GetOrCreate(current.Word) .GetOrCreate(successor.PartOfSpeech) .GetOrCreate(current.PartOfSpeech); Statistics[current.Word][successor.PartOfSpeech][current.PartOfSpeech]++; }