Repository navigation
[NL] Show the synonyms under their meaning when they give its number - #2842
Merged
Merged
Conversation
Member
|
Thanks @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 nl.wiktionary a synonyms line often starts with the number of its meaning, like
*[1] [[bijgevolg]]on daardoor. The dictionary showed them as a separate "Synoniemen" list with the bare numbers left in.Now these synonyms go under their meaning as a
syn.:sub-definition, like for RU, UK, CS, DE and JA. The meanings are the#items of the nearest section above that has some, so a homophones or notes section can sit in between. Handled:[1],[1, 3],[2-3],[3], [4]and[2]:.The list is kept as it is when a line has no number, a number past the last meaning, a sub-meaning number like
[1.1], or a number pointing to a meaning that is a form of another word (#{{volt-d|...}}). That meaning goes to the variants, and its synonyms would be lost with it.Testing
parse_word()on all 61,185 pages that have a synonyms section, main against this branch: 6,727 pages get their synonyms under the meanings, no page loses a meaning, same 10 errors on both.tests/test_nl.py(expectations for "a" and "Konkani" updated), the new doctests, mypy and ruff pass.