Package nltk :: Module collocations :: Class BigramCollocationFinder
[hide private]
[frames] | no frames]

type BigramCollocationFinder

source code

               object --+    
                        |    
AbstractCollocationFinder --+
                            |
                           BigramCollocationFinder

A tool for the finding and ranking of bigram collocations or other association measures. It is often useful to use from_words() rather than constructing an instance directly.

Instance Methods [hide private]
 
score_ngram(self, score_fn, w1, w2)
Returns the score for a given bigram using the given scoring function.
source code

Inherited from AbstractCollocationFinder: __init__, above_score, apply_freq_filter, apply_ngram_filter, apply_word_filter, nbest, score_ngrams

Class Methods [hide private]
 
from_words(cls, words, window_size=2)
Construct a BigramCollocationFinder for all bigrams in the given sequence.
source code

Inherited from AbstractCollocationFinder: from_documents

Static Methods [hide private]

Inherited from AbstractCollocationFinder (private): _ngram_freqdist

Method Details [hide private]

from_words(cls, words, window_size=2)
Class Method

source code 

Construct a BigramCollocationFinder for all bigrams in the given sequence. By default, bigrams must be contiguous.