aima/text.py
def add(self, ngram):
        """Count 1 for P[(w1, ..., wn)] and for P(wn | (w1, ..., wn-1)"""
        CountingProbDist.add(self, ngram)
        self.cond_prob[ngram[:-1]].add(ngram[-1])
def add(self, ngram):
        """Count 1 for P[(w1, ..., wn)] and for P(wn | (w1, ..., wn-1)"""
        CountingProbDist.add(self, ngram)
        self.cond_prob[ngram[:-1]].add(ngram[-1])
Count 1 for P[(w1, ..., wn)] and for P(wn | (w1, ..., wn-1)