def METHOD_NAME(self):
    self.bigrams_dict, self.trigrams_dict = {}, {}
    bigram_combs = list(itertools.product(self.letters, self.letters))
    bigram_combs = ["".join(comb) for comb in bigram_combs]
    trigram_combs = list(itertools.product(self.letters, self.letters, self.letters))
    trigram_combs = ["".join(comb) for comb in trigram_combs]
    for cnt, bigram in enumerate(bigram_combs):
        self.bigrams_dict[bigram] = cnt
    for cnt, trigram in enumerate(trigram_combs):
        self.trigrams_dict[trigram] = cnt + len(bigram_combs)