code: def word_error_rate(ref: Sequence[T], hyp: Sequence[T]) -> float:
      
  
      if len(ref) == 0:
          raise EmptyReferenceException(
              "Cannot calculating word error rate against a length 0 "\
              "reference sequence.")
  
      distance = min_edit_distance(ref, hyp)
      return 100 * float(distance) / len(ref)
docs: Calculate the word error rate of a sequence against a reference.
  
      Args:
          ref: The gold-standard reference sequence
          hyp: The hypothesis to be evaluated against the reference.
  
      Returns:
          The word error rate of the supplied hypothesis with respect to the
          reference string.
  
      Raises:
          persephone.exceptions.EmptyReferenceException: If the length of the reference sequence is 0.