def evaluate_hypotheses(filepath: str):
    """
    Compute wer, cer, mer, wil, wip for given lists of greedy and beamsearch hypotheses

    Parameters
    ----------
    filepath : str
        Output tsv file path for the predictions

    Returns
    -------
    dict
        {"greedy": {wer, cer, mer, wil, wip}, "beam": {wer, cer, mer, wil, wip}}
        The results are original, NOT multiplied with 100.
    """
    import pandas as pd  # pylint: disable=import-outside-toplevel
    from tqdm import tqdm  # pylint: disable=import-outside-toplevel

    logger.info(f"Reading file {filepath} ...")
    reference, greedy_hypothesis, beam_hypothesis = [], [], []
    with file_util.read_file(filepath) as path:
        with tf.io.gfile.GFile(path, "r") as openfile:
            lines = openfile.read().splitlines()
            lines = lines[1:]  # skip header
            for eachline in tqdm(lines, disable=False):
                _, groundtruth, greedy, beamsearch = eachline.split("\t")
                reference.append(groundtruth)
                greedy_hypothesis.append(greedy)
                beam_hypothesis.append(beamsearch)

    logger.info("Evaluating greedy results ...")
    greedy_wordoutput = jiwer.process_words(reference=reference, hypothesis=greedy_hypothesis)
    greedy_charoutput = jiwer.process_characters(reference=reference, hypothesis=greedy_hypothesis)

    logger.info("Evaluating beamsearch results ...")
    beam_wordoutput = jiwer.process_words(reference=reference, hypothesis=beam_hypothesis)
    beam_charoutput = jiwer.process_characters(reference=reference, hypothesis=beam_hypothesis)

    outputs = {
        "greedy": {
            "wer": greedy_wordoutput.wer,
            "cer": greedy_charoutput.cer,
            "mer": greedy_wordoutput.mer,
            "wil": greedy_wordoutput.wil,
            "wip": greedy_wordoutput.wip,
        },
        "beam": {
            "wer": beam_wordoutput.wer,
            "cer": beam_charoutput.cer,
            "mer": beam_wordoutput.mer,
            "wil": beam_wordoutput.wil,
            "wip": beam_wordoutput.wip,
        },
    }
    df = pd.DataFrame.from_dict(outputs, orient="index")
    return df

    Compute wer, cer, mer, wil, wip for given lists of greedy and beamsearch hypotheses

    Parameters
    ----------
    filepath : str
        Output tsv file path for the predictions

    Returns
    -------
    dict
        {"greedy": {wer, cer, mer, wil, wip}, "beam": {wer, cer, mer, wil, wip}}
        The results are original, NOT multiplied with 100.
    
tensorflow_asr/utils/app_util.py