class_docstr: A tool for the finding and ranking of trigram collocations or other
  association measures. It is often useful to use from_words() rather than
  constructing an instance directly.
class_docstr_tok: ["A","tool","for","the","finding","and","ranking","of","trigram","collocations","or","other","association","measures",".","It","is","often","useful","to","use","from_words","(",")","rather","than","constructing","an","instance","directly","."]
docstr: Returns the score for a given trigram using the given scoring
  function.
docstr_tok: ["Returns","the","score","for","a","given","trigram","using","the","given","scoring","function","."]
code: def score_ngram(self, score_fn, w1, w2, w3):
      """Returns the score for a given trigram using the given scoring
      function.
      """
      n_all = self.N
      n_iii = self.ngram_fd[(w1, w2, w3)]
      if not n_iii:
          return
      n_iix = self.bigram_fd[(w1, w2)]
      n_ixi = self.wildcard_fd[(w1, w3)]
      n_xii = self.bigram_fd[(w2, w3)]
      n_ixx = self.word_fd[w1]
      n_xix = self.word_fd[w2]
      n_xxi = self.word_fd[w3]
      return score_fn(
          n_iii, (n_iix, n_ixi, n_xii), (n_ixx, n_xix, n_xxi), n_all
      )
  
imports: import itertools
  from nltk.metrics import BigramAssocMeasures, ContingencyMeasures, QuadgramAssocMeasures, TrigramAssocMeasures
  from nltk.metrics.spearman import ranks_from_scores, spearman_correlation
  from nltk.probability import FreqDist
  from nltk.util import ngrams
label_desc: Use image node_id 4 for calling the TrigramCollocationFinder obj's underlying member method code with example usage: obj.score_ngram(score_fn, w1, w2, w3) and returns: score_fn