parameters: (self)
return_statement: return self.SURE_YES
docstring: return confidence based on existing data
docstring_summary: return confidence based on existing data
docstring_tokens: return confidence based on existing data
function: def get_confidence(self):
          """return confidence based on existing data"""
          # if we didn't receive any character in our consideration range,
          # return negative answer
          if self._total_chars <= 0 or self._freq_chars <= self.MINIMUM_DATA_THRESHOLD:
              return self.SURE_NO
  
          if self._total_chars != self._freq_chars:
              r = (self._freq_chars / ((self._total_chars - self._freq_chars)
                   * self.typical_distribution_ratio))
              if r < self.SURE_YES:
                  return r
  
          # normalize confidence (we don't want to be 100% sure)
          return self.SURE_YES
function_tokens: def get_confidence ( self ) : # if we didn't receive any character in our consideration range, # return negative answer if self . _total_chars <= 0 or self . _freq_chars <= self . MINIMUM_DATA_THRESHOLD : return self . SURE_NO if self . _total_chars != self . _freq_chars : r = ( self . _freq_chars / ( ( self . _total_chars - self . _freq_chars ) * self . typical_distribution_ratio ) ) if r < self . SURE_YES : return r # normalize confidence (we don't want to be 100% sure) return self . SURE_YES