import re


def load_lex(file_path):
    """Loads a lexicon in word list format to a dictionary

    Args:
        file_path (str): File containing the lexicon.

    Return:
        dict(str:str): Word and correction.
    """
    return {
        re.sub(r"(.)\1\1+", r"\1\1\1", w.strip()): 0
        for w in open(file_path, encoding="utf-8").readlines()
    }