class_docstr: Base class for BLEU & NIST, providing tokenization and some basic n-gram matching
  functions.
docstr: Returns a dictionary with counts of all n-grams in the given sentences.
  @param n: the "n" in n-grams (how long the n-grams should be)
  @param sents: list of sentences for n-gram counting
  @return: a dictionary (ngram: count) listing counts of n-grams attested in any of the sentences
docstr_tok: ["Returns","a","dictionary","with","counts","of","all","n-grams","in","the","given","sentences",".","@","param","n",":","the","``","n","''","in","n-grams","(","how","long","the","n-grams","should","be",")","@","param","sents",":","list","of","sentences","for","n-gram","counting","@","return",":","a","dictionary","(","ngram",":","count",")","listing","counts","of","n-grams","attested","in","any","of","the","sentences"]
code: def get_ngram_counts(self, n, sents):
      """Returns a dictionary with counts of all n-grams in the given sentences.
      @param n: the "n" in n-grams (how long the n-grams should be)
      @param sents: list of sentences for n-gram counting
      @return: a dictionary (ngram: count) listing counts of n-grams attested in any of the sentences
      """
      merged_ngrams = {}
  
      for sent in sents:
          ngrams = defaultdict(int)
  
          for ngram in self.ngrams(n, sent):
              ngrams[ngram] += 1
          for ngram, cnt in ngrams.items():
              merged_ngrams[ngram] = max(
                  (merged_ngrams.get(ngram, 0), cnt)
              )
      return merged_ngrams
  
imports: from __future__ import unicode_literals
  from __future__ import division
  from builtins import zip
  from builtins import range
  from past.utils import old_div
  from builtins import object
  from collections import defaultdict
  import math
  import re
label_desc: Use image node_id 7 for calling the NGramScore obj's underlying member method code with example usage: obj.get_ngram_counts(n, sents) and returns: merged_ngrams