#NEWLINE# def _merge_similarity_set( feature_extractor , Ak , S , i , j , t ) : #NEWLINE# #INDENT# S = list ( filter ( ( lambda x : ( not ( ( i in x [ 1 ] ) or ( j in x [ 1 ] ) ) ) ) , S ) ) #NEWLINE# St = ( [ ( feature_extractor . similarity ( t , x ) , ( t , x ) ) for x in Ak [ t ] if ( t < Ak ) ] + [ ( feature_extractor . similarity ( x , t ) , ( x , t ) ) for x in Ak [ t ] if ( x < t ) ] ) #NEWLINE# return sorted ( ( S + St ) )