Skip to content

Refine Polish dictionaries and UI translations#115

Merged
Hugo0 merged 3 commits into
Hugo0:mainfrom
JanuszTwardak:feature/pl_language_improved
Feb 15, 2026
Merged

Refine Polish dictionaries and UI translations#115
Hugo0 merged 3 commits into
Hugo0:mainfrom
JanuszTwardak:feature/pl_language_improved

Conversation

@JanuszTwardak

@JanuszTwardak JanuszTwardak commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR significantly refines and improves the Polish language support. The previous dictionary and solution lists contained low-quality data. This update replaces them with cleaner, frequency-based datasets and corrects the UI translations.

This PR aims to improve dictionaries for daily puzzle and guessing words. Before changes dictionary for polish words contains a lot of words from other languages (English, Spanish, even Finnish) and a lot of archaisms.

I've used open source word lists and some algorithms to generate two dictionaries:

  • pl_5words.txt: common polish words, base forms only
  • pl_5words_supplement.txt: all valid Polish words from SJP dictionary, multiple forms

1. Dictionary Refinement - Daily Puzzles

File: webapp\data\languages\pl\pl_5words.txt
Count: 1,713 words

The solution list has been rebuilt from scratch using a cross-reference between SJP base forms and Polish movie subtitle frequency (https://github.com/hermitdave/FrequencyWords) data to ensure solutions are commonly known words.

Algorithm:

  • Used base forms only (nominative case) to prevent skewing scores with inflections.
  • Foreign word filter: Verified that entries contained commas (indicating Polish inflection) to filter out uninflected foreign phrases.
  • English pattern removal: Applied regex to remove non-Polish character clusters (ou, ck, ee, oo, th, gh, ea, sh).
  • Applied a minimum frequency threshold based on subtitle data (100)
  • Manual Review: Following the algorithmic generation, I performed a manual, line-by-line human review of the entire candidate list. Yes, I didn't use AI for this step. I removed:
    • Archaic words not in common use.
    • Profanity.
    • Obscure loanwords that bypassed the regex filters.

2. Dictionary Refinement - Valid Guesses

File: webapp\data\languages\pl\pl_5words_supplement.txt
Count: 34,150 words

Replaced the existing list with a cleaner extraction from the SJP dictionary https://sjp.pl/sl/odmiany/.

Filtering logic:

  • Split entries by comma to handle multiple variations per line.
  • Filtered for exactly 5 letters.
  • Excluded multi-word phrases (containing spaces).

3. UI Translations

File: webapp\data\languages\pl\language_config.json

Refined the configuration file translations. The interface text has been rewritten to sound natural and native, fixing previous literal translations.

4. Sources

File: webapp\data\languages\pl\SOURCES.md

Added sources I used for rewriting all dictionaries, with their licenses (all open source as well).

…pplement.txt). Improved translation of language_config.json for polish language. Added SOURCES.md for polish language words
@coderabbitai

coderabbitai Bot commented Feb 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (1)
  • webapp/data/languages/pl/pl_5words.txt

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Two Polish language files updated: a new SOURCES.md documentation file detailing data provenance for word lists (SJP.pl and FrequencyWords sources, Apache 2.0 and MIT licenses), and Polish language configuration strings revised with updated translations, UI labels, and UI text.

Changes

Cohort / File(s) Summary
Polish Language Configuration
webapp/data/languages/pl/SOURCES.md, webapp/data/languages/pl/language_config.json
Added new data sources documentation file detailing licensing, usage, and source attribution for Polish language word lists. Updated Polish UI strings, translations, descriptions, and help text in language configuration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Polish words, now sourced with care,
From SJP's treasure, beyond compare!
Licenses declared in documents bright,
UI strings polished—translations just right! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Refine Polish dictionaries and UI translations' accurately summarizes the main changes: improving Polish language support through dictionary refinement and UI translation updates.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@JanuszTwardak JanuszTwardak changed the title Big improvements for Polish language support Refine Polish dictionaries and UI translations Feb 10, 2026

@Hugo0 Hugo0 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great contribution! The word list quality is a massive improvement — the current list has English words (pride, print, lewis), inflected forms, and archaisms. Your frequency-based approach with manual review is exactly what's needed.

Ran pytest locally — one issue to fix:

pl_5words.txt contains event, which has the letter v. Polish character set (pl_characters.txt) doesn't include v, so this fails the character validation test:

FAILED test_words_use_valid_characters[pl] - pl: Found 1 words with invalid characters. Examples: [('event', ['v'])]

Please remove event from pl_5words.txt (it's an English loanword anyway, not a great daily puzzle word).

Minor note: pl_5words_supplement.txt has ~100 words containing v (loanwords like covid, cover, drive, etc.). These won't cause test failures since the supplement validation is less strict, but users can't type v on the Polish keyboard layout — so those entries are effectively dead. Not blocking, but worth knowing.

Everything else looks good:

  • UI translations are clearly native-quality (fixed machine-translated strings like "Dzielić" → "Udostępnij")
  • 1,713 curated daily words is plenty (~4.7 years)
  • 34K supplement words should drastically reduce the invalid word rate (currently 65% for Polish)
  • SOURCES.md with licensing is a nice touch

Will merge once event is removed. Thanks for putting in the manual review work!

@Hugo0 Hugo0 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great contribution! The word list quality is a massive improvement — the current list has English words (pride, print, lewis), inflected forms, and archaisms. Your frequency-based approach with manual review is exactly what's needed.

Ran pytest locally — one issue to fix:

pl_5words.txt contains "event", which has the letter "v". Polish character set (pl_characters.txt) doesn't include "v", so this fails the character validation test:

FAILED test_words_use_valid_characters[pl] - Found 1 words with invalid characters: [('event', ['v'])]

Please remove "event" from pl_5words.txt (it's an English loanword anyway, not a great daily puzzle word).

Minor note: pl_5words_supplement.txt has ~100 words containing "v" (loanwords like covid, cover, drive, etc.). These won't cause test failures since the supplement validation is less strict, but users can't type "v" on the Polish keyboard layout — so those entries are effectively dead. Not blocking, but worth knowing.

Everything else looks good:

  • UI translations are clearly native-quality (fixed machine-translated strings like "Dzielić" to "Udostępnij")
  • 1,713 curated daily words is plenty (~4.7 years)
  • 34K supplement words should drastically reduce the invalid word rate (currently 65% for Polish)
  • SOURCES.md with licensing is a nice touch

Will merge once "event" is removed. Thanks for putting in the manual review work!

@Hugo0

Hugo0 commented Feb 15, 2026

Copy link
Copy Markdown
Owner

fixed, merging. thx!

@Hugo0
Hugo0 merged commit 28eb8bb into Hugo0:main Feb 15, 2026
2 of 4 checks passed
@Hugo0 Hugo0 mentioned this pull request Feb 22, 2026
Hugo0 added a commit that referenced this pull request Feb 22, 2026
* chore: refined full list of polish words (pl_5words.txt, pl_5words_supplement.txt). Improved translation of language_config.json for polish language. Added SOURCES.md for polish language words

* fix: Remove 'event' from Polish word list (contains 'v', not in charset)

---------

Co-authored-by: Hugo Montenegro <h@hugo0.com>
Hugo0 added a commit that referenced this pull request Apr 15, 2026
* chore: refined full list of polish words (pl_5words.txt, pl_5words_supplement.txt). Improved translation of language_config.json for polish language. Added SOURCES.md for polish language words

* fix: Remove 'event' from Polish word list (contains 'v', not in charset)

---------

Co-authored-by: Hugo Montenegro <h@hugo0.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants