#NEWLINE# def get_confidence( self ) : #NEWLINE# #INDENT# st = self . get_state ( ) #NEWLINE# if ( st == constants . eFoundIt ) : #NEWLINE# #INDENT# return 0.99 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( st == constants . eNotMe ) : #NEWLINE# #INDENT# return 0.01 #NEWLINE# #UNINDENT# #UNINDENT# bestConf = 0.0 #NEWLINE# self . _mBestGuessProber = None #NEWLINE# for prober in self . _mProbers : #NEWLINE# #INDENT# if ( not prober ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( not prober . active ) : #NEWLINE# #INDENT# if constants . _debug : #NEWLINE# #INDENT# sys . stderr . write ( ( prober . get_charset_name ( ) + ' not active\n' ) ) #NEWLINE# #UNINDENT# continue #NEWLINE# #UNINDENT# cf = prober . get_confidence ( ) #NEWLINE# if constants . _debug : #NEWLINE# #INDENT# sys . stderr . write ( ( '%s confidence = %s\n' % ( prober . get_charset_name ( ) , cf ) ) ) #NEWLINE# #UNINDENT# if ( bestConf < cf ) : #NEWLINE# #INDENT# bestConf = cf #NEWLINE# self . _mBestGuessProber = prober #NEWLINE# #UNINDENT# #UNINDENT# if ( not self . _mBestGuessProber ) : #NEWLINE# #INDENT# return 0.0 #NEWLINE# #UNINDENT# return bestConf