docs: record why the translation engine lives in-tree

A from-scratch CPU inference engine is the largest, riskiest part of
the codebase and the least connected to screenwriting, so it deserves a
written decision. It stays: the alternative (a ctranslate2/argos
dependency, a plugin or a separate binary) buys a single menu item at
the cost of cgo and per-distribution packaging, while the in-tree
engine keeps the one-binary, offline, GPL-clean build. The package doc
now says so, with the condition that should reopen the question
(more language pairs).
This commit is contained in:
Kharec committed 2026-10-15 17:54:11 +02:00
1 parent 82bfef8cba
commit 1440adc199
2 files changed
+14 -1

No files matched your search

+2 -1
View File
@@ -62,7 +62,8 @@ internal/layout line wrapping + pagination (paper sizes, locked pages);
internal/pdf hand-written PDF 1.4 writer, standard Courier fonts, zero dependencies internal/pdf hand-written PDF 1.4 writer, standard Courier fonts, zero dependencies
internal/spell Hunspell .aff/.dic reader, checker (compounds too), suggestions, word scan internal/spell Hunspell .aff/.dic reader, checker (compounds too), suggestions, word scan
internal/marian MarianMT (OPUS-MT) inference in pure Go: safetensors, SentencePiece unigram, internal/marian MarianMT (OPUS-MT) inference in pure Go: safetensors, SentencePiece unigram,
transformer encoder-decoder, beam search, verified download transformer encoder-decoder, beam search, verified download. In-tree on
purpose (one binary, no cgo, offline by design): see the package doc.
internal/translate French → English script translation: language detection, screenplay term internal/translate French → English script translation: language detection, screenplay term
tables, per-element rules, name protection, parallel sentence translation tables, per-element rules, name protection, parallel sentence translation
frontend/index.html app shell: header bar, navigator, paper, HUD, <dialog>s frontend/index.html app shell: header bar, navigator, paper, HUD, <dialog>s
+12
View File
@@ -3,6 +3,18 @@
// plain Go: a SentencePiece tokenizer, the transformer encoder-decoder and // plain Go: a SentencePiece tokenizer, the transformer encoder-decoder and
// beam search. A model directory holds config.json, model.safetensors, // beam search. A model directory holds config.json, model.safetensors,
// source.spm, target.spm and vocab.json. // source.spm, target.spm and vocab.json.
//
// The engine lives in-tree on purpose. Plotzilla ships as one binary built
// with only the Go toolchain: a native runtime (ctranslate2, argos) would
// add cgo and per-distribution packaging, and a separate binary or plugin
// an install step, all for a single menu item. Translation is offline by
// design — an unpublished script never leaves the machine — and the model
// is data downloaded at runtime (Apache-2.0), so neither the "no
// third-party dependency" rule nor the GPL is affected. The screenplay
// conventions stay out of this package (internal/translate owns them) and
// the pipeline is covered by a synthetic tiny model and, on demand, the
// real one. If more language pairs are ever added, each with its own
// 300 MB download and quirks, reconsider a separate optional component.
package marian package marian
import ( import (