class_docstr: A constraint on edit distance (Levenshtein Distance).
  We use the Levenshtein Distance div the long of the sentence as score.
  
  :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.
docstr: Calculate the score
  
  :param str transformed_text: transformed sentence
  :param str reference_text: origin sentence
  :return float: the score of two sentence
docstr_tok: ["Calculate","the","score",":","param","str","transformed_text",":","transformed","sentence",":","param","str","reference_text",":","origin","sentence",":","return","float",":","the","score","of","two","sentence"]
code: def validate(self, transformed_text, reference_text):
      r"""
      Calculate the score
  
      :param str transformed_text: transformed sentence
      :param str reference_text: origin sentence
      :return float: the score of two sentence
  
      """
      dis = editdistance.eval(transformed_text, reference_text)
      return 1 - min(dis, len(reference_text)) / len(reference_text)
  
imports: import editdistance
  from .validator import Validator
label_desc: Use image node_id 3 for calling the EditDistance obj's underlying member method code with example usage: obj.validate(transformed_text, reference_text) and returns: unknown