def __init__(self, n, word_fd, otherngram_fd, wildcard_fd, ngram_fd): """Construct a NramCollocationFinder, given FreqDists for appearances of words, bigrams, two words with any word between them, and trigrams. """ AbstractCollocationFinder.__init__(self, word_fd, ngram_fd) self.wildcard_fd = wildcard_fd self.otherngram_fd = otherngram_fd self.n = n
def __init__(self, word_fd, bigram_fd, wildcard2_fd, trigram_fd, wildcard3_fd, quadgram_fd): """Construct a QuadgramCollocationFinder, given FreqDists for appearances of words, bigrams, trigrams, three words with any word between them, and quadgrans. """ AbstractCollocationFinder.__init__(self, word_fd, quadgram_fd) self.wildcard3_fd = wildcard3_fd self.wildcard2_fd = wildcard2_fd self.trigram_fd = trigram_fd self.bigram_fd = bigram_fd