mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
(Eng) Remove more+most from inflection table of A*
A* has a parameter and the string more/most is added later if needed.
This commit is contained in:
@@ -7,11 +7,11 @@ concrete AdjectiveEng of Adjective = CatEng ** open ResEng, Prelude in {
|
||||
isPre = a.isPre
|
||||
} ;
|
||||
ComparA a np = {
|
||||
s = \\_ => a.s ! AAdj Compar Nom ++ "than" ++ np.s ! npNom ;
|
||||
s = \\_ => getCompar Nom a ++ "than" ++ np.s ! npNom ;
|
||||
isPre = False
|
||||
} ;
|
||||
UseComparA a = {
|
||||
s = \\_ => a.s ! AAdj Compar Nom ;
|
||||
s = \\_ => getCompar Nom a ;
|
||||
isPre = a.isPre
|
||||
} ;
|
||||
|
||||
|
||||
@@ -97,8 +97,8 @@ concrete CatEng of Cat = CommonX - [Pol,CAdv] ** open ResEng, Prelude in {
|
||||
VV = {s : VVForm => Str ; p : Str ; typ : VVType} ;
|
||||
V2V = Verb ** {c2,c3 : Str ; typ : VVType} ;
|
||||
|
||||
A = {s : AForm => Str ; isPre : Bool} ;
|
||||
A2 = {s : AForm => Str ; c2 : Str ; isPre : Bool} ;
|
||||
A = ResEng.Adjective ;
|
||||
A2 = ResEng.Adjective ** {c2 : Str} ;
|
||||
|
||||
N = {s : Number => Case => Str ; g : Gender} ;
|
||||
N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ;
|
||||
@@ -118,8 +118,8 @@ concrete CatEng of Cat = CommonX - [Pol,CAdv] ** open ResEng, Prelude in {
|
||||
VV = \s -> {s = \\_ => s; p = ""; isRefl = False; typ = VVInf} ;
|
||||
V2V = \s -> {s = \\_ => s; p = ""; isRefl = False; c2,c3="" ; typ = VVInf} ;
|
||||
|
||||
A = \s -> {s = \\_ => s; isPre = True} ;
|
||||
A2 = \s -> {s = \\_ => s; c2 = ""; isPre = True} ;
|
||||
A = \s -> {s = \\_ => s; isPre = True ; isMost = False} ;
|
||||
A2 = \s -> {s = \\_ => s; c2 = ""; isPre = True ; isMost = False} ;
|
||||
|
||||
N = \s -> {s = \\_,_ => s; g = Neutr} ;
|
||||
N2 = \s -> {s = \\_,_ => s; c2 = ""; g = Neutr} ;
|
||||
|
||||
@@ -44,8 +44,8 @@ lin
|
||||
s2 = frameTable (
|
||||
tr (th "" ++ th "nom" ++ th "gen") ++
|
||||
tr (th "posit" ++ td (adj.s ! AAdj Posit Nom) ++ td (adj.s ! AAdj Posit Gen)) ++
|
||||
tr (th "compar" ++ td (adj.s ! AAdj Compar Nom) ++ td (adj.s ! AAdj Compar Gen)) ++
|
||||
tr (th "superl" ++ td (adj.s ! AAdj Superl Nom) ++ td (adj.s ! AAdj Superl Gen))
|
||||
tr (th "compar" ++ td (getCompar Nom adj) ++ td (getCompar Gen adj)) ++
|
||||
tr (th "superl" ++ td (getSuperl Nom adj) ++ td (getSuperl Gen adj))
|
||||
) ++
|
||||
heading1 "Adverb" ++
|
||||
paragraph (adj.s ! AAdv)
|
||||
|
||||
@@ -35,9 +35,8 @@ lin
|
||||
s1 = heading1 (heading adjective_Category) ;
|
||||
s2 = frameTable (
|
||||
tr (th (heading positive_Parameter) ++ tdf (adj.s ! AAdj Posit Nom)) ++
|
||||
tr (th (heading comparative_Parameter) ++ tdf (adj.s ! AAdj Compar Nom)) ++
|
||||
tr (th (heading superlative_Parameter) ++ tdf (adj.s ! AAdj Superl Nom)) ++
|
||||
tr (th (heading adverb_Category) ++ tdf (adj.s ! AAdv))
|
||||
tr (th (heading comparative_Parameter) ++ tdf (getCompar Nom adj)) ++
|
||||
tr (th (heading superlative_Parameter) ++ tdf (getSuperl Nom adj)) ++
|
||||
tr (th (heading adverb_Category) ++ tdf (adj.s ! AAdv))
|
||||
)
|
||||
} ;
|
||||
|
||||
@@ -84,9 +84,9 @@ concrete NounEng of Noun = CatEng ** open MorphoEng, ResEng, Prelude in {
|
||||
sp = \\_,c => adn.s ++ num.sp!False!c ;
|
||||
n = num.n} ;
|
||||
|
||||
OrdSuperl a = {s = \\c => a.s ! AAdj Superl c } ;
|
||||
OrdSuperl a = {s = \\c => getSuperl c a} ;
|
||||
|
||||
OrdNumeralSuperl n a = {s = \\c => n.s ! True ! NOrd ! Nom ++ a.s ! AAdj Superl c } ;
|
||||
OrdNumeralSuperl n a = {s = \\c => n.s ! True ! NOrd ! Nom ++ getSuperl c a} ;
|
||||
|
||||
DefArt = {
|
||||
s = \\hasCard,n => artDef ;
|
||||
|
||||
@@ -510,8 +510,9 @@ mkInterj : Str -> Interj
|
||||
(fat + last fat + "er") (fat + last fat + "est") (adj2adv fat) ;
|
||||
|
||||
compoundADeg a =
|
||||
let ad = (a.s ! AAdj Posit Nom)
|
||||
in mkADeg ad ("more" ++ ad) ("most" ++ ad) (a.s ! AAdv) ;
|
||||
let ad : Str = a.s ! AAdj Posit Nom ;
|
||||
a' : Adjective = mkADeg ad nonExist nonExist (a.s ! AAdv) ;
|
||||
in a' ** {isMost = True} ;
|
||||
|
||||
adegA a = a ;
|
||||
|
||||
@@ -677,14 +678,17 @@ mkInterj : Str -> Interj
|
||||
mkAdjective a b c d
|
||||
} ;
|
||||
|
||||
invarA s = mkAdjective s s s s ;
|
||||
invarA s = lin A {
|
||||
s = \\_ => s ;
|
||||
isPre = True ;
|
||||
isMost = False} ;
|
||||
|
||||
compoundA = compoundADeg ;
|
||||
simpleA a =
|
||||
let ad = (a.s ! AAdj Posit Nom)
|
||||
in regADeg ad ;
|
||||
|
||||
irregAdv a adv = lin A {s = table {AAdv => adv; aform => a.s ! aform}; isPre = a.isPre} ;
|
||||
irregAdv a adv = a ** {s = table {AAdv => adv; aform => a.s ! aform}} ;
|
||||
|
||||
prepA2 : A -> Prep -> A2 ;
|
||||
|
||||
|
||||
@@ -141,15 +141,37 @@ param
|
||||
}
|
||||
} ;
|
||||
|
||||
mkAdjective : (_,_,_,_ : Str) -> {s : AForm => Str; isPre : Bool; lock_A : {}} =
|
||||
\good,better,best,well -> lin A {
|
||||
s = table {
|
||||
AAdj Posit c => (regGenitiveS good) ! c ;
|
||||
AAdj Compar c => (regGenitiveS better) ! c ;
|
||||
AAdj Superl c => (regGenitiveS best) ! c ;
|
||||
AAdv => well
|
||||
} ;
|
||||
isPre = True
|
||||
Adjective : Type = {s : AForm => Str ; isPre, isMost : Bool} ;
|
||||
mkAdjective : (_,_,_,_ : Str) -> Adjective = \good,better,best,well ->
|
||||
let adjCompar : Adjective = {
|
||||
s = table {
|
||||
AAdj Posit c => (regGenitiveS good) ! c ;
|
||||
AAdj Compar c => (regGenitiveS better) ! c ;
|
||||
AAdj Superl c => (regGenitiveS best) ! c ;
|
||||
AAdv => well
|
||||
} ;
|
||||
isPre = True ;
|
||||
isMost = False ;
|
||||
} ;
|
||||
in case better of {
|
||||
"more" + _
|
||||
=> adjCompar ** {
|
||||
s = table {
|
||||
AAdj Posit c => adjCompar.s ! AAdj Posit c ;
|
||||
AAdv => adjCompar.s ! AAdv ;
|
||||
_ => nonExist } ; -- IL 06/2021. Replace with an actual string, if this causes problems.
|
||||
isMost = True } ;
|
||||
_ => adjCompar
|
||||
} ;
|
||||
|
||||
-- IL 06/2021: remove "more" and "most" from A & A2's inflection table
|
||||
getCompar : Case -> Adjective -> Str = \c,a -> case a.isMost of {
|
||||
True => "more" ++ a.s ! AAdj Posit c ;
|
||||
False => a.s ! AAdj Compar c
|
||||
} ;
|
||||
getSuperl : Case -> Adjective -> Str = \c,a -> case a.isMost of {
|
||||
True => "most" ++ a.s ! AAdj Posit c ;
|
||||
False => a.s ! AAdj Superl c
|
||||
} ;
|
||||
|
||||
mkVerb : (_,_,_,_,_ : Str) -> Verb =
|
||||
|
||||
Reference in New Issue
Block a user