def METHOD_NAME(self):
    def _search(key):
        ratio = 0
        field_meta = {}
        for text_index, text in enumerate(self.texts):
            texts = text.split()
            search_text = key.split()
            search_text_n = len(search_text)
            for index in range(0, len(texts) - search_text_n):
                real_text = texts[index:index+search_text_n]
                new_ratio = fuzz.partial_ratio(real_text, search_text)
                if not new_ratio > ratio:
                    continue
                try:
                    search = re.search(' '.join(real_text), text)
                    if search:
                        start, end = search.span()
                        ratio = new_ratio
                        field_meta = {
                            'text_index': text_index,
                            'text': text,
                            'start_index': start,
                            'end_index': end,
                            'score': ratio,
                            'real_text': real_text,
                            'search_text': search_text,
                        }
                except re.error:
                    pass
        return field_meta
    def search(key, field_meta):
        new_field_meta = _search(key)
        if new_field_meta['score'] > field_meta.get('score', 0):
            field_meta = new_field_meta
        return field_meta
    for field in self.fields:
        keys = M_KEYS[field]
        if self.field_meta.get(field):
            continue
        field_meta = {}
        for key in keys:
            field_meta = search(key, field_meta)
        if field_meta.get('score') > 70:
            self.field_meta[field] = field_meta
            if not self.text_meta.get(field_meta['text_index']):
                self.text_meta[field_meta['text_index']] = []
            self.text_meta[field_meta['text_index']].append(field)