From 8ef45519c20e4ca73dc96e6082a861c93baef327 Mon Sep 17 00:00:00 2001 From: Karl Bartel Date: Thu, 16 May 2024 18:36:24 +0200 Subject: [PATCH] Discard more short splits Too many of these are not a sensible split of a compound word. The likelihood is much worse than for longer splits. --- wikdict_web/lookup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wikdict_web/lookup.py b/wikdict_web/lookup.py index d2dfe86..953271b 100644 --- a/wikdict_web/lookup.py +++ b/wikdict_web/lookup.py @@ -226,7 +226,7 @@ def get_compounds(from_lang, to_lang, query): ) if not lang_solution: continue - if len(lang_solution.parts) >= len(query) / 2: + if len(lang_solution.parts) >= len(query) / 3: # Too high likelyhood of useless split continue solutions.append([lang, other_lang, lang_solution])