Repository navigation
[PL] Show the synonyms under their meaning - #2851
Merged
BoboTiG merged 1 commit intoNov 26, 2026
Merged
Conversation
Member
|
Thanks a lot @monosans ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #2815. On pl.wiktionary each synonyms line starts with the numbers of its meanings, like
: (1.1) [[trusia]]on królik. The dictionary showed them as a separate "Synonimy" list with the numbers stripped, so you couldn't tell which meaning a synonym was for.Now they go under their meaning as a
syn.:sub-definition, like for RU, UK, NL, CS, DE and JA. Handled:(1.1),(1.1-2),(1.1-1.3),(1.1, 2.1),(1.1,3),(1.4-5,7)and(1.1) (2.1). Several lines for the same meaning are joined with;. The Polish and the international sections each have their own numbering, so each is matched on its own.The list of a section is kept as it is when a line has no number (
: {{gwara}} [[mliko]]), a number that isn't one of its meanings ((1),(1.1.2)), a range across parts of speech ((1.1-3.1)), or a number pointing to a meaning the dictionary doesn't show: a form of another word goes to the variants, and a part of speech likeprzyrostekis left out, so the synonyms would be lost with it.Testing
parse_word()on all 180,287 pages that have a non-empty synonyms section, main against this branch: 38,313 of them show synonyms. 37,423 now get them under the meanings and 890 keep the list. No other definition changes and no errors on either side. No synonym is lost; in 6 pages the old list still had leftover numbers like "(2.1) (3.1) okej, okay", and those are gone now.tests/test_pl.py(expectations for "a", "ABC", "książka" and "piękny" updated), the new doctests, mypy and ruff pass.