class_docstr: CER and WER
docstr: insert result and ground truth for next sample
code: def addSample(self, gt, rec):
      "insert result and ground truth for next sample"
      # chars
      self.edChars += editdistance.eval(gt, rec)
      self.numChars += len(gt)
  
      # words
      (idStrGt, idStrRec) = self.getWordIDStrings(gt, rec)
      self.edWords += editdistance.eval(idStrGt, idStrRec)
      self.numWords += len(idStrGt)
  
file_path: calamari/calamari_ocr/thirdparty/ctcwordbeamsearch/Metrics.py
imports: from __future__ import division
  from __future__ import print_function
  import re
  import editdistance
label_desc: Use image node_id 3 for calling the Metrics obj's underlying member method code with example usage: obj.addSample(gt, rec) without return types