def delexicalizeNLG(self, utterance, dacts):
        """
        De-lexicalise utterance, specifically for nlg.

        :param utterance: the utterance to de-lexicalize
        :param dacts: dialogue acts
        :return: the de-lexicalized utterance
        """

        delex_transcript = deepcopy(utterance).lower()
        delex_dacts = ''

        for dact in dacts:

            act = dact['act']
            slots = dact['slots']

            delex_dacts += 'act_' + act + ' '
            if slots:
                for slot in slots:
                    s = slot[0]
                    v = ''

                    if len(slot) > 1:
                        v = slot[1]

                    if s == 'slot':
                        delex_dacts += s

                        if v:
                            delex_dacts += '_' + v + ' '

                    else:

                        # Deal with some special cases
                        if v == 'dontcare':
                            delex_transcript = \
                                delex_transcript.replace(
                                    'it doesnt matter', '<' + s + '>')
                            delex_transcript = \
                                delex_transcript.replace(
                                    'doesnt matter', '<' + s + '>')
                            delex_transcript = \
                                delex_transcript.replace(
                                    'do not care', '<' + s + '>')
                            delex_transcript = \
                                delex_transcript.replace(
                                    'dont care', '<' + s + '>')
                            delex_transcript = \
                                delex_transcript.replace(
                                    'any kind', '<' + s + '>')
                            delex_transcript = \
                                delex_transcript.replace(
                                    'any thing', '<' + s + '>')
                            delex_transcript = \
                                delex_transcript.replace(
                                    'any type', '<' + s + '>')
                            delex_transcript = \
                                delex_transcript.replace(
                                    'any', '<' + s + '>')
                        elif v == 'seafood':
                            delex_transcript = \
                                delex_transcript.replace(
                                    'sea food', '<' + s + '>')
                        elif v == 'moderate':
                            delex_transcript = \
                                delex_transcript.replace(
                                    'moderately', '<' + s + '>')
                        elif v == 'centre':
                            delex_transcript = \
                                delex_transcript.replace(
                                    'center', '<' + s + '>')
                        elif v == 'asian oriental':
                            delex_transcript = \
                                delex_transcript.replace(
                                    'asian oriental', '<' + s + '>')
                            delex_transcript = \
                                delex_transcript.replace(
                                    'oriental', '<' + s + '>')
                            delex_transcript = \
                                delex_transcript.replace(
                                    'asian', '<' + s + '>')
                        elif v == 'north american':
                            delex_transcript = \
                                delex_transcript.replace(
                                    'north american', '<' + s + '>')
                            delex_transcript = \
                                delex_transcript.replace(
                                    'american', '<' + s + '>')

                        if s == 'postcode':
                            idx = delex_transcript.find(v)
                            if idx >= 0:
                                delex_transcript = \
                                    delex_transcript.replace(
                                        delex_transcript[idx:], '<' + s + '>')

                        delex_transcript = \
                            delex_transcript.replace(str(v), '<' + s + '>')

                        delex_dacts += '<' + s + '> '

        return [delex_transcript.strip(), delex_dacts.strip()]

        De-lexicalise utterance, specifically for nlg.

        :param utterance: the utterance to de-lexicalize
        :param dacts: dialogue acts
        :return: the de-lexicalized utterance
        
plato/utilities/parser/parse_dstc2.py