Reducing the sensitivity threshold of language recognition

This commit is contained in:
Jafar Farganlooj 2024-08-15 09:27:18 +03:30 committed by GitHub
parent fce8d65e5b
commit 3f47998944
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -267,7 +267,7 @@ def get_search_query_from_webapp(
selected_locale = query_lang selected_locale = query_lang
if query_lang == 'auto': if query_lang == 'auto':
query_lang = detect_language(query, threshold=0.8, only_search_languages=True) query_lang = detect_language(query, threshold=0.55, only_search_languages=True)
query_lang = query_lang or preferences.client.locale_tag or 'all' query_lang = query_lang or preferences.client.locale_tag or 'all'
if not is_locked('categories') and raw_text_query.specific: if not is_locked('categories') and raw_text_query.specific: