import re


def cleanReason(reason: str) ->  str:
    """
    Converts data form of similarity reason (e.g. `bills-nearly_identical`) to a more readable form (e.g. `nearly identical`)

    Args:
        reason (str): The similarity reason in its data form 

    Returns:
        (str): The similarity reason in its readable form
    """
    r1 = re.sub(r'bills-',r'', reason)
    r2 = re.sub(r'_([a-z]*)_([a-z]*)_',r'\1 \2', r1)
    return r2.replace('_', ' ').replace('match main', 'match (main)')