287 Stop analyzing the current document and come up with a final
290 :returns: The ``result`` attribute, a ``dict`` with the keys
291 `encoding`, `confidence`, and `language`.
299 self.
logger.debug(
"no data received!")
303 self.
result = {
"encoding":
"ascii",
"confidence": 1.0,
"language":
""}
307 prober_confidence =
None
308 max_prober_confidence = 0.0
314 if prober_confidence > max_prober_confidence:
315 max_prober_confidence = prober_confidence
319 assert charset_name
is not None
327 lower_charset_name, charset_name
332 (charset_name
or "").
lower(), charset_name
335 "encoding": charset_name,
336 "confidence": confidence,
342 if self.
result[
"encoding"]
is None:
343 self.
logger.debug(
"no probers hit minimum threshold")
347 if isinstance(group_prober, CharSetGroupProber):
350 "%s %s confidence = %s",
357 "%s %s confidence = %s",