From 472d7fb9d37ec838fc69692cf24c8cb4a68af47a Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 12 Jan 2026 15:43:27 +0100 Subject: Various fixes on adjective inflection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This includes providing tests and fixes for feminine adjectives with contracted roots, and feminine versions of "unus nauta" adjectives. Signed-off-by: Miquel Sabaté Solà --- lib/mihi/src/lib.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/mihi/src/lib.rs b/lib/mihi/src/lib.rs index 78400f2..57dc93f 100644 --- a/lib/mihi/src/lib.rs +++ b/lib/mihi/src/lib.rs @@ -999,11 +999,11 @@ fn contract_root(word: &Word, case: usize, number: usize, gender: usize) -> bool return true; } - // Nominative/vocative singular are never contracted. The accusative is - // only not contracted on neuter words. + // Nominative/vocative singular are only contracted for feminine nouns. The + // accusative is only not contracted on neuter words. match case { - 0 | 1 => false, - 2 => gender != 3, + 0 | 1 => gender == Gender::Feminine as usize, + 2 => gender != Gender::Neuter as usize, _ => true, } } @@ -1095,7 +1095,8 @@ pub fn group_declension_inflections( "SELECT id, number, gender, \"case\", value, declension_id, \ kind, tense, mood, voice, person, conjugation_id \ FROM forms \ - WHERE kind = ?1 AND gender = ?2", + WHERE kind = ?1 AND gender = ?2 + ORDER BY id", ) .unwrap(); let mut it = stmt.query([kind, &gender.to_string()]).unwrap(); -- cgit v1.2.3