class_docstr: An accumulator object capable of computing BLEU score using multiple references.
  The BLEU score is always smoothed a bit so that it's never undefined. For sentence-level
  measurements, proper smoothing should be used via the smoothing parameter (set to 1.0 for
  the same behavior as default Moses's MERT sentence BLEU).
docstr: Return the current n-gram precision (harmonic mean of n-gram precisions up to max_ngram)
  according to the accumulated counts.
docstr_tok: ["Return","the","current","n-gram","precision","(","harmonic","mean","of","n-gram","precisions","up","to","max_ngram",")","according","to","the","accumulated","counts","."]
code: def ngram_precision(self):
      """Return the current n-gram precision (harmonic mean of n-gram precisions up to max_ngram)
      according to the accumulated counts."""
      prec_log_sum = 0.0
      for n_hits, n_len in zip(self.hits, self.cand_lens):
          n_hits += self.smoothing  # pre-set smoothing
          n_len += self.smoothing
          n_hits = max(
              n_hits, self.TINY
          )  # forced smoothing just a litle to make BLEU defined
          n_len = max(n_len, self.SMALL)  # only applied for zeros
          prec_log_sum += math.log(old_div(n_hits, n_len))
  
      return math.exp((1.0 / self.max_ngram) * prec_log_sum)
  
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 BLEUScore obj's underlying member method code with example usage: obj.ngram_precision() and returns: math