Ilia Denisov 6b8b176f82
build / dawg (pull_request) Successful in 2m45s
Filter OpenCorpora abbreviations & proper nouns from the Russian noun list
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

scrabble-dictionary

Versioned dictionary artifacts for the Scrabble game backend: the word-list sources and the build pipeline that produces the dictionary DAWGs, published as a release artifact (the DAWGs are data, not a Go module).

The build uses the published scrabble-solver dictdawg/wordlist packages (pinned in go.mod) over github.com/iliadenisov/{dafsa,alphabet} (v1.1.0), so the on-disk format and letter indexing match the running backend exactly — there is no index drift, because the backend pins the same dafsa/alphabet. The DAWGs this repo builds are byte-identical to the solver's committed test fixtures.

Artifact

make dawg builds three DAWGs into dawg/:

file variant source
en_sowpods.dawg English (SOWPODS) sources/scrabble_en/sowpods.txt
ru_scrabble.dawg Russian Scrabble sources/scrabble_ru/scrabble.txt
ru_erudit.dawg Эрудит sources/erudit_ru/erudit.txt (Ё→Е folded scrabble.txt, via tools/fold_yo.py)

The CI (.gitea/workflows/build.yaml) rebuilds them on every push/PR as a validation gate (inlined go run, no make/python needed on the runner). Release artifacts are published per version (see Release below): the three DAWGs packaged flat into scrabble-dawg-<tag>.tar.gz and attached to the Gitea release for the vX.Y.Z tag. The backend deploy unpacks that tarball into BACKEND_DICT_DIR; one semver label versions the whole set (additive — a new version is a new release, never breaking a running backend).

Sources / provenance

  • English: sources/scrabble_en/sowpods.txt, vendored from kamilmielnik/scrabble-dictionaries.
  • Russian: sources/scrabble_ru/scrabble.txt, derived from the Russian academic orthographic dictionary by the tooling under tools/ (see tools/README.md); sources/erudit_ru/erudit.txt is its Ё→Е folded form (tools/fold_yo.py). Only the prepared word lists are vendored; the heavy upstream source (the orfo PDF/text) is not.

Build

make dawg     # -> dawg/{en_sowpods,ru_scrabble,ru_erudit}.dawg

Requires Go (module deps fetched with GOPRIVATE=gitea.iliadenisov.ru/*, exported by the Makefile). No python is needed for the build — the Ё→Е fold is committed as erudit.txt; regenerate it with python3 tools/fold_yo.py sources/scrabble_ru/scrabble.txt > sources/erudit_ru/erudit.txt.

Release

CI builds and validates the DAWGs but does not upload them (the release upload needs a write token, kept out of CI for now — a future enhancement). To publish a version, tag it and attach the artifact to its Gitea release:

make dawg
tar czf scrabble-dawg-vX.Y.Z.tar.gz -C dawg en_sowpods.dawg ru_scrabble.dawg ru_erudit.dawg
# create the Gitea release for tag vX.Y.Z and upload scrabble-dawg-vX.Y.Z.tar.gz as an asset

The backend consumes it at https://gitea.iliadenisov.ru/developer/scrabble-dictionary/releases/download/vX.Y.Z/scrabble-dawg-vX.Y.Z.tar.gz.

S
Description
No description provided
Readme 26 MiB
v1.3.1 Latest
2026-06-30 05:10:45 +00:00
Languages
Python 55.8%
Go 36.5%
C++ 4.5%
Makefile 3.2%