mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 01:18:57 -06:00
(Som) Add superlatives
This commit is contained in:
@@ -40,7 +40,9 @@ concrete AdjectiveSom of Adjective = CatSom ** open ResSom, Prelude in {
|
|||||||
-- The superlative use is covered in $Ord$.
|
-- The superlative use is covered in $Ord$.
|
||||||
|
|
||||||
-- : Ord -> AP ; -- warmest
|
-- : Ord -> AP ; -- warmest
|
||||||
-- AdjOrd ord = ord ** {} ;
|
AdjOrd ord = ord ** {
|
||||||
|
compar = []
|
||||||
|
} ;
|
||||||
|
|
||||||
-- Sentence and question complements defined for all adjectival
|
-- Sentence and question complements defined for all adjectival
|
||||||
-- phrases, although the semantics is only clear for some adjectives.
|
-- phrases, although the semantics is only clear for some adjectives.
|
||||||
|
|||||||
@@ -66,7 +66,10 @@ concrete CatSom of Cat = CommonX - [Adv,IAdv] ** open ResSom, Prelude in {
|
|||||||
Predet = {s : Str ; da : DefArticle ; isPoss : Bool} ;
|
Predet = {s : Str ; da : DefArticle ; isPoss : Bool} ;
|
||||||
Quant = ResSom.Quant ;
|
Quant = ResSom.Quant ;
|
||||||
Num = ResSom.Num ;
|
Num = ResSom.Num ;
|
||||||
Ord = {s : Str ; n : Number} ;
|
Ord = {
|
||||||
|
s : AForm => Str ; -- Ord can came from AP and become AP again
|
||||||
|
n : Number -- Ord can come from Num, which has inherent number
|
||||||
|
} ;
|
||||||
DAP = ResSom.Determiner ;
|
DAP = ResSom.Determiner ;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -141,9 +141,9 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
|||||||
-- : Quant -> Num -> Ord -> Det ; -- these five best
|
-- : Quant -> Num -> Ord -> Det ; -- these five best
|
||||||
DetQuantOrd quant num ord =
|
DetQuantOrd quant num ord =
|
||||||
let theseFive = DetQuant quant num in theseFive ** {
|
let theseFive = DetQuant quant num in theseFive ** {
|
||||||
s = \\g,c => theseFive.s ! g ! c ++ ord.s ;
|
s = \\g,c => theseFive.s ! g ! c ++ ord.s ! AF num.n c ;
|
||||||
sp = \\g,c => theseFive.sp ! g ! c ++ ord.s ;
|
sp = \\g,c => theseFive.sp ! g ! c ++ ord.s ! AF num.n c ;
|
||||||
shortPoss = \\da => theseFive.shortPoss ! da ++ ord.s
|
shortPoss = \\da => theseFive.shortPoss ! da ++ ord.s ! AF num.n Abs
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Whether the resulting determiner is singular or plural depends on the
|
-- Whether the resulting determiner is singular or plural depends on the
|
||||||
@@ -173,17 +173,20 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
|||||||
OrdDigits digs = digs ** { s = digs.s ! NOrd } ;
|
OrdDigits digs = digs ** { s = digs.s ! NOrd } ;
|
||||||
-}
|
-}
|
||||||
-- : Numeral -> Ord ;
|
-- : Numeral -> Ord ;
|
||||||
OrdNumeral num = num ** {s = num.ord} ;
|
OrdNumeral num = num ** {
|
||||||
|
s = \\_ => num.ord
|
||||||
|
} ;
|
||||||
|
|
||||||
{-
|
|
||||||
-- : A -> Ord ;
|
-- : A -> Ord ;
|
||||||
OrdSuperl a = { } ;
|
OrdSuperl a = {
|
||||||
|
s = \\af => "ugu" ++ a.s ! af ;
|
||||||
|
n = Sg -- ?? is this meaningful?
|
||||||
|
} ;
|
||||||
|
|
||||||
-- One can combine a numeral and a superlative.
|
-- One can combine a numeral and a superlative.
|
||||||
|
|
||||||
-- : Numeral -> A -> Ord ; -- third largest
|
-- : Numeral -> A -> Ord ; -- third largest
|
||||||
OrdNumeralSuperl num a = num ** { } ;
|
-- OrdNumeralSuperl num a = num ** { } ;
|
||||||
-}
|
|
||||||
|
|
||||||
-- : Quant
|
-- : Quant
|
||||||
DefArt = defQuant "a" "kan" "tan" "kuwan" False ;
|
DefArt = defQuant "a" "kan" "tan" "kuwan" False ;
|
||||||
|
|||||||
@@ -22,3 +22,11 @@ Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQ
|
|||||||
-- LangEng: that cat is bigger than this cat
|
-- LangEng: that cat is bigger than this cat
|
||||||
LangSom: bisad BIND daasi bisad BIND dan waa ka weyn tahay
|
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
|
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: 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
|
||||||
|
|
||||||
|
-- LangEng: cat is the biggest animal that I saw
|
||||||
|
LangSom: bisadi waa xayawaan BIND ka ugu weyn aan arkay
|
||||||
|
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (MassNP (UseN cat_N)) (UseComp (CompNP (DetCN (DetQuantOrd DefArt NumSg (OrdSuperl big_A)) (RelCN (UseN animal_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (UsePron i_Pron) (SlashV2a see_V2)))))))))
|
||||||
|
|||||||
Reference in New Issue
Block a user