work with langcodes 3.0, without language_data

This commit is contained in:
Robyn Speer 2021-02-09 17:27:22 -05:00
parent c8229a5378
commit ad3a5c533f
3 changed files with 8 additions and 5 deletions

View File

@ -1,3 +1,8 @@
## Version 2.4.1 (2021-02-09)
- Changed a log message to not try to call a language by name, to remove
the dependency on a database of language names.
## Version 2.4 (2020-10-01) ## Version 2.4 (2020-10-01)
- The Exquisite Corpus data has been updated to include Google Books Ngrams - The Exquisite Corpus data has been updated to include Google Books Ngrams

View File

@ -30,12 +30,10 @@ doclines = README_contents.split("\n")
dependencies = [ dependencies = [
'msgpack >= 1.0', 'langcodes >= 2.1', 'regex >= 2020.04.04' 'msgpack >= 1.0', 'langcodes >= 2.1', 'regex >= 2020.04.04'
] ]
if sys.version_info < (3, 4):
dependencies.append('pathlib')
setup( setup(
name="wordfreq", name="wordfreq",
version='2.4.0', version='2.4.1',
maintainer='Robyn Speer', maintainer='Robyn Speer',
maintainer_email='rspeer@luminoso.com', maintainer_email='rspeer@luminoso.com',
url='http://github.com/LuminosoInsight/wordfreq/', url='http://github.com/LuminosoInsight/wordfreq/',

View File

@ -141,8 +141,8 @@ def get_frequency_list(lang, wordlist='best', match_cutoff=None):
if best != lang: if best != lang:
logger.warning( logger.warning(
"You asked for word frequencies in language %r. Using the " "You asked for word frequencies in language %r. Using the "
"nearest match, which is %r (%s)." "nearest match, which is %r."
% (lang, best, langcodes.get(best).language_name('en')) % (lang, best)
) )
return read_cBpack(available[best]) return read_cBpack(available[best])