From 7f8165f16dcd6254d54e9057f23b8c0d48d80beb Mon Sep 17 00:00:00 2001 From: Ilia Denisov Date: Tue, 30 Jun 2026 07:01:00 +0200 Subject: [PATCH] feat(ru): drop obscene lexicon (mat) from the Russian noun list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- sources/erudit_ru/erudit.txt | 11 ----------- sources/scrabble_ru/manual_reject.txt | 13 +++++++++++++ sources/scrabble_ru/scrabble.txt | 11 ----------- tools/README.md | 8 +++++--- 4 files changed, 18 insertions(+), 25 deletions(-) diff --git a/sources/erudit_ru/erudit.txt b/sources/erudit_ru/erudit.txt index 3cb2a34..4e41bf8 100644 --- a/sources/erudit_ru/erudit.txt +++ b/sources/erudit_ru/erudit.txt @@ -4167,7 +4167,6 @@ ахтерпик ахтерштаг ахтерштевень -ахуй ацератерий ацетабулярия ацеталь @@ -6747,7 +6746,6 @@ блюститель блюстительница блютус -блядь блямба бляха бляшечка @@ -11369,7 +11367,6 @@ выбивка выбирание выбленка -выблядок выбоина выбоинка выбой @@ -19469,8 +19466,6 @@ дядя дятел дятлообразные -ебальник -еблан евангелие евангелизация евангелизм @@ -45601,7 +45596,6 @@ охтинка охтянин охтянка -охуение охулка оцеживание оцелот @@ -48716,9 +48710,6 @@ пижончик пизанец пизанка -пизда -пиздец -пиздобол пизолит пиит пиитика @@ -77619,8 +77610,6 @@ худфильм худфонд худышка -хуй -хуйня хук хула хулахуп diff --git a/sources/scrabble_ru/manual_reject.txt b/sources/scrabble_ru/manual_reject.txt index 3dbde2f..b015701 100644 --- a/sources/scrabble_ru/manual_reject.txt +++ b/sources/scrabble_ru/manual_reject.txt @@ -70,3 +70,16 @@ щелевой щелинный эскадронный +# обсценная лексика (мат), корни хуй / еб·ёб / пизд / бляд — вычищается как +# политика, а не как «ложное существительное»; строки с «#» отбрасывает cyr_ok +ахуй +блядь +выблядок +ебальник +еблан +охуение +пизда +пиздец +пиздобол +хуй +хуйня diff --git a/sources/scrabble_ru/scrabble.txt b/sources/scrabble_ru/scrabble.txt index 16130df..13681b3 100644 --- a/sources/scrabble_ru/scrabble.txt +++ b/sources/scrabble_ru/scrabble.txt @@ -4168,7 +4168,6 @@ ахтерпик ахтерштаг ахтерштевень -ахуй ацератерий ацетабулярия ацеталь @@ -6752,7 +6751,6 @@ блюститель блюстительница блютус -блядь блямба бляха бляшечка @@ -11376,7 +11374,6 @@ выбивка выбирание выбленка -выблядок выбоина выбоинка выбой @@ -19478,8 +19475,6 @@ дядя дятел дятлообразные -ебальник -еблан евангелие евангелизация евангелизм @@ -45628,7 +45623,6 @@ охтинка охтянин охтянка -охуение охулка оцеживание оцелот @@ -48747,9 +48741,6 @@ пижончик пизанец пизанка -пизда -пиздец -пиздобол пизолит пиит пиитика @@ -77659,8 +77650,6 @@ худфильм худфонд худышка -хуй -хуйня хук хула хулахуп diff --git a/tools/README.md b/tools/README.md index 6bf77c3..ed1ef28 100644 --- a/tools/README.md +++ b/tools/README.md @@ -33,7 +33,7 @@ process's memory (dump it with `--dump`, query it with `--trace WORD`). | `orfo_dict_2025.txt` | ✓ | the pdftotext output — the parsed source of truth (the PDF binary is not needed to rebuild). | | `all.txt` | ✓ | Stage 1 base: every clean Cyrillic headword/variant; a plural headword with a singular is replaced by that singular. | | `manual_confirm.txt` | ✓ | hand-reviewed nouns from the undefined tail; the brain merges them into the result. | -| `manual_reject.txt` | ✓ | hand-vetoed false nouns (substantivized adjectives a dictionary misreads as nouns, e.g. нёбный); subtracted from the result last. | +| `manual_reject.txt` | ✓ | hand-vetoed words subtracted from the result last: false nouns (substantivized adjectives a dictionary misreads as nouns, e.g. нёбный) and obscene lexicon (mat, e.g. хуй, блядь). | | `scrabble.txt` | ✓ | **Stage 2 result**: common nouns, nominative singular (+ pluralia tantum), length 2–15 — the working dictionary. | | `undefined.txt` | — | the ambiguous tail; kept in memory, written only with `--dump`. | @@ -134,8 +134,10 @@ Each Stage-1 word (length 2–15) is routed by three sources, most authoritative The plural-form variants the dictionaries already resolve never reach this step. 5. **Manual overrides**: `manual_confirm.txt` adds maintainer-approved nouns from the undefined tail (before variant rescue, so they can anchor it); `manual_reject.txt` is - subtracted **last**, removing false nouns a dictionary misreads — substantivized - adjectives with no nominal use (`нёбный`, `акцизный`, …) — overriding every path above. + subtracted **last**, removing both false nouns a dictionary misreads — substantivized + adjectives with no nominal use (`нёбный`, `акцизный`, …) — and the obscene lexicon (mat + on the хуй/еб·ёб/пизд/бляд roots: `хуй`, `пизда`, `блядь`, …), dropped as policy though + morphologically valid nouns — overriding every path above. The nominative singular always comes from the dictionary that recognised the word, or from the orthographic `ед.` note — never from a predictor guess (libmorph and the predictor