#NEWLINE# def sort_possible_matches( self , seq , data ) : #NEWLINE# #INDENT# matches = [ ] #NEWLINE# for ( line , group ) in seq : #NEWLINE# #INDENT# count = 0 #NEWLINE# for ( line , word ) in group : #NEWLINE# #INDENT# if ( line in data ) : #NEWLINE# #INDENT# count = ( count + 1 ) #NEWLINE# #UNINDENT# #UNINDENT# matches . append ( ( count , line ) ) #NEWLINE# #UNINDENT# matches . sort ( reverse = True ) #NEWLINE# return matches