1
0
forked from GitHub/gf-rgl

(Hun) Make comparative discontinuous

This commit is contained in:
Inari Listenmaa
2020-04-17 14:45:44 +02:00
parent 738dd44ec8
commit cc85e4aaeb
4 changed files with 36 additions and 16 deletions

View File

@@ -5,11 +5,14 @@ concrete AdjectiveHun of Adjective = CatHun ** open ResHun, Prelude in {
lin
-- : A -> AP ;
PositA a = {s = a.s ! Posit} ;
PositA a = emptyAP ** {
s = a.s ! Posit
} ;
-- : A -> NP -> AP ;
ComparA a np = a ** {
s = \\n => a.s ! Compar ! n ++ np.s ! Ade ;
ComparA a np = emptyAP ** {
s = a.s ! Compar ;
compar = np.s ! Ade ;
} ;
-- : A2 -> NP -> AP ; -- married to her
@@ -22,20 +25,20 @@ concrete AdjectiveHun of Adjective = CatHun ** open ResHun, Prelude in {
UseA2 = PositA ;
-- : A -> AP ; -- warmer
UseComparA a = a ** {
s = \\n => a.s ! Compar ! n ;
UseComparA a = emptyAP ** {
s = a.s ! Compar ;
} ;
-- : CAdv -> AP -> NP -> AP ; -- as cool as John
-- CAdvAP adv ap np = ap ** { } ;
CAdvAP adv ap np = ap ** {
s = \\n => adv.s ++ ap.s ! n ;
compar = ap.compar ++ adv.p ++ np.s ! Nom
} ;
-- The superlative use is covered in $Ord$.
-- : Ord -> AP ; -- warmest
AdjOrd ord = ord ** {
s = \\_ => ord.s ;
} ;
-- AdjOrd ord = emptyAP ** ord ;
-- Sentence and question complements defined for all adjectival
-- phrases, although the semantics is only clear for some adjectives.
@@ -46,12 +49,16 @@ concrete AdjectiveHun of Adjective = CatHun ** open ResHun, Prelude in {
-- An adjectival phrase can be modified by an *adadjective*, such as "very".
-- : AdA -> AP -> AP ;
AdAP ada ap = ap ** {s = \\af => ada.s ++ ap.s ! af} ;
AdAP ada ap = ap ** {
s = \\af => ada.s ++ ap.s ! af ;
} ;
-- It can also be postmodified by an adverb, typically a prepositional phrase.
-- : AP -> Adv -> AP ; -- warm by nature
-- AdvAP ap adv = ap ** {} ;
AdvAP ap adv = ap ** {
s = \\af => ap.s ! af ++ adv.s ;
} ;
}

View File

@@ -40,9 +40,13 @@ lincat
[AP] = {s1,s2 : Number => Str} ;
lin
BaseAP = twoTable Number ;
BaseAP x y =
-- Don't try to have discontinuous comparative forms
let xCont : AP = x ** {s = \\n => x.s ! n ++ x.compar} ;
yCont : AP = y ** {s = \\n => y.s ! n ++ y.compar} ;
in twoTable Number xCont yCont ;
ConsAP = consrTable Number comma ;
ConjAP = conjunctDistrTable Number ;
ConjAP co as = conjunctDistrTable Number co as ** {compar = []} ;
-- Noun phrases
lincat

View File

@@ -116,7 +116,15 @@ oper
--------------------------------------------------------------------------------
-- Adjectives
AdjPhrase : Type = {s : Number => Str} ;
AdjPhrase : Type = {
s : Number => Str ;
compar : Str -- Discontinuous: Én *nagyobb* vagyok *nálad*.
} ;
emptyAP : AdjPhrase = {
s = \\_ => [] ;
compar = [] ;
} ;
Adjective : Type = {s : Degree => Number => Str} ;

View File

@@ -111,7 +111,8 @@ lin
s = \\vf => case vf of {
VFin P3 n => ap.s ! n ;
VFin _ n => ap.s ! n ++ copula.s ! vf ;
_ => ap.s ! Sg ++ copula.s ! vf} ;
_ => ap.s ! Sg ++ copula.s ! vf}
++ ap.compar ;
} ;
-- : CN -> Comp ;