(self, candidate_item, 
                        de_duplication_candidate_phrases_list)
return sim_ratio
计算 mmr 相似度，用于考察信息量
计算 mmr 相似度，用于考察信息量
计算 mmr 相似度，用于考察信息量
def _mmr_similarity(self, candidate_item, 
                        de_duplication_candidate_phrases_list):
        ''' 计算 mmr 相似度，用于考察信息量 '''
        sim_ratio = 0.0
        candidate_info = set([item[0] for item in candidate_item[1][0]])
        
        for de_du_item in de_duplication_candidate_phrases_list:
            no_info = set([item[0] for item in de_du_item[1][0]])
            common_part = candidate_info & no_info
            if sim_ratio < len(common_part) / len(candidate_info):
                sim_ratio = len(common_part) / len(candidate_info)
        return sim_ratio
def _mmr_similarity ( self , candidate_item , de_duplication_candidate_phrases_list ) : sim_ratio = 0.0 candidate_info = set ( [ item [ 0 ] for item in candidate_item [ 1 ] [ 0 ] ] ) for de_du_item in de_duplication_candidate_phrases_list : no_info = set ( [ item [ 0 ] for item in de_du_item [ 1 ] [ 0 ] ] ) common_part = candidate_info & no_info if sim_ratio < len ( common_part ) / len ( candidate_info ) : sim_ratio = len ( common_part ) / len ( candidate_info ) return sim_ratio