Add Luxembourgish language support - #134
Merged
Merged
Conversation
Gated behind a new `lang-luxembourgish` feature and selected with `--language luxembourgish`. Luxembourgish is the first generator to need grammatical gender and join-time sandhi: - Nouns carry a gender (m/f/n) and adjectives carry all three agreeing forms, so nothing is derived at runtime and the irregulars – héich -> héijen, gutt -> gudden – are plain data. - The Eifeler Regel drops a final -n/-nn at each join unless the next word begins with n, d, t, z, h or a vowel. The word lists are best-effort seed lists awaiting native-speaker review. To keep curation honest, a unit test lints the built-in adjective forms and the `luxembourgish!` macro rejects entries that contradict one another, so a slip fails the build rather than showing up in generated names.
`Petnames::retain` judged an adjective by its base form alone, so an emphatic form like `kıpkırmızı` (10 characters) could still be emitted under `--letters 6`. Drop an emphatic that fails the predicate on its own, which keeps the base adjective in play rather than discarding both.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Luxembourgish (Lëtzebuergesch) as a third language, behind a non-default
lang-luxembourgishfeature and selected with--language luxembourgish. It follows the pattern established by Turkish – a distinct type implementingGenerator, duplicated rather than abstracted – but it's the first generator to need two things English and Turkish didn't.Gender agreement. Every noun is masculine, feminine, or neuter, and an attributive adjective agrees with it in the articleless strong nominative: masculine
-en(groussen Hond), feminine bare (grouss Kaz), neuter-t(grousst Haus). Irregulars are common enough – héich → héijen, gutt → gudden, rout → rouden – that each adjective carries all three forms as data rather than deriving them, so a wrong irregular is a fixable line in a text file rather than a bug in a morphology engine.generate_intopicks the noun first, even though it's emitted last, because the noun fixes the gender.The Eifeler Regel. A final
-nor-nndrops before a word beginning with anything other thann, d, t, z, hor a vowel. This is applied at the join, which is what the "Generatorowns the whole buffer" design was for:The separator plays no part – the rule is about the sounds either side of the join – and the last word of a name is phrase-final, so it always keeps its
-n.Word lists need a native-speaker pass
words/luxembourgish/*are best-effort seed lists authored by a non-native speaker. The genders in particular, and a handful of adjective forms, want review; the file headers say so. Two guard rails make that curation safer:-n, and the neuter is the feminine plus-texcept after a stem-final-t/-d. Real exceptions go in anIRREGULAR_NEUTERconst. This already caught one bad entry (rouden:rout:routt).luxembourgish!macro now rejects entries that contradict each other rather than silently keeping the first, e.g.noun 'kaz' appears twice with different genders: Feminine and Masculine.The one open linguistic question is whether adjectival
-nnreally reduces all the way (ronn+bir→ro-bir). The documented rule says final-nand-nnboth go, and that's what's implemented, but it's the first thing worth checking with a native speaker. It's a one-line change if the answer is no.Second commit
Apply --letters to Turkish emphatic adjective formsis an unrelated pre-existing bug found while reviewing the Luxembourgish equivalent:Petnames::retainjudged a Turkish adjective by its base form alone, so--letters 6could still emitçırılçıplak(11 characters). It's kept as a separate commit and can be split into its own PR if preferred.Verification
cargo fmt --check;cargo clippy --workspace --all-features --all-targets -D warnings; the full test suite;cargo hack --workspace --feature-powerset test(321 test binaries, 0 failures);scripts/doc; andscripts/semver-checks, which reports no semver update required – everything here is additive, so this is a minor bump when released.