def delexicalizeNLU(self, utterance, sys_act):
        """
        De-lexicalise utterance, specifically for nlu.

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

        delex_utterance = deepcopy(utterance)

        # Replace synonyms (we are only generating nlg templates here)
        delex_utterance = delex_utterance.replace('center', 'centre')
        delex_utterance = delex_utterance.replace('cheaply', 'cheap')
        delex_utterance = delex_utterance.replace('moderately', 'moderate')
        delex_utterance = delex_utterance.replace('expensively', 'expensive')

        sys_dact = None
        if sys_act:
            if self.prev_sys_act:
                # If there is a slot value
                if self.prev_sys_act['slots'] and \
                        self.prev_sys_act['slots'][0]:
                    if self.prev_sys_act['slots'][0][0] != 'slot':
                        sys_dact = \
                            DialogueAct(
                                self.prev_sys_act['act'],
                                [DialogueActItem(
                                    self.prev_sys_act['slots'][0][0],
                                    Operator.EQ,
                                    self.prev_sys_act['slots'][0][1])])
                    else:
                        sys_dact = \
                            DialogueAct(
                                self.prev_sys_act['act'],
                                [DialogueActItem(
                                    self.prev_sys_act['slots'][0][1],
                                    Operator.EQ,
                                    '')])

        dacts = self.nlu.process_input(utterance, sys_dact)

        # If the utterance cannot be parsed, skip it
        if dacts[0].intent == 'UNK':
            return 'UNK'

        # TODO: This is a quick and dirty way to do this. Revisit soon!

        # Search and replace each value
        for dact in dacts:
            # For inform dacts swap slot values
            if dact.intent == 'inform':
                for item in dact.params:
                    if item.value:
                        delex_utterance = \
                            delex_utterance.replace(
                                item.value, '<' + item.slot.upper() + '>')

                    else:
                        if not sys_dact or \
                                sys_dact.intent not in \
                                ['request', 'impl-conf', 'expl-conf'] or \
                                not sys_dact.params:
                            return 'UNK'

                        for dc in self.dontcare_patterns:
                            delex_utterance = \
                                delex_utterance.replace(
                                    dc,
                                    '<' +
                                    sys_dact.params[0].slot.upper() + '>')

            # For request dacts swap slot names
            elif dact.intent == 'request':
                for item in dact.params:
                    if item.slot == 'addr':
                        delex_utterance = \
                            delex_utterance.replace(
                                'address', '<' + item.slot.upper() + '>')

                    elif item.slot == 'phone':
                        delex_utterance = delex_utterance.replace(
                            'phone number', '<' + item.slot.upper() + '>')
                        delex_utterance = delex_utterance.replace(
                            'phone', '<' + item.slot.upper() + '>')

                    elif item.slot == 'postcode':
                        delex_utterance = \
                            delex_utterance.replace(
                                'postcode', '<' + item.slot.upper() + '>')
                        delex_utterance = \
                            delex_utterance.replace(
                                'post code', '<' + item.slot.upper() + '>')
                        delex_utterance = \
                            delex_utterance.replace(
                                'postal code', '<' + item.slot.upper() + '>')
                        delex_utterance = \
                            delex_utterance.replace(
                                'zip code', '<' + item.slot.upper() + '>')

                    else:
                        delex_utterance = \
                            delex_utterance.replace(
                                item.slot,
                                '<' + item.slot.upper() + '>')

        # Reject any utterances that make it here undelexicalized
        return delex_utterance if '<' in delex_utterance else 'UNK'

        De-lexicalise utterance, specifically for nlu.

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