#NEWLINE# def tweak_labels( Y , pos_sent_list ) : #NEWLINE# #INDENT# pos = ( Y == pos_sent_list [ 0 ] ) #NEWLINE# for sent_label in pos_sent_list [ 1 : ] : #NEWLINE# #INDENT# pos |= ( Y == sent_label ) #NEWLINE# #UNINDENT# Y = np . zeros ( Y . shape [ 0 ] ) #NEWLINE# Y [ pos ] = 1 #NEWLINE# Y = Y . astype ( int ) #NEWLINE# return Y