instance method get_confidence

Ruby on Rails 2.3.18

Since v2.3.18 Last seen in v2.3.18

Signature

get_confidence()

No documentation comment.

Source
# File actionmailer/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

Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sbcharsetprober.rb line 110 · View on GitHub · Improve this page · Find usages on GitHub

Defined in CharDet::SingleByteCharSetProber

Type at least 2 characters to search.

↑↓ navigate · open · esc close