Skip to content

[NL] Show the synonyms under their meaning when they give its number - #2842

Merged
BoboTiG merged 1 commit into
reader-dict:mainfrom
monosans:feat/nl-synonyms
Nov 16, 2026
Merged

BoboTiG merged 1 commit into
reader-dict:mainfrom
monosans:feat/nl-synonyms

Conversation

@monosans

Copy link
Copy Markdown
Contributor

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

  • NL dump 20261101, Python 3.13 (python:3.13-slim in Docker) on Windows 11.
  • 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.

@BoboTiG
BoboTiG merged commit a677ec5 into reader-dict:main Nov 16, 2026
1 check passed
@BoboTiG

BoboTiG commented Nov 16, 2026

Copy link
Copy Markdown
Member

Thanks @monosans 🍾

@monosans
monosans deleted the feat/nl-synonyms branch November 16, 2026 10:00
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