Fix AdjCN to include comparative NP (ComparA)

AdjCN currently ignores the 'compar' field from AP, causing the NP in
comparative constructions (ComparA) to be dropped.

Example:
- Expected: "guri ka weyn baabuur"
- Actual:   "guri ka weyn"

This change appends ap.compar in AdjCN, preserving the comparison NP.

A corresponding test has been added to src/somali/unittest/ap.gftest.
This commit is contained in:
Abdirahman Ahmed
2026-04-17 12:00:51 +02:00
committed by Inari Listenmaa
parent be0fb1f7c1
commit 90d8897bf9
2 changed files with 5 additions and 1 deletions

View File

@@ -250,7 +250,7 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
mod = \\st,n,c =>
cn.mod ! st ! n ! Abs -- If there was something before, it is now in Abs
++ andConj st cn.modtype -- If the sentence is already modified, any new modifier needs to be introduced with conjunction
++ ap.s ! AF n c ;
++ ap.s ! AF n c ++ " " ++ ap.compar ;
modtype = AMod
} ;

View File

@@ -23,6 +23,10 @@ Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQ
LangSom: bisad BIND daasi bisad BIND dan waa ka weyn tahay
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant that_Quant NumSg) (UseN cat_N)) (UseComp (CompAP (ComparA big_A (DetCN (DetQuant this_Quant NumSg) (UseN cat_N)))))))) NoVoc
-- LangEng: house bigger than car
LangSom: guri ka weyn baabuur
Lang: PhrUtt NoPConj (UttNP (AdjCN (ComparA big_A (MassNP (UseN car_N))) (UseN house_N))) NoVoc
-- LangEng: that cat is biggest
LangSom: bisad BIND daasi waa ugu weyn tahay
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant that_Quant NumSg) (UseN cat_N)) (UseComp (CompAP (AdjOrd (OrdSuperl big_A))))))) NoVoc