def __extract_lemmas(self, doc, m, phrase):
        """
        :param sent: sentence from which the match was found
        :param m: the found match
        :phrase: name of the phrase
        :return: tuple of the lemmas in the match
        """

        ph_start = m['start']
        ph_end = m['end']
        start_index = None
        for ind, word in enumerate(doc['words']):
            if word['start'] == ph_start:
                start_index = ind
                break
        end_index = None
        for ind, word in enumerate(doc['words']):
            if word['end'] == ph_end:
                end_index = ind
                break
        if start_index is not None and end_index is not None:
            
            lem = []
                
            for i in doc['words'][start_index:end_index + 1]:
                word_lem = []
                for idx, j in enumerate(i['analysis']):
                    if i['analysis'][idx]['partofspeech'] in ['A', 'D', 'C', 'J']:
                        if i['analysis'][idx]['lemma'] not in word_lem:
                            word_lem.append(i['analysis'][idx]['lemma'])
                word_lem_str = '|'.join(word_lem)          
                lem.append(word_lem_str)

        else:
            raise Exception('Something went really wrong')
        return lem