#NEWLINE# def is_reply_lines( lines ) : #NEWLINE# #INDENT# reply_lines = 0 #NEWLINE# empty_lines = 0 #NEWLINE# for line in lines : #NEWLINE# #INDENT# if ( len ( line . strip ( ) ) == 0 ) : #NEWLINE# #INDENT# empty_lines += 1 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( line . strip ( ) [ 0 ] in REPLY_START_CHARACTERS ) : #NEWLINE# #INDENT# reply_lines += 1 #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# confidence = ( float ( reply_lines ) / ( len ( lines ) - empty_lines ) ) #NEWLINE# is_reply_kind = ( confidence >= THRESHOLD_REPLY ) #NEWLINE# return ( is_reply_kind , confidence )