docstr: A constraint on Translate score difference.
  
  :param ~textflint.input.dataset origin_dataset:
      the dataset of origin sample
  :param ~textflint.input.dataset trans_dataset:
      the dataset of translate sample
  :param str|list fields: the name of the origin field need compare.
  :param str type: the type of the scoring index.
code: def __init__(self, origin_dataset, trans_dataset, fields, type):
      r"""
      A constraint on Translate score difference.
  
      :param ~textflint.input.dataset origin_dataset:
          the dataset of origin sample
      :param ~textflint.input.dataset trans_dataset:
          the dataset of translate sample
      :param str|list fields: the name of the origin field need compare.
      :param str type: the type of the scoring index.
  
      """
      super().__init__(origin_dataset, trans_dataset, fields)
      if type not in ["bleu", "chrf", "meteor"]:
          raise ValueError(
              "Please choose type from "
              "bleu, chrf, meteor,not {0}".format(type)
          )
      self.type = type
      self.processor = EnProcessor()
  
file_path: textflint/textflint/generation/validator/translate_score.py
imports: import nltk
  import nltk.translate.chrf_score
  from .validator import Validator
  from ...common.preprocess.en_processor import EnProcessor
label_desc: Use image node_id 1 to create a new TranslateScore object from inherited base classes: Validator with example: obj = TranslateScore(origin_dataset, trans_dataset, fields, type)