One engine
The charts, the tables on every page, the worksheets and their answer keys all take their words from a single function in the site’s source (src/lib/italianNumbers.ts). Nothing is typed in by hand, so a word that is right in the chart is right on the sheet.
A second derivation
The checker (scripts/check-italian-numbers.mjs) was written before the engine, without reading it, and works differently: it writes each number as a chain of parts (cento | venti | otto) and then applies each spelling rule as a rewrite at the joins, where the engine applies the rules as it builds. Both have to agree, letter for letter, on every cardinal from 0 to 1,000,000 and every ordinal from 1 to 100, and on 40 forms quoted directly from the sources below. The current run makes 3,000,145 checks and finds no difference.
The decisions, and their sources
| Rule | As printed | Source |
|---|---|---|
| A ten drops its last vowel before uno and otto | ventuno, ventotto, novantuno, novantotto | Faloppa, Enciclopedia dell’Italiano: "ventuno [e non *ventiuno]" |
| A compound ending in tre is written tré; tre alone and tre inside a longer word are not | tre, ventitré, centotré, ventitremila | Faloppa: "I composti di tre vanno accentati"; Treccani Vocabolario, tre 〈tré〉 |
| cento and mille take no un | cento, mille | Treccani Vocabolario, cento and mille |
| cento keeps its o before uno, otto and undici (the usual forms; the elided ones are accepted in keys) | centouno, centootto, centoundici | Faloppa: "centouno [raramente centuno], centootto [raramente centotto]" |
| cento drops its o before ottanta | centottanta, centottantotto | Faloppa limits the uncommon elision to uno, otto, undici |
| mille does not elide | milleuno, milleottocento | Faloppa: "milleuno [non *milluno]" |
| Thousands from two use mila joined to the full number | duemila, ventunomila, duecentomila | Treccani Vocabolario, mila: duemila, duecentomila |
| A million is two words, un milione | un milione | Faloppa; Treccani Vocabolario, milione |
Where usage varies
Two forms on the sheets have a written alternative, and the answer key prints it so a teacher can accept it: centootto (also centotto, in every number containing it) and ventunomila (also ventunmila). Treccani’s Enciclopedia dell’Italiano also notes some wavering over the accent on ventitré; the site follows its rule and prints the accent. Large numbers can also be written in separate words (cinque mila); the sheets print the joined forms, which are the ones Treccani gives first.
What else the tests cover
Beyond the words, the worksheet tests check that a recipe rebuilds the identical sheet, that the pupils’ PDF carries no answers and the key carries them all, that every page of every exercise fits on A4, that every character prints in the PDF font, and that the long words above 10,000 fit their column. They run before every release. The generator is where all of it ends up.