mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
more Hungarian functions
This commit is contained in:
@@ -27,7 +27,7 @@ lin
|
|||||||
-- Like adverbs, adadjectives can be produced by adjectives.
|
-- Like adverbs, adadjectives can be produced by adjectives.
|
||||||
|
|
||||||
-- : A -> AdA ; -- extremely
|
-- : A -> AdA ; -- extremely
|
||||||
-- PositAdAAdj a = { } ;
|
PositAdAAdj a = {s = a.s ! Posit ! SgNom} ;
|
||||||
-- Subordinate clauses can function as adverbs.
|
-- Subordinate clauses can function as adverbs.
|
||||||
|
|
||||||
-- : Subj -> S -> Adv ;
|
-- : Subj -> S -> Adv ;
|
||||||
|
|||||||
@@ -76,8 +76,7 @@ concrete CatHun of Cat = CommonX - [Adv] ** open ResHun, Prelude in {
|
|||||||
|
|
||||||
-- Constructed in NumeralHun.
|
-- Constructed in NumeralHun.
|
||||||
|
|
||||||
Card = ResHun.Numeral ;
|
Card, ACard, Numeral = ResHun.Numeral ;
|
||||||
Numeral = ResHun.Numeral ;
|
|
||||||
Digits = {s : CardOrd => Str} ;
|
Digits = {s : CardOrd => Str} ;
|
||||||
Decimal = {s : CardOrd => Str; hasDot : Bool} ;
|
Decimal = {s : CardOrd => Str; hasDot : Bool} ;
|
||||||
|
|
||||||
|
|||||||
@@ -59,15 +59,30 @@ lin
|
|||||||
ConsRS = consrTable3 Gender Number Case comma ;
|
ConsRS = consrTable3 Gender Number Case comma ;
|
||||||
ConjRS = conjunctDistrTable3 Gender Number Case ;
|
ConjRS = conjunctDistrTable3 Gender Number Case ;
|
||||||
|
|
||||||
{-
|
|
||||||
lincat
|
lincat
|
||||||
[CN] = { } ;
|
[CN] = {
|
||||||
|
s1,s2 : NumCaseStem => Str ;
|
||||||
|
h : Harm ;
|
||||||
|
g : Gender
|
||||||
|
} ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
BaseCN = {} ;
|
BaseCN x y = twoTable NumCaseStem x y ** {
|
||||||
ConsCN = {} ;
|
h = y.h ;
|
||||||
ConjCN co cs = conjunctDistrTable … co cs ** cs ;
|
g = y.g
|
||||||
|
} ;
|
||||||
|
ConsCN x xs = consrTable NumCaseStem comma x xs ** {
|
||||||
|
h = xs.h ;
|
||||||
|
g = xs.g
|
||||||
|
} ;
|
||||||
|
ConjCN co cs = conjunctDistrTable NumCaseStem co cs ** {
|
||||||
|
compl = \\_,_ => [] ;
|
||||||
|
postmod = [] ;
|
||||||
|
h = cs.h ;
|
||||||
|
g = cs.g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
{-
|
||||||
lincat
|
lincat
|
||||||
[DAP] =
|
[DAP] =
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,23 @@
|
|||||||
concrete ConstructionHun of Construction = CatHun ** open ParadigmsHun, ResHun in {
|
concrete ConstructionHun of Construction = CatHun ** open
|
||||||
|
ParadigmsHun, ResHun, NounHun, VerbHun, AdjectiveHun, Prelude in {
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Timeunit = N ;
|
Timeunit = N ;
|
||||||
|
Hour = {s : Str} ;
|
||||||
Weekday = N ;
|
Weekday = N ;
|
||||||
Monthday = NP ;
|
Monthday = NP ;
|
||||||
Month = N ;
|
Month = N ;
|
||||||
Year = NP ;
|
Year = NP ;
|
||||||
|
Language = N ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
hungry_VP = UseComp (CompAP (PositA (mkA "éhes"))) ;
|
||||||
|
thirsty_VP = UseComp (CompAP (PositA (mkA "szomjas"))) ;
|
||||||
|
tired_VP = UseComp (CompAP (PositA (mkA "fáradt"))) ;
|
||||||
|
scared_VP = UseComp (CompAP (PositA (mkA "ijedt"))) ;
|
||||||
|
ill_VP = UseComp (CompAP (PositA (mkA "beteg"))) ;
|
||||||
|
ready_VP = UseComp (CompAP (PositA (mkA "kész"))) ;
|
||||||
|
|
||||||
has_age_VP card = useV (copula ** {
|
has_age_VP card = useV (copula ** {
|
||||||
s = \\vf => case vf of {
|
s = \\vf => case vf of {
|
||||||
VPres P3 _ => [] ;
|
VPres P3 _ => [] ;
|
||||||
@@ -16,6 +26,153 @@ lin
|
|||||||
}) ** {
|
}) ** {
|
||||||
adv = card.s ! Indep ++ "éves"
|
adv = card.s ! Indep ++ "éves"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
n_units_AP card cn a =
|
||||||
|
let ap : AP = PositA a in ap ** {
|
||||||
|
s = \\n,c => card.s ! Attrib ++ cn.s ! SgNom ++ ap.s ! n ! c
|
||||||
|
} ;
|
||||||
|
|
||||||
|
n_units_of_NP card cn np = lin NP (indeclNP
|
||||||
|
(card.s ! Attrib ++ cn.s ! SgNom ++ np.s ! NoPoss ! Nom ++ np.postmod)) ;
|
||||||
|
|
||||||
|
n_unit_CN card unit cn = cn ** {
|
||||||
|
s = \\ncs => card.s ! Attrib ++ unit.s ! SgNom ++ cn.s ! ncs
|
||||||
|
} ;
|
||||||
|
|
||||||
|
bottle_of_CN np = (UseN (mkN "palack")) ** {
|
||||||
|
compl = \\_,_ => np.s ! NoPoss ! Nom ++ np.postmod
|
||||||
|
} ;
|
||||||
|
cup_of_CN np = (UseN (mkN "csésze")) ** {
|
||||||
|
compl = \\_,_ => np.s ! NoPoss ! Nom ++ np.postmod
|
||||||
|
} ;
|
||||||
|
glass_of_CN np = (UseN (mkN "pohár")) ** {
|
||||||
|
compl = \\_,_ => np.s ! NoPoss ! Nom ++ np.postmod
|
||||||
|
} ;
|
||||||
|
|
||||||
|
timeunitAdv n time = mkAdv (n.s ! Attrib ++ time.s ! SgNom) ;
|
||||||
|
timeunitRange l u time =
|
||||||
|
mkAdv (l.s ! Attrib ++ BIND ++ "-" ++ BIND ++ u.s ! Attrib ++ time.s ! SgNom) ;
|
||||||
|
|
||||||
|
oneHour = {s = "1"} ;
|
||||||
|
twoHour = {s = "2"} ;
|
||||||
|
threeHour = {s = "3"} ;
|
||||||
|
fourHour = {s = "4"} ;
|
||||||
|
fiveHour = {s = "5"} ;
|
||||||
|
sixHour = {s = "6"} ;
|
||||||
|
sevenHour = {s = "7"} ;
|
||||||
|
eightHour = {s = "8"} ;
|
||||||
|
nineHour = {s = "9"} ;
|
||||||
|
tenHour = {s = "10"} ;
|
||||||
|
elevenHour = {s = "11"} ;
|
||||||
|
twelveHour = {s = "12"} ;
|
||||||
|
thirteenHour = {s = "13"} ;
|
||||||
|
fourteenHour = {s = "14"} ;
|
||||||
|
fifteenHour = {s = "15"} ;
|
||||||
|
sixteenHour = {s = "16"} ;
|
||||||
|
seventeenHour = {s = "17"} ;
|
||||||
|
eighteenHour = {s = "18"} ;
|
||||||
|
nineteenHour = {s = "19"} ;
|
||||||
|
twentyHour = {s = "20"} ;
|
||||||
|
twentyOneHour = {s = "21"} ;
|
||||||
|
twentyTwoHour = {s = "22"} ;
|
||||||
|
twentyThreeHour = {s = "23"} ;
|
||||||
|
twentyFourHour = {s = "24"} ;
|
||||||
|
|
||||||
|
timeHour h = mkAdv (h.s ++ "órakor") ;
|
||||||
|
timeHourMinute h m = mkAdv (h.s ++ BIND ++ ":" ++ BIND ++ m.s ! Attrib) ;
|
||||||
|
|
||||||
|
weekdayPunctualAdv w = mkAdv (caseFromStem glue w Sup Sg) ;
|
||||||
|
weekdayHabitualAdv w = mkAdv (caseFromStem glue w Sup Sg) ;
|
||||||
|
weekdayNextAdv w = mkAdv ("jövő" ++ caseFromStem glue w Sup Sg) ;
|
||||||
|
weekdayLastAdv w = mkAdv ("múlt" ++ caseFromStem glue w Sup Sg) ;
|
||||||
|
|
||||||
|
monthAdv m = mkAdv (caseFromStem glue m Ine Sg) ;
|
||||||
|
yearAdv y = mkAdv (y.s ! NoPoss ! Nom ++ BIND ++ "-ban") ;
|
||||||
|
dayMonthAdv d m =
|
||||||
|
mkAdv (d.s ! NoPoss ! Nom ++ BIND ++ "." ++ m.s ! SgNom) ;
|
||||||
|
monthYearAdv m y =
|
||||||
|
mkAdv (m.s ! SgNom ++ y.s ! NoPoss ! Nom ++ BIND ++ "-ban") ;
|
||||||
|
dayMonthYearAdv d m y =
|
||||||
|
mkAdv (d.s ! NoPoss ! Nom ++ BIND ++ "." ++ m.s ! SgNom ++ y.s ! NoPoss ! Nom ++ BIND ++ "-ban") ;
|
||||||
|
|
||||||
|
intYear i = lin NP (indeclNP i.s) ;
|
||||||
|
intMonthday i = lin NP (indeclNP i.s) ;
|
||||||
|
|
||||||
|
InLanguage l = mkAdv (l.s ! SgNom ++ "nyelven") ;
|
||||||
|
|
||||||
|
weekdayN w = w ;
|
||||||
|
monthN m = m ;
|
||||||
|
|
||||||
|
weekdayPN w = lin PN (MassNP (UseN w)) ;
|
||||||
|
monthPN m = lin PN (MassNP (UseN m)) ;
|
||||||
|
|
||||||
|
languageCN l = UseN l ;
|
||||||
|
languageNP l = lin NP (MassNP (UseN l)) ;
|
||||||
|
|
||||||
|
second_Timeunit = mkN "másodperc" ;
|
||||||
|
minute_Timeunit = mkN "perc" ;
|
||||||
|
hour_Timeunit = mkN "óra" ;
|
||||||
|
day_Timeunit = mkN "nap" ;
|
||||||
|
week_Timeunit = mkN "hét" ;
|
||||||
|
month_Timeunit = mkN "hónap" ;
|
||||||
|
year_Timeunit = mkN "év" ;
|
||||||
|
|
||||||
|
monday_Weekday = mkN "hétfő" ;
|
||||||
|
tuesday_Weekday = mkN "kedd" ;
|
||||||
|
wednesday_Weekday = mkN "szerda" ;
|
||||||
|
thursday_Weekday = mkN "csütörtök" ;
|
||||||
|
friday_Weekday = mkN "péntek" ;
|
||||||
|
saturday_Weekday = mkN "szombat" ;
|
||||||
|
sunday_Weekday = mkN "vasárnap" ;
|
||||||
|
|
||||||
|
january_Month = mkN "január" ;
|
||||||
|
february_Month = mkN "február" ;
|
||||||
|
march_Month = mkN "március" ;
|
||||||
|
april_Month = mkN "április" ;
|
||||||
|
may_Month = mkN "május" ;
|
||||||
|
june_Month = mkN "június" ;
|
||||||
|
july_Month = mkN "július" ;
|
||||||
|
august_Month = mkN "augusztus" ;
|
||||||
|
september_Month = mkN "szeptember" ;
|
||||||
|
october_Month = mkN "október" ;
|
||||||
|
november_Month = mkN "november" ;
|
||||||
|
december_Month = mkN "december" ;
|
||||||
|
|
||||||
|
afrikaans_Language = mkN "afrikaans" ;
|
||||||
|
amharic_Language = mkN "amhara" ;
|
||||||
|
arabic_Language = mkN "arab" ;
|
||||||
|
bulgarian_Language = mkN "bolgár" ;
|
||||||
|
catalan_Language = mkN "katalán" ;
|
||||||
|
chinese_Language = mkN "kínai" ;
|
||||||
|
danish_Language = mkN "dán" ;
|
||||||
|
dutch_Language = mkN "holland" ;
|
||||||
|
english_Language = mkN "angol" ;
|
||||||
|
estonian_Language = mkN "észt" ;
|
||||||
|
finnish_Language = mkN "finn" ;
|
||||||
|
french_Language = mkN "francia" ;
|
||||||
|
german_Language = mkN "német" ;
|
||||||
|
greek_Language = mkN "görög" ;
|
||||||
|
hebrew_Language = mkN "héber" ;
|
||||||
|
hindi_Language = mkN "hindi" ;
|
||||||
|
japanese_Language = mkN "japán" ;
|
||||||
|
italian_Language = mkN "olasz" ;
|
||||||
|
latin_Language = mkN "latin" ;
|
||||||
|
latvian_Language = mkN "lett" ;
|
||||||
|
maltese_Language = mkN "máltai" ;
|
||||||
|
nepali_Language = mkN "nepáli" ;
|
||||||
|
norwegian_Language = mkN "norvég" ;
|
||||||
|
persian_Language = mkN "perzsa" ;
|
||||||
|
polish_Language = mkN "lengyel" ;
|
||||||
|
punjabi_Language = mkN "pandzsábi" ;
|
||||||
|
romanian_Language = mkN "román" ;
|
||||||
|
russian_Language = mkN "orosz" ;
|
||||||
|
sindhi_Language = mkN "szindhi" ;
|
||||||
|
spanish_Language = mkN "spanyol" ;
|
||||||
|
swahili_Language = mkN "szuahéli" ;
|
||||||
|
swedish_Language = mkN "svéd" ;
|
||||||
|
thai_Language = mkN "thai" ;
|
||||||
|
turkish_Language = mkN "török" ;
|
||||||
|
urdu_Language = mkN "urdu" ;
|
||||||
{-
|
{-
|
||||||
lin
|
lin
|
||||||
|
|
||||||
|
|||||||
@@ -7,11 +7,15 @@ concrete ExtendHun of Extend = CatHun
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
VPS = {s : Person => Number => Str} ;
|
VPS = {s : Person => Number => Str} ;
|
||||||
|
[VPS] = {s1,s2 : Person => Number => Str} ;
|
||||||
VPI = SS ;
|
VPI = SS ;
|
||||||
|
[VPI] = {s1,s2 : Str} ;
|
||||||
VPS2 = {s : ObjDef => Person => Number => Str ; c2 : Case} ;
|
VPS2 = {s : ObjDef => Person => Number => Str ; c2 : Case} ;
|
||||||
[VPS2] = {s1,s2 : ObjDef => Person => Number => Str ; c2 : Case} ;
|
[VPS2] = {s1,s2 : ObjDef => Person => Number => Str ; c2 : Case} ;
|
||||||
VPI2 = {s : ObjDef => Str ; c2 : Case} ;
|
VPI2 = {s : ObjDef => Str ; c2 : Case} ;
|
||||||
[VPI2] = {s1,s2 : ObjDef => Str ; c2 : Case} ;
|
[VPI2] = {s1,s2 : ObjDef => Str ; c2 : Case} ;
|
||||||
|
[Comp] = {s1,s2 : VForm => Str} ;
|
||||||
|
[Imp] = {s1,s2 : Number => Polarity => Str} ;
|
||||||
RNP = NounPhrase ;
|
RNP = NounPhrase ;
|
||||||
RNPList = {s1,s2 : Possessor => Case => Str ; agr : Person*Number ; g : Gender ; postmod : Str} ;
|
RNPList = {s1,s2 : Possessor => Case => Str ; agr : Person*Number ; g : Gender ; postmod : Str} ;
|
||||||
|
|
||||||
@@ -34,6 +38,8 @@ lin
|
|||||||
objdef = Def ;
|
objdef = Def ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
EmptyRelSlash cls = relSlash {s = \\_,_,_ => []} cls ;
|
||||||
|
|
||||||
UseDAP = DetNP ;
|
UseDAP = DetNP ;
|
||||||
UseDAPMasc,
|
UseDAPMasc,
|
||||||
UseDAPFem = \dap -> DetNP dap ** {g = Human} ;
|
UseDAPFem = \dap -> DetNP dap ** {g = Human} ;
|
||||||
@@ -48,12 +54,45 @@ lin
|
|||||||
} ++ vp.obj ++ vp.adv
|
} ++ vp.obj ++ vp.adv
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
BaseVPS x y = {
|
||||||
|
s1 = x.s ;
|
||||||
|
s2 = y.s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ConsVPS x xs = {
|
||||||
|
s1 = \\p,n => x.s ! p ! n ++ bindComma ++ xs.s1 ! p ! n ;
|
||||||
|
s2 = xs.s2
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ConjVPS conj xs = {
|
||||||
|
s = \\p,n => xs.s1 ! p ! n ++ conj.s2 ++ xs.s2 ! p ! n
|
||||||
|
} ;
|
||||||
|
|
||||||
PredVPS np vps = {
|
PredVPS np vps = {
|
||||||
s = linNP np ++ vps.s ! np.agr.p1 ! np.agr.p2
|
s = linNP np ++ vps.s ! np.agr.p1 ! np.agr.p2
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
MkVPI vp = {s = infVP vp} ;
|
MkVPI vp = {s = infVP vp} ;
|
||||||
|
|
||||||
|
BaseVPI x y = {
|
||||||
|
s1 = x.s ;
|
||||||
|
s2 = y.s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ConsVPI x xs = {
|
||||||
|
s1 = x.s ++ bindComma ++ xs.s1 ;
|
||||||
|
s2 = xs.s2
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ConjVPI conj xs = {
|
||||||
|
s = xs.s1 ++ conj.s2 ++ xs.s2
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ComplVPIVV vv vpi =
|
||||||
|
useV (vv ** {s = vv.s ! Indef}) ** {
|
||||||
|
adv = vpi.s
|
||||||
|
} ;
|
||||||
|
|
||||||
MkVPS2 t pol vps = {
|
MkVPS2 t pol vps = {
|
||||||
s = \\od,p,n =>
|
s = \\od,p,n =>
|
||||||
t.s ++ pol.s ++ if_then_Pol pol.p [] "nem" ++
|
t.s ++ pol.s ++ if_then_Pol pol.p [] "nem" ++
|
||||||
@@ -116,6 +155,34 @@ lin
|
|||||||
c2 = xs.c2
|
c2 = xs.c2
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
BaseComp x y = {
|
||||||
|
s1 = x.s ;
|
||||||
|
s2 = y.s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ConsComp x xs = {
|
||||||
|
s1 = \\vf => x.s ! vf ++ bindComma ++ xs.s1 ! vf ;
|
||||||
|
s2 = xs.s2
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ConjComp conj xs = UseCopula ** {
|
||||||
|
s = \\vf => xs.s1 ! vf ++ conj.s2 ++ xs.s2 ! vf
|
||||||
|
} ;
|
||||||
|
|
||||||
|
BaseImp x y = {
|
||||||
|
s1 = x.s ;
|
||||||
|
s2 = y.s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ConsImp x xs = {
|
||||||
|
s1 = \\n,p => x.s ! n ! p ++ bindComma ++ xs.s1 ! n ! p ;
|
||||||
|
s2 = xs.s2
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ConjImp conj xs = {
|
||||||
|
s = \\n,p => xs.s1 ! n ! p ++ conj.s2 ++ xs.s2 ! n ! p
|
||||||
|
} ;
|
||||||
|
|
||||||
PresPartAP vp = emptyAP ** {
|
PresPartAP vp = emptyAP ** {
|
||||||
s = \\_,_ => vp.obj ++ vp.adv ++ vp.s ! VPresPart
|
s = \\_,_ => vp.obj ++ vp.adv ++ vp.s ! VPresPart
|
||||||
} ;
|
} ;
|
||||||
@@ -153,6 +220,19 @@ lin
|
|||||||
s = \\p,c => predet.s ++ rnp.s ! p ! c
|
s = \\p,c => predet.s ++ rnp.s ! p ! c
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
AdvRNP np prep rnp = np ** {
|
||||||
|
s = \\p,c => np.s ! p ! c ++ applyAdp prep rnp ;
|
||||||
|
postmod = []
|
||||||
|
} ;
|
||||||
|
|
||||||
|
AdvRVP vp prep rnp = insertAdv vp {
|
||||||
|
s = applyAdp prep rnp
|
||||||
|
} ;
|
||||||
|
|
||||||
|
AdvRAP ap prep rnp = ap ** {
|
||||||
|
compl = \\n => ap.compl ! n ++ applyAdp prep rnp
|
||||||
|
} ;
|
||||||
|
|
||||||
ReflA2RNP a2 rnp =
|
ReflA2RNP a2 rnp =
|
||||||
let ap : AP = ComplA2 a2 rnp in ap ;
|
let ap : AP = ComplA2 a2 rnp in ap ;
|
||||||
|
|
||||||
@@ -218,6 +298,10 @@ lin
|
|||||||
isPre = False
|
isPre = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
CompoundAP n a = emptyAP ** {
|
||||||
|
s = \\_,_ => n.s ! SgNom ++ a.s ! Posit ! SgNom
|
||||||
|
} ;
|
||||||
|
|
||||||
WithoutVP vp = {
|
WithoutVP vp = {
|
||||||
s = infVP vp ++ "nélkül" ;
|
s = infVP vp ++ "nélkül" ;
|
||||||
isPre = False
|
isPre = False
|
||||||
@@ -233,6 +317,29 @@ lin
|
|||||||
isPre = False
|
isPre = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
ApposNP np1 np2 = np1 ** {
|
||||||
|
s = \\p,c => np1.s ! p ! c ++ bindComma ++ np2.s ! NoPoss ! Nom ;
|
||||||
|
postmod = []
|
||||||
|
} ;
|
||||||
|
|
||||||
|
AdAdV ada adv = {
|
||||||
|
s = ada.s ++ adv.s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
UttAdV adv = {
|
||||||
|
s = adv.s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
PositAdVAdj adj = {
|
||||||
|
s = adj.s ! Posit ! SgNom
|
||||||
|
} ;
|
||||||
|
|
||||||
|
UttVPShort vp = {
|
||||||
|
s = infVP vp
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ComplSlashPartLast vps np = insertObj vps np ;
|
||||||
|
|
||||||
iFem_Pron = pronTable ! <P1,Sg> ** {g = Human} ;
|
iFem_Pron = pronTable ! <P1,Sg> ** {g = Human} ;
|
||||||
theyFem_Pron = pronTable ! <P3,Pl> ** {g = Human} ;
|
theyFem_Pron = pronTable ! <P3,Pl> ** {g = Human} ;
|
||||||
theyNeutr_Pron = pronTable ! <P3,Pl> ;
|
theyNeutr_Pron = pronTable ! <P3,Pl> ;
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ concrete IdiomHun of Idiom = CatHun ** open Prelude, ResHun, VerbHun, NounHun, S
|
|||||||
-}
|
-}
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
ImpersCl vp = predVP emptyNP vp ;
|
||||||
|
|
||||||
ExistNP np = existNP np [] ;
|
ExistNP np = existNP np [] ;
|
||||||
|
|
||||||
ExistNPAdv np adv = existNP np adv.s ;
|
ExistNPAdv np adv = existNP np adv.s ;
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ concrete NounHun of Noun = CatHun ** open
|
|||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
hunV : pattern Str = #("a"|"e"|"i"|"o"|"u"|"ö"|"ü"|
|
||||||
|
"á"|"é"|"í"|"ó"|"ú"|"ő"|"ű") ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
|
||||||
--2 Noun phrases
|
--2 Noun phrases
|
||||||
@@ -147,15 +151,17 @@ concrete NounHun of Noun = CatHun ** open
|
|||||||
-- : AdN -> Card -> Card ;
|
-- : AdN -> Card -> Card ;
|
||||||
AdNum adn card = card ** { s = \\p => adn.s ++ card.s ! p } ;
|
AdNum adn card = card ** { s = \\p => adn.s ++ card.s ! p } ;
|
||||||
|
|
||||||
{-
|
|
||||||
-- : Digits -> Ord ;
|
-- : Digits -> Ord ;
|
||||||
OrdDigits digs = digs ** { s = digs.s ! NOrd } ;
|
OrdDigits digs = {
|
||||||
|
s = \\_,_ => digs.s ! NOrd ;
|
||||||
|
n = Sg
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : Numeral -> Ord ;
|
-- : Numeral -> Ord ;
|
||||||
OrdNumeral num = num ** {
|
OrdNumeral num = {
|
||||||
s = \\_ => num.ord
|
s = \\_,_ => num.s ! Attrib ;
|
||||||
|
n = Sg
|
||||||
} ;
|
} ;
|
||||||
-}
|
|
||||||
-- : A -> Ord ;
|
-- : A -> Ord ;
|
||||||
OrdSuperl a = {
|
OrdSuperl a = {
|
||||||
s = \\n,c =>
|
s = \\n,c =>
|
||||||
@@ -172,7 +178,7 @@ concrete NounHun of Noun = CatHun ** open
|
|||||||
-- : Quant
|
-- : Quant
|
||||||
DefArt = mkQuant "a" "a" ** {
|
DefArt = mkQuant "a" "a" ** {
|
||||||
s,
|
s,
|
||||||
sp = \\_,_ => pre {"a" ; "az" / v } ;
|
sp = \\_,_ => pre {"a" ; "az" / hunV } ;
|
||||||
dt = DefDet ;
|
dt = DefDet ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -185,7 +191,10 @@ concrete NounHun of Noun = CatHun ** open
|
|||||||
|
|
||||||
-- : Pron -> Quant
|
-- : Pron -> Quant
|
||||||
PossPron pron = pron ** {
|
PossPron pron = pron ** {
|
||||||
s,sp = \\_,_ => pre {"a" ; "az" / v} ++ pron.s ! Nom ;
|
s,sp = \\_,_ => case pron.agr of {
|
||||||
|
<P3,_> => "az" ++ pron.s ! Nom ;
|
||||||
|
_ => pre {"a" ; "az" / hunV} ++ pron.s ! Nom
|
||||||
|
} ;
|
||||||
dt = DetPoss (agr2pstem pron.agr) ;
|
dt = DetPoss (agr2pstem pron.agr) ;
|
||||||
caseagr = False ;
|
caseagr = False ;
|
||||||
} ;
|
} ;
|
||||||
@@ -261,6 +270,22 @@ concrete NounHun of Noun = CatHun ** open
|
|||||||
compl = \\n,c => cn.compl ! n ! c ++ np.s ! NoPoss ! Nom ++ np.postmod
|
compl = \\n,c => cn.compl ! n ! c ++ np.s ! NoPoss ! Nom ++ np.postmod
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
-- : Det -> NP -> NP ; -- three of them, some of the boys
|
||||||
|
CountNP det np = emptyNP ** det ** {
|
||||||
|
s = \\_,c => det.sp ! c ++ np.s ! NoPoss ! Ela ++ np.postmod ;
|
||||||
|
agr = <P3,det.n> ;
|
||||||
|
objdef = dt2objdef det.dt
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- : Decimal -> MU -> NP ;
|
||||||
|
QuantityNP dec mu = indeclNP
|
||||||
|
(case mu.isPre of {
|
||||||
|
True => mu.s ++ dec.s ! NCard ;
|
||||||
|
False => dec.s ! NCard ++ mu.s
|
||||||
|
}) ** {
|
||||||
|
objdef = Def
|
||||||
|
} ;
|
||||||
|
|
||||||
--3 Conjoinable determiners and ones with adjectives
|
--3 Conjoinable determiners and ones with adjectives
|
||||||
|
|
||||||
-- : DAP -> AP -> DAP ; -- the large (one)
|
-- : DAP -> AP -> DAP ; -- the large (one)
|
||||||
|
|||||||
@@ -572,7 +572,7 @@ oper
|
|||||||
<_,_ + #v> => endCaseVow ;
|
<_,_ + #v> => endCaseVow ;
|
||||||
<_,_ + #v + ("sz"|"z"|"s"|"zs"|"j"|"ly"|"l"|"r"|"n"|"ny"|"ssz"
|
<_,_ + #v + ("sz"|"z"|"s"|"zs"|"j"|"ly"|"l"|"r"|"n"|"ny"|"ssz"
|
||||||
|"zz"|"ss"|"ll"|"rr"|"nn"|"ns"|"nsz"|"nz")> => endCaseConsAcc ;
|
|"zz"|"ss"|"ll"|"rr"|"nn"|"ns"|"nsz"|"nz")> => endCaseConsAcc ;
|
||||||
<True,_> => endCaseConsAccAt ;
|
<True,_> => endCaseCons ;
|
||||||
_ => endCaseCons } ;
|
_ => endCaseCons } ;
|
||||||
|
|
||||||
-- Last consonant doubles before instrumental and translative
|
-- Last consonant doubles before instrumental and translative
|
||||||
|
|||||||
@@ -55,6 +55,10 @@ lin
|
|||||||
|
|
||||||
-- : Sub100 -> Sub1000 ; -- coercion of 1..99
|
-- : Sub100 -> Sub1000 ; -- coercion of 1..99
|
||||||
pot1as2 n = n ;
|
pot1as2 n = n ;
|
||||||
|
-- : Sub1000 ; -- a hundred
|
||||||
|
pot21 =
|
||||||
|
{s = table {p => "száz"} ;
|
||||||
|
n = numNumber ; numtype = IsNum} ;
|
||||||
-- : Sub10 -> Sub1000 ; -- m * 100
|
-- : Sub10 -> Sub1000 ; -- m * 100
|
||||||
pot2 d =
|
pot2 d =
|
||||||
{s = table {p => (d.s ! <Unit,Attrib>) ++ "száz"} ;
|
{s = table {p => (d.s ! <Unit,Attrib>) ++ "száz"} ;
|
||||||
@@ -66,6 +70,10 @@ lin
|
|||||||
|
|
||||||
-- : Sub1000 -> Sub1000000 ; -- coercion of 1..999
|
-- : Sub1000 -> Sub1000000 ; -- coercion of 1..999
|
||||||
pot2as3 n = n ;
|
pot2as3 n = n ;
|
||||||
|
-- : Sub1000000 ; -- a thousand
|
||||||
|
pot31 =
|
||||||
|
{s = table {p => "ezer"} ;
|
||||||
|
n = numNumber ; numtype = IsNum} ;
|
||||||
-- : Sub1000 -> Sub1000000 ; -- m * 1000
|
-- : Sub1000 -> Sub1000000 ; -- m * 1000
|
||||||
pot3 n =
|
pot3 n =
|
||||||
{s = table {p => n.s ! Attrib ++ "ezer"} ;
|
{s = table {p => n.s ! Attrib ++ "ezer"} ;
|
||||||
@@ -74,9 +82,38 @@ lin
|
|||||||
pot3plus n m =
|
pot3plus n m =
|
||||||
{s = table {p => n.s ! Attrib ++ "ezer" ++ m.s ! p} ;
|
{s = table {p => n.s ! Attrib ++ "ezer" ++ m.s ! p} ;
|
||||||
n = numNumber ; numtype = IsNum} ;
|
n = numNumber ; numtype = IsNum} ;
|
||||||
|
pot3decimal d =
|
||||||
|
{s = table {p => d.s ! NCard ++ "ezer"} ;
|
||||||
|
n = numNumber ; numtype = IsNum} ;
|
||||||
|
|
||||||
pot3as4 n = n ;
|
pot3as4 n = n ;
|
||||||
|
|
||||||
|
pot41 =
|
||||||
|
{s = table {p => "egymillió"} ;
|
||||||
|
n = numNumber ; numtype = IsNum} ;
|
||||||
|
pot4 n =
|
||||||
|
{s = table {p => n.s ! Attrib ++ "millió"} ;
|
||||||
|
n = numNumber ; numtype = IsNum} ;
|
||||||
|
pot4plus n m =
|
||||||
|
{s = table {p => n.s ! Attrib ++ "millió" ++ m.s ! p} ;
|
||||||
|
n = numNumber ; numtype = IsNum} ;
|
||||||
pot4as5 n = n ;
|
pot4as5 n = n ;
|
||||||
|
pot4decimal d =
|
||||||
|
{s = table {p => d.s ! NCard ++ "millió"} ;
|
||||||
|
n = numNumber ; numtype = IsNum} ;
|
||||||
|
|
||||||
|
pot51 =
|
||||||
|
{s = table {p => "egymilliárd"} ;
|
||||||
|
n = numNumber ; numtype = IsNum} ;
|
||||||
|
pot5 n =
|
||||||
|
{s = table {p => n.s ! Attrib ++ "milliárd"} ;
|
||||||
|
n = numNumber ; numtype = IsNum} ;
|
||||||
|
pot5plus n m =
|
||||||
|
{s = table {p => n.s ! Attrib ++ "milliárd" ++ m.s ! p} ;
|
||||||
|
n = numNumber ; numtype = IsNum} ;
|
||||||
|
pot5decimal d =
|
||||||
|
{s = table {p => d.s ! NCard ++ "milliárd"} ;
|
||||||
|
n = numNumber ; numtype = IsNum} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
LinDigit : Type = {s : DForm*Place => Str ; n : Number} ;
|
LinDigit : Type = {s : DForm*Place => Str ; n : Number} ;
|
||||||
@@ -127,6 +164,15 @@ oper
|
|||||||
n = numNumber ;
|
n = numNumber ;
|
||||||
hasDot=False
|
hasDot=False
|
||||||
} ;
|
} ;
|
||||||
|
IFrac d i = {
|
||||||
|
s = \\x => d.s ! x ++
|
||||||
|
case d.hasDot of {
|
||||||
|
True => BIND ;
|
||||||
|
False => BIND ++ "." ++ BIND
|
||||||
|
} ++ i.s ;
|
||||||
|
n = numNumber ;
|
||||||
|
hasDot=True
|
||||||
|
} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
mkDig : Str -> TDigit = \s -> {
|
mkDig : Str -> TDigit = \s -> {
|
||||||
|
|||||||
@@ -24,6 +24,6 @@ concrete PhraseHun of Phrase = CatHun ** open Prelude, ResHun in {
|
|||||||
-- PConjConj conj = {s = conj.s1 ++ conj.s2 ! …} ;
|
-- PConjConj conj = {s = conj.s1 ++ conj.s2 ! …} ;
|
||||||
|
|
||||||
NoVoc = {s = []} ;
|
NoVoc = {s = []} ;
|
||||||
-- VocNP np = { s = "," ++ np.s ! … } ; -}
|
VocNP np = {s = bindComma ++ linNP np} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -426,7 +426,7 @@ oper
|
|||||||
c2 : Case -- object case
|
c2 : Case -- object case
|
||||||
} ;
|
} ;
|
||||||
Verb3 : Type = Verb2 ** {
|
Verb3 : Type = Verb2 ** {
|
||||||
-- c3 : Case -- indirect object case
|
c3 : Case -- indirect object case
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
datV2 : Verb -> Verb2 = \v -> {
|
datV2 : Verb -> Verb2 = \v -> {
|
||||||
@@ -469,7 +469,7 @@ oper
|
|||||||
= case sg3 of {
|
= case sg3 of {
|
||||||
_ + ("ít" | (#c + #c)) => sg3 + harm3 "ani" "eni" "eni" ! getHarm sg3 ;
|
_ + ("ít" | (#c + #c)) => sg3 + harm3 "ani" "eni" "eni" ! getHarm sg3 ;
|
||||||
_ => sg3 + "ni"
|
_ => sg3 + "ni"
|
||||||
}
|
}
|
||||||
in mkVerbReg endingsIndef inf sg3 ;
|
in mkVerbReg endingsIndef inf sg3 ;
|
||||||
|
|
||||||
mkVerbReg : VerbEndings -> (inf, stem : Str) -> Verb =
|
mkVerbReg : VerbEndings -> (inf, stem : Str) -> Verb =
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ lin
|
|||||||
PredVP = predVP ;
|
PredVP = predVP ;
|
||||||
|
|
||||||
-- : SC -> VP -> Cl ; -- that she goes is good (Saeed p. 94)
|
-- : SC -> VP -> Cl ; -- that she goes is good (Saeed p. 94)
|
||||||
--PredSCVP sc vp = ;
|
PredSCVP sc vp = predVP (indeclNP sc.s) vp ;
|
||||||
|
|
||||||
--2 Clauses missing object noun phrases
|
--2 Clauses missing object noun phrases
|
||||||
-- : NP -> VPSlash -> ClSlash ;
|
-- : NP -> VPSlash -> ClSlash ;
|
||||||
@@ -58,6 +58,9 @@ lin
|
|||||||
-- : S -> SC ;
|
-- : S -> SC ;
|
||||||
EmbedS s = {s = s.s} ;
|
EmbedS s = {s = s.s} ;
|
||||||
|
|
||||||
|
-- : QS -> SC ;
|
||||||
|
EmbedQS qs = {s = qs.s} ;
|
||||||
|
|
||||||
-- : Temp -> Pol -> Cl -> S ;
|
-- : Temp -> Pol -> Cl -> S ;
|
||||||
UseCl t p cl = {
|
UseCl t p cl = {
|
||||||
s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p
|
s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p
|
||||||
@@ -76,7 +79,9 @@ lin
|
|||||||
ExtAdvS = advS (SOFT_BIND ++ ",");
|
ExtAdvS = advS (SOFT_BIND ++ ",");
|
||||||
|
|
||||||
-- : S -> Subj -> S -> S ;
|
-- : S -> Subj -> S -> S ;
|
||||||
-- SSubjS s1 subj s2 = AdvS (AK.SubjS subj s2) s1 ;
|
SSubjS s1 subj s2 = {
|
||||||
|
s = s1.s ++ bindComma ++ subj.s ++ s2.s
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : S -> RS -> S ; -- she sleeps, which is good
|
-- : S -> RS -> S ; -- she sleeps, which is good
|
||||||
-- RelS sent rs = advS {s = rs.s ! Sg3 Masc ++ SOFT_BIND ++ ","} sent ;
|
-- RelS sent rs = advS {s = rs.s ! Sg3 Masc ++ SOFT_BIND ++ ","} sent ;
|
||||||
|
|||||||
@@ -21,44 +21,54 @@ lin
|
|||||||
-- } ;
|
-- } ;
|
||||||
|
|
||||||
-- : VS -> S -> VP ;
|
-- : VS -> S -> VP ;
|
||||||
-- ComplVS vs s =
|
ComplVS vs s = useV vs ** {
|
||||||
-- let vps = useV vs ;
|
adv = "hogy" ++ s.s
|
||||||
-- subord = SubjS {s=""} s ;
|
} ;
|
||||||
-- in vps ** {} ;
|
|
||||||
|
|
||||||
{-
|
|
||||||
-- : VQ -> QS -> VP ;
|
-- : VQ -> QS -> VP ;
|
||||||
ComplVQ vq qs = ;
|
ComplVQ vq qs = useV vq ** {
|
||||||
|
adv = qs.s
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : VA -> AP -> VP ; -- they become red
|
-- : VA -> AP -> VP ; -- they become red
|
||||||
ComplVA va ap = ResHun.insertObj (CompAP ap).s (useV va) ;
|
ComplVA va ap = useV va ** {
|
||||||
|
adv = ap.s ! Sg ! Nom ++ ap.compl ! Sg
|
||||||
|
} ;
|
||||||
|
|
||||||
--------
|
--------
|
||||||
-- Slash
|
-- Slash
|
||||||
-}
|
|
||||||
-- : V2 -> VPSlash
|
-- : V2 -> VPSlash
|
||||||
SlashV2a = ResHun.useVc ;
|
SlashV2a = ResHun.useVc ;
|
||||||
|
|
||||||
{-
|
|
||||||
-- : V3 -> NP -> VPSlash ; -- give it (to her)
|
-- : V3 -> NP -> VPSlash ; -- give it (to her)
|
||||||
|
Slash2V3 v3 np = v3 ** {
|
||||||
|
adv = np.s ! NoPoss ! v3.c2 ++ np.postmod ;
|
||||||
|
c2 = v3.c3
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : V3 -> NP -> VPSlash ; -- give (it) to her
|
-- : V3 -> NP -> VPSlash ; -- give (it) to her
|
||||||
Slash2V3,
|
Slash3V3 v3 np = v3 ** {
|
||||||
Slash3V3 = \v3 -> insertObj (useVc3 v3) ;
|
adv = np.s ! NoPoss ! v3.c3 ++ np.postmod ;
|
||||||
|
c2 = v3.c2
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : V2S -> S -> VPSlash ; -- answer (to him) that it is good
|
-- : V2S -> S -> VPSlash ; -- answer (to him) that it is good
|
||||||
SlashV2S v2s s =
|
SlashV2S v2s s = useVc v2s ** {
|
||||||
let vps = useVc v2s ;
|
adv = "hogy" ++ s.s
|
||||||
subord = SubjS {s=""} s ;
|
} ;
|
||||||
in vps ** {obj = } ;
|
|
||||||
|
|
||||||
|
|
||||||
-- : V2V -> VP -> VPSlash ; -- beg (her) to go
|
-- : V2V -> VP -> VPSlash ; -- beg (her) to go
|
||||||
SlashV2V v2v vp = ;
|
SlashV2V v2v vp = useVc v2v ** {
|
||||||
|
adv = infVP vp
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : V2Q -> QS -> VPSlash ; -- ask (him) who came
|
-- : V2Q -> QS -> VPSlash ; -- ask (him) who came
|
||||||
SlashV2Q v2q qs = ;
|
SlashV2Q v2q qs = useVc v2q ** {
|
||||||
|
adv = qs.s
|
||||||
|
} ;
|
||||||
|
|
||||||
-}
|
|
||||||
-- : V2A -> AP -> VPSlash ; -- paint (it) red
|
-- : V2A -> AP -> VPSlash ; -- paint (it) red
|
||||||
SlashV2A v2a ap = useVc v2a ** {
|
SlashV2A v2a ap = useVc v2a ** {
|
||||||
adv = ap.s ! Sg ! Nom ++ ap.compl ! Sg
|
adv = ap.s ! Sg ! Nom ++ ap.compl ! Sg
|
||||||
@@ -90,11 +100,11 @@ lin
|
|||||||
|
|
||||||
-- : VPSlash -> Adv -> VPSlash ; -- use (it) here
|
-- : VPSlash -> Adv -> VPSlash ; -- use (it) here
|
||||||
AdvVPSlash = insertAdvSlash ;
|
AdvVPSlash = insertAdvSlash ;
|
||||||
{-
|
|
||||||
-- : VP -> Adv -> VP ; -- sleep , even though ...
|
-- : VP -> Adv -> VP ; -- sleep , even though ...
|
||||||
ExtAdvVP vp adv = vp ** { } ;
|
ExtAdvVP vp adv = vp ** {
|
||||||
|
adv = vp.adv ++ bindComma ++ adv.s
|
||||||
|
} ;
|
||||||
|
|
||||||
-}
|
|
||||||
-- : AdV -> VP -> VP ; -- always sleep
|
-- : AdV -> VP -> VP ; -- always sleep
|
||||||
AdVVP adv vp = vp ** {
|
AdVVP adv vp = vp ** {
|
||||||
s = \\vf => adv.s ++ vp.s ! vf
|
s = \\vf => adv.s ++ vp.s ! vf
|
||||||
@@ -105,6 +115,13 @@ lin
|
|||||||
s = \\o,vf => adv.s ++ vps.s ! o ! vf
|
s = \\o,vf => adv.s ++ vps.s ! o ! vf
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
-- : VP -> Prep -> VPSlash ; -- live in (it)
|
||||||
|
VPSlashPrep vp prep = vp ** {
|
||||||
|
s = \\_ => vp.s ;
|
||||||
|
adv = vp.obj ++ vp.adv ++ prep.s ;
|
||||||
|
c2 = prep.c
|
||||||
|
} ;
|
||||||
|
|
||||||
--2 Complements to copula
|
--2 Complements to copula
|
||||||
|
|
||||||
-- Adjectival phrases, noun phrases, and adverbs can be used.
|
-- Adjectival phrases, noun phrases, and adverbs can be used.
|
||||||
|
|||||||
Reference in New Issue
Block a user