Petal learns French, and the pack that shipped was misspelling itself

Phase 24, the fr half: langpack, Hunspell dictionary, Piper voice, and the
lexicon coverage that turned out to have been measured already (63.1%, better
than pt-PT's 62.1%). No migration; not deployed.

The plan recorded that build_ptpt_dictionary.py "generalizes" to French. It
did not. It handled single-character flags and plain PFX/SFX and stopped on
everything else, and fr.aff uses four of the things it stopped on. FLAG long
is the dangerous one: French flags are two characters, so the old reader's
set(flagstr) yields a bag of unrelated letters and expands every entry through
the wrong paradigm without ever erroring. Plus continuation flags (French
really does affix an affixed form), NEEDAFFIX on 68,075 of 84,140 stems, and
FULLSTRIP. Renamed build_hunspell_dictionary.py with a per-language profile,
asserting that CIRCUMFIX and FORBIDDENWORD are still unused rather than
assuming it — and it rebuilds pt-PT byte-identical to the shipped asset, which
is the only thing that makes "generalized" a claim rather than a hope.

Elision was decided by building both halves and measuring. Keeping l'arbre and
its thirty-three siblings: 3,159,832 forms, 8.25 MB gzipped. Dropping them:
473,326 and 1.19 MB. They are not new words, but the tokenizer keeps internal
apostrophes, so they genuinely would have been underlined — so they moved out
of the dictionary into withElision, which splits at a known clitic and still
requires the remainder to be a word (l'zzzz stays flagged). Real nspell: 369 ms
and 74 MB, against pt-PT's 842 ms and 139 MB, on the larger language.

Where the regional trap lives is the mirror image of Portuguese's: every fr_*
Piper voice is fr_FR and Debian's fr_FR/fr_CA/fr_BE dictionaries are one shared
word list, so nothing can be quietly wrong about the country and the whole
decision sits in the copy. What French has instead is the 1990 reform, packaged
three ways; comprehensive ships, because Petal never corrects her French and
coût and cout are both correct.

Then the interim review pass, at the user's suggestion and explicitly "for
now": four models read each Latin pack independently, and only findings at
least two of them reached on their own were applied — five per pack. It earned
its keep on the pack that was already live. pt-PT was carrying pre-Acordo
spellings (adjectivos, actualmente) in a file whose own header commits to
post-Acordo, plus Brazilian decepção, because the Phase 21 greps checked for
Brazilian vocabulary and never checked the pack against its own spelling
policy. That grep now exists and was confirmed to fail on the old text before
being kept. Where reviewers agreed a line was wrong but split on the fix, the
wording is mine and the reasoning is in BUILD_PLAN rather than averaged away.

Still owed, and both packs now say so precisely: a quorum of models agreeing is
agreement, not authority. No native speaker has read either pack, and none of
this has been seen in a browser.

go build/vet/test clean, tsc, vite build, vitest 190/190.

Claude-Session: https://claude.ai/code/session_016y6gyuHkQXPiEuW8RGQyua
This commit is contained in:
prosolis
2026-07-27 16:19:26 -07:00
parent 9a2e909b85
commit 071ea7b835
20 changed files with 1453 additions and 286 deletions
+20 -11
View File
@@ -1,12 +1,21 @@
// The European Portuguese pack — the first pair that is not Chinese, and the
// one that proves a language really is data.
//
// ⚠️ WRITTEN BUT NOT YET REVIEWED BY A NATIVE SPEAKER.
// ⚠️ REVIEWED BY FOUR MODELS, NOT BY A pt-PT SPEAKER.
// SUGGESTIONS.md §3 sets the bar: "the pt-PT pack should be reviewed by a pt-PT
// speaker before it's trusted — same standard the zh copy got by being written
// for a real reader." That review has not happened. Until it does, treat every
// line here as a good-faith draft rather than as shipped copy, and expect a
// speaker to change the register long before they change the vocabulary.
// for a real reader." That has still not happened. What has happened
// (2026-07-27) is an interim pass: four different models read this file
// independently as European Portuguese speakers, and only findings at least two
// of them reached on their own were applied — see BUILD_PLAN Phase 24.
//
// It found something worth the whole exercise: this file was carrying
// **pre-Acordo spellings** — *adjectivos*, *actualmente* — in direct
// contradiction of the paragraph directly below, and *decepção*, which is the
// Brazilian form. The test greps guarded against Brazilian vocabulary and never
// against the pack's own stated spelling policy; they do now. Treat this as a
// better-checked draft, and still expect a speaker to change the register long
// before they change the vocabulary.
//
// European Portuguese, not Brazilian. That is the single most likely way for
// this file to go quietly wrong, so the choices are deliberate throughout:
@@ -93,7 +102,7 @@ export const ptPT: Pack = {
{ native: 'A tua cama deve estar com saudades 🛏️', en: 'I bet your bed is missing you right now.' },
{ native: 'Cansada não se escreve bem — vai descansar 🌙', en: 'A tired writer is a bad writer — get some rest.' },
{ native: 'Dorme sobre o assunto, que as ideias vêm sozinhas ✨', en: 'Sleep is a wondrous enabler.' },
{ native: 'Ouves? Pois não… está toda a gente a dormir, e tu também devias 😴', en: "Hear that? No… you don't, because everyone is sleeping and you should be too." },
{ native: 'Ouves? Pois não ouves… está toda a gente a dormir, e tu também devias 😴', en: "Hear that? No… you don't, because everyone is sleeping and you should be too." },
// Portuguese proverbs on sleep and haste, in place of the Chinese ones —
// a pack is not a translation of another pack.
{ native: 'Deitar cedo e cedo erguer dá saúde e faz crescer.', en: 'Early to bed and early to rise makes you healthy and helps you grow.' },
@@ -135,7 +144,7 @@ export const ptPT: Pack = {
names: {
cat: 'Gato dorminhoco',
dog: 'Cão contente',
'wiggle-dog': 'Cão abanão',
'wiggle-dog': 'Cão abana-rabo',
butterfly: 'Borboleta',
parrot: 'Papagaio',
},
@@ -170,7 +179,7 @@ export const ptPT: Pack = {
ageIsNotHave: (years) => `Em inglês a idade é com o verbo *to be*, não com *have*: “I am ${years} years old”.`,
agreeIsAVerb: '“Agree” já é o verbo — não leva *to be* à frente: diz-se “I agree”.',
forNotSince: (duration) => `Para uma duração usa-se “for”: “for ${duration}”. O “since” marca o início (since 2020).`,
veryBeforeVerb: (verb) => `“Very” só acompanha adjectivos, não verbos: “really ${verb}”, ou “${verb} … very much”.`,
veryBeforeVerb: (verb) => `“Very” só acompanha adjetivos, não verbos: “really ${verb}”, ou “${verb} … very much”.`,
turnOnNotOpen: (thing, on) => `Em inglês os aparelhos não se abrem nem se fecham — ligam-se e desligam-se: “turn ${on ? 'on' : 'off'} the ${thing}”.`,
althoughOrBut: (word) => `Em inglês usa-se “${word}” ou “but”, nunca os dois na mesma frase.`,
},
@@ -181,8 +190,8 @@ export const ptPT: Pack = {
// que ela queria.
falseFriends: {
actually: {
native: '“Actually” quer dizer *na verdade*, não *actualmente*. Para “actualmente” diz-se “currently” / “nowadays”.',
en: '“Actually” means *in fact*. For the Portuguese *actualmente*, English uses “currently”.',
native: '“Actually” quer dizer *na verdade*, não *atualmente*. Para “atualmente” diz-se “currently” / “nowadays”.',
en: '“Actually” means *in fact*. For the Portuguese *atualmente*, English uses “currently”.',
},
eventually: {
native: '“Eventually” quer dizer *por fim, mais cedo ou mais tarde* — não *eventualmente*. Para isso: “possibly” ou “if necessary”.',
@@ -245,8 +254,8 @@ export const ptPT: Pack = {
en: '“Costume” is fancy dress; *costumes* are “customs”.',
},
deception: {
native: '“Deception” é *engano*. A *decepção* é “disappointment”.',
en: '“Deception” means being misled; *decepção* is “disappointment”.',
native: '“Deception” é *engano*. A *deceção* é “disappointment”.',
en: '“Deception” means being misled; *deceção* is “disappointment”.',
},
injury: {
native: '“Injury” é uma *lesão*. A *injúria* é “insult”.',