def METHOD_NAME(reference, hypothesis, ignore_case=False, delimiter=' '):
    """Calculate word error rate (WER). WER compares reference text and
    hypothesis text in word-level. WER is defined as:
    .. math::
        WER = (Sw + Dw + Iw) / Nw
    where
    .. code-block:: text
        Sw is the number of words subsituted,
        Dw is the number of words deleted,
        Iw is the number of words inserted,
        Nw is the number of words in the reference
    We can use levenshtein distance to calculate WER. Please draw an attention
    that empty items will be removed when splitting sentences by delimiter.
    Args:
        reference (str): The reference sentence.
        hypothesis (str): The hypothesis sentence.
        ignore_case (bool): Whether case-sensitive or not.
        delimiter (char): Delimiter of input sentences.
    Returns: 
        float: Word error rate.
    Raises:
        ValueError: If word number of reference is zero.
    """
    edit_distance, ref_len = word_errors(reference, hypothesis, ignore_case,
                                         delimiter)
    if ref_len == 0:
        raise ValueError("Reference's word number should be greater than 0.")
    METHOD_NAME = float(edit_distance) / ref_len
    return METHOD_NAME