mirror of
https://github.com/rspeer/wordfreq.git
synced 2024-12-24 18:01:38 +00:00
parent
919f2f5912
commit
bb706b65f4
@ -18,7 +18,7 @@ def count_tokens(filename):
|
||||
counts = defaultdict(int)
|
||||
with open(filename, encoding='utf-8', errors='replace') as infile:
|
||||
for line in infile:
|
||||
for token in simple_tokenize(line.strip()):
|
||||
for token in simple_tokenize(line):
|
||||
counts[token] += 1
|
||||
return counts
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user