mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
added the constructor Noun.NumeralSuperlOrd for phrases like "third largest", which have special linearizations in many languages e.g. German (drittgrösste) and Finnish (kolmanneksi suurin). Implemented for Chi (to check), Dut, Eng, Fin, Ger, Romance, Scand so far
This commit is contained in:
@@ -74,6 +74,10 @@ abstract Noun = Cat ** {
|
||||
OrdNumeral : Numeral -> Ord ; -- fifty-first
|
||||
OrdSuperl : A -> Ord ; -- warmest
|
||||
|
||||
-- One can combine a numeral and a superlative.
|
||||
|
||||
OrdNumeralSuperl : Numeral -> A -> Ord ; -- third largest
|
||||
|
||||
-- Definite and indefinite noun phrases are sometimes realized as
|
||||
-- neatly distinct words (Spanish "un, unos ; el, los") but also without
|
||||
-- any particular word (Finnish; Swedish definites).
|
||||
|
||||
@@ -59,6 +59,7 @@ concrete NounChi of Noun = CatChi ** open ResChi, Prelude in {
|
||||
AdNum adn num = {s = adn.s ++ num.s ; hasC = True} ;
|
||||
|
||||
OrdSuperl a = {s = superlative_s ++ a.s} ;
|
||||
OrdNumeralSuperl n a = {s = ordinal_s ++ n.s ++ superlative_s ++ a.s} ; ---- to check AR 24/8/2014
|
||||
|
||||
DefArt = mkQuant [] [] DTPoss ; -- use that_Quant if you want the_s
|
||||
IndefArt = mkQuant yi_s [] (DTFull Sg) ; -- empty in the plural
|
||||
|
||||
@@ -84,6 +84,8 @@ concrete NounDut of Noun = CatDut ** open ResDut, Prelude in {
|
||||
|
||||
OrdSuperl a = {s = a.s ! Superl} ;
|
||||
|
||||
OrdNumeralSuperl n a = {s = \\af => n.s ! NOrd af ++ a.s ! Superl ! af} ;
|
||||
|
||||
DefArt = {
|
||||
s = \\_,n,g => case <n,g> of {<Sg,Neutr> => "het" ; _ => "de"} ;
|
||||
sp = \\n,g => "die" ;
|
||||
|
||||
@@ -80,6 +80,8 @@ concrete NounEng of Noun = CatEng ** open MorphoEng, ResEng, Prelude in {
|
||||
|
||||
OrdSuperl a = {s = \\c => a.s ! AAdj Superl c } ;
|
||||
|
||||
OrdNumeralSuperl n a = {s = \\c => n.s ! NOrd ! Nom ++ a.s ! AAdj Superl c } ;
|
||||
|
||||
DefArt = {
|
||||
s = \\hasCard,n => artDef ;
|
||||
sp = \\hasCard,n => case <n,hasCard> of {
|
||||
|
||||
@@ -153,6 +153,9 @@ concrete NounFin of Noun = CatFin ** open ResFin, MorphoFin, StemFin, Prelude in
|
||||
|
||||
OrdSuperl a = snoun2nounSep {s = \\nc => a.s ! Superl ! sAN nc ; h = a.h} ;
|
||||
|
||||
OrdNumeralSuperl n a = -- kolmanneksi suurin
|
||||
{s = \\f => n.s ! NOrd (NCase Sg Transl) ++ (snoun2nounSep {s = \\nc => a.s ! Superl ! sAN nc ; h = a.h}).s ! f} ;
|
||||
|
||||
DefArt = {
|
||||
s1 = \\_,_ => [] ;
|
||||
sp = table {Sg => pronSe.s ; Pl => pronNe.s} ;
|
||||
|
||||
@@ -97,6 +97,8 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
||||
|
||||
OrdSuperl a = {s = a.s ! Superl} ;
|
||||
|
||||
OrdNumeralSuperl n a = {s = \\af => n.s ! NOrd APred ++ Predef.BIND ++ a.s ! Superl ! af} ; -- drittbeste
|
||||
|
||||
DefArt = {
|
||||
s = \\_,n,g,c => artDefContr (gennum g n) c ;
|
||||
sp = \\_,n,g,c => artDefContr (gennum g n) c ; ---- deren, denem...
|
||||
|
||||
@@ -97,6 +97,9 @@ incomplete concrete NounRomance of Noun =
|
||||
|
||||
OrdSuperl adj = {s = \\a => adj.s ! Superl ! AF a.g a.n} ;
|
||||
|
||||
OrdNumeralSuperl num adj = {s = \\a => num.s ! NOrd a.g a.n ++ adj.s ! Superl ! AF a.g a.n} ; -- la terza più grande
|
||||
---- could be discontinuous: la terza città più grande
|
||||
|
||||
DefArt = {
|
||||
s = \\_,n,g,c => artDef g n c ;
|
||||
sp = \\n,g,c => artDef g n c ; ---- not for Fre
|
||||
|
||||
@@ -108,6 +108,14 @@ incomplete concrete NounScand of Noun =
|
||||
isDet = True
|
||||
} ;
|
||||
|
||||
OrdNumeralSuperl n a = {
|
||||
s = n.s ! NOrd SupWeak ++ case a.isComp of {
|
||||
True => "mest" ++ a.s ! AF (APosit (Weak Sg)) Nom ;
|
||||
_ => a.s ! AF (ASuperl SupWeak) Nom
|
||||
} ;
|
||||
isDet = True
|
||||
} ;
|
||||
|
||||
DefArt = {
|
||||
s = \\n,bm,bn,g => if_then_Str (orB bm bn) (artDef (gennum (ngen2gen g) n)) [] ;
|
||||
sp = \\n,bm,bn,g => artDef (gennum (ngen2gen g) n) ;
|
||||
|
||||
Reference in New Issue
Block a user