From 2ecf31ee81acf300e696ce96bdfe21b99bc24f4d Mon Sep 17 00:00:00 2001 From: Robyn Speer Date: Wed, 14 Mar 2018 15:08:52 -0400 Subject: [PATCH] Actually use `min_score` in `_language_in_list` We don't need to set it to any value but 80 now, but we will need to if we try to distinguish three kinds of Chinese (zh-Hans, zh-Hant, and unified zh-Hani). --- wordfreq/language_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wordfreq/language_info.py b/wordfreq/language_info.py index feb5ef1..6c56b64 100644 --- a/wordfreq/language_info.py +++ b/wordfreq/language_info.py @@ -31,7 +31,7 @@ def _language_in_list(language, targets, min_score=80): The languages can be given as strings (language tags) or as Language objects. `targets` can be any iterable of such languages. """ - matched = best_match(language, targets) + matched = best_match(language, targets, min_score=min_score) return matched[1] > 0