Package nltk :: Package metrics :: Module association
[hide private]
[frames] | no frames]

Module association

source code

Provides scoring functions for a number of association measures through a generic, abstract implementation in NgramAssocMeasures, and n-specific BigramAssocMeasures and TrigramAssocMeasures.

Classes [hide private]
NgramAssocMeasures
An abstract class defining a collection of generic association measures.
BigramAssocMeasures
A collection of trigram association measures.
TrigramAssocMeasures
A collection of trigram association measures.
ContingencyMeasures
Wraps NgramAssocMeasures classes such that the arguments of association measures are contingency table values rather than marginals.
Functions [hide private]
 
_log2(x) source code
 
_product(s) source code
Variables [hide private]
  _SMALL = 1e-20
  NGRAM = 0
Marginals index for the ngram count
  UNIGRAMS = -2
Marginals index for a tuple of each unigram count
  TOTAL = -1
Marginals index for the number of words in the data