(ner_men,match_men)
return ner_men+match_men
将NER模型与Match模型得到结果融合，具体融合思路：如果NER得到结果与Match得到结果有交叉，选择Match得到的结果
    :param ner_men:
    :param match_men:
    :return:
将NER模型与Match模型得到结果融合，具体融合思路：如果NER得到结果与Match得到结果有交叉，选择Match得到的结果
    :param ner_men:
    :param match_men:
    :return:
将NER模型与Match模型得到结果融合，具体融合思路：如果NER得到结果与Match得到结果有交叉，选择Match得到的结果 : param ner_men : : param match_men : : return :
def filterEntity(ner_men,match_men):
    '''
    将NER模型与Match模型得到结果融合，具体融合思路：如果NER得到结果与Match得到结果有交叉，选择Match得到的结果
    :param ner_men:
    :param match_men:
    :return:
    '''
    info_del=[]
    for ner in ner_men:
        for match in match_men:
            offset_ner=int(ner['offset'])
            end_ner=offset_ner+len(ner['mention'])
            offset_match = int(match['offset'])
            end_match=offset_match+len(match['mention'])
            if offset_ner==offset_match and end_ner==end_match:
                match['ner_num'] = ner['ner_num']
                ner['m_pred'] = match['m_pred']
            if max(end_ner,end_match)-min(offset_ner,offset_match) <len(ner['mention'])+len(match['mention']):
                info_del.append(ner)

    ner_men=[ner for ner in ner_men if ner not in info_del]
    return ner_men+match_men
def filterEntity ( ner_men , match_men ) : info_del = [ ] for ner in ner_men : for match in match_men : offset_ner = int ( ner [ 'offset' ] ) end_ner = offset_ner + len ( ner [ 'mention' ] ) offset_match = int ( match [ 'offset' ] ) end_match = offset_match + len ( match [ 'mention' ] ) if offset_ner == offset_match and end_ner == end_match : match [ 'ner_num' ] = ner [ 'ner_num' ] ner [ 'm_pred' ] = match [ 'm_pred' ] if max ( end_ner , end_match ) - min ( offset_ner , offset_match ) < len ( ner [ 'mention' ] ) + len ( match [ 'mention' ] ) : info_del . append ( ner ) ner_men = [ ner for ner in ner_men if ner not in info_del ] return ner_men + match_men