def load_lexicon(lex_file, phone_rep):
    """ Load lexicon into dict """

    lex = {}  # key is utf-8 word, value is list of phones
    with open(lex_file, "r", encoding="utf-8") as fpr:
        for line in fpr:
            parts = line.strip().split()
            lex[parts[0]] = "".join([phone_rep[p] for p in parts[1:]])
    return lex