mirror of
https://github.com/rspeer/wordfreq.git
synced 2024-12-23 17:31:41 +00:00
use itertools.chain
This commit is contained in:
parent
bbdc064528
commit
6a40e63060
@ -4,6 +4,7 @@ import langcodes
|
||||
import msgpack
|
||||
import re
|
||||
import gzip
|
||||
import itertools
|
||||
import pathlib
|
||||
import random
|
||||
import logging
|
||||
@ -226,8 +227,7 @@ def iter_wordlist(lang, wordlist='combined'):
|
||||
with the same rounded frequency, appearing in alphabetical order within
|
||||
each band.
|
||||
"""
|
||||
for sublist in get_frequency_list(lang, wordlist):
|
||||
yield from sublist
|
||||
return itertools.chain(*get_frequency_list(lang, wordlist))
|
||||
|
||||
|
||||
def half_harmonic_mean(a, b):
|
||||
|
Loading…
Reference in New Issue
Block a user