Files
heidi/lib
CatoandClaude Opus 5 dfde0301b4 feat(vocabulary): what a word is beyond what it means, and drills built from it (#71)
* feat(vocabulary): room for what a word actually needs — article, forms, example

A vocabulary entry was a pair of strings. That is a glossary, and a glossary is
the thing a learner reads once. What makes a word usable is the part that was
missing: which article it takes, what its forms are, and a sentence it lives in.

THE SCHEMA IS BUILT TO MAKE THE WRONG THING UNREPRESENTABLE, because this is
the exact place a language product starts quietly inventing.

`Article` is a closed set of three — `de`, `d`, `s`. A free string would let
`der` into the field, which is a German article presented as a Zurich one: the
invisible error §2 is entirely about, aimed at somebody who cannot detect it. A
test refuses anything outside the three.

`FormLabel` is closed for the reason the follow-up moves are: the label is
rendered in seven languages, so it has to be a key a dictionary can translate.
"du-Form" in a Russian interface is not a translation, it is German leaking.

Everything is OPTIONAL, and that is the load-bearing part. A noun whose gender
nobody here has checked carries no article. Absence is honest; a guess is a
confident falsehood that a learner will repeat for a year.

Five guards, because an article, a paradigm and an example are CLAIMS ABOUT THE
LANGUAGE — a different kind of statement from a gloss, needing its own
guarantees:

- an article must be one of the variety's three;
- any entry carrying an article, forms or an example must name a source, since
  this repo does not publish an assertion about the language that names nobody;
- an example sentence faces the variety gate, exactly as every generated line
  does — a reference page teaching a Bernese form would be worse than a model
  doing it;
- an example must actually contain the word it illustrates;
- a form may not equal its own headword, which is what a row filled in to make
  a table look complete looks like.

Example sentences are to be WRITTEN for this product, never lifted: the open
resources for this variety are overwhelmingly research-licensed, so a copied
sentence is a licence problem wearing the costume of a teaching aid — and later
nobody could tell which sentences were safe.

Also adds the article exercise to the practice engine: objectively markable,
because the answer set is closed at three and the answer is a field in the
pack. Nothing is inferred and no model is asked. A noun with no declared
article produces no item rather than a guess.

No content yet — the fields are empty and every guard passes vacuously. That is
deliberate: the structure and its rules land first, so the words can be added
against a standard instead of into one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* feat(practice): paradigm and article drills, with distractors that are real forms

Two more objectively-markable item kinds, and both are objective for the same
reason: the answer set is closed and comes out of the pack, so nothing is
inferred and no model is consulted.

`article` — which of `de`, `d`, `s` the noun takes. All three are always
offered; showing only the plausible two would leak the answer. This is the
error a German reader is least able to avoid, because gender is carried by a
word they never had to learn, so *der Velo* survives a hundred correct readings
of the noun.

`form` — which form goes with which person, one item per row of the paradigm.
A verb with four forms is four questions: the paradigm is the thing being
learned, and asking only about its first row teaches the first row.

THE DISTRACTORS ARE THE VERB'S OWN OTHER FORMS, which is the whole reason this
can exist here. A generated drill normally has to invent plausible wrong
answers, and inventing a plausible wrong Zurich form is precisely the thing
this product refuses to do — it would be indistinguishable, to the learner,
from a right one. Choosing between `bi`, `bisch` and `isch` needs nothing
invented: they are all real, and only one is in the right row.

Three forms minimum. Two options is a coin toss and one is not a question.

And the guarantee that matters more than any item: a noun with no declared
article produces NO item, and a thin paradigm is not asked about at all. The
schema keeps both fields optional so that "nobody here has checked this" stays
expressible; an exercise that quietly filled the gap would be the one place in
the product that invents language. Both are pinned by tests.

Still no content — every one of these generates zero items today, and the
tests pass by asserting that correctly. The drills light up when the words do.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* feat(vocabulary): give the words genders, forms and a sentence

The vocabulary list said what a word MEANS and nothing else, so an article
drill was impossible and a paradigm had nowhere to live. Three fields, all
optional: `article` ("de" | "d" | "s" — a closed set, so the German `der` is
unrepresentable), `forms`, and one `example` pair.

Optional is the point. "Nobody has checked this" has to stay expressible, and
a generator that quietly filled a missing gender would be the one place in
this product that invents language. `articleItems` skips any noun without a
declared article, and a test walks the pack to prove it.

The content: three nouns, one per gender, and the `ha` paradigm. Every string
already appears in this pack's own grammar examples — `De Maa, wo dört staht`,
`S Dach vom Huus`, `Häsch du am Samschtig scho öppis vor?`. Nothing below is a
new claim about Zurich German; it is claims the pack already makes, promoted
into the vocabulary where a learner can find them. The nouns also make the
drill possible at all: every noun the list had was neuter, four of them `-li`
diminutives, and an exercise whose answer is always `s` is not an exercise.

Sourcing rules are recorded at the top of `vocabulary`, checked against the
actual licences rather than against what is readable online. SDS (CC BY-SA
4.0) is cited as the evidence for the article system — map 3869 gives `də` at
66/66 Zurich points, map 3866 `s` at 66/66, while map 3870 is split 57/48
INSIDE the canton. The Idiotikon's CC BY-SA covers its API only; the scans
carry no licence at all. ArchiMob, SwissCrawl, the SMS corpus and Weber 1948
are consult-only and named as such. So every example sentence here is written
here.

The provenance test now follows its pointers instead of checking a kind
string, which caught a real gap: half the pairs come from `bridgeRules`, which
are derived and absent from `pack.rules`.

Still outstanding is the thing HEIDI.md §9 already names: no native Zurich
speaker has reviewed any of it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-17 08:44:44 -07:00
..