# File lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sbcharsetprober.rb, line 110 def get_confidence r = 0.01 if @_mTotalSeqs > 0 # print self._mSeqCounters[POSITIVE_CAT], self._mTotalSeqs, self._mModel['mTypicalPositiveRatio'] r = (1.0 * @_mSeqCounters[POSITIVE_CAT]) / @_mTotalSeqs / @_mModel['mTypicalPositiveRatio'] # print r, self._mFreqChar, self._mTotalChar r = r * @_mFreqChar / @_mTotalChar if r >= 1.0 r = 0.99 end end return r end