forked from GitHub/gf-rgl
(Hun) Make comparative discontinuous
This commit is contained in:
@@ -5,11 +5,14 @@ concrete AdjectiveHun of Adjective = CatHun ** open ResHun, Prelude in {
|
|||||||
lin
|
lin
|
||||||
|
|
||||||
-- : A -> AP ;
|
-- : A -> AP ;
|
||||||
PositA a = {s = a.s ! Posit} ;
|
PositA a = emptyAP ** {
|
||||||
|
s = a.s ! Posit
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : A -> NP -> AP ;
|
-- : A -> NP -> AP ;
|
||||||
ComparA a np = a ** {
|
ComparA a np = emptyAP ** {
|
||||||
s = \\n => a.s ! Compar ! n ++ np.s ! Ade ;
|
s = a.s ! Compar ;
|
||||||
|
compar = np.s ! Ade ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : A2 -> NP -> AP ; -- married to her
|
-- : A2 -> NP -> AP ; -- married to her
|
||||||
@@ -22,20 +25,20 @@ concrete AdjectiveHun of Adjective = CatHun ** open ResHun, Prelude in {
|
|||||||
UseA2 = PositA ;
|
UseA2 = PositA ;
|
||||||
|
|
||||||
-- : A -> AP ; -- warmer
|
-- : A -> AP ; -- warmer
|
||||||
UseComparA a = a ** {
|
UseComparA a = emptyAP ** {
|
||||||
s = \\n => a.s ! Compar ! n ;
|
s = a.s ! Compar ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
-- : CAdv -> AP -> NP -> AP ; -- as cool as John
|
-- : 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$.
|
-- The superlative use is covered in $Ord$.
|
||||||
|
|
||||||
-- : Ord -> AP ; -- warmest
|
-- : Ord -> AP ; -- warmest
|
||||||
AdjOrd ord = ord ** {
|
-- AdjOrd ord = emptyAP ** ord ;
|
||||||
s = \\_ => ord.s ;
|
|
||||||
} ;
|
|
||||||
|
|
||||||
-- 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.
|
||||||
@@ -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".
|
-- An adjectival phrase can be modified by an *adadjective*, such as "very".
|
||||||
|
|
||||||
-- : AdA -> AP -> AP ;
|
-- : 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.
|
-- It can also be postmodified by an adverb, typically a prepositional phrase.
|
||||||
|
|
||||||
-- : AP -> Adv -> AP ; -- warm by nature
|
-- : AP -> Adv -> AP ; -- warm by nature
|
||||||
-- AdvAP ap adv = ap ** {} ;
|
AdvAP ap adv = ap ** {
|
||||||
|
s = \\af => ap.s ! af ++ adv.s ;
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,9 +40,13 @@ lincat
|
|||||||
[AP] = {s1,s2 : Number => Str} ;
|
[AP] = {s1,s2 : Number => Str} ;
|
||||||
|
|
||||||
lin
|
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 ;
|
ConsAP = consrTable Number comma ;
|
||||||
ConjAP = conjunctDistrTable Number ;
|
ConjAP co as = conjunctDistrTable Number co as ** {compar = []} ;
|
||||||
|
|
||||||
-- Noun phrases
|
-- Noun phrases
|
||||||
lincat
|
lincat
|
||||||
|
|||||||
@@ -116,7 +116,15 @@ oper
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Adjectives
|
-- 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} ;
|
Adjective : Type = {s : Degree => Number => Str} ;
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,8 @@ lin
|
|||||||
s = \\vf => case vf of {
|
s = \\vf => case vf of {
|
||||||
VFin P3 n => ap.s ! n ;
|
VFin P3 n => ap.s ! n ;
|
||||||
VFin _ n => ap.s ! n ++ copula.s ! vf ;
|
VFin _ n => ap.s ! n ++ copula.s ! vf ;
|
||||||
_ => ap.s ! Sg ++ copula.s ! vf} ;
|
_ => ap.s ! Sg ++ copula.s ! vf}
|
||||||
|
++ ap.compar ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : CN -> Comp ;
|
-- : CN -> Comp ;
|
||||||
|
|||||||
Reference in New Issue
Block a user