class_docstr: CER and WER
code: def getWordIDStrings(self, s1, s2):
      # get words in string 1 and string 2
      words1 = re.findall(self.pattern, s1)
      words2 = re.findall(self.pattern, s2)
  
      # find unique words
      allWords = list(set(words1 + words2))
  
      # list of word ids for string 1
      idStr1 = []
      for w in words1:
          idStr1.append(allWords.index(w))
  
      # list of word ids for string 2
      idStr2 = []
      for w in words2:
          idStr2.append(allWords.index(w))
  
      return (idStr1, idStr2)
  
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 2 for calling the Metrics obj's underlying member method code with example usage: obj.getWordIDStrings(s1, s2) and returns: idStr1,  idStr2