class_docstr: This is an implementation of the smoothing techniques
  for segment-level BLEU scores that was presented in
  Boxing Chen and Collin Cherry (2014) A Systematic Comparison of
  Smoothing Techniques for Sentence-Level BLEU. In WMT14.
  http://acl2014.org/acl2014/W14-33/pdf/W14-3346.pdf
class_docstr_tok: ["This","is","an","implementation","of","the","smoothing","techniques","for","segment-level","BLEU","scores","that","was","presented","in","Boxing","Chen","and","Collin","Cherry","(","2014",")","A","Systematic","Comparison","of","Smoothing","Techniques","for","Sentence-Level","BLEU",".","In","WMT14",".","http",":","\/\/acl2014.org\/acl2014\/W14-33\/pdf\/W14-3346.pdf"]
docstr: No smoothing.
docstr_tok: ["No","smoothing","."]
code: def method0(self, p_n, *args, **kwargs):
      """
      No smoothing.
      """
      p_n_new = []
      for i, p_i in enumerate(p_n):
          if p_i.numerator != 0:
              p_n_new.append(p_i)
          else:
              _msg = str(
                  "\nThe hypothesis contains 0 counts of {}-gram overlaps.\n"
                  "Therefore the BLEU score evaluates to 0, independently of\n"
                  "how many N-gram overlaps of lower order it contains.\n"
                  "Consider using lower n-gram order or use "
                  "SmoothingFunction()"
              ).format(i + 1)
              warnings.warn(_msg)
              # When numerator==0 where denonminator==0 or !=0, the result
              # for the precision score should be equal to 0 or undefined.
              # Due to BLEU geometric mean computation in logarithm space,
              # we we need to take the return sys.float_info.min such that
              # math.log(sys.float_info.min) returns a 0 precision score.
              p_n_new.append(sys.float_info.min)
      return p_n_new
  
imports: import math
  import sys
  import warnings
  from collections import Counter
  from fractions import Fraction
  from nltk.util import ngrams
label_desc: Use image node_id 2 for calling the SmoothingFunction obj's underlying member method code with example usage: obj.method0(p_n) and returns: p_n_new