#NEWLINE# def getRuleTitle( tree , rule_dict = rule_dc ) : #NEWLINE# #INDENT# texts = sorted_title_candidates ( tree , rule_dict ) #NEWLINE# metas = get_meta_titles ( tree ) #NEWLINE# maxs = 0 #NEWLINE# ele = '' #NEWLINE# for x in texts : #NEWLINE# #INDENT# xs = x . lower ( ) . split ( ) #NEWLINE# for y in metas : #NEWLINE# #INDENT# ys = y . lower ( ) . split ( ) #NEWLINE# newm = fscore ( xs , ys ) #NEWLINE# if ( newm > maxs ) : #NEWLINE# #INDENT# maxs = newm #NEWLINE# ele = x #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return ele