Merge pull request #88 from LuminosoInsight/version2.4

work with langcodes 3.0, without language_data
This commit is contained in:
Lance Nathan 2021-02-09 17:36:09 -05:00 committed by GitHub
commit 7318f58df9
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])