# File lib/CharDistributionAnalysis.rb, line 76 def get_confidence #"""return confidence based on existing data""" # if we didn"t receive any character in our consideration range, return negative answer if @_mTotalChars <= 0 return SURE_NO end if @_mTotalChars != @_mFreqChars r = @_mFreqChars / ((@_mTotalChars - @_mFreqChars) * @_mTypicalDistributionRatio) if r < SURE_YES return r end end # normalize confidence (we don"t want to be 100% sure) return SURE_YES end