d04470b741
build / dawg (push) Failing after 2s
- builddict drives the de-internalized scrabble-solver dictdawg/wordlist builders (pinned v1.0.0) to produce the three DAWGs (en_sowpods, ru_scrabble, ru_erudit), byte-identical to the solver's committed fixtures (same dafsa/alphabet v1.1.0 -> no index drift with the running backend). - Sources: english/sowpods.txt vendored from kamilmielnik/scrabble-dictionaries; russian/scrabble.txt + the dictprep tooling moved out of scrabble-solver. - CI builds the DAWGs on push/PR and, on a vX.Y.Z tag, packages them flat into scrabble-dawg-<tag>.tar.gz and attaches it to the Gitea release.
35 lines
1.3 KiB
Makefile
35 lines
1.3 KiB
Makefile
# scrabble-dictionary build helpers.
|
|
#
|
|
# `make dawg` (re)builds the dictionary DAWGs under dawg/ from their word lists, using the
|
|
# published scrabble-solver dictdawg/wordlist builders (pinned in go.mod), so the on-disk
|
|
# format and letter indexing match the running backend exactly (no index drift):
|
|
# en_sowpods.dawg — English SOWPODS (Latin alphabet)
|
|
# ru_scrabble.dawg — Russian Scrabble nouns (Cyrillic, 33 letters)
|
|
# ru_erudit.dawg — Эрудит (the same list with Ё→Е folded and de-duped)
|
|
#
|
|
# The CI workflow packages dawg/*.dawg into a release artifact on a vX.Y.Z tag.
|
|
|
|
export GOPRIVATE := gitea.iliadenisov.ru/*
|
|
|
|
GO ?= go
|
|
PYTHON ?= python3
|
|
DAWG_DIR := dawg
|
|
BUILDDICT := $(GO) run ./cmd/builddict
|
|
|
|
.PHONY: dawg dawg-en dawg-ru dawg-erudit clean-dawg
|
|
|
|
dawg: dawg-en dawg-ru dawg-erudit
|
|
|
|
dawg-en:
|
|
$(BUILDDICT) -dict dictionaries/english/sowpods.txt -alphabet latin -name en_sowpods -out $(DAWG_DIR)
|
|
|
|
dawg-ru:
|
|
$(BUILDDICT) -dict dictprep/russian/scrabble.txt -alphabet russian -name ru_scrabble -out $(DAWG_DIR)
|
|
|
|
dawg-erudit:
|
|
$(PYTHON) dictprep/fold_yo.py dictprep/russian/scrabble.txt > /tmp/ru_erudit_words.txt
|
|
$(BUILDDICT) -dict /tmp/ru_erudit_words.txt -alphabet russian -name ru_erudit -out $(DAWG_DIR)
|
|
|
|
clean-dawg:
|
|
rm -f $(DAWG_DIR)/*.dawg
|