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