[fix] language disambiguation

This commit is contained in:
Al
2015-08-23 22:50:24 -04:00
parent e26776a5e9
commit 7053c6b60b

View File

@@ -203,6 +203,8 @@ def disambiguate_language(text, languages):
elif len(valid_default) == 1:
current_lang = valid_default[0]
seen_languages.update(valid)
if current_lang is not None:
if not any((current_lang not in langs for script, langs in script_langs.iteritems())):
return current_lang