We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b660a04 commit 35a5b86Copy full SHA for 35a5b86
autocorrect/word_count.py
@@ -14,7 +14,7 @@ def get_words(filename, lang, encd):
14
yield from re.findall(word_regex, line)
15
16
17
-def count_words(src_filename, lang, encd=None, out_filename="word_count.json"):
+def count_words(src_filename, lang, encd="utf-8", out_filename="word_count.json"):
18
words = get_words(src_filename, lang, encd)
19
counts = Counter(words)
20
# make output file human readable
0 commit comments