forked from GitHub/gf-rgl
(Hun) Add number as a parameter to APs complement
This commit is contained in:
@@ -13,13 +13,13 @@ concrete AdjectiveHun of Adjective = CatHun ** open ResHun, Prelude in {
|
|||||||
|
|
||||||
-- : A -> NP -> AP ;
|
-- : A -> NP -> AP ;
|
||||||
ComparA a np = UseComparA a ** {
|
ComparA a np = UseComparA a ** {
|
||||||
compar = applyAdp (caseAdp Ade) np ;
|
compl = \\n => applyAdp (caseAdp Ade) np ;
|
||||||
-- compar = applyAdp (prepos Nom "mint") np ;
|
-- compl = applyAdp (prepos Nom "mint") np ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : A2 -> NP -> AP ; -- married to her
|
-- : A2 -> NP -> AP ; -- married to her
|
||||||
ComplA2 a2 np = PositA a2 ** {
|
ComplA2 a2 np = PositA a2 ** {
|
||||||
compar = applyAdp a2.c2 np ;
|
compl = \\n => applyAdp a2.c2 np ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : A2 -> AP ; -- married to itself
|
-- : A2 -> AP ; -- married to itself
|
||||||
@@ -38,7 +38,7 @@ concrete AdjectiveHun of Adjective = CatHun ** open ResHun, Prelude in {
|
|||||||
-- : 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,c => adv.s ++ ap.s ! n ! c ;
|
s = \\n,c => adv.s ++ ap.s ! n ! c ;
|
||||||
compar = ap.compar ++ adv.p ++ applyAdp (caseAdp Nom) np ;
|
compl = \\n => ap.compl ! n ++ adv.p ++ applyAdp (caseAdp Nom) np ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- The superlative use is covered in $Ord$.
|
-- The superlative use is covered in $Ord$.
|
||||||
|
|||||||
@@ -25,13 +25,13 @@ lincat
|
|||||||
lin
|
lin
|
||||||
BaseAP x y =
|
BaseAP x y =
|
||||||
-- Don't try to have discontinuous comparative forms
|
-- Don't try to have discontinuous comparative forms
|
||||||
let xCont : AP = x ** {s = \\n,c => x.s ! n ! c ++ x.compar} ;
|
let xCont : AP = x ** {s = \\n,c => x.s ! n ! c ++ x.compl ! n} ;
|
||||||
yCont : AP = y ** {s = \\n,c => y.s ! n ! c ++ y.compar} ;
|
yCont : AP = y ** {s = \\n,c => y.s ! n ! c ++ y.compl ! n} ;
|
||||||
in twoTable2 Number Case xCont yCont ;
|
in twoTable2 Number Case xCont yCont ;
|
||||||
ConsAP a as =
|
ConsAP a as =
|
||||||
let aCont : AP = a ** {s = \\n,c => a.s ! n ! c ++ a.compar} ;
|
let aCont : AP = a ** {s = \\n,c => a.s ! n ! c ++ a.compl ! n} ;
|
||||||
in consrTable2 Number Case comma aCont as ;
|
in consrTable2 Number Case comma aCont as ;
|
||||||
ConjAP co as = conjunctDistrTable2 Number Case co as ** {compar = []} ;
|
ConjAP co as = conjunctDistrTable2 Number Case co as ** {compl = \\_ => []} ;
|
||||||
|
|
||||||
-- Noun phrases
|
-- Noun phrases
|
||||||
lincat
|
lincat
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ concrete NounHun of Noun = CatHun ** open
|
|||||||
-- : AP -> CN -> CN
|
-- : AP -> CN -> CN
|
||||||
AdjCN ap cn = cn ** {
|
AdjCN ap cn = cn ** {
|
||||||
s = \\nc => ap.s ! Sg ! Nom ++ cn.s ! nc ;
|
s = \\nc => ap.s ! Sg ! Nom ++ cn.s ! nc ;
|
||||||
compl = \\n,c => ap.compar ++ cn.compl ! n ! c ;
|
compl = \\n,c => ap.compl ! n ++ cn.compl ! n ! c ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : CN -> RS -> CN ;
|
-- : CN -> RS -> CN ;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ concrete PhraseHun of Phrase = CatHun ** open Prelude, ResHun in {
|
|||||||
UttAdv adv = adv ;
|
UttAdv adv = adv ;
|
||||||
UttCN cn = {s = linCN cn} ;
|
UttCN cn = {s = linCN cn} ;
|
||||||
UttCard n = {s = n.s ! Indep} ;
|
UttCard n = {s = n.s ! Indep} ;
|
||||||
UttAP ap = {s = ap.s ! Sg ! Nom ++ ap.compar} ;
|
UttAP ap = {s = ap.s ! Sg ! Nom ++ ap.compl ! Sg} ;
|
||||||
UttInterj i = i ;
|
UttInterj i = i ;
|
||||||
|
|
||||||
NoPConj = {s = []} ;
|
NoPConj = {s = []} ;
|
||||||
|
|||||||
@@ -306,12 +306,13 @@ oper
|
|||||||
|
|
||||||
AdjPhrase : Type = {
|
AdjPhrase : Type = {
|
||||||
s : Number => Case => Str ;
|
s : Number => Case => Str ;
|
||||||
compar : Str -- Discontinuous: Én *nagyobb* vagyok *nálad*.
|
compl : Number => Str -- Discontinuous comparative: Én nagyobb vagyok nálad.
|
||||||
|
-- This depends on Number to allow postmodifier APs.
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
emptyAP : AdjPhrase = {
|
emptyAP : AdjPhrase = {
|
||||||
s = \\_,_ => [] ;
|
s = \\_,_ => [] ;
|
||||||
compar = [] ;
|
compl = \\_ => [] ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
Adjective : Type = {
|
Adjective : Type = {
|
||||||
|
|||||||
@@ -110,10 +110,9 @@ lin
|
|||||||
-- : AP -> Comp ;
|
-- : AP -> Comp ;
|
||||||
CompAP ap = UseCopula ** {
|
CompAP ap = UseCopula ** {
|
||||||
s = \\vf => case vf of {
|
s = \\vf => case vf of {
|
||||||
VPres P3 n => ap.s ! n ! Nom ;
|
VPres P3 n => ap.s ! n ! Nom ++ ap.compl ! n ;
|
||||||
VPres _ n => ap.s ! n ! Nom ++ copula.s ! vf ;
|
VPres _ n => ap.s ! n ! Nom ++ copula.s ! vf ++ ap.compl ! n ;
|
||||||
_ => ap.s ! Sg ! Nom ++ copula.s ! vf}
|
_ => ap.s ! Sg ! Nom ++ copula.s ! vf ++ ap.compl ! Sg } ;
|
||||||
++ ap.compar ;
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : CN -> Comp ;
|
-- : CN -> Comp ;
|
||||||
|
|||||||
Reference in New Issue
Block a user