Skip to content

Commit

Permalink
Add language to detect_all output
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-blanchard committed Dec 10, 2020
1 parent 1e208b7 commit 53854fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chardet/__init__.py
Expand Up @@ -74,7 +74,8 @@ def detect_all(byte_str):
charset_name)
results.append({
'encoding': charset_name,
'confidence': prober.get_confidence()
'confidence': prober.get_confidence(),
'language': prober.language,
})
if len(results) > 0:
return sorted(results, key=lambda result: -result['confidence'])
Expand Down

0 comments on commit 53854fb

Please sign in to comment.