diff --git a/chardet/latin1prober.py b/chardet/latin1prober.py index abaaf98..c8bc405 100755 --- a/chardet/latin1prober.py +++ b/chardet/latin1prober.py @@ -130,10 +130,10 @@ def get_confidence(self): if total < 0.01: confidence = 0.0 else: - confidence = (self._mFreqCounter[3] / total) - (self._mFreqCounter[1] * 20.0 / total) + confidence = (self._mFreqCounter[3] - self._mFreqCounter[1] * 20.0) / total if confidence < 0.0: confidence = 0.0 # lower the confidence of latin1 so that other more accurate detector # can take priority. - confidence = confidence * 0.5 + confidence = confidence * 0.73 return confidence