6 Commits

Author SHA1 Message Date
Ilia Denisov 7f8165f16d feat(ru): drop obscene lexicon (mat) from the Russian noun list
build / dawg (pull_request) Successful in 24s
Remove the 11 obscene nouns built on the хуй/еб·ёб/пизд/бляд roots
(ахуй, блядь, выблядок, ебальник, еблан, охуение, пизда, пиздец,
пиздобол, хуй, хуйня) from the Russian Scrabble/Эрудит dictionary.

These are morphologically valid common nouns, so the pipeline admitted
them like any other word — OpenCorpora's tagset exposes no obscenity
grammeme to filter on. They are vetoed as policy via manual_reject.txt,
which is subtracted last in ru_stage2.build(), so no pipeline logic
changes: scrabble.txt is the deterministic result of that subtraction
and erudit.txt is its Ё→Е fold, regenerated with tools/fold_yo.py.

The coarser-but-not-mat муд* (мудак, мудила) and legitimate homographs
(очко, сука, моча, дрочёна) are deliberately kept.

scrabble.txt 83027 -> 83016, erudit.txt 82985 -> 82974.
2026-06-30 07:01:00 +02:00
Ilia Denisov 74ff3aefb6 feat(ru): drop abbreviations from the Russian noun list
build / dawg (pull_request) Successful in 6m4s
The list leaked abbreviations two ways: an OpenCorpora noun tagged Abbr without
Fixd (the declinable acronym ОГВЗ) slipped past the Abbr+Fixd seed filter, and the
РАН «(сокр.)» words (вуз, нэп, колхоз, гост, …) were kept on purpose by the old
policy.

Drop every abbreviation instead. A final pass in ru_stage2.py removes a word when
the orthographic note marks it «(сокр.)» (is_abbrev_note) or when every OpenCorpora
noun reading carries Abbr (oc_abbr_only — also the declinable огвз/заз the seed
filter missed). Homographs with a plain-noun reading survive (ваза «ВАЗ», рис).
Lexicalised words are rescued via manual_confirm.txt (колхоз, совхоз, рация,
спецназ, эсминец, дзот, дот, прораб, токамак, тэн, … and под — a real noun OC knows
only as ПОД); the bound prefix гос is vetoed in manual_reject.txt.

108 words removed from ru_scrabble / ru_erudit; en_sowpods unchanged. tools/README
documents the policy and that libmorph is required for a faithful rebuild.
2026-06-22 14:16:55 +02:00
Ilia Denisov e17e945b41 Drop substantivized-adjective false nouns via manual_reject.txt
build / dawg (pull_request) Successful in 1m33s
OpenCorpora/libmorph hand a noun reading to Stage 2 above the РАН note, so
substantivized-adjective false nouns a dictionary misreads (нёбный, акцизный,
велярный, …) reached scrabble.txt with no veto path — the earlier abbreviation
filter only carved out Abbr+Fixd.

ru_stage2.py now subtracts sources/scrabble_ru/manual_reject.txt last, after
every admission path (OC seed / libmorph / note / manual_confirm / variant),
mirroring manual_confirm.txt. The list seeds 62 hand-reviewed words — 43 pure
adjectives plus 19 marginal (slang/archaic/jargon) substantivizations; genuine
substantivized nouns (больной, знакомый, учёный, участковый, …) stay.

scrabble.txt -62 (83206->83144); erudit.txt re-folded -62. The DAWGs are
gitignored and rebuild from these lists in CI.
2026-06-20 17:09:02 +02:00
Ilia Denisov 6b8b176f82 Filter OpenCorpora abbreviations & proper nouns from the Russian noun list
build / dawg (pull_request) Successful in 2m45s
OpenCorpora tags indeclinable abbreviations as common nouns (Abbr+Fixd), and
Stage 2 seeded the result with its whole noun lexicon, so non-words leaked into
scrabble.txt: ндс, ст, ср, кпд, чп, гибдд, днк, …

ru_stage2.py now drops Abbr+Fixd nouns from the OpenCorpora seed and lets the
orthographic dictionary decide instead: a lowercase РАН headword whose note is a
noun is kept (the lexicalised сельпо, под, ска, роно, врио, тв, фио, суперэвм),
everything else is dropped. Function words (CONJ/PRCL, e.g. зато) and OpenCorpora
inflected forms (ан = род. мн. от «ана»; proper «Ан») are excluded too.

--trace WORD now prints a detailed per-signal audit (all.txt, OpenCorpora POS /
Abbr / Fixd / CONJ/PRCL, libmorph, РАН note + classify, outcome) for auditing a
word or repeating the analysis; tools/README.md documents the rule and method.

Net: 179 words removed from scrabble.txt (83385 -> 83206) and erudit.txt
(83343 -> 83164); verified to remove exactly those 179 and add none. DAWGs
rebuild clean.
2026-06-13 13:33:26 +02:00
Ilia Denisov 5b7a741ec2 Restore lost Russian dictionary sources from scrabble-solver history
The dict pipeline was moved out of scrabble-solver (256999b) into this repo,
but the initial import (d04470b) dropped three primary sources, and the
"Tidy sources" reorg (dd61ff1) git-ignored them while tools/README.md still
documented them as the committed source of truth — so the word-provenance
analysis could no longer run.

Recover them byte-identically from scrabble-solver's history (reachable from
its v1.0.0 tag):

- tools/orfo_dict_2025.pdf                 primary source (RAS orthographic dictionary PDF)
- sources/scrabble_ru/orfo_dict_2025.txt   pdftotext output, pipeline source of truth
- sources/scrabble_ru/all.txt              Stage-1 base, input to Stage 2

Stop ignoring them in .gitignore and fix the contradictory note in
sources/scrabble_ru/README.md (only the debug dumps are regenerated locally).
2026-06-13 11:59:43 +02:00
Ilia Denisov dd61ff1d51 Tidy sources into sources/<variant>/ + tools/
build / dawg (pull_request) Successful in 4m22s
Consolidate the scattered build inputs (dictionaries/english/, dictprep/russian/)
into one sources/ tree keyed by the variant labels (scrabble_en/scrabble_ru/
erudit_ru), and move the Russian prep pipeline to tools/. The dawg outputs and
their filenames are unchanged — rebuilt byte-identical (en_sowpods/ru_scrabble/
ru_erudit) — so the release artifact and the backend are unaffected.

ru_stage2.py OUT_DIR and the ruwords flag defaults are repointed to
sources/scrabble_ru/; Makefile / CI / cmd/builddict default / README updated;
pipeline intermediates git-ignored. Verified: make dawg byte-identical to the
committed baseline, py_compile + go vet of the moved tools. The full Russian
regeneration pipeline (pymorphy3/libmorph/orfo PDF) was not run here.
2026-06-09 12:25:33 +02:00