class_docstr: An abstract class defining a collection of generic association measures.
  Each public method returns a score, taking the following arguments::
  
      score_fn(count_of_ngram,
               (count_of_n-1gram_1, ..., count_of_n-1gram_j),
               (count_of_n-2gram_1, ..., count_of_n-2gram_k),
               ...,
               (count_of_1gram_1, ..., count_of_1gram_n),
               count_of_total_words)
  
  See ``BigramAssocMeasures`` and ``TrigramAssocMeasures``
  
  Inheriting classes should define a property _n, and a method _contingency
  which calculates contingency values from marginals in order for all
  association measures defined here to be usable.
class_docstr_tok: ["An","abstract","class","defining","a","collection","of","generic","association","measures",".","Each","public","method","returns","a","score",",","taking","the","following","arguments",":",":","score_fn","(","count_of_ngram",",","(","count_of_n-1gram_1",",","...",",","count_of_n-1gram_j",")",",","(","count_of_n-2gram_1",",","...",",","count_of_n-2gram_k",")",",","...",",","(","count_of_1gram_1",",","...",",","count_of_1gram_n",")",",","count_of_total_words",")","See","``","BigramAssocMeasures","``","and","``","TrigramAssocMeasures","``","Inheriting","classes","should","define","a","property","_n",",","and","a","method","_contingency","which","calculates","contingency","values","from","marginals","in","order","for","all","association","measures","defined","here","to","be","usable","."]
docstr: Scores ngrams using Student's t test with independence hypothesis
  for unigrams, as in Manning and Schutze 5.3.1.
docstr_tok: ["Scores","ngrams","using","Student","'s","t","test","with","independence","hypothesis","for","unigrams",",","as","in","Manning","and","Schutze","5.3.1","."]
code: def student_t(cls, *marginals):
      """Scores ngrams using Student's t test with independence hypothesis
      for unigrams, as in Manning and Schutze 5.3.1.
      """
      return (
          marginals[NGRAM]
          - _product(marginals[UNIGRAMS])
          / (marginals[TOTAL] ** (cls._n - 1))
      ) / (marginals[NGRAM] + _SMALL) ** 0.5
  
imports: import math
  from abc import ABCMeta, abstractmethod
  from functools import reduce
label_desc: Use image node_id 5 for calling the NgramAssocMeasures obj's underlying member method code with example usage: obj.student_t(cls) and returns: unknown