module documentation

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

Class BigramAssocMeasures A collection of bigram association measures. Each association measure is provided as a function with three arguments:
Class ContingencyMeasures Wraps NgramAssocMeasures classes such that the arguments of association measures are contingency table values rather than marginals.
Class NgramAssocMeasures An abstract class defining a collection of generic association measures. Each public method returns a score, taking the following arguments:
Class QuadgramAssocMeasures A collection of quadgram association measures. Each association measure is provided as a function with five arguments:
Class TrigramAssocMeasures A collection of trigram association measures. Each association measure is provided as a function with four arguments:
Constant NGRAM Marginals index for the ngram count
Constant TOTAL Marginals index for the number of words in the data
Constant UNIGRAMS Marginals index for a tuple of each unigram count
Constant _SMALL Undocumented
Variable _log2 Undocumented
Variable _product Undocumented
NGRAM: int = (source)

Marginals index for the ngram count

Value
0
TOTAL: int = (source)

Marginals index for the number of words in the data

Value
-1
UNIGRAMS: int = (source)

Marginals index for a tuple of each unigram count

Value
-2
_SMALL: float = (source)

Undocumented

Value
1e-20

Undocumented

_product = (source)

Undocumented