Skip to content

Commit

Permalink
Discard more short splits
Browse files Browse the repository at this point in the history
Too many of these are not a sensible split of a compound word. The
likelihood is much worse than for longer splits.
  • Loading branch information
karlb committed May 16, 2024
1 parent 672c295 commit 8ef4551
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wikdict_web/lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 8ef4551

Please sign in to comment.