Drop substantivized-adjective false nouns via manual_reject.txt
build / dawg (pull_request) Successful in 1m33s
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.
This commit is contained in:
@@ -33,6 +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. |
|
||||
| `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`. |
|
||||
|
||||
@@ -127,6 +128,10 @@ Each Stage-1 word (length 2–15) is routed by three sources, most authoritative
|
||||
травмпункт`, `регги и реггей`) and one is already a confirmed noun, the other is moved
|
||||
from review/undefined into the result as well, propagated transitively through chains.
|
||||
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.
|
||||
|
||||
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
|
||||
|
||||
+9
-1
@@ -353,7 +353,15 @@ def build():
|
||||
fate[y] = f"scrabble: вариант от «{x}» (через «и»)"
|
||||
changed = True
|
||||
|
||||
undefined = [w for w in amb if w not in scrabble]
|
||||
# Manual rejections: words the maintainer vetoed — substantivized-adjective false nouns
|
||||
# a dictionary misreads as nouns (нёбный, акцизный, …). Subtracted last, so it overrides
|
||||
# every admission path above (OC seed / libmorph / note / manual_confirm / variant).
|
||||
reject = {w for w in load(os.path.join(OUT_DIR, "manual_reject.txt")) if cyr_ok(w)}
|
||||
scrabble -= reject
|
||||
for w in reject:
|
||||
fate[w] = "отброшено: ручной запрет (manual_reject.txt)"
|
||||
|
||||
undefined = [w for w in amb if w not in scrabble and w not in reject]
|
||||
return {
|
||||
"oc": oc, "scrabble": scrabble, "undefined": undefined,
|
||||
"adjectives": adj, "verbs": verb, "singulars": ed_nouns,
|
||||
|
||||
Reference in New Issue
Block a user