Skip to content

[CS] Show the synonyms under their meaning - #2837

Merged
BoboTiG merged 1 commit into
reader-dict:mainfrom
monosans:cs-synonyms
Nov 9, 2026
Merged

BoboTiG merged 1 commit into
reader-dict:mainfrom
monosans:cs-synonyms

Conversation

@monosans

@monosans monosans commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Following up on #2815: CS has the same layout as RU and UK. "synonyma" has one line per meaning, in the same order, with a dash for a meaning without synonyms. So utils.attach_synonyms() applies as it is:

1. kus horniny
   a. syn.: (v obecném jazyce) šutr, (velký:) balvan, (zdrobněle) kamínek
2. (hromadné, jen singulár) materiál tvořený kameny (1)
   a. syn.: kamení, skála, kamenivo

Two details:

  • In CS the categories often come right after the synonyms, at the end of the page ([[Kategorie:Česká substantiva]]). They counted as a line that isn't a list item, so the list was kept as it was. attach_synonyms() now skips such links. RU and UK don't change: I compared 1,500 pages with synonyms in each.
  • The empty synonyms (a lone dash) are deleted after the matching now, as they keep the lines in step with the meanings. The forms ("# {{flexion|...}}") are found first, so a form page loses its synonyms, as in RU.

On the 20261101 dump, 20,014 of the 20,429 Czech sections with synonyms get them under their meanings. The other 415 keep their list: bullets instead of numbers, more lines than meanings, or references spread over several lines. On a sample of 1,500 pages, no meaning is lost, and only 1 page still has a separate synonyms list instead of 721.

The "kámen" and "popření" tests now expect the synonyms under their meanings, and there are doctests for the categories and for CS. The CS tests pass with a CS dump, and the RU/UK/BG checks still pass.

The CS Wiktionary writes one synonyms line per meaning, as RU and UK do, so
utils.attach_synonyms() applies. The categories that can follow the last
section of a page no longer stop the matching.
@BoboTiG
BoboTiG merged commit 121c05c into reader-dict:main Nov 9, 2026
1 check passed
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