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
|
isPre = a.isPre
|
||||||
} ;
|
} ;
|
||||||
ComparA a np = {
|
ComparA a np = {
|
||||||
s = \\_ => a.s ! AAdj Compar Nom ++ "than" ++ np.s ! npNom ;
|
s = \\_ => getCompar Nom a ++ "than" ++ np.s ! npNom ;
|
||||||
isPre = False
|
isPre = False
|
||||||
} ;
|
} ;
|
||||||
UseComparA a = {
|
UseComparA a = {
|
||||||
s = \\_ => a.s ! AAdj Compar Nom ;
|
s = \\_ => getCompar Nom a ;
|
||||||
isPre = a.isPre
|
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} ;
|
VV = {s : VVForm => Str ; p : Str ; typ : VVType} ;
|
||||||
V2V = Verb ** {c2,c3 : Str ; typ : VVType} ;
|
V2V = Verb ** {c2,c3 : Str ; typ : VVType} ;
|
||||||
|
|
||||||
A = {s : AForm => Str ; isPre : Bool} ;
|
A = ResEng.Adjective ;
|
||||||
A2 = {s : AForm => Str ; c2 : Str ; isPre : Bool} ;
|
A2 = ResEng.Adjective ** {c2 : Str} ;
|
||||||
|
|
||||||
N = {s : Number => Case => Str ; g : Gender} ;
|
N = {s : Number => Case => Str ; g : Gender} ;
|
||||||
N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ;
|
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} ;
|
VV = \s -> {s = \\_ => s; p = ""; isRefl = False; typ = VVInf} ;
|
||||||
V2V = \s -> {s = \\_ => s; p = ""; isRefl = False; c2,c3="" ; typ = VVInf} ;
|
V2V = \s -> {s = \\_ => s; p = ""; isRefl = False; c2,c3="" ; typ = VVInf} ;
|
||||||
|
|
||||||
A = \s -> {s = \\_ => s; isPre = True} ;
|
A = \s -> {s = \\_ => s; isPre = True ; isMost = False} ;
|
||||||
A2 = \s -> {s = \\_ => s; c2 = ""; isPre = True} ;
|
A2 = \s -> {s = \\_ => s; c2 = ""; isPre = True ; isMost = False} ;
|
||||||
|
|
||||||
N = \s -> {s = \\_,_ => s; g = Neutr} ;
|
N = \s -> {s = \\_,_ => s; g = Neutr} ;
|
||||||
N2 = \s -> {s = \\_,_ => s; c2 = ""; g = Neutr} ;
|
N2 = \s -> {s = \\_,_ => s; c2 = ""; g = Neutr} ;
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ lin
|
|||||||
s2 = frameTable (
|
s2 = frameTable (
|
||||||
tr (th "" ++ th "nom" ++ th "gen") ++
|
tr (th "" ++ th "nom" ++ th "gen") ++
|
||||||
tr (th "posit" ++ td (adj.s ! AAdj Posit Nom) ++ td (adj.s ! AAdj Posit 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 "compar" ++ td (getCompar Nom adj) ++ td (getCompar Gen adj)) ++
|
||||||
tr (th "superl" ++ td (adj.s ! AAdj Superl Nom) ++ td (adj.s ! AAdj Superl Gen))
|
tr (th "superl" ++ td (getSuperl Nom adj) ++ td (getSuperl Gen adj))
|
||||||
) ++
|
) ++
|
||||||
heading1 "Adverb" ++
|
heading1 "Adverb" ++
|
||||||
paragraph (adj.s ! AAdv)
|
paragraph (adj.s ! AAdv)
|
||||||
|
|||||||
@@ -35,9 +35,8 @@ lin
|
|||||||
s1 = heading1 (heading adjective_Category) ;
|
s1 = heading1 (heading adjective_Category) ;
|
||||||
s2 = frameTable (
|
s2 = frameTable (
|
||||||
tr (th (heading positive_Parameter) ++ tdf (adj.s ! AAdj Posit Nom)) ++
|
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 comparative_Parameter) ++ tdf (getCompar Nom adj)) ++
|
||||||
tr (th (heading superlative_Parameter) ++ tdf (adj.s ! AAdj Superl Nom)) ++
|
tr (th (heading superlative_Parameter) ++ tdf (getSuperl Nom adj)) ++
|
||||||
tr (th (heading adverb_Category) ++ tdf (adj.s ! AAdv))
|
|
||||||
tr (th (heading adverb_Category) ++ tdf (adj.s ! AAdv))
|
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 ;
|
sp = \\_,c => adn.s ++ num.sp!False!c ;
|
||||||
n = num.n} ;
|
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 = {
|
DefArt = {
|
||||||
s = \\hasCard,n => artDef ;
|
s = \\hasCard,n => artDef ;
|
||||||
|
|||||||
@@ -510,8 +510,9 @@ mkInterj : Str -> Interj
|
|||||||
(fat + last fat + "er") (fat + last fat + "est") (adj2adv fat) ;
|
(fat + last fat + "er") (fat + last fat + "est") (adj2adv fat) ;
|
||||||
|
|
||||||
compoundADeg a =
|
compoundADeg a =
|
||||||
let ad = (a.s ! AAdj Posit Nom)
|
let ad : Str = a.s ! AAdj Posit Nom ;
|
||||||
in mkADeg ad ("more" ++ ad) ("most" ++ ad) (a.s ! AAdv) ;
|
a' : Adjective = mkADeg ad nonExist nonExist (a.s ! AAdv) ;
|
||||||
|
in a' ** {isMost = True} ;
|
||||||
|
|
||||||
adegA a = a ;
|
adegA a = a ;
|
||||||
|
|
||||||
@@ -677,14 +678,17 @@ mkInterj : Str -> Interj
|
|||||||
mkAdjective a b c d
|
mkAdjective a b c d
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
invarA s = mkAdjective s s s s ;
|
invarA s = lin A {
|
||||||
|
s = \\_ => s ;
|
||||||
|
isPre = True ;
|
||||||
|
isMost = False} ;
|
||||||
|
|
||||||
compoundA = compoundADeg ;
|
compoundA = compoundADeg ;
|
||||||
simpleA a =
|
simpleA a =
|
||||||
let ad = (a.s ! AAdj Posit Nom)
|
let ad = (a.s ! AAdj Posit Nom)
|
||||||
in regADeg ad ;
|
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 ;
|
prepA2 : A -> Prep -> A2 ;
|
||||||
|
|
||||||
|
|||||||
@@ -141,15 +141,37 @@ param
|
|||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkAdjective : (_,_,_,_ : Str) -> {s : AForm => Str; isPre : Bool; lock_A : {}} =
|
Adjective : Type = {s : AForm => Str ; isPre, isMost : Bool} ;
|
||||||
\good,better,best,well -> lin A {
|
mkAdjective : (_,_,_,_ : Str) -> Adjective = \good,better,best,well ->
|
||||||
s = table {
|
let adjCompar : Adjective = {
|
||||||
AAdj Posit c => (regGenitiveS good) ! c ;
|
s = table {
|
||||||
AAdj Compar c => (regGenitiveS better) ! c ;
|
AAdj Posit c => (regGenitiveS good) ! c ;
|
||||||
AAdj Superl c => (regGenitiveS best) ! c ;
|
AAdj Compar c => (regGenitiveS better) ! c ;
|
||||||
AAdv => well
|
AAdj Superl c => (regGenitiveS best) ! c ;
|
||||||
} ;
|
AAdv => well
|
||||||
isPre = True
|
} ;
|
||||||
|
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 =
|
mkVerb : (_,_,_,_,_ : Str) -> Verb =
|
||||||
|
|||||||
Reference in New Issue
Block a user