def modify_phonetic_representation(self, phonetic_representation):
        """ Returns a compact phonetic representation given a CMUdict-formatted representation.

        :param list phonetic_representation: a phonetic representation in standard
            CMUdict formatting, i.e. a list of phonemes like ['HH', 'EH0', 'L', 'OW1']
        :returns: A string representing a custom phonetic representation, where each phoneme is
            mapped to a single ascii character.

        Changing the phonetic representation from a list to a string is useful for calculating phonetic
        simlarity scores.
        """

        for i in range(len(phonetic_representation)):
            # Remove numerical stress indicators
            phonetic_representation[i] = re.sub('\d+', '', phonetic_representation[i])

        multis = ['AA', 'AE', 'AH', 'AO', 'AW', 'AY', 'CH', 'DH', 'EH', 'ER',
                  'EY', 'HH', 'IH', 'IY', 'JH', 'NG', 'OW', 'OY', 'SH',
                  'TH', 'UH', 'UW', 'ZH']

        singles = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
                   'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w']

        for i in range(len(phonetic_representation)):
            # Convert multicharacter phone symbols to arbitrary
            # single-character symbols
            if phonetic_representation[i] in multis:
                phonetic_representation[i] = singles[multis.index(phonetic_representation[i])]
        phonetic_representation = ''.join(phonetic_representation)

        return phonetic_representation
Returns a compact phonetic representation given a CMUdict-formatted representation.

        :param list phonetic_representation: a phonetic representation in standard
            CMUdict formatting, i.e. a list of phonemes like ['HH', 'EH0', 'L', 'OW1']
        :returns: A string representing a custom phonetic representation, where each phoneme is
            mapped to a single ascii character.

        Changing the phonetic representation from a list to a string is useful for calculating phonetic
        simlarity scores.