docstr: Class to evaluation the CER and errors of two dataset
docstr_tok: ["Class","to","evaluation","the","CER","and","errors","of","two","dataset"]
code: def __init__(self, params: EvaluatorParams, data: "Data"):
      """Class to evaluation the CER and errors of two dataset"""
      self.params = params
      self.data = data
      self.preloaded_gt = None
      self.params.setup.mode = PipelineMode.TARGETS
  
file_path: calamari/calamari_ocr/ocr/evaluator.py
imports: from dataclasses import dataclass, field
  from typing import Dict, TYPE_CHECKING
  import logging
  from edit_distance import edit_distance
  from collections import namedtuple
  from paiargparse import pai_dataclass, pai_meta
  from tfaip.data.databaseparams import DataPipelineParams
  from tfaip.data.pipeline.definitions import PipelineMode
  from tfaip.util.multiprocessing.parallelmap import parallel_map, tqdm_wrapper
  from calamari_ocr.ocr.dataset.datareader.base import CalamariDataGeneratorParams
  from calamari_ocr.ocr.dataset.textprocessors import synchronize
label_desc: Use image node_id 1 to create a new Evaluator object  with example: obj = Evaluator(params, data)