mirror of
https://github.com/rspeer/wordfreq.git
synced 2024-12-23 17:31:41 +00:00
corrected available_languages to return a dict of strs to strs
This commit is contained in:
parent
6cc962bfea
commit
9f288bac31
@ -95,7 +95,7 @@ def available_languages(wordlist='combined'):
|
||||
list_name = path.name.split('.')[0]
|
||||
name, lang = list_name.split('_')
|
||||
if name == wordlist:
|
||||
available[lang] = path
|
||||
available[lang] = str(path)
|
||||
return available
|
||||
|
||||
|
||||
@ -123,8 +123,7 @@ def get_frequency_list(lang, wordlist='combined', match_cutoff=30):
|
||||
% (lang, best, langcodes.get(best).language_name('en'))
|
||||
)
|
||||
|
||||
filepath = available[str(best)]
|
||||
return read_dBpack(str(filepath))
|
||||
return read_dBpack(available[best])
|
||||
|
||||
|
||||
def dB_to_freq(dB):
|
||||
|
Loading…
Reference in New Issue
Block a user