def add_train(self, corpus, sentence):
        """
        Add the counts associated with a sentence.
        """

        if not corpus in self._obs_counts:
            self._obs_counts[corpus] = defaultdict(DistCounter)

        for context, word in bigrams(self.tokenize_and_censor(sentence)):
            self._obs_counts[corpus][context].inc(word)
            self._unigram[corpus].inc(word)
dataset/ETHPy150Open Pinafore/qb/clm/lm_wrapper.py/LanguageModelWriter.add_train/original