class_docstr: An accumulator object capable of computing NIST score using multiple references.
docstr: Compute the NIST length penalty, based on system output length & average reference length.
  @param lsys: total system output length
  @param avg_lref: total average reference length
  @return: NIST length penalty term
docstr_tok: ["Compute","the","NIST","length","penalty",",","based","on","system","output","length","&","average","reference","length",".","@","param","lsys",":","total","system","output","length","@","param","avg_lref",":","total","average","reference","length","@","return",":","NIST","length","penalty","term"]
code: def nist_length_penalty(self, lsys, avg_lref):
      """Compute the NIST length penalty, based on system output length & average reference length.
      @param lsys: total system output length
      @param avg_lref: total average reference length
      @return: NIST length penalty term
      """
      ratio = lsys / float(avg_lref)
      if ratio >= 1:
          return 1
      if ratio <= 0:
          return 0
      return math.exp(-self.BETA * math.log(ratio) ** 2)
  
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 6 for calling the NISTScore obj's underlying member method code with example usage: obj.nist_length_penalty(lsys, avg_lref) and returns: math, int, int