diff --git a/languages.csv b/languages.csv index 1259a866..18d0d92a 100644 --- a/languages.csv +++ b/languages.csv @@ -18,7 +18,7 @@ Grc,Ancient Greek,ancient_greek,,,y,,n,n,,n Gre,Greek,greek,,,,,,,,y Heb,Hebrew,hebrew,,,,,n,n,,n Hin,Hindi,hindi,Hindustani,to_devanagari,y,,,,,y -Hun,Hungarian,hungarian,,,y,n,n,n,,n +Hun,Hungarian,hungarian,,,n,y,y,y,n,n Ice,Icelandic,icelandic,,,,,,n,,y Ina,Interlingua,interlingua,,,y,,n,n,,n Ita,Italian,italian,Romance,,y,,,,y,y diff --git a/src/api/CombinatorsHun.gf b/src/api/CombinatorsHun.gf new file mode 100644 index 00000000..61da4088 --- /dev/null +++ b/src/api/CombinatorsHun.gf @@ -0,0 +1,7 @@ +--# -path=.:alltenses:prelude:src/hungarian + +resource CombinatorsHun = Combinators with + (Cat = CatHun), + (Structural = StructuralHun), + (Noun = NounHun), + (Constructors = ConstructorsHun) ** open MissingHun in {} ; diff --git a/src/api/ConstructorsHun.gf b/src/api/ConstructorsHun.gf new file mode 100644 index 00000000..0b6002cb --- /dev/null +++ b/src/api/ConstructorsHun.gf @@ -0,0 +1,3 @@ +--# -path=.:alltenses:prelude:../hungarian + +resource ConstructorsHun = Constructors with (Grammar = GrammarHun) ** open MissingHun in {} ; diff --git a/src/api/SymbolicHun.gf b/src/api/SymbolicHun.gf new file mode 100644 index 00000000..07c68d72 --- /dev/null +++ b/src/api/SymbolicHun.gf @@ -0,0 +1,5 @@ +--# -path=.:../hungarian:../common:../abstract:../prelude + +resource SymbolicHun = Symbolic with + (Symbol = SymbolHun), + (Grammar = GrammarHun) ** open MissingHun in {} ; diff --git a/src/api/SyntaxHun.gf b/src/api/SyntaxHun.gf new file mode 100644 index 00000000..00ebb972 --- /dev/null +++ b/src/api/SyntaxHun.gf @@ -0,0 +1,4 @@ +--# -path=.:alltenses:prelude:../hungarian + +instance SyntaxHun of Syntax = + ConstructorsHun, CatHun, StructuralHun, CombinatorsHun ; diff --git a/src/api/TryHun.gf b/src/api/TryHun.gf new file mode 100644 index 00000000..2674f64c --- /dev/null +++ b/src/api/TryHun.gf @@ -0,0 +1,3 @@ +--# -path=.:../hungarian:../common:../abstract:../prelude + +resource TryHun = SyntaxHun, LexiconHun, ParadigmsHun - [mkAdv] ; diff --git a/src/hungarian/AdjectiveHun.gf b/src/hungarian/AdjectiveHun.gf index eb4afff4..a718d87a 100644 --- a/src/hungarian/AdjectiveHun.gf +++ b/src/hungarian/AdjectiveHun.gf @@ -1,59 +1,67 @@ -concrete AdjectiveHun of Adjective = CatHun ** open ResHun, Prelude in -{ ---{ --- --- lin --- --- PositA a = { --- s = \\_ => a.s ! AAdj Posit Nom ; --- isPre = True --- } ; --- ComparA a np = { --- s = \\_ => a.s ! AAdj Compar Nom ++ "than" ++ np.s ! npNom ; --- isPre = False --- } ; --- UseComparA a = { --- s = \\_ => a.s ! AAdj Compar Nom ; --- isPre = True --- } ; --- --- AdjOrd ord = { --- s = \\_ => ord.s ! Nom ; --- isPre = True --- } ; --- --- CAdvAP ad ap np = { --- s = \\a => ad.s ++ ap.s ! a ++ ad.p ++ np.s ! npNom ; --- isPre = False --- } ; --- --- ComplA2 a np = { --- s = \\_ => a.s ! AAdj Posit Nom ++ a.c2 ++ np.s ! NPAcc ; --- isPre = False --- } ; --- --- ReflA2 a = { --- s = \\ag => a.s ! AAdj Posit Nom ++ a.c2 ++ reflPron ! ag ; --- isPre = False --- } ; --- --- SentAP ap sc = { --- s = \\a => ap.s ! a ++ sc.s ; --- isPre = False --- } ; --- --- AdAP ada ap = { --- s = \\a => ada.s ++ ap.s ! a ; --- isPre = ap.isPre --- } ; --- --- UseA2 a = { --- s = \\_ => a.s ! AAdj Posit Nom ; --- isPre = True --- } ; --- --- AdvAP ap adv = {s = \\a => ap.s ! a ++ adv.s ; isPre = False} ; --- ---} +concrete AdjectiveHun of Adjective = CatHun ** open ResHun, Prelude in { + + flags optimize=all_subs ; + + lin + + -- : A -> AP ; + PositA a = emptyAP ** { + s = a.s ! Posit + } ; + + -- : A -> NP -> AP ; + ComparA a np = emptyAP ** { + s = a.s ! Compar ; + compar = np.s ! Ade ; + } ; + + -- : A2 -> NP -> AP ; -- married to her + ComplA2 a2 np = emptyAP ** { + s = a2.s ! Posit ; + compar = np.s ! a2.c2.c ++ a2.c2.s + } ; + + -- : A2 -> AP ; -- married to itself + -- ReflA2 a2 = a2 ** { } ; + + -- : A2 -> AP ; -- married + UseA2 = PositA ; + + -- : A -> AP ; -- warmer + UseComparA a = emptyAP ** { + s = a.s ! Compar ; + } ; + + -- : CAdv -> AP -> NP -> AP ; -- as cool as John + 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 = emptyAP ** ord ; + +-- Sentence and question complements defined for all adjectival +-- phrases, although the semantics is only clear for some adjectives. + + -- : AP -> SC -> AP ; -- good that she is here + -- SentAP ap sc = ap ** {} ; + +-- 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 ; + } ; + + +-- It can also be postmodified by an adverb, typically a prepositional phrase. + + -- : AP -> Adv -> AP ; -- warm by nature + AdvAP ap adv = ap ** { + s = \\af => ap.s ! af ++ adv.s ; + } ; } diff --git a/src/hungarian/AdverbHun.gf b/src/hungarian/AdverbHun.gf index 30c7864a..78a9bbb5 100644 --- a/src/hungarian/AdverbHun.gf +++ b/src/hungarian/AdverbHun.gf @@ -1,25 +1,35 @@ -concrete AdverbHun of Adverb = CatHun ** open ResHun, Prelude in -{ ---{ --- --- lin --- PositAdvAdj a = {s = a.s ! AAdv} ; --- ComparAdvAdj cadv a np = { --- s = cadv.s ++ a.s ! AAdv ++ cadv.p ++ np.s ! npNom --- } ; --- ComparAdvAdjS cadv a s = { --- s = cadv.s ++ a.s ! AAdv ++ cadv.p ++ s.s --- } ; --- --- PrepNP prep np = {s = prep.s ++ np.s ! NPAcc} ; --- --- AdAdv = cc2 ; --- PositAdAAdj a = {s = a.s ! AAdv} ; --- --- SubjS = cc2 ; --- --- AdnCAdv cadv = {s = cadv.s ++ cadv.p} ; --- ---} +concrete AdverbHun of Adverb = CatHun ** open ResHun, ParamHun, ParadigmsHun, Prelude in { -} +lin + + -- : A -> Adv ; + --PositAdvAdj adj = { } ; + + -- : CAdv -> A -> NP -> Adv ; -- more warmly than John + -- ComparAdvAdj cadv a np = { } ; + +-- ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more warmly than he runs + + -- : Prep -> NP -> Adv ; + PrepNP prep np = { + s = np.s ! prep.c ++ prep.s ; + } ; + +-- Adverbs can be modified by 'adadjectives', just like adjectives. + + --AdAdv : AdA -> Adv -> Adv ; -- very quickly + -- AdAdv ada adv = adv ** +-- Like adverbs, adadjectives can be produced by adjectives. + + -- : A -> AdA ; -- extremely +-- PositAdAAdj a = { } ; +-- Subordinate clauses can function as adverbs. + + -- : Subj -> S -> Adv ; + -- SubjS subj s = + +-- Comparison adverbs also work as numeral adverbs. + + --AdnCAdv : CAdv -> AdN ; -- less (than five) + --AdnCAdv cadv = {s = } ; +} ; diff --git a/src/hungarian/AllEngHun.gf b/src/hungarian/AllEngHun.gf deleted file mode 100644 index edf3b187..00000000 --- a/src/hungarian/AllEngHun.gf +++ /dev/null @@ -1,13 +0,0 @@ ---# -path=.:../abstract:../common:prelude - -abstract AllHunAbs = - Lang, - IrregHunAbs-[ - blow_V,burn_V,come_V,dig_V,fall_V,fly_V,freeze_V,go_V,lie_V,run_V, - sew_V,sing_V,sit_V,sleep_V,spit_V,stand_V,swell_V,swim_V,think_V], - ExtraHunAbs - ** -{ ---{} ; - -} diff --git a/src/hungarian/AllHun.gf b/src/hungarian/AllHun.gf index c8d4c3ed..0d147c37 100644 --- a/src/hungarian/AllHun.gf +++ b/src/hungarian/AllHun.gf @@ -1,13 +1,6 @@ --# -path=.:../abstract:../common:../prelude -concrete AllHun of AllHunAbs = +concrete AllHun of AllHunAbs = LangHun, - IrregHun-[ - blow_V,burn_V,come_V,dig_V,fall_V,fly_V,freeze_V,go_V,lie_V,run_V, - sew_V,sing_V,sit_V,sleep_V,spit_V,stand_V,swell_V,swim_V,think_V], - ExtraHun - ** -{ ---{} ; - -} + ExtendHun + ** {} ; diff --git a/src/hungarian/AllHunAbs.gf b/src/hungarian/AllHunAbs.gf new file mode 100644 index 00000000..4656dcf3 --- /dev/null +++ b/src/hungarian/AllHunAbs.gf @@ -0,0 +1,6 @@ +--# -path=.:../abstract:../common:prelude + +abstract AllHunAbs = + Lang, + Extend + ** {} ; diff --git a/src/hungarian/BackwardHun.gf b/src/hungarian/BackwardHun.gf deleted file mode 100644 index 7d42b77b..00000000 --- a/src/hungarian/BackwardHun.gf +++ /dev/null @@ -1,80 +0,0 @@ -concrete BackwardHun of Backward = CatHun ** open ResHun in -{ ---{ --- --- flags optimize=all_subs ; --- --- lin --- ----- A repository of obsolete constructs, needed for backward compatibility. ----- They create spurious ambiguities if used in combination with Lang. --- ----- from Verb 19/4/2008 --- --- ComplV2 v np = insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v) ; --- ComplV3 v np np2 = --- insertObj (\\_ => v.c2 ++ np.s ! Acc ++ v.c3 ++ np2.s ! Acc) (predV v) ; --- ComplV2V v np vp = --- insertObj (\\a => infVP v.isAux vp a) --- (insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ; --- ComplV2S v np s = --- insertObj (\\_ => conjThat ++ s.s) --- (insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ; --- ComplV2Q v np q = --- insertObj (\\_ => q.s ! QIndir) --- (insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ; --- ComplV2A v np ap = --- insertObj (\\_ => v.c2 ++ np.s ! Acc ++ ap.s ! np.a) (predV v) ; --- --- ReflV2 v = insertObj (\\a => v.c2 ++ reflPron ! a) (predV v) ; --- ----- from Sentence 19/4/2008 --- --- SlashV2 np v2 = --- mkClause (np.s ! Nom) np.a (predV v2) ** {c2 = v2.c2} ; --- --- SlashVVV2 np vv v2 = --- mkClause (np.s ! Nom) np.a --- (insertObj (\\a => infVP vv.isAux (predV v2) a) (predVV vv)) ** --- {c2 = v2.c2} ; --- ----- from Noun 19/4/2008 --- --- NumInt n = {s = n.s ; n = Pl} ; --- OrdInt n = {s = n.s ++ "th"} ; --- DEPRECATED --- --- DetSg quant ord = { --- s = quant.s ! Sg ++ ord.s ; --- n = Sg --- } ; --- --- DetPl quant num ord = { --- s = quant.s ! num.n ++ num.s ++ ord.s ; --- n = num.n --- } ; --- --- NoNum = {s = []; n = Pl } ; --- --- DefArt = {s = \\_ => artDef} ; --- --- IndefArt = { --- s = table { --- Sg => artIndef ; --- Pl => [] --- } --- } ; --- --- MassDet = {s = \\_ => []} ; --- --- --- ----- from Structural 19/4/2008 --- --- that_NP = regNP "that" Sg ; --- these_NP = regNP "these" Pl ; --- this_NP = regNP "this" Sg ; --- those_NP = regNP "those" Pl ; --- ---} - -} diff --git a/src/hungarian/CatHun.gf b/src/hungarian/CatHun.gf index 5c654156..159b97ad 100644 --- a/src/hungarian/CatHun.gf +++ b/src/hungarian/CatHun.gf @@ -1,94 +1,121 @@ -concrete CatHun of Cat = CommonX ** open ResHun, Prelude in -{ +concrete CatHun of Cat = CommonX ** open ResHun, Prelude in { + + flags optimize=all_subs ; + lincat --- ----- exception to CommonX, due to the distinction contracted/uncontracted negation --- --- Pol = {s : Str ; p : CPolarity} ; --- ----- Tensed/Untensed --- --- S = {s : Str} ; --- QS = {s : QForm => Str} ; --- RS = {s : Agr => Str ; c : NPCase} ; -- c for it clefts --- SSlash = {s : Str ; c2 : Str} ; --- ----- Sentence --- --- Cl = {s : ResHun.Tense => Anteriority => CPolarity => Order => Str} ; --- ClSlash = { --- s : ResHun.Tense => Anteriority => CPolarity => Order => Str ; --- c2 : Str --- } ; --- Imp = {s : CPolarity => ImpForm => Str} ; --- ----- Question --- --- QCl = {s : ResHun.Tense => Anteriority => CPolarity => QForm => Str} ; --- IP = {s : NPCase => Str ; n : Number} ; --- IComp = {s : Str} ; --- IDet = {s : Str ; n : Number} ; --- IQuant = {s : Number => Str} ; --- ----- Relative --- --- RCl = { --- s : ResHun.Tense => Anteriority => CPolarity => Agr => Str ; --- c : NPCase --- } ; --- RP = {s : RCase => Str ; a : RAgr} ; --- ----- Verb --- --- VP = ResHun.VP ; --- VPSlash = ResHun.VP ** {c2 : Str} ; --- Comp = {s : Agr => Str} ; --- ----- Adjective --- --- AP = {s : Agr => Str ; isPre : Bool} ; --- ----- Noun --- - N = {s : Number => Case => Str} ; --- NP = {s : NPCase => Str ; a : Agr} ; --- Pron = {s : NPCase => Str ; sp : Case => Str ; a : Agr} ; --- Det = {s : Str ; sp : NPCase => Str ; n : Number ; hasNum : Bool} ; --- Predet = {s : Str} ; --- Ord = { s : Case => Str } ; --- Num = {s : Case => Str ; n : Number ; hasCard : Bool} ; --- Card = {s : Case => Str ; n : Number} ; --- Quant = {s : Bool => Number => Str ; sp : Bool => Number => NPCase => Str} ; --- ----- Numeral --- --- Numeral = {s : CardOrd => Case => Str ; n : Number} ; --- Digits = {s : CardOrd => Case => Str ; n : Number ; tail : DTail} ; --- ----- Structural --- --- Conj = {s1,s2 : Str ; n : Number} ; ------b Conj = {s : Str ; n : Number} ; ------b DConj = {s1,s2 : Str ; n : Number} ; --- Subj = {s : Str} ; --- Prep = {s : Str} ; --- ----- Open lexical classes, e.g. Lexicon --- --- V, VS, VQ, VA = Verb ; -- = {s : VForm => Str} ; --- V2, V2A, V2Q, V2S = Verb ** {c2 : Str} ; --- V3 = Verb ** {c2, c3 : Str} ; --- VV = {s : VVForm => Str ; typ : VVType} ; --- V2V = Verb ** {c2,c3 : Str ; typ : VVType} ; --- --- A = {s : AForm => Str} ; --- A2 = {s : AForm => Str ; c2 : Str} ; --- --- N = {s : Number => Case => Str ; g : Gender} ; --- N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ; --- N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Str} ; --- PN = {s : Case => Str ; g : Gender} ; --- ---} + +--2 Sentences and clauses +-- Constructed in SentenceHun, and also in IdiomHun + + S = ResHun.Sentence ; + QS = SS ; + RS = ResHun.RP ; + -- relative sentence. Tense and polarity fixed, + -- but agreement may depend on the CN/NP it modifies. + + Cl = ResHun.ClSlash ; + ClSlash = ResHun.ClSlash ; + SSlash = ResHun.Sentence ; -- sentence missing NP; e.g. "she has looked at" + Imp = {s : Number => Polarity => Str} ; -- imperative e.g. "look at this" + +--2 Questions and interrogatives + +-- Constructed in QuestionHun. + + QCl = ResHun.QClause ; + IComp = SS ; -- interrogative complement of copula e.g. "where" + IDet = ResHun.Determiner ; -- interrogative determiner e.g. "how many" + IQuant = ResHun.Quant ; -- interrogative quantifier e.g. "which" + IP = ResHun.NounPhrase ; -- interrogative pronoun e.g. "who" + +--2 Subord clauses and pronouns + + RCl = ResHun.RClause ; + RP = ResHun.RP ; + +--2 Verb phrases + +-- Constructed in VerbHun. + + VP = ResHun.VerbPhrase ; + VPSlash = ResHun.VPSlash ; + Comp = ResHun.VerbPhrase ; + + +--2 Adjectival phrases + +-- Constructed in AdjectiveHun. + + AP = ResHun.AdjPhrase ; + + +--2 Nouns and noun phrases + +-- Constructed in NounHun. +-- Many atomic noun phrases e.g. "everybody" +-- are constructed in StructuralHun. +-- The determiner structure is +-- ``` Predet (QuantSg | QuantPl Num) Ord +-- as defined in NounHun. + + CN = ResHun.Noun ; + NP = ResHun.NounPhrase ; + Pron = ResHun.Pronoun ; --Pronouns need enough info to turn it into NP or Quant. + Det = ResHun.Determiner ; + Predet = {s : Str} ; + Quant = ResHun.Quant ; + Num = ResHun.Num ; + Ord = { + s : Number => Str ; -- Number => Case => Str ; -- Ord can come from AP and become AP again + n : Number -- Ord can come from Num, which has inherent number + } ; + DAP = ResHun.Determiner ; + + +--2 Numerals + +-- Constructed in NumeralHun. + + Card = ResHun.Numeral ; + Numeral = ResHun.Numeral ; + Digits = {s : CardOrd => Str ; n : Number} ; + + + +--2 Structural words + +-- Constructed in StructuralHun. + Conj = ResHun.Conj ; + Subj = SS ; + Prep = ResHun.Postposition ; + + + +--2 Words of open classes + +-- These are constructed in LexiconHun and in +-- additional lexicon modules. + + VS, -- sentence-complement verb e.g. "claim" + -- TODO: eventually different lincats + VQ, -- question-complement verb e.g. "wonder" + VA, -- adjective-complement verb e.g. "look" + V = ResHun.Verb ; + + VV, -- verb-phrase-complement verb e.g. "want" + V2A, -- verb with NP and AP complement e.g. "paint" + V2V, -- verb with NP and V complement e.g. "cause" + V2S, -- verb with NP and S complement e.g. "tell" + V2Q, -- verb with NP and Q complement e.g. "ask" + V2 = ResHun.Verb2 ; + V3 = ResHun.Verb3 ; + + A = ResHun.Adjective ; + A2 = ResHun.Adjective2 ; + + N, + N2, + N3 = ResHun.Noun ; + PN = ResHun.NounPhrase ; } diff --git a/src/hungarian/ConjunctionHun.gf b/src/hungarian/ConjunctionHun.gf index 67b83578..ddf55672 100644 --- a/src/hungarian/ConjunctionHun.gf +++ b/src/hungarian/ConjunctionHun.gf @@ -1,58 +1,65 @@ -concrete ConjunctionHun of Conjunction = - CatHun ** open ResHun, Coordination, Prelude in -{ ---{ --- --- flags optimize=all_subs ; --- --- lin --- --- ConjS = conjunctDistrSS ; --- --- ConjAdv = conjunctDistrSS ; --- --- ConjNP conj ss = conjunctDistrTable NPCase conj ss ** { --- a = conjAgr (agrP3 conj.n) ss.a --- } ; --- --- ConjAP conj ss = conjunctDistrTable Agr conj ss ** { --- isPre = ss.isPre --- } ; --- --- ConjRS conj ss = conjunctDistrTable Agr conj ss ** { --- c = ss.c --- } ; --- --- ConjIAdv = conjunctDistrSS ; --- --- ConjCN co ns = conjunctDistrTable2 Number Case co ns ** {g = Neutr} ; --- gender? --- ----- These fun's are generated from the list cat's. --- --- BaseS = twoSS ; --- ConsS = consrSS comma ; --- BaseAdv = twoSS ; --- ConsAdv = consrSS comma ; --- BaseNP x y = twoTable NPCase x y ** {a = conjAgr x.a y.a} ; --- ConsNP xs x = consrTable NPCase comma xs x ** {a = conjAgr xs.a x.a} ; --- BaseAP x y = twoTable Agr x y ** {isPre = andB x.isPre y.isPre} ; --- ConsAP xs x = consrTable Agr comma xs x ** {isPre = andB xs.isPre x.isPre} ; --- BaseRS x y = twoTable Agr x y ** {c = y.c} ; --- ConsRS xs x = consrTable Agr comma xs x ** {c = xs.c} ; --- BaseIAdv = twoSS ; --- ConsIAdv = consrSS comma ; --- BaseCN = twoTable2 Number Case ; --- ConsCN = consrTable2 Number Case comma ; --- --- lincat --- [S] = {s1,s2 : Str} ; --- [Adv] = {s1,s2 : Str} ; --- [IAdv] = {s1,s2 : Str} ; --- [NP] = {s1,s2 : NPCase => Str ; a : Agr} ; --- [AP] = {s1,s2 : Agr => Str ; isPre : Bool} ; --- [RS] = {s1,s2 : Agr => Str ; c : NPCase} ; --- [CN] = {s1,s2 : Number => Case => Str} ; --- ---} +concrete ConjunctionHun of Conjunction = + CatHun ** open ResHun, Coordination, Prelude in { + +-- Adverb and other simple {s : Str} types. +lincat + [Adv],[AdV],[IAdv],[S] = {s1,s2 : Str} ; + +lin + BaseAdv, BaseAdV, BaseIAdv, BaseS = twoSS ; + ConsAdv, ConsAdV, ConsIAdv, ConsS = consrSS comma ; + ConjAdv, ConjAdV, ConjIAdv, ConjS = conjunctDistrSS ; + +-- Adjectival phrases +lincat + [AP] = {s1,s2 : Number => Str} ; + +lin + 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 a as = + let aCont : AP = a ** {s = \\n => a.s ! n ++ a.compar} ; + in consrTable Number comma aCont as ; + ConjAP co as = conjunctDistrTable Number co as ** {compar = []} ; + +-- Noun phrases +lincat + [NP] = ResHun.BaseNP ** {s1,s2 : Case => Str} ; + +lin + BaseNP x y = twoTable Case x y ** y ; + ConsNP x xs = consrTable Case comma x xs ** xs ; + ConjNP co xs = conjunctDistrTable Case co xs ** xs ; + +-- Relative sentences +lincat + [RS] = {s1,s2 : Number => Case => Str} ; + +lin + BaseRS = twoTable2 Number Case ; + ConsRS = consrTable2 Number Case comma ; + ConjRS = conjunctDistrTable2 Number Case ; + +{- +lincat + [CN] = { } ; + +lin + BaseCN = {} ; + ConsCN = {} ; + ConjCN co cs = conjunctDistrTable … co cs ** cs ; + +lincat + [DAP] = + +lin + BaseDAP x y = x ** + ConsDAP xs x = xs ** + ConjDet conj xs = xs ** + +-} } diff --git a/src/hungarian/ConstructionHun.gf b/src/hungarian/ConstructionHun.gf new file mode 100644 index 00000000..51edc500 --- /dev/null +++ b/src/hungarian/ConstructionHun.gf @@ -0,0 +1,113 @@ +concrete ConstructionHun of Construction = CatHun ** open ParadigmsHun in { + +lincat + Timeunit = N ; + Weekday = N ; + Monthday = NP ; + Month = N ; + Year = NP ; +{- +lin + + timeunitAdv n time = + weekdayPunctualAdv w = ; -- on Sunday + weekdayHabitualAdv w = ; -- on Sundays + weekdayNextAdv w = -- next Sunday + weekdayLastAdv w = -- last Sunday + + monthAdv m = mkAdv in_Prep (mkNP m) ; + yearAdv y = mkAdv in_Prep y ; + dayMonthAdv d m = ; -- on 17 May + monthYearAdv m y = ; -- in May 2012 + dayMonthYearAdv d m y = ; -- on 17 May 2013 + + intYear = symb ; + intMonthday = symb ; + +lincat Language = N ; + +lin InLanguage l = mkAdv ???_Prep (mkNP l) ; + +lin + weekdayN w = w ; + monthN m = m ; + + weekdayPN w = mkPN w ; + monthPN m = mkPN m ; + + languageCN l = mkCN l ; + languageNP l = mkNP l ; + + +oper mkLanguage : Str -> N = \s -> mkN s ; + +---------------------------------------------- +---- lexicon of special names + +lin second_Timeunit = mkN "second" ; +lin minute_Timeunit = mkN "minute" ; +lin hour_Timeunit = mkN "hour" ; +lin day_Timeunit = mkN "day" ; +lin week_Timeunit = mkN "week" ; +lin month_Timeunit = mkN "month" ; +lin year_Timeunit = mkN "year" ; + +lin monday_Weekday = mkN "Monday" ; +lin tuesday_Weekday = mkN "Tuesday" ; +lin wednesday_Weekday = mkN "Wednesday" ; +lin thursday_Weekday = mkN "Thursday" ; +lin friday_Weekday = mkN "Friday" ; +lin saturday_Weekday = mkN "Saturday" ; +lin sunday_Weekday = mkN "Sunday" ; + +lin january_Month = mkN "January" ; +lin february_Month = mkN "February" ; +lin march_Month = mkN "March" ; +lin april_Month = mkN "April" ; +lin may_Month = mkN "May" ; +lin june_Month = mkN "June" ; +lin july_Month = mkN "July" ; +lin august_Month = mkN "August" ; +lin september_Month = mkN "September" ; +lin october_Month = mkN "October" ; +lin november_Month = mkN "November" ; +lin december_Month = mkN "December" ; + +lin afrikaans_Language = mkLanguage "Afrikaans" ; +lin amharic_Language = mkLanguage "Amharic" ; +lin arabic_Language = mkLanguage "Arabic" ; +lin bulgarian_Language = mkLanguage "Bulgarian" ; +lin catalan_Language = mkLanguage "Catalan" ; +lin chinese_Language = mkLanguage "Chinese" ; +lin danish_Language = mkLanguage "Danish" ; +lin dutch_Language = mkLanguage "Dutch" ; +lin english_Language = mkLanguage "Euslish" ; +lin estonian_Language = mkLanguage "Estonian" ; +lin finnish_Language = mkLanguage "Finnish" ; +lin french_Language = mkLanguage "French" ; +lin german_Language = mkLanguage "German" ; +lin greek_Language = mkLanguage "Greek" ; +lin hebrew_Language = mkLanguage "Hebrew" ; +lin hindi_Language = mkLanguage "Hindi" ; +lin japanese_Language = mkLanguage "Japanese" ; +lin italian_Language = mkLanguage "Italian" ; +lin latin_Language = mkLanguage "Latin" ; +lin latvian_Language = mkLanguage "Latvian" ; +lin maltese_Language = mkLanguage "Maltese" ; +lin nepali_Language = mkLanguage "Nepali" ; +lin norwegian_Language = mkLanguage "Norwegian" ; +lin persian_Language = mkLanguage "Persian" ; +lin polish_Language = mkLanguage "Polish" ; +lin punjabi_Language = mkLanguage "Punjabi" ; +lin romanian_Language = mkLanguage "Romanian" ; +lin russian_Language = mkLanguage "Russian" ; +lin sindhi_Language = mkLanguage "Sindhi" ; +lin spanish_Language = mkLanguage "Spanish" ; +lin swahili_Language = mkLanguage "Swahili" ; +lin swedish_Language = mkLanguage "Swedish" ; +lin thai_Language = mkLanguage "Thai" ; +lin turkish_Language = mkLanguage "Turkish" ; +lin urdu_Language = mkLanguage "Urdu" ; +-} + +} ; diff --git a/src/hungarian/ExtendHun.gf b/src/hungarian/ExtendHun.gf new file mode 100644 index 00000000..334eef4c --- /dev/null +++ b/src/hungarian/ExtendHun.gf @@ -0,0 +1,8 @@ +--# -path=.:../common:../abstract + +concrete ExtendHun of Extend = CatHun + -- ** ExtendFunctor - [] + -- with (Grammar=GrammarHun) + ** open Prelude, ResHun, NounHun in { + +} ; diff --git a/src/hungarian/ExtraEngHun.gf b/src/hungarian/ExtraEngHun.gf deleted file mode 100644 index 1339ee3a..00000000 --- a/src/hungarian/ExtraEngHun.gf +++ /dev/null @@ -1,40 +0,0 @@ -abstract ExtraHunAbs = Extra - [ProDrop] ** -{ ---{ --- ----- uncontracted negative polarity; contracted is the default for PNeg --- fun --- UncNeg : Pol ; --- ----- freely compounded nouns --- --- CompoundCN : CN -> CN -> CN ; -- rock album --- --- that_RP : RP ; -- "that" as a relational pronoun (IdRP is "which" / "who") --- --- each_Det : Det ; --- any_Quant : Quant ; --- ----- infinitive without to --- --- UttVPShort : VP -> Utt ; --- ----- emphasizing "do", e.g. "John does walk" --- --- do_VV : VV ; --- --- ------ these are obsolete: use UncNeg : Pol instead --- --- fun --- UncNegCl : Temp -> Pol -> Cl -> S ; --- UncNegQCl : Temp -> Pol -> QCl -> QS ; --- UncNegRCl : Temp -> Pol -> RCl -> RS ; --- --- UncNegImpSg : Pol -> Imp -> Utt; -- do not help yourself --- UncNegImpPl : Pol -> Imp -> Utt; -- do not help yourselves --- --- ---} - -} diff --git a/src/hungarian/ExtraHun.gf b/src/hungarian/ExtraHun.gf deleted file mode 100644 index 072e85f7..00000000 --- a/src/hungarian/ExtraHun.gf +++ /dev/null @@ -1,164 +0,0 @@ -concrete ExtraHun of ExtraHunAbs = CatHun ** - open ResHun, Coordination, Prelude, MorphoHun, ParadigmsHun in -{ ---{ --- --- lin --- GenNP np = {s = \\_,_ => np.s ! npGen ; sp = \\_,_,_ => np.s ! npGen} ; --- GenIP ip = {s = \\_ => ip.s ! NCase Gen} ; --- GenRP nu cn = { --- s = \\c => "whose" ++ nu.s ! Nom ++ --- case c of { --- RC _ (NCase Gen) => cn.s ! nu.n ! Gen ; --- _ => cn.s ! nu.n ! Nom --- } ; --- a = RAg (agrP3 Sg) --- } ; --- --- ComplBareVS v s = insertObj (\\_ => s.s) (predV v) ; --- --- StrandRelSlash rp slash = { --- s = \\t,a,p,ag => --- rp.s ! RC (fromAgr ag).g NPAcc ++ slash.s ! t ! a ! p ! ODir ++ slash.c2 ; --- c = NPAcc --- } ; --- EmptyRelSlash slash = { --- s = \\t,a,p,_ => slash.s ! t ! a ! p ! ODir ++ slash.c2 ; --- c = NPAcc --- } ; --- --- StrandQuestSlash ip slash = --- {s = \\t,a,b,q => --- (mkQuestion (ss (ip.s ! NPAcc)) slash).s ! t ! a ! b ! q ++ slash.c2 --- }; --- --- lincat --- VPI = {s : VPIForm => Agr => Str} ; --- [VPI] = {s1,s2 : VPIForm => Agr => Str} ; --- --- lin --- BaseVPI = twoTable2 VPIForm Agr ; --- ConsVPI = consrTable2 VPIForm Agr comma ; --- --- MkVPI vp = { --- s = \\v,a => vp.ad ++ vp.inf ++ vp.s2 ! a --- } ; --- ConjVPI = conjunctDistrTable2 VPIForm Agr ; --- ComplVPIVV vv vpi = ------- insertObj (\\a => infVP vv.typ vpi a) (predVV vv) ; --- let isAux = case vv.typ of {VVAux => True ; _ => False} in --- insertObj (\\a => (if_then_Str isAux [] "to") ++ vpi.s ! VPIInf ! a) (predVV vv) ; --- --- lin --- that_RP = --- { s = table { --- RC _ (NCase Gen) => "whose" ; --- RC _ _ => "that" ; --- _ => "that" ---- "in that" ? ----- RPrep Neutr => "which" ; ----- RPrep _ => "whom" --- } ; --- a = RNoAg --- } ; --- --- each_Det = mkDeterminer Sg "each" ; --- any_Quant = mkQuant "any" "any" ; --- ----- for VP conjunction --- --- param --- VPIForm = VPIInf | VPIPPart ; --- --- lincat --- VPS = {s : Agr => Str} ; --- [VPS] = {s1,s2 : Agr => Str} ; --- --- lin --- BaseVPS = twoTable Agr ; --- ConsVPS = consrTable Agr comma ; --- --- PredVPS np vpi = {s = np.s ! npNom ++ vpi.s ! np.a} ; --- --- MkVPS t p vp = { --- s = \\a => --- let --- verb = vp.s ! t.t ! t.a ! p.p ! ODir ! a ; --- verbf = verb.aux ++ verb.adv ++ verb.fin ++ verb.inf ; --- in t.s ++ p.s ++ vp.ad ++ verbf ++ vp.s2 ! a --- } ; --- --- ConjVPS = conjunctDistrTable Agr ; --- --- ICompAP ap = {s = "how" ++ ap.s ! agrP3 Sg} ; ---- IComp should have agr! --- --- IAdvAdv adv = {s = "how" ++ adv.s} ; --- --- PartVP vp = { --- s = \\a => vp.ad ++ vp.prp ++ vp.s2 ! a ; --- isPre = False ---- depends on whether there are complements --- } ; --- --- EmbedPresPart vp = {s = infVP VVPresPart vp (agrP3 Sg)} ; --- agr --- --- UttVPShort vp = {s = infVP VVAux vp (agrP3 Sg)} ; --- --- do_VV = { --- s = table { --- VVF VInf => ["do"] ; --- VVF VPres => "does" ; --- VVF VPPart => ["done"] ; ---- --- VVF VPresPart => ["doing"] ; --- VVF VPast => ["did"] ; --# notpresent --- VVPastNeg => ["didn't"] ; --# notpresent --- VVPresNeg => "doesn't" --- } ; --- typ = VVAux --- } ; --- --- ---lin --- UncNeg = {s = [] ; p = CNeg False} ; --- --- PassVPSlash vps = --- let --- be = predAux auxBe ; --- ppt = vps.ptp --- in { --- s = be.s ; --- prp = be.prp ; --- ptp = be.ptp ; --- inf = be.inf ; --- ad = vps.ad ; --- s2 = \\a => ppt ++ vps.s2 ! a ---- order --- } ; --- --------------- ------ obsolete: use UncNeg : Pol --- --- UncNegCl t p cl = { --- s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! unc p.p ! ODir --- } ; --- UncNegQCl t p cl = { --- s = \\q => t.s ++ p.s ++ cl.s ! t.t ! t.a ! unc p.p ! q --- } ; --- UncNegRCl t p cl = { --- s = \\r => t.s ++ p.s ++ cl.s ! t.t ! t.a ! unc p.p ! r ; --- c = cl.c --- } ; --- --- UncNegImpSg p imp = {s = p.s ++ imp.s ! unc p.p ! ImpF Sg False} ; --- UncNegImpPl p imp = {s = p.s ++ imp.s ! unc p.p ! ImpF Pl False} ; --- --- CompoundCN a b = {s = \\n,c => a.s ! Sg ! Nom ++ b.s ! n ! c ; g = b.g} ; --- --- oper --- unc : CPolarity -> CPolarity = \x -> case x of { --- CNeg _ => CNeg False ; --- _ => x --- } ; ---------- --- --- ---} - -} diff --git a/src/hungarian/GrammarHun.gf b/src/hungarian/GrammarHun.gf index b65226d1..325a57e9 100644 --- a/src/hungarian/GrammarHun.gf +++ b/src/hungarian/GrammarHun.gf @@ -1,8 +1,6 @@ ---# -path=.:../abstract:../common:prelude - -concrete GrammarHun of Grammar = - NounHun, - VerbHun, +concrete GrammarHun of Grammar = + NounHun, + VerbHun, AdjectiveHun, AdverbHun, NumeralHun, @@ -11,21 +9,12 @@ concrete GrammarHun of Grammar = RelativeHun, ConjunctionHun, PhraseHun, - TextX - [Pol,PPos,PNeg], + TextX, StructuralHun, IdiomHun, - TenseX - [Pol,PPos,PNeg] - ** open ResHun, Prelude in -{ ---{ --- ---flags startcat = Phr ; unlexer = text ; lexer = text ; --- ---lin --- PPos = {s = [] ; p = CPos} ; --- PNeg = {s = [] ; p = CNeg True} ; -- contracted: don't --- --- ---} ; + TenseX + ** { -} +flags startcat = Phr ; unlexer = text ; lexer = text ; + +} ; diff --git a/src/hungarian/IdiomHun.gf b/src/hungarian/IdiomHun.gf index 0710d0e4..ce9f3c6c 100644 --- a/src/hungarian/IdiomHun.gf +++ b/src/hungarian/IdiomHun.gf @@ -1,36 +1,47 @@ -concrete IdiomHun of Idiom = CatHun ** open Prelude, ResHun in -{ ---{ --- --- flags optimize=all_subs ; --- --- lin --- ImpersCl vp = mkClause "it" (agrP3 Sg) vp ; --- GenericCl vp = mkClause "one" (agrP3 Sg) vp ; --- --- CleftNP np rs = mkClause "it" (agrP3 Sg) --- (insertObj (\\_ => rs.s ! np.a) --- (insertObj (\\_ => np.s ! rs.c) (predAux auxBe))) ; --- --- CleftAdv ad s = mkClause "it" (agrP3 Sg) --- (insertObj (\\_ => conjThat ++ s.s) --- (insertObj (\\_ => ad.s) (predAux auxBe))) ; --- --- ExistNP np = --- mkClause "there" (agrP3 (fromAgr np.a).n) --- (insertObj (\\_ => np.s ! NPAcc) (predAux auxBe)) ; --- --- ExistIP ip = --- mkQuestion (ss (ip.s ! npNom)) --- (mkClause "there" (agrP3 ip.n) (predAux auxBe)) ; --- --- ProgrVP vp = insertObj (\\a => vp.ad ++ vp.prp ++ vp.s2 ! a) (predAux auxBe) ; --- --- ImpPl1 vp = {s = "let's" ++ infVP VVAux vp (AgP1 Pl)} ; --- --- ImpP3 np vp = {s = "let" ++ np.s ! NPAcc ++ infVP VVAux vp np.a} ; --- ---} --- + +--1 Idiom: Idiomatic Expressions + +concrete IdiomHun of Idiom = CatHun ** open Prelude, ResHun, VerbHun, NounHun, StructuralHun in { + +-- This module defines constructions that are formed in fixed ways, +-- often different even in closely related languages. + +{- lin + + + -- ImpersCl : VP -> Cl ; -- it is hot + -- GenericCl : VP -> Cl ; -- one sleeps + ImpersCl, + GenericCl = \vp -> predVP impersNP (passVP vp) ; + + CleftNP : NP -> RS -> Cl ; -- it is I who did it + CleftAdv : Adv -> S -> Cl ; -- it is here she slept + + -- : NP -> Cl ; -- there is a house + ExistNP np = + + ExistIP : IP -> QCl ; -- which houses are there + +-- 7/12/2012 generalizations of these + + ExistNPAdv : NP -> Adv -> Cl ; -- there is a house in Paris + ExistIPAdv : IP -> Adv -> QCl ; -- which houses are there in Paris + + -- : VP -> VP ; + ProgrVP vp = vp ** { + } ; + + + -- : VP -> Utt ; -- let's go + ImpPl1 vp = { } ; + + ImpP3 : NP -> VP -> Utt ; -- let John walk + +-- 3/12/2013 non-reflexive uses of "self" + + SelfAdvVP : VP -> VP ; -- is at home himself + SelfAdVVP : VP -> VP ; -- is himself at home + SelfNP : NP -> NP ; -- the president himself (is at home) +-} } diff --git a/src/hungarian/IrregHun.gf b/src/hungarian/IrregHun.gf deleted file mode 100644 index f113b81e..00000000 --- a/src/hungarian/IrregHun.gf +++ /dev/null @@ -1,185 +0,0 @@ ---# -path=.:prelude:../abstract:../common - -concrete IrregHun of IrregHunAbs = CatHun ** open ParadigmsHun in -{ ---{ --- ---flags optimize=values ; --- --- lin --- awake_V = irregV "awake" "awoke" "awoken" ; --- bear_V = irregV "bear" "bore" "born" ; --- beat_V = irregV "beat" "beat" "beat" ; --- become_V = irregV "become" "became" "become" ; --- begin_V = irregV "begin" "began" "begun" ; --- bend_V = irregV "bend" "bent" "bent" ; --- beset_V = irregV "beset" "beset" "beset" ; --- bet_V = irregDuplV "bet" "bet" "bet" ; --- bid_V = irregDuplV "bid" (variants {"bid" ; "bade"}) (variants {"bid" ; "bidden"}) ; --- bind_V = irregV "bind" "bound" "bound" ; --- bite_V = irregV "bite" "bit" "bitten" ; --- bleed_V = irregV "bleed" "bled" "bled" ; --- blow_V = irregV "blow" "blew" "blown" ; --- break_V = irregV "break" "broke" "broken" ; --- breed_V = irregV "breed" "bred" "bred" ; --- bring_V = irregV "bring" "brought" "brought" ; --- broadcast_V = irregV "broadcast" "broadcast" "broadcast" ; --- build_V = irregV "build" "built" "built" ; --- burn_V = irregV "burn" (variants {"burned" ; "burnt"}) (variants {"burned" ; "burnt"}) ; --- burst_V = irregV "burst" "burst" "burst" ; --- buy_V = irregV "buy" "bought" "bought" ; --- cast_V = irregV "cast" "cast" "cast" ; --- catch_V = irregV "catch" "caught" "caught" ; --- choose_V = irregV "choose" "chose" "chosen" ; --- cling_V = irregV "cling" "clung" "clung" ; --- come_V = irregV "come" "came" "come" ; --- cost_V = irregV "cost" "cost" "cost" ; --- creep_V = irregV "creep" "crept" "crept" ; --- cut_V = irregDuplV "cut" "cut" "cut" ; --- deal_V = irregV "deal" "dealt" "dealt" ; --- dig_V = irregDuplV "dig" "dug" "dug" ; --- dive_V = irregV "dive" (variants {"dived" ; "dove"}) "dived" ; --- do_V = mk5V "do" "does" "did" "done" "doing" ; --- draw_V = irregV "draw" "drew" "drawn" ; --- dream_V = irregV "dream" (variants {"dreamed" ; "dreamt"}) (variants {"dreamed" ; "dreamt"}) ; --- drive_V = irregV "drive" "drove" "driven" ; --- drink_V = irregV "drink" "drank" "drunk" ; --- eat_V = irregV "eat" "ate" "eaten" ; --- fall_V = irregV "fall" "fell" "fallen" ; --- feed_V = irregV "feed" "fed" "fed" ; --- feel_V = irregV "feel" "felt" "felt" ; --- fight_V = irregV "fight" "fought" "fought" ; --- find_V = irregV "find" "found" "found" ; --- fit_V = irregDuplV "fit" "fit" "fit" ; --- flee_V = irregV "flee" "fled" "fled" ; --- fling_V = irregV "fling" "flung" "flung" ; --- fly_V = irregV "fly" "flew" "flown" ; --- forbid_V = irregDuplV "forbid" "forbade" "forbidden" ; --- forget_V = irregDuplV "forget" "forgot" "forgotten" ; --- forgive_V = irregV "forgive" "forgave" "forgiven" ; --- forsake_V = irregV "forsake" "forsook" "forsaken" ; --- freeze_V = irregV "freeze" "froze" "frozen" ; --- get_V = irregDuplV "get" "got" "gotten" ; --- give_V = irregV "give" "gave" "given" ; --- go_V = mk5V "go" "goes" "went" "gone" "going" ; --- grind_V = irregV "grind" "ground" "ground" ; --- grow_V = irregV "grow" "grew" "grown" ; --- hang_V = irregV "hang" "hung" "hung" ; --- have_V = mk5V "have" "has" "had" "had" "having" ; --- hear_V = irregV "hear" "heard" "heard" ; --- hide_V = irregV "hide" "hid" "hidden" ; --- hit_V = irregDuplV "hit" "hit" "hit" ; --- hold_V = irregV "hold" "held" "held" ; --- hurt_V = irregV "hurt" "hurt" "hurt" ; --- keep_V = irregV "keep" "kept" "kept" ; --- kneel_V = irregV "kneel" "knelt" "knelt" ; --- knit_V = irregDuplV "knit" "knit" "knit" ; --- know_V = irregV "know" "knew" "know" ; --- lay_V = irregV "lay" "laid" "laid" ; --- lead_V = irregV "lead" "led" "led" ; --- leap_V = irregV "leap" (variants {"leaped" ; "lept"}) (variants {"leaped" ; "lept"}) ; --- learn_V = irregV "learn" (variants {"learned" ; "learnt"}) (variants {"learned" ; "learnt"}) ; --- leave_V = irregV "leave" "left" "left" ; --- lend_V = irregV "lend" "lent" "lent" ; --- let_V = irregDuplV "let" "let" "let" ; --- lie_V = irregV "lie" "lay" "lain" ; --- light_V = irregV "light" (variants {"lighted" ; "lit"}) "lighted" ; --- lose_V = irregV "lose" "lost" "lost" ; --- make_V = irregV "make" "made" "made" ; --- mean_V = irregV "mean" "meant" "meant" ; --- meet_V = irregV "meet" "met" "met" ; --- misspell_V = irregV "misspell" (variants {"misspelled" ; "misspelt"}) (variants {"misspelled" ; "misspelt"}) ; --- mistake_V = irregV "mistake" "mistook" "mistaken" ; --- mow_V = irregV "mow" "mowed" (variants {"mowed" ; "mown"}) ; --- overcome_V = irregV "overcome" "overcame" "overcome" ; --- overdo_V = mk5V "overdo" "overdoes" "overdid" "overdone" "overdoing" ; --- overtake_V = irregV "overtake" "overtook" "overtaken" ; --- overthrow_V = irregV "overthrow" "overthrew" "overthrown" ; --- pay_V = irregV "pay" "paid" "paid" ; --- plead_V = irregV "plead" "pled" "pled" ; --- prove_V = irregV "prove" "proved" (variants {"proved" ; "proven"}) ; --- put_V = irregDuplV "put" "put" "put" ; --- quit_V = irregDuplV "quit" "quit" "quit" ; --- read_V = irregV "read" "read" "read" ; --- rid_V = irregDuplV "rid" "rid" "rid" ; --- ride_V = irregV "ride" "rode" "ridden" ; --- ring_V = irregV "ring" "rang" "rung" ; --- rise_V = irregV "rise" "rose" "risen" ; --- run_V = irregDuplV "run" "ran" "run" ; --- saw_V = irregV "saw" "sawed" (variants {"sawed" ; "sawn"}) ; --- say_V = irregV "say" "said" "said" ; --- see_V = irregV "see" "saw" "seen" ; --- seek_V = irregV "seek" "sought" "sought" ; --- sell_V = irregV "sell" "sold" "sold" ; --- send_V = irregV "send" "sent" "sent" ; --- set_V = irregDuplV "set" "set" "set" ; --- sew_V = irregV "sew" "sewed" (variants {"sewed" ; "sewn"}) ; --- shake_V = irregV "shake" "shook" "shaken" ; --- shave_V = irregV "shave" "shaved" (variants {"shaved" ; "shaven"}) ; --- shear_V = irregV "shear" "shore" "shorn" ; --- shed_V = irregDuplV "shed" "shed" "shed" ; --- shine_V = irregV "shine" "shone" "shone" ; --- shoe_V = irregV "shoe" "shoed" (variants {"shoed" ; "shod"}) ; --- shoot_V = irregV "shoot" "shot" "shot" ; --- show_V = irregV "show" "showed" (variants {"showed" ; "shown"}) ; --- shrink_V = irregV "shrink" "shrank" "shrunk" ; --- shut_V = irregDuplV "shut" "shut" "shut" ; --- sing_V = irregV "sing" "sang" "sung" ; --- sink_V = irregV "sink" "sank" "sunk" ; --- sit_V = irregDuplV "sit" "sat" "sat" ; --- sleep_V = irregV "sleep" "slept" "slept" ; --- slay_V = irregV "slay" "slew" "slain" ; --- slide_V = irregV "slide" "slid" "slid" ; --- sling_V = irregV "sling" "slung" "slung" ; --- slit_V = irregDuplV "slit" "slit" "slit" ; --- smite_V = irregV "smite" "smote" "smitten" ; --- sow_V = irregV "sow" "sowed" (variants {"sowed" ; "sown"}) ; --- speak_V = irregV "speak" "spoke" "spoken" ; --- speed_V = irregV "speed" "sped" "sped" ; --- spend_V = irregV "spend" "spent" "spent" ; --- spill_V = irregV "spill" (variants {"spilled" ; "spilt"}) (variants {"spilled" ; "spilt"}) ; --- spin_V = irregDuplV "spin" "spun" "spun" ; --- spit_V = irregDuplV "spit" (variants {"spit" ; "spat"}) "spit" ; --- split_V = irregDuplV "split" "split" "split" ; --- spread_V = irregV "spread" "spread" "spread" ; --- spring_V = irregV "spring" (variants {"sprang" ; "sprung"}) "sprung" ; --- stand_V = irregV "stand" "stood" "stood" ; --- steal_V = irregV "steal" "stole" "stolen" ; --- stick_V = irregV "stick" "stuck" "stuck" ; --- sting_V = irregV "sting" "stung" "stung" ; --- stink_V = irregV "stink" "stank" "stunk" ; --- stride_V = irregV "stride" "strod" "stridden" ; --- strike_V = irregV "strike" "struck" "struck" ; --- string_V = irregV "string" "strung" "strung" ; --- strive_V = irregV "strive" "strove" "striven" ; --- swear_V = irregV "swear" "swore" "sworn" ; --- sweep_V = irregV "sweep" "swept" "swept" ; --- swell_V = irregV "swell" "swelled" (variants {"swelled" ; "swollen"}) ; --- swim_V = irregDuplV "swim" "swam" "swum" ; --- swing_V = irregV "swing" "swung" "swung" ; --- take_V = irregV "take" "took" "taken" ; --- teach_V = irregV "teach" "taught" "taught" ; --- tear_V = irregV "tear" "tore" "torn" ; --- tell_V = irregV "tell" "told" "told" ; --- think_V = irregV "think" "thought" "thought" ; --- thrive_V = irregV "thrive" (variants {"thrived" ; "throve"}) "thrived" ; --- throw_V = irregV "throw" "threw" "thrown" ; --- thrust_V = irregV "thrust" "thrust" "thrust" ; --- tread_V = irregV "tread" "trod" "trodden" ; --- understand_V = irregV "understand" "understood" "understood" ; --- uphold_V = irregV "uphold" "upheld" "upheld" ; --- upset_V = irregDuplV "upset" "upset" "upset" ; --- wake_V = irregV "wake" "woke" "woken" ; --- wear_V = irregV "wear" "wore" "worn" ; --- weave_V = irregV "weave" (variants {"weaved" ; "wove"}) (variants {"weaved" ; "woven"}) ; --- wed_V = irregDuplV "wed" "wed" "wed" ; --- weep_V = irregV "weep" "wept" "wept" ; --- wind_V = irregV "wind" "wound" "wound" ; --- win_V = irregDuplV "win" "won" "won" ; --- withhold_V = irregV "withhold" "withheld" "withheld" ; --- withstand_V = irregV "withstand" "withstood" "withstood" ; --- wring_V = irregV "wring" "wrung" "wrung" ; --- write_V = irregV "write" "wrote" "written" ; ---} - -} diff --git a/src/hungarian/IrregHunAbs.gf b/src/hungarian/IrregHunAbs.gf deleted file mode 100644 index 5c3edd3a..00000000 --- a/src/hungarian/IrregHunAbs.gf +++ /dev/null @@ -1,180 +0,0 @@ -abstract IrregHunAbs = Cat ** -{ ---{ ---fun --- awake_V : V ; --- bear_V : V ; --- beat_V : V ; --- become_V : V ; --- begin_V : V ; --- bend_V : V ; --- beset_V : V ; --- bet_V : V ; --- bid_V : V ; --- bind_V : V ; --- bite_V : V ; --- bleed_V : V ; --- blow_V : V ; --- break_V : V ; --- breed_V : V ; --- bring_V : V ; --- broadcast_V : V ; --- build_V : V ; --- burn_V : V ; --- burst_V : V ; --- buy_V : V ; --- cast_V : V ; --- catch_V : V ; --- choose_V : V ; --- cling_V : V ; --- come_V : V ; --- cost_V : V ; --- creep_V : V ; --- cut_V : V ; --- deal_V : V ; --- dig_V : V ; --- dive_V : V ; --- do_V : V ; --- draw_V : V ; --- dream_V : V ; --- drive_V : V ; --- drink_V : V ; --- eat_V : V ; --- fall_V : V ; --- feed_V : V ; --- feel_V : V ; --- fight_V : V ; --- find_V : V ; --- fit_V : V ; --- flee_V : V ; --- fling_V : V ; --- fly_V : V ; --- forbid_V : V ; --- forget_V : V ; --- forgive_V : V ; --- forsake_V : V ; --- freeze_V : V ; --- get_V : V ; --- give_V : V ; --- go_V : V ; --- grind_V : V ; --- grow_V : V ; --- hang_V : V ; --- have_V : V ; --- hear_V : V ; --- hide_V : V ; --- hit_V : V ; --- hold_V : V ; --- hurt_V : V ; --- keep_V : V ; --- kneel_V : V ; --- knit_V : V ; --- know_V : V ; --- lay_V : V ; --- lead_V : V ; --- leap_V : V ; --- learn_V : V ; --- leave_V : V ; --- lend_V : V ; --- let_V : V ; --- lie_V : V ; --- light_V : V ; --- lose_V : V ; --- make_V : V ; --- mean_V : V ; --- meet_V : V ; --- misspell_V : V ; --- mistake_V : V ; --- mow_V : V ; --- overcome_V : V ; --- overdo_V : V ; --- overtake_V : V ; --- overthrow_V : V ; --- pay_V : V ; --- plead_V : V ; --- prove_V : V ; --- put_V : V ; --- quit_V : V ; --- read_V : V ; --- rid_V : V ; --- ride_V : V ; --- ring_V : V ; --- rise_V : V ; --- run_V : V ; --- saw_V : V ; --- say_V : V ; --- see_V : V ; --- seek_V : V ; --- sell_V : V ; --- send_V : V ; --- set_V : V ; --- sew_V : V ; --- shake_V : V ; --- shave_V : V ; --- shear_V : V ; --- shed_V : V ; --- shine_V : V ; --- shoe_V : V ; --- shoot_V : V ; --- show_V : V ; --- shrink_V : V ; --- shut_V : V ; --- sing_V : V ; --- sink_V : V ; --- sit_V : V ; --- sleep_V : V ; --- slay_V : V ; --- slide_V : V ; --- sling_V : V ; --- slit_V : V ; --- smite_V : V ; --- sow_V : V ; --- speak_V : V ; --- speed_V : V ; --- spend_V : V ; --- spill_V : V ; --- spin_V : V ; --- spit_V : V ; --- split_V : V ; --- spread_V : V ; --- spring_V : V ; --- stand_V : V ; --- steal_V : V ; --- stick_V : V ; --- sting_V : V ; --- stink_V : V ; --- stride_V : V ; --- strike_V : V ; --- string_V : V ; --- strive_V : V ; --- swear_V : V ; --- sweep_V : V ; --- swell_V : V ; --- swim_V : V ; --- swing_V : V ; --- take_V : V ; --- teach_V : V ; --- tear_V : V ; --- tell_V : V ; --- think_V : V ; --- thrive_V : V ; --- throw_V : V ; --- thrust_V : V ; --- tread_V : V ; --- understand_V : V ; --- uphold_V : V ; --- upset_V : V ; --- wake_V : V ; --- wear_V : V ; --- weave_V : V ; --- wed_V : V ; --- weep_V : V ; --- wind_V : V ; --- win_V : V ; --- withhold_V : V ; --- withstand_V : V ; --- wring_V : V ; --- write_V : V ; ---} - -} diff --git a/src/hungarian/LangHun.gf b/src/hungarian/LangHun.gf index a15285fc..0a311313 100644 --- a/src/hungarian/LangHun.gf +++ b/src/hungarian/LangHun.gf @@ -1,14 +1,4 @@ ---# -path=.:../abstract:../common:../prelude - -concrete LangHun of Lang = +concrete LangHun of Lang = GrammarHun, - LexiconHun - ** -{ ---{ --- ---flags startcat = Phr ; unlexer = text ; lexer = text ; --- ---} ; - -} + LexiconHun, + ConstructionHun ; diff --git a/src/hungarian/LexiconHun.gf b/src/hungarian/LexiconHun.gf index e068cdac..79336d23 100644 --- a/src/hungarian/LexiconHun.gf +++ b/src/hungarian/LexiconHun.gf @@ -1,383 +1,418 @@ ---# -path=.:prelude +concrete LexiconHun of Lexicon = CatHun ** + open ParadigmsHun, ParamHun, Prelude in { -concrete LexiconHun of Lexicon = CatHun ** - open ParadigmsHun, Prelude in -{ ---{ --- - flags coding = utf8 ; +---- +-- A +-- lin add_V3 = mkV3 "" ; +-- lin airplane_N = mkN "" ; +-- lin alas_Interj = mkInterj "" ; +-- lin already_Adv = mkA "" ; +-- lin animal_N = mkN "" ; +--lin answer_V2S = mkV2S "válasz" ; +-- lin apartment_N = mkN "" ; +lin apple_N = mkN "alma" ; +lin art_N = mkN "müvészet" ; +-- lin ashes_N = mkN "" ; +-- lin ask_V2Q = mkV2 "" ; + +---- +-- B + +lin baby_N = mkN "bébi" ; +-- lin back_N = mkN "" ; +-- lin bad_A = mkA "" ; +lin bank_N = mkN "bank" ; +-- lin bark_N = mkN "" ; +-- lin beautiful_A = mkA "" ; +-- lin become_VA = mkVA "" ; +lin beer_N = mkN "sör" ; +-- lin beg_V2V = mkV2 "" ; +lin belly_N = mkN "has" ; +lin big_A = mkA "nagy" ; +-- lin bike_N = mkN "" ; +lin bird_N = mkN "madár" ; +-- lin bite_V2 = mkV2 "" ; +lin black_A = mkA "fekete" ; +-- lin blood_N = mkN "" ; +-- lin blow_V = mkV "" ; +lin blue_A = mkA "kék" ; +-- lin boat_N = mkN "" ; +-- lin bone_N = mkN "" ; +-- lin boot_N = mkN "" ; +-- lin boss_N = mkN "" ; +-- lin book_N = mkN "" ; +lin boy_N = mkN "fiú" ; +-- lin bread_N = mkN "" ; +-- lin break_V2 = mkV2 "" ; +-- lin breast_N = mkN "" ; +-- lin breathe_V = mkV "" ; +-- lin broad_A = mkA "" ; +-- lin brother_N2 = mkN "" ; +-- lin brown_A = mkA "" ; +-- lin burn_V = mkV "" ; +-- lin butter_N = mkN "" ; +-- lin buy_V2 = mkV2 "" ; + +---- +-- C + +-- lin camera_N = mkN "" ; +-- lin cap_N = mkN "" ; +-- lin car_N = mkN "" ; +-- lin carpet_N = mkN "" ; +lin cat_N = mkN "macska" ; +-- lin ceiling_N = mkN "" ; +-- lin chair_N = mkN "" ; +-- lin cheese_N = mkN "" ; +lin child_N = mkN "gyerek" ; +-- lin church_N = mkN "" ; +lin city_N = mkN "város" ; +-- lin clean_A = mkA "" ; +-- lin clever_A = mkA "" ; +-- lin close_V2 = mkV2 "" ; +-- lin cloud_N = mkN "" ; +lin coat_N = mkN "kabát" ; +-- lin cold_A = mkA "" ; +-- lin come_V = mkV "" ; +-- lin computer_N = mkN "" ; +-- lin correct_A = mkA "" ; +-- lin count_V2 = mkV2 "" ; +lin country_N = mkN "ország" ; +-- lin cousin_N = mkN "" ; +-- lin cow_N = mkN "" ; +-- lin cut_V2 = mkV2 "" ; -- -lin --- airplane_N = regN "airplane" ; --- alas_Interj = ss "alas" ; --- answer_V2S = mkV2S (mkV "answer" "answered") toP ; --- apartment_N = regN "apartment" ; --- apple_N = regN "apple" ; --- art_N = regN "art" ; --- ask_V2Q = mkV2Q (regV "ask") noPrep ; --- baby_N = regN "baby" ; --- bad_A = mkADeg "bad" "worse" "worst" "badly" ; --- bank_N = regN "bank" ; --- beautiful_A = compoundADeg (regA "beautiful") ; --- become_VA = mkVA (irregV "become" "became" "become") ; --- beer_N = regN "beer" ; --- beg_V2V = mkV2V (regDuplV "beg") noPrep toP ; --- -- prevent_V2V = ingV2V (mkV "prevent") noPrep (mkPrep "from") ; --- -- make_V2V = mkV2V make_V noPrep noPrep ; --- big_A = duplADeg "big" ; --- bike_N = regN "bike" ; --- bird_N = regN "bird" ; --- black_A = regADeg "black" ; --- blue_A = regADeg "blue" ; --- boat_N = regN "boat" ; --- book_N = regN "book" ; --- boot_N = regN "boot" ; --- boss_N = mkN human (regN "boss") ; --- boy_N = mkN masculine (regN "boy") ; --- bread_N = regN "bread" ; --- break_V2 = dirV2 (irregV "break" "broke" "broken") ; --- broad_A = regADeg "broad" ; --- brother_N2 = mkN2 (mkN masculine (mkN "brother")) (mkPrep "of") ; --- brown_A = regADeg "brown" ; --- butter_N = regN "butter" ; --- buy_V2 = dirV2 (irregV "buy" "bought" "bought") ; --- camera_N = regN "camera" ; --- cap_N = regN "cap" ; --- car_N = regN "car" ; --- carpet_N = regN "carpet" ; --- cat_N = regN "cat" ; --- ceiling_N = regN "ceiling" ; --- chair_N = regN "chair" ; --- cheese_N = regN "cheese" ; - child_N = mkN "gyerek" ; --- church_N = regN "church" ; --- city_N = regN "city" ; --- clean_A = regADeg "clean" ; --- clever_A = mkA "clever" "cleverer" ; --- close_V2 = dirV2 (regV "close") ; --- coat_N = regN "coat" ; --- cold_A = regADeg "cold" ; --- come_V = (irregV "come" "came" "come") ; --- computer_N = regN "computer" ; --- country_N = regN "country" ; --- cousin_N = mkN human (regN "cousin") ; --- cow_N = regN "cow" ; --- die_V = (regV "die") ; --- dirty_A = regADeg "dirty" ; --- distance_N3 = mkN3 (regN "distance") fromP toP ; --- doctor_N = mkN human (regN "doctor") ; --- dog_N = regN "dog" ; --- door_N = regN "door" ; --- drink_V2 = dirV2 (irregV "drink" "drank" "drunk") ; --- easy_A2V = mkA2V (regA "easy") forP ; --- eat_V2 = dirV2 (irregV "eat" "ate" "eaten") ; --- empty_A = regADeg "empty" ; --- enemy_N = regN "enemy" ; --- factory_N = regN "factory" ; --- father_N2 = mkN2 (mkN masculine (mkN "father")) (mkPrep "of") ; --- fear_VS = mkVS (regV "fear") ; --- find_V2 = dirV2 (irregV "find" "found" "found") ; --- fish_N = mk2N "fish" "fish" ; --- floor_N = regN "floor" ; --- forget_V2 = dirV2 (irregDuplV "forget" "forgot" "forgotten") ; --- fridge_N = regN "fridge" ; --- friend_N = mkN human (regN "friend") ; --- fruit_N = regN "fruit" ; --- fun_AV = mkAV (regA "fun") ; --- garden_N = regN "garden" ; --- girl_N = mkN feminine (regN "girl") ; --- glove_N = regN "glove" ; --- gold_N = regN "gold" ; --- good_A = mkADeg "good" "better" "best" "well" ; --- go_V = mk5V "go" "goes" "went" "gone" "going" ; --- green_A = regADeg "green" ; --- harbour_N = regN "harbour" ; --- hate_V2 = dirV2 (regV "hate") ; --- hat_N = regN "hat" ; --- hear_V2 = dirV2 (irregV "hear" "heard" "heard") ; --- hill_N = regN "hill" ; --- hope_VS = mkVS (regV "hope") ; --- horse_N = regN "horse" ; --- hot_A = duplADeg "hot" ; - house_N = mkN "ház" ; --- important_A = compoundADeg (regA "important") ; --- industry_N = regN "industry" ; --- iron_N = regN "iron" ; --- king_N = mkN masculine (regN "king") ; --- know_V2 = dirV2 (irregV "know" "knew" "known") ; --- know_VQ = mkVQ (irregV "know" "knew" "known") ; --- know_VS = mkVS (irregV "know" "knew" "known") ; --- lake_N = regN "lake" ; --- lamp_N = regN "lamp" ; --- learn_V2 = dirV2 (regV "learn") ; --- leather_N = regN "leather" ; --- leave_V2 = dirV2 (irregV "leave" "left" "left") ; --- like_V2 = dirV2 (regV "like") ; --- listen_V2 = prepV2 (regV "listen") toP ; --- live_V = (regV "live") ; --- long_A = regADeg "long" ; --- lose_V2 = dirV2 (irregV "lose" "lost" "lost") ; --- love_N = regN "love" ; --- love_V2 = dirV2 (regV "love") ; --- man_N = mkN masculine (mk2N "man" "men") ; --- married_A2 = mkA2 (regA "married") toP ; --- meat_N = regN "meat" ; --- milk_N = regN "milk" ; --- moon_N = regN "moon" ; --- mother_N2 = mkN2 (mkN feminine (mkN "mother")) (mkPrep "of") ; --- mountain_N = regN "mountain" ; --- music_N = regN "music" ; --- narrow_A = regADeg "narrow" ; --- new_A = regADeg "new" ; --- newspaper_N = regN "newspaper" ; --- oil_N = regN "oil" ; --- old_A = regADeg "old" ; --- open_V2 = dirV2 (regV "open") ; --- paint_V2A = mkV2A (regV "paint") noPrep ; --- paper_N = regN "paper" ; --- paris_PN = mkPN (mkN nonhuman (mkN "Paris")) ; --- peace_N = regN "peace" ; --- pen_N = regN "pen" ; --- planet_N = regN "planet" ; --- plastic_N = regN "plastic" ; --- play_V2 = dirV2 (regV "play") ; --- policeman_N = mkN masculine (mkN "policeman" "policemen") ; --- priest_N = mkN human (regN "priest") ; --- probable_AS = mkAS (regA "probable") ; --- queen_N = mkN feminine (regN "queen") ; --- radio_N = regN "radio" ; --- rain_V0 = mkV0 (regV "rain") ; --- read_V2 = dirV2 (irregV "read" "read" "read") ; --- red_A = duplADeg "red" ; --- religion_N = regN "religion" ; --- restaurant_N = regN "restaurant" ; --- river_N = regN "river" ; --- rock_N = regN "rock" ; --- roof_N = regN "roof" ; --- rubber_N = regN "rubber" ; --- run_V = (irregDuplV "run" "ran" "run") ; --- say_VS = mkVS (irregV "say" "said" "said") ; --- school_N = regN "school" ; --- science_N = regN "science" ; --- sea_N = regN "sea" ; --- seek_V2 = dirV2 (irregV "seek" "sought" "sought") ; --- see_V2 = dirV2 (irregV "see" "saw" "seen") ; --- sell_V3 = dirV3 (irregV "sell" "sold" "sold") toP ; --- send_V3 = dirV3 (irregV "send" "sent" "sent") toP ; --- sheep_N = mk2N "sheep" "sheep" ; --- ship_N = regN "ship" ; --- shirt_N = regN "shirt" ; --- shoe_N = regN "shoe" ; --- shop_N = regN "shop" ; --- short_A = regADeg "short" ; --- silver_N = regN "silver" ; --- sister_N = mkN feminine (mkN "sister") ; --- sleep_V = (irregV "sleep" "slept" "slept") ; --- small_A = regADeg "small" ; --- snake_N = regN "snake" ; --- sock_N = regN "sock" ; --- speak_V2 = dirV2 (irregV "speak" "spoke" "spoken") ; --- star_N = regN "star" ; --- steel_N = regN "steel" ; --- stone_N = regN "stone" ; --- stove_N = regN "stove" ; --- student_N = mkN human (regN "student") ; --- stupid_A = mkA "stupid" ; --- sun_N = regN "sun" ; --- switch8off_V2 = dirV2 (partV (regV "switch") "off") ; --- switch8on_V2 = dirV2 (partV (regV "switch") "on") ; --- table_N = regN "table" ; --- talk_V3 = mkV3 (regV "talk") toP aboutP ; --- teacher_N = mkN human (regN "teacher") ; --- teach_V2 = dirV2 (irregV "teach" "taught" "taught") ; --- television_N = regN "television" ; --- thick_A = regADeg "thick" ; --- thin_A = duplADeg "thin" ; --- train_N = regN "train" ; --- travel_V = (regDuplV "travel") ; --- tree_N = regN "tree" ; --- ---- trousers_N = regN "trousers" ; --- ugly_A = mkA "ugly" ; --- understand_V2 = dirV2 (irregV "understand" "understood" "understood") ; --- university_N = regN "university" ; --- village_N = regN "village" ; --- wait_V2 = prepV2 (regV "wait") forP ; --- walk_V = (regV "walk") ; --- warm_A = regADeg "warm" ; --- war_N = regN "war" ; --- watch_V2 = dirV2 (regV "watch") ; --- water_N = regN "water" ; --- white_A = mkA "white" ; --- window_N = regN "window" ; --- wine_N = regN "wine" ; --- win_V2 = dirV2 (irregDuplV "win" "won" "won") ; --- woman_N = mkN feminine (mk2N "woman" "women") ; --- wonder_VQ = mkVQ (mkV "wonder" "wondered") ; --- wood_N = regN "wood" ; --- write_V2 = dirV2 (irregV "write" "wrote" "written") ; --- yellow_A = mkA "yellow" ; --- young_A = regADeg "young" ; +-- ---- +-- -- D -- --- do_V2 = dirV2 (mk5V "do" "does" "did" "done" "doing") ; --- now_Adv = mkAdv "now" ; --- already_Adv = mkAdv "already" ; --- song_N = regN "song" ; --- add_V3 = dirV3 (regV "add") toP ; --- number_N = regN "number" ; --- put_V2 = prepV2 (irregDuplV "put" "put" "put") noPrep ; --- stop_V = regDuplV "stop" ; --- jump_V = regV "jump" ; +-- lin day_N = mkN "" ; +-- lin die_V = mkV "" ; +-- lin dig_V = mkV "" ; +-- lin dirty_A = mkA "" ; +-- lin distance_N3 = mkN "" ; +-- lin do_V2 = mkV2 do_V ; +-- lin doctor_N = mkN "" ; +-- lin dog_N = mkN "" ; +lin door_N = mkN "ajtó" ; +-- lin drink_V2 = mkV2 "" ; +-- lin dry_A = mkA "" ; +-- lin dull_A = mkA "" ; +-- lin dust_N = mkN "" ; + +---- +-- E + +-- lin ear_N = mkN "" ; +-- lin earth_N = mkN "" ; +-- lin eat_V2 = mkV2 "" ; +-- lin egg_N = mkN "" ; +-- lin empty_A = mkA "" ; +-- lin enemy_N = mkN "" ; +lin eye_N = mkN "szem" ; + +---- +-- F + +-- lin factory_N = mkN "" ; +-- lin fall_V = mkV "" ; +-- lin far_Adv = mkA "" ; +-- lin fat_N = mkN "" ; +-- lin father_N2 = mkN2 "" ; +-- lin fear_V2 = mkV2 "" ; +-- lin fear_VS = mkVS "" ; +-- lin feather_N = mkN "" ; +-- lin fight_V2 = mkV2 "" ; +-- lin find_V2 = mkV2 "" ; +-- lin fingernail_N = mkN "" ; +-- lin fire_N = mkN "" ; +lin fish_N = mkN "hal" ; +-- lin float_V = mkV "" ; +-- lin floor_N = mkN "" ; +-- lin flow_V = mkV "" ; +-- lin flower_N = mkN "" ; +lin fly_V = mkV "repül" ; +-- lin fog_N = mkN "" ; +-- lin foot_N = mkN "" ; +-- lin forest_N = mkN "" ; +-- lin forget_V2 = mkV2 "" ; +-- lin freeze_V = mkV "" ; +-- lin fridge_N = mkN "" ; +-- lin friend_N = mkN "" ; +lin fruit_N = mkN "gyümölcs" ; +-- lin full_A = mkA "" ; +-- --lin fun_AV + +---- +-- G + +lin garden_N = mkN "kert" ; +lin girl_N = mkN "lány" ; +-- lin give_V3 = mkV3 "" ; +-- lin glove_N = mkN "" ; +-- lin go_V = mkV "" ; +lin gold_N = mkN "arany" ; +-- lin good_A = mkA "" ; +-- lin grammar_N = mkN "" ; +-- lin grass_N = mkN "" ; +-- lin green_A = mkA "" ; + +---- +-- H + +-- lin hair_N = mkN "" ; +lin hand_N = mkN "kéz" ; +-- lin harbour_N = mkN "" ; +-- lin hat_N = mkN "" ; +-- lin hate_V2 = mkV2 "" ; +lin head_N = mkN "fej" ; +-- lin hear_V2 = mkV2 "" ; +-- lin heart_N = mkN "" ; +-- lin heavy_A = mkA "" ; +-- lin hill_N = mkN "" ; +-- lin hit_V2 = mkV2 "" ; +-- lin hold_V2 = mkV2 "" ; +-- lin hope_VS = mkV "" ; +-- lin horn_N = mkN "" ; +lin horse_N = mkN "ló" ; +-- lin hot_A = mkA "" ; +lin house_N = mkN "ház" ; +-- lin hunt_V2 = mkV2 "" ; +-- lin husband_N = mkN "" ; + +-------- +-- I - K + +-- lin ice_N = mkN "" ; +-- lin industry_N = mkN "" ; +-- lin iron_N = mkN "" ; +-- lin john_PN = mkPN "" ; +-- lin jump_V = mkV "" ; +-- lin kill_V2 = mkV2 "" ; +-- lin king_N = mkN "" ; +-- lin knee_N = mkN "" ; +-- lin know_V2 = mkV2 "" ; +-- lin know_VQ = mkVQ "" ; +-- lin know_VS = mkV "" ; + + +---- +-- L + +-- lin lake_N = mkN "" ; +-- lin lamp_N = mkN "" ; +-- lin language_N = mkN "" ; +-- lin laugh_V = mkV "" ; +-- lin leaf_N = mkN "" ; +-- lin learn_V2 = mkV2 "" ; +-- lin leather_N = mkN "" ; +-- lin leave_V2 = mkV2 "" ; +-- lin leg_N = mkN "" ; +-- lin lie_V = mkV "" ; +-- lin like_V2 = mkV2 "" ; +-- lin listen_V2 = mkV2 "" ; +-- lin live_V = mkV ""; +-- lin liver_N = mkN "" ; +-- lin long_A = mkA "" ; +-- lin lose_V2 = mkV2 "" ; +-- lin louse_N = mkN "" ; +-- lin love_N = mkN "" ; +-- lin love_V2 = mkV2 "" ; + +---- +-- M + +lin man_N = mkN "férfi" "ak" harmA ; -- force plural allomorph and a-harmony +lin married_A2 = mkA2 "házas" Ins ; +-- lin meat_N = mkN "" ; +-- lin milk_N = mkN "" ; +-- lin moon_N = mkN "" ; +lin mother_N2 = mkN2 "anya" ; +-- lin mountain_N = mkN "" ; +-- lin mouth_N = mkN "" ; +-- lin music_N = mkN "" ; + +---- +-- N + +lin name_N = mkN "név" ; +-- lin narrow_A = mkA "" ; +-- lin near_A = mkA "" ; +-- lin neck_N = mkN "" ; +-- lin new_A = mkA "" ; +-- lin newspaper_N = mkN "" ; +-- lin night_N = mkN "" ; +-- lin nose_N = mkN "" ; +lin now_Adv = mkAdv "most" ; +-- lin number_N = mkN "" ; -- --- left_Ord = mkOrd "left" ; --- right_Ord = mkOrd "right" ; --- far_Adv = mkAdv "far" ; --- correct_A = (regA "correct") ; --- dry_A = regA "dry" ; --- dull_A = regA "dull" ; --- full_A = regA "full" ; --- heavy_A = regA "heavy" ; --- near_A = regA "near" ; --- rotten_A = (regA "rotten") ; --- round_A = regA "round" ; --- sharp_A = regA "sharp" ; --- smooth_A = regA "smooth" ; --- straight_A = regA "straight" ; --- wet_A = regA "wet" ; ---- --- wide_A = regA "wide" ; --- animal_N = regN "animal" ; --- ashes_N = regN "ash" ; -- FIXME: plural only? --- back_N = regN "back" ; --- bark_N = regN "bark" ; --- belly_N = regN "belly" ; --- blood_N = regN "blood" ; --- bone_N = regN "bone" ; --- breast_N = regN "breast" ; --- cloud_N = regN "cloud" ; --- day_N = regN "day" ; --- dust_N = regN "dust" ; --- ear_N = regN "ear" ; --- earth_N = regN "earth" ; --- egg_N = regN "egg" ; --- eye_N = regN "eye" ; --- fat_N = regN "fat" ; --- feather_N = regN "feather" ; --- fingernail_N = regN "fingernail" ; --- fire_N = regN "fire" ; --- flower_N = regN "flower" ; --- fog_N = regN "fog" ; --- foot_N = mk2N "foot" "feet" ; --- forest_N = regN "forest" ; --- grass_N = regN "grass" ; --- guts_N = regN "gut" ; -- FIXME: no singular --- hair_N = regN "hair" ; --- hand_N = regN "hand" ; --- head_N = regN "head" ; --- heart_N = regN "heart" ; --- horn_N = regN "horn" ; --- husband_N = mkN masculine (regN "husband") ; --- ice_N = regN "ice" ; --- knee_N = regN "knee" ; --- leaf_N = mk2N "leaf" "leaves" ; --- leg_N = regN "leg" ; --- liver_N = regN "liver" ; --- louse_N = mk2N "louse" "lice" ; --- mouth_N = regN "mouth" ; --- name_N = regN "name" ; --- neck_N = regN "neck" ; --- night_N = regN "night" ; --- nose_N = regN "nose" ; --- person_N = mkN human (regN "person") ; --- rain_N = regN "rain" ; --- road_N = regN "road" ; --- root_N = regN "root" ; --- rope_N = regN "rope" ; --- salt_N = regN "salt" ; --- sand_N = regN "sand" ; --- seed_N = regN "seed" ; --- skin_N = regN "skin" ; --- sky_N = regN "sky" ; --- smoke_N = regN "smoke" ; --- snow_N = regN "snow" ; --- stick_N = regN "stick" ; --- tail_N = regN "tail" ; --- tongue_N = regN "tongue" ; --- tooth_N = mk2N "tooth" "teeth" ; --- wife_N = mkN feminine (mk2N "wife" "wives") ; --- wind_N = regN "wind" ; --- wing_N = regN "wing" ; --- worm_N = regN "worm" ; --- year_N = regN "year" ; --- blow_V = IrregHun.blow_V ; --- breathe_V = dirV2 (regV "breathe") ; --- burn_V = IrregHun.burn_V ; --- dig_V = IrregHun.dig_V ; --- fall_V = IrregHun.fall_V ; --- float_V = regV "float" ; --- flow_V = regV "flow" ; --- fly_V = IrregHun.fly_V ; --- freeze_V = IrregHun.freeze_V ; --- give_V3 = dirV3 give_V toP ; --- laugh_V = regV "laugh" ; --- lie_V = IrregHun.lie_V ; --- play_V = regV "play" ; --- sew_V = IrregHun.sew_V ; --- sing_V = IrregHun.sing_V ; --- sit_V = IrregHun.sit_V ; --- smell_V = regV "smell" ; --- spit_V = IrregHun.spit_V ; --- stand_V = IrregHun.stand_V ; --- swell_V = IrregHun.swell_V ; --- swim_V = IrregHun.swim_V ; --- think_V = IrregHun.think_V ; --- turn_V = regV "turn" ; --- vomit_V = mkV "vomit" "vomited" ; +-- -------- +-- -- O - P -- --- bite_V2 = dirV2 IrregHun.bite_V ; --- count_V2 = dirV2 (regV "count") ; --- cut_V2 = dirV2 IrregHun.cut_V ; --- fear_V2 = dirV2 (regV "fear") ; --- fight_V2 = dirV2 fight_V ; --- hit_V2 = dirV2 hit_V ; --- hold_V2 = dirV2 hold_V ; --- hunt_V2 = dirV2 (regV "hunt") ; --- kill_V2 = dirV2 (regV "kill") ; --- pull_V2 = dirV2 (regV "pull") ; --- push_V2 = dirV2 (regV "push") ; --- rub_V2 = dirV2 (regDuplV "rub") ; --- scratch_V2 = dirV2 (regV "scratch") ; --- split_V2 = dirV2 split_V ; --- squeeze_V2 = dirV2 (regV "squeeze") ; --- stab_V2 = dirV2 (regDuplV "stab") ; --- suck_V2 = dirV2 (regV "suck") ; --- throw_V2 = dirV2 throw_V ; --- tie_V2 = dirV2 (regV "tie") ; --- wash_V2 = dirV2 (regV "wash") ; --- wipe_V2 = dirV2 (regV "wipe") ; -- ----- other_A = regA "other" ; +lin oil_N = mkN "olaj" ; +-- lin old_A = mkA "" ; +-- lin open_V2 = mkV2 "" ; +-- lin paint_V2A = mkV2A "" ; +-- lin paper_N = mkN "" ; +-- lin paris_PN = mkPN "Paris" ; +lin peace_N = mkN "béke" ; +-- lin pen_N = mkN "" ; +lin person_N = mkN "ember" ; +-- lin planet_N = mkN "" ; +-- lin plastic_N = mkN "" ; +-- lin play_V = mkV "" ; +-- lin policeman_N = mkN "" ; +-- lin priest_N = mkN "" ; +-- lin pull_V2 = mkV2 "" ; +-- lin push_V2 = mkV2 "" ; +-- lin put_V2 = mkV2 "" ; -- --- grammar_N = regN "grammar" ; --- language_N = regN "language" ; --- rule_N = regN "rule" ; +-- -------- +-- -- Q - R -- ----- added 4/6/2007 --- john_PN = mkPN (mkN masculine (mkN "John")) ; --- question_N = regN "question" ; --- ready_A = regA "ready" ; --- reason_N = regN "reason" ; --- today_Adv = mkAdv "today" ; --- uncertain_A = regA "uncertain" ; --- ---oper --- aboutP = mkPrep "about" ; --- atP = mkPrep "at" ; --- forP = mkPrep "for" ; --- fromP = mkPrep "from" ; --- inP = mkPrep "in" ; --- onP = mkPrep "on" ; --- toP = mkPrep "to" ; --- ---} ; +-- lin queen_N = mkN "" ; +lin question_N = mkN "kérdés" ; +-- lin radio_N = mkN "" ; +-- lin rain_N = mkN "" ; +-- lin rain_V0 = mkV "" ; +-- lin read_V2 = mkV2 "" ; +-- lin ready_A = mkA "" ; +-- lin reason_N = mkN "" ; +lin red_A = mkA "piros" ; +-- lin religion_N = mkN "" ; +-- lin restaurant_N = mkN "" ; +-- lin river_N = mkN "" ; +lin road_N = mkN "út" ; +-- lin rock_N = mkN "" ; +-- lin roof_N = mkN "" ; +-- lin root_N = mkN "" ; +-- lin rope_N = mkN "" ; +-- lin rotten_A = mkA "" ; +-- lin round_A = mkA "" ; +-- lin rub_V2 = mkV2 "" ; +-- lin rubber_N = mkN "" ; +-- lin rule_N = mkN "" ; +-- lin run_V = mkV "" ; + +---- +-- S + +-- lin salt_N = mkN "" ; +-- lin sand_N = mkN "" ; +-- lin say_VS = mkVS "" ; +-- lin school_N = mkN "" ; +-- lin science_N = mkN "" ; +-- lin scratch_V2 = mkV2 "" ; +-- lin sea_N = mkN "" ; +lin see_V2 = mkV2 "lát" ; +-- lin seed_N = mkN "" ; +-- lin seek_V2 = mkV2 "" ; +-- lin sell_V3 = mkV3 "" ; +-- lin send_V3 = mkV3 "" ; +-- lin sew_V = mkV "" ; +-- lin sharp_A = mkA "" ; +-- lin sheep_N = mkN "" fem ; +-- lin ship_N = mkN "" ; +lin shirt_N = mkN "ing" ; +lin shoe_N = mkN "cipő" ; +-- lin shop_N = mkN "" ; +-- lin short_A = mkA "" ; +-- lin silver_N = mkN "" ; +-- lin sing_V = mkV "" ; +-- lin sister_N = mkN "" ; +-- lin sit_V = mkV "" ; +-- lin skin_N = mkN "" ; +-- lin sky_N = mkN "" ; +-- lin sleep_V = mkV "" ; +-- lin small_A = mkA "" ; +-- lin smell_V = mkV "" ; +-- lin smoke_N = mkN "" ; +-- lin smooth_A = mkA "" ; +-- lin snake_N = mkN "" ; +-- lin snow_N = mkN "" ; +-- lin sock_N = mkN "" ; +-- lin song_N = mkN "" ; +-- lin speak_V2 = mkV2 "" ; +-- lin spit_V = mkV "" ; +-- lin split_V2 = mkV2 "" ; +-- lin squeeze_V2 = mkV2 "" ; +-- lin stab_V2 = mkV2 "" ; +-- lin stand_V = mkV "" ; +-- lin star_N = mkN "" ; +-- lin steel_N = mkN "" ; +-- lin stick_N = mkN "" ; +lin stone_N = mkN "kő"; +-- lin stop_V = mkV "" ; +-- lin stove_N = mkN "" ; +-- lin straight_A = mkA "" ; +-- lin student_N = mkN "" ; +-- lin stupid_A = mkA "" ; +-- lin suck_V2 = mkV2 "" ; +-- lin sun_N = mkN "" ; +-- lin swell_V = mkV "" ; +-- lin swim_V = mkV "" ; + +---- +-- T + + +lin table_N = mkN "asztal" ; +-- lin tail_N = mkN "" ; +lin talk_V3 = mkV3 "beszél" ; +-- lin teach_V2 = mkV2 "" ; +lin teacher_N = mkN "tanár" ; +-- lin television_N = mkN "" ; +-- lin thick_A = mkA "" ; +-- lin thin_A = mkA "" ; +-- lin think_V = mkV "" ; +-- lin throw_V2 = mkV2 "" ; +-- lin tie_V2 = mkV2 "" ; +lin today_Adv = mkAdv "ma" ; +-- lin tongue_N = mkN "" ; +-- lin tooth_N = mkN "" ; +-- lin train_N = mkN "" ; +-- lin travel_V = mkV "" ; +-- lin tree_N = mkN "" ; +-- lin turn_V = mkV "" ; + +-------- +-- U - V + +-- lin ugly_A = mkA "" ; +-- lin uncertain_A = mkA "" ; +-- lin understand_V2 = mkV2 "" ; +-- lin university_N = mkN "" ; +lin village_N = mkN "falu" ; +-- lin vomit_V = mkV2 "" ; + +-------- +-- W - Y + +-- lin wait_V2 = mkV2 "" ; +-- lin walk_V = mkV "" ; +-- lin war_N = mkN "" ; +-- lin warm_A = mkA "" ; +-- lin wash_V2 = mkV2 "" ; +-- lin watch_V2 = mkV2 "" ; +lin water_N = mkN "víz" ; +-- lin wet_A = mkA "" ; +-- lin white_A = mkA "" ; +-- lin wide_A = mkA "" ; +-- lin wife_N = mkN "" ; +-- lin win_V2 = mkV2 "" ; +-- lin wind_N = mkN "" ; +lin window_N = mkN "ablak" ; +lin wine_N = mkN "bor" ; +-- lin wing_N = mkN "" ; +-- lin wipe_V2 = mkV2 "" ; +lin woman_N = mkN "nő" "k" harmO ; +-- lin wonder_VQ = mkVQ "" ; +-- lin wood_N = mkN "" ; +-- lin worm_N = mkN "" ; +-- lin write_V2 = mkV2 "" ; +-- lin year_N = mkN "" ; +-- lin yellow_A = mkA "" ; +-- lin young_A = mkA "" ; } diff --git a/src/hungarian/MissingHun.gf b/src/hungarian/MissingHun.gf new file mode 100644 index 00000000..b060230d --- /dev/null +++ b/src/hungarian/MissingHun.gf @@ -0,0 +1,540 @@ +resource MissingHun = open GrammarHun, Prelude in { +-- temporary definitions to enable the compilation of RGL API + +oper AdAdv : AdA -> Adv -> Adv = notYet "AdAdv" ; +oper AdNum : AdN -> Card -> Card = notYet "AdNum" ; +oper AdVVP : AdV -> VP -> VP = notYet "AdVVP" ; +oper AdVVPSlash : AdV -> VPSlash -> VPSlash = notYet "AdVVPSlash" ; +oper AddAdvQVP : QVP -> IAdv -> QVP = notYet "AddAdvQVP" ; +oper AdjDAP : DAP -> AP -> DAP = notYet "AdjDAP" ; +oper AdnCAdv : CAdv -> AdN = notYet "AdnCAdv" ; +oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ; +oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ; +oper AdvQVP : VP -> IAdv -> QVP = notYet "AdvQVP" ; +oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ; +oper BaseAdV : AdV -> AdV -> ListAdV = notYet "BaseAdV" ; +oper BaseCN : CN -> CN -> ListCN = notYet "BaseCN" ; +oper BaseIAdv : IAdv -> IAdv -> ListIAdv = notYet "BaseIAdv" ; +oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ; +oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ; +oper CompIAdv : IAdv -> IComp = notYet "CompIAdv" ; +oper CompIP : IP -> IComp = notYet "CompIP" ; +oper ComparAdvAdj : CAdv -> A -> NP -> Adv = notYet "ComparAdvAdj" ; +oper ComparAdvAdjS : CAdv -> A -> S -> Adv = notYet "ComparAdvAdjS" ; +oper ComplN2 : N2 -> NP -> CN = notYet "ComplN2" ; +oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ; +oper ComplSlashIP : VPSlash -> IP -> QVP = notYet "ComplSlashIP" ; +oper ComplVA : VA -> AP -> VP = notYet "ComplVA" ; +oper ComplVQ : VQ -> QS -> VP = notYet "ComplVQ" ; +oper ComplVS : VS -> S -> VP = notYet "ComplVS" ; +oper ComplVV : VV -> VP -> VP = notYet "ComplVV" ; +oper ConjAdV : Conj -> ListAdV -> AdV = notYet "ConjAdV" ; +oper ConjCN : Conj -> ListCN -> CN = notYet "ConjCN" ; +oper ConjDet : Conj -> ListDAP -> Det = notYet "ConjDet" ; +oper ConjIAdv : Conj -> ListIAdv -> IAdv = notYet "ConjIAdv" ; +oper ConsAdV : AdV -> ListAdV -> ListAdV = notYet "ConsAdV" ; +oper ConsCN : CN -> ListCN -> ListCN = notYet "ConsCN" ; +oper ConsIAdv : IAdv -> ListIAdv -> ListIAdv = notYet "ConsIAdv" ; +oper CountNP : Det -> NP -> NP = notYet "CountNP" ; +oper DetDAP : Det -> DAP = notYet "DetDAP" ; +oper DetQuantOrd : Quant -> Num -> Ord -> Det = notYet "DetQuantOrd" ; +oper EmbedQS : QS -> SC = notYet "EmbedQS" ; +oper EmbedS : S -> SC = notYet "EmbedS" ; +oper EmbedVP : VP -> SC = notYet "EmbedVP" ; +oper ExistIP : IP -> QCl = notYet "ExistIP" ; +oper ExistIPAdv : IP -> Adv -> QCl = notYet "ExistIPAdv" ; +oper ExistNP : NP -> Cl = notYet "ExistNP" ; +oper ExistNPAdv : NP -> Adv -> Cl = notYet "ExistNPAdv" ; +oper ExtAdvVP : VP -> Adv -> VP = notYet "ExtAdvVP" ; +oper FunRP : Prep -> NP -> RP -> RP = notYet "FunRP" ; +oper GenericCl : VP -> Cl = notYet "GenericCl" ; +oper IdetCN : IDet -> CN -> IP = notYet "IdetCN" ; +oper IdetIP : IDet -> IP = notYet "IdetIP" ; +oper IdetQuant : IQuant -> Num -> IDet = notYet "IdetQuant" ; +oper ImpP3 : NP -> VP -> Utt = notYet "ImpP3" ; +oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ; +oper ImpVP : VP -> Imp = notYet "ImpVP" ; +oper ImpersCl : VP -> Cl = notYet "ImpersCl" ; +oper OrdDigits : Digits -> Ord = notYet "OrdDigits" ; +oper OrdNumeral : Numeral -> Ord = notYet "OrdNumeral" ; +oper OrdNumeralSuperl : Numeral -> A -> Ord = notYet "OrdNumeralSuperl" ; +oper PConjConj : Conj -> PConj = notYet "PConjConj" ; +oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ; +oper PartNP : CN -> NP -> CN = notYet "PartNP" ; +oper PassV2 : V2 -> VP = notYet "PassV2" ; +oper PositAdAAdj : A -> AdA = notYet "PositAdAAdj" ; +oper PositAdvAdj : A -> Adv = notYet "PositAdvAdj" ; +oper PossNP : CN -> NP -> CN = notYet "PossNP" ; +oper PossPron : Pron -> Quant = notYet "PossPron" ; +oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ; +oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ; +oper ProgrVP : VP -> VP = notYet "ProgrVP" ; +oper QuestCl : Cl -> QCl = notYet "QuestCl" ; +oper QuestIAdv : IAdv -> Cl -> QCl = notYet "QuestIAdv" ; +oper QuestIComp : IComp -> NP -> QCl = notYet "QuestIComp" ; +oper QuestQVP : IP -> QVP -> QCl = notYet "QuestQVP" ; +oper QuestSlash : IP -> ClSlash -> QCl = notYet "QuestSlash" ; +oper QuestVP : IP -> VP -> QCl = notYet "QuestVP" ; +oper ReflA2 : A2 -> AP = notYet "ReflA2" ; +oper ReflVP : VPSlash -> VP = notYet "ReflVP" ; +oper RelCl : Cl -> RCl = notYet "RelCl" ; +oper RelNP : NP -> RS -> NP = notYet "RelNP" ; +oper RelS : S -> RS -> S = notYet "RelS" ; +oper RelSlash : RP -> ClSlash -> RCl = notYet "RelSlash" ; +oper SSubjS : S -> Subj -> S -> S = notYet "SSubjS" ; +oper SelfAdVVP : VP -> VP = notYet "SelfAdVVP" ; +oper SelfAdvVP : VP -> VP = notYet "SelfAdvVP" ; +oper SelfNP : NP -> NP = notYet "SelfNP" ; +oper SentAP : AP -> SC -> AP = notYet "SentAP" ; +oper SentCN : CN -> SC -> CN = notYet "SentCN" ; +oper Slash2V3 : V3 -> NP -> VPSlash = notYet "Slash2V3" ; +oper Slash3V3 : V3 -> NP -> VPSlash = notYet "Slash3V3" ; +oper SlashPrep : Cl -> Prep -> ClSlash = notYet "SlashPrep" ; +oper SlashV2A : V2A -> AP -> VPSlash = notYet "SlashV2A" ; +oper SlashV2Q : V2Q -> QS -> VPSlash = notYet "SlashV2Q" ; +oper SlashV2S : V2S -> S -> VPSlash = notYet "SlashV2S" ; +oper SlashV2V : V2V -> VP -> VPSlash = notYet "SlashV2V" ; +oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ; +oper SlashVP : NP -> VPSlash -> ClSlash = notYet "SlashVP" ; +oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ; +oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ; +oper SubjS : Subj -> S -> Adv = notYet "SubjS" ; +oper Use2N3 : N3 -> N2 = notYet "Use2N3" ; +oper Use3N3 : N3 -> N2 = notYet "Use3N3" ; +oper UseQCl : Temp -> Pol -> QCl -> QS = notYet "UseQCl" ; +oper UseSlash : Temp -> Pol -> ClSlash -> SSlash = notYet "UseSlash" ; +oper UttIAdv : IAdv -> Utt = notYet "UttIAdv" ; +oper UttImpPl : Pol -> Imp -> Utt = notYet "UttImpPl" ; +oper UttImpPol : Pol -> Imp -> Utt = notYet "UttImpPol" ; +oper UttImpSg : Pol -> Imp -> Utt = notYet "UttImpSg" ; +oper UttQS : QS -> Utt = notYet "UttQS" ; +oper VPSlashPrep : VP -> Prep -> VPSlash = notYet "VPSlashPrep" ; +oper VocNP : NP -> Voc = notYet "VocNP" ; +oper above_Prep : Prep = notYet "above_Prep" ; +oper active2passive : Cl -> Cl = notYet "active2passive" ; +oper add_V3 : V3 = notYet "add_V3" ; +oper after_Prep : Prep = notYet "after_Prep" ; +oper airplane_N : N = notYet "airplane_N" ; +oper alas_Interj : Interj = notYet "alas_Interj" ; +oper almost_AdA : AdA = notYet "almost_AdA" ; +oper almost_AdN : AdN = notYet "almost_AdN" ; +oper already_Adv : Adv = notYet "already_Adv" ; +oper although_Subj : Subj = notYet "although_Subj" ; +oper always_AdV : AdV = notYet "always_AdV" ; +oper animal_N : N = notYet "animal_N" ; +oper answer_V2S : V2S = notYet "answer_V2S" ; +oper apartment_N : N = notYet "apartment_N" ; +oper art_N : N = notYet "art_N" ; +oper as_CAdv : CAdv = notYet "as_CAdv" ; +oper ashes_N : N = notYet "ashes_N" ; +oper ask_V2Q : V2Q = notYet "ask_V2Q" ; +oper at_least_AdN : AdN = notYet "at_least_AdN" ; +oper at_most_AdN : AdN = notYet "at_most_AdN" ; +oper baby_N : N = notYet "baby_N" ; +oper back_N : N = notYet "back_N" ; +oper bad_A : A = notYet "bad_A" ; +oper bank_N : N = notYet "bank_N" ; +oper bark_N : N = notYet "bark_N" ; +oper beautiful_A : A = notYet "beautiful_A" ; +oper because_Subj : Subj = notYet "because_Subj" ; +oper become_VA : VA = notYet "become_VA" ; +oper beer_N : N = notYet "beer_N" ; +oper before_Prep : Prep = notYet "before_Prep" ; +oper beg_V2V : V2V = notYet "beg_V2V" ; +oper belly_N : N = notYet "belly_N" ; +oper between_Prep : Prep = notYet "between_Prep" ; +oper bike_N : N = notYet "bike_N" ; +oper bird_N : N = notYet "bird_N" ; +oper bite_V2 : V2 = notYet "bite_V2" ; +oper blood_N : N = notYet "blood_N" ; +oper blow_V : V = notYet "blow_V" ; +oper boat_N : N = notYet "boat_N" ; +oper bone_N : N = notYet "bone_N" ; +oper boot_N : N = notYet "boot_N" ; +oper boss_N : N = notYet "boss_N" ; +oper both7and_DConj : Conj = notYet "both7and_DConj" ; +oper bottle_of_CN : NP -> CN = notYet "bottle_of_CN" ; +oper break_V2 : V2 = notYet "break_V2" ; +oper breast_N : N = notYet "breast_N" ; +oper breathe_V : V = notYet "breathe_V" ; +oper broad_A : A = notYet "broad_A" ; +oper brother_N2 : N2 = notYet "brother_N2" ; +oper brown_A : A = notYet "brown_A" ; +oper burn_V : V = notYet "burn_V" ; +oper but_PConj : PConj = notYet "but_PConj" ; +oper butter_N : N = notYet "butter_N" ; +oper buy_V2 : V2 = notYet "buy_V2" ; +oper camera_N : N = notYet "camera_N" ; +oper can8know_VV : VV = notYet "can8know_VV" ; +oper can_VV : VV = notYet "can_VV" ; +oper cap_N : N = notYet "cap_N" ; +oper car_N : N = notYet "car_N" ; +oper carpet_N : N = notYet "carpet_N" ; +oper ceiling_N : N = notYet "ceiling_N" ; +oper chair_N : N = notYet "chair_N" ; +oper cheese_N : N = notYet "cheese_N" ; +oper child_N : N = notYet "child_N" ; +oper church_N : N = notYet "church_N" ; +oper city_N : N = notYet "city_N" ; +oper clean_A : A = notYet "clean_A" ; +oper clever_A : A = notYet "clever_A" ; +oper close_V2 : V2 = notYet "close_V2" ; +oper cloud_N : N = notYet "cloud_N" ; +oper cold_A : A = notYet "cold_A" ; +oper computer_N : N = notYet "computer_N" ; +oper correct_A : A = notYet "correct_A" ; +oper count_V2 : V2 = notYet "count_V2" ; +oper country_N : N = notYet "country_N" ; +oper cousin_N : N = notYet "cousin_N" ; +oper cow_N : N = notYet "cow_N" ; +oper cup_of_CN : NP -> CN = notYet "cup_of_CN" ; +oper cut_V2 : V2 = notYet "cut_V2" ; +oper day_N : N = notYet "day_N" ; +oper dconcat : Digits -> Digits -> Digits = notYet "dconcat" ; +oper die_V : V = notYet "die_V" ; +oper dig_V : V = notYet "dig_V" ; +oper digits2num : Digits -> Numeral = notYet "digits2num" ; +oper digits2numeral : Card -> Card = notYet "digits2numeral" ; +oper dirty_A : A = notYet "dirty_A" ; +oper distance_N3 : N3 = notYet "distance_N3" ; +oper dn : Dig -> Digit = notYet "dn" ; +oper dn10 : Dig -> Sub10 = notYet "dn10" ; +oper dn100 : Dig -> Dig -> Sub100 = notYet "dn100" ; +oper dn1000 : Dig -> Dig -> Dig -> Sub1000 = notYet "dn1000" ; +oper dn1000000a : Dig -> Dig -> Dig -> Dig -> Sub1000000 = notYet "dn1000000a" ; +oper dn1000000b : Dig -> Dig -> Dig -> Dig -> Dig -> Sub1000000 = notYet "dn1000000b" ; +oper dn1000000c : Dig -> Dig -> Dig -> Dig -> Dig -> Dig -> Sub1000000 = notYet "dn1000000c" ; +oper doctor_N : N = notYet "doctor_N" ; +oper dog_N : N = notYet "dog_N" ; +oper door_N : N = notYet "door_N" ; +oper dry_A : A = notYet "dry_A" ; +oper dull_A : A = notYet "dull_A" ; +oper during_Prep : Prep = notYet "during_Prep" ; +oper dust_N : N = notYet "dust_N" ; +oper ear_N : N = notYet "ear_N" ; +oper earth_N : N = notYet "earth_N" ; +oper easy_A2V : A2 = notYet "easy_A2V" ; +oper egg_N : N = notYet "egg_N" ; +oper either7or_DConj : Conj = notYet "either7or_DConj" ; +oper empty_A : A = notYet "empty_A" ; +oper enemy_N : N = notYet "enemy_N" ; +oper every_Det : Det = notYet "every_Det" ; +oper everybody_NP : NP = notYet "everybody_NP" ; +oper everything_NP : NP = notYet "everything_NP" ; +oper everywhere_Adv : Adv = notYet "everywhere_Adv" ; +oper except_Prep : Prep = notYet "except_Prep" ; +oper eye_N : N = notYet "eye_N" ; +oper factory_N : N = notYet "factory_N" ; +oper fall_V : V = notYet "fall_V" ; +oper far_Adv : Adv = notYet "far_Adv" ; +oper fat_N : N = notYet "fat_N" ; +oper father_N2 : N2 = notYet "father_N2" ; +oper fear_V2 : V2 = notYet "fear_V2" ; +oper fear_VS : VS = notYet "fear_VS" ; +oper feather_N : N = notYet "feather_N" ; +oper few_X_short_of_Y : NP -> CN -> CN -> S = notYet "few_X_short_of_Y" ; +oper fight_V2 : V2 = notYet "fight_V2" ; +oper find_V2 : V2 = notYet "find_V2" ; +oper fingernail_N : N = notYet "fingernail_N" ; +oper fire_N : N = notYet "fire_N" ; +oper fish_N : N = notYet "fish_N" ; +oper float_V : V = notYet "float_V" ; +oper floor_N : N = notYet "floor_N" ; +oper flow_V : V = notYet "flow_V" ; +oper flower_N : N = notYet "flower_N" ; +oper fly_V : V = notYet "fly_V" ; +oper fog_N : N = notYet "fog_N" ; +oper foot_N : N = notYet "foot_N" ; +oper forest_N : N = notYet "forest_N" ; +oper forget_V2 : V2 = notYet "forget_V2" ; +oper freeze_V : V = notYet "freeze_V" ; +oper fridge_N : N = notYet "fridge_N" ; +oper friend_N : N = notYet "friend_N" ; +oper from_Prep : Prep = notYet "from_Prep" ; +oper fruit_N : N = notYet "fruit_N" ; +oper full_A : A = notYet "full_A" ; +oper fun_AV : A = notYet "fun_AV" ; +oper garden_N : N = notYet "garden_N" ; +oper glass_of_CN : NP -> CN = notYet "glass_of_CN" ; +oper glove_N : N = notYet "glove_N" ; +oper gold_N : N = notYet "gold_N" ; +oper grammar_N : N = notYet "grammar_N" ; +oper grass_N : N = notYet "grass_N" ; +oper green_A : A = notYet "green_A" ; +oper guts_N : N = notYet "guts_N" ; +oper hair_N : N = notYet "hair_N" ; +oper hand_N : N = notYet "hand_N" ; +oper harbour_N : N = notYet "harbour_N" ; +oper has_age_VP : Card -> VP = notYet "has_age_VP" ; +oper hat_N : N = notYet "hat_N" ; +oper hate_V2 : V2 = notYet "hate_V2" ; +oper have_name_Cl : NP -> NP -> Cl = notYet "have_name_Cl" ; +oper head_N : N = notYet "head_N" ; +oper hear_V2 : V2 = notYet "hear_V2" ; +oper heart_N : N = notYet "heart_N" ; +oper heavy_A : A = notYet "heavy_A" ; +oper here7from_Adv : Adv = notYet "here7from_Adv" ; +oper here7to_Adv : Adv = notYet "here7to_Adv" ; +oper here_Adv : Adv = notYet "here_Adv" ; +oper hill_N : N = notYet "hill_N" ; +oper hit_V2 : V2 = notYet "hit_V2" ; +oper hold_V2 : V2 = notYet "hold_V2" ; +oper hope_VS : VS = notYet "hope_VS" ; +oper horn_N : N = notYet "horn_N" ; +oper horse_N : N = notYet "horse_N" ; +oper hot_A : A = notYet "hot_A" ; +oper how8many_IDet : IDet = notYet "how8many_IDet" ; +oper how8much_IAdv : IAdv = notYet "how8much_IAdv" ; +oper how_IAdv : IAdv = notYet "how_IAdv" ; +oper how_far_QCl : NP -> QCl = notYet "how_far_QCl" ; +oper how_old_QCl : NP -> QCl = notYet "how_old_QCl" ; +oper hungry_VP : VP = notYet "hungry_VP" ; +oper hunt_V2 : V2 = notYet "hunt_V2" ; +oper husband_N : N = notYet "husband_N" ; +oper ice_N : N = notYet "ice_N" ; +oper if_Subj : Subj = notYet "if_Subj" ; +oper if_then_Conj : Conj = notYet "if_then_Conj" ; +oper ill_VP : VP = notYet "ill_VP" ; +oper important_A : A = notYet "important_A" ; +oper in8front_Prep : Prep = notYet "in8front_Prep" ; +oper industry_N : N = notYet "industry_N" ; +oper iron_N : N = notYet "iron_N" ; +oper is_right_VP : VP = notYet "is_right_VP" ; +oper is_wrong_VP : VP = notYet "is_wrong_VP" ; +oper it_Pron : Pron = notYet "it_Pron" ; +oper john_PN : PN = notYet "john_PN" ; +oper jump_V : V = notYet "jump_V" ; +oper kill_V2 : V2 = notYet "kill_V2" ; +oper king_N : N = notYet "king_N" ; +oper knee_N : N = notYet "knee_N" ; +oper know_V2 : V2 = notYet "know_V2" ; +oper know_VQ : VQ = notYet "know_VQ" ; +oper know_VS : VS = notYet "know_VS" ; +oper lake_N : N = notYet "lake_N" ; +oper lamp_N : N = notYet "lamp_N" ; +oper language_N : N = notYet "language_N" ; +oper leaf_N : N = notYet "leaf_N" ; +oper learn_V2 : V2 = notYet "learn_V2" ; +oper leather_N : N = notYet "leather_N" ; +oper leave_V2 : V2 = notYet "leave_V2" ; +oper left_Ord : Ord = notYet "left_Ord" ; +oper leg_N : N = notYet "leg_N" ; +oper less_CAdv : CAdv = notYet "less_CAdv" ; +oper lie_V : V = notYet "lie_V" ; +oper listen_V2 : V2 = notYet "listen_V2" ; +oper live_V : V = notYet "live_V" ; +oper liver_N : N = notYet "liver_N" ; +oper long_A : A = notYet "long_A" ; +oper lose_V2 : V2 = notYet "lose_V2" ; +oper louse_N : N = notYet "louse_N" ; +oper love_N : N = notYet "love_N" ; +oper love_V2 : V2 = notYet "love_V2" ; +oper married_A2 : A2 = notYet "married_A2" ; +oper married_Cl : NP -> NP -> Cl = notYet "married_Cl" ; +oper meat_N : N = notYet "meat_N" ; +oper moon_N : N = notYet "moon_N" ; +oper more_CAdv : CAdv = notYet "more_CAdv" ; +oper most_Predet : Predet = notYet "most_Predet" ; +oper mother_N2 : N2 = notYet "mother_N2" ; +oper mountain_N : N = notYet "mountain_N" ; +oper mouth_N : N = notYet "mouth_N" ; +oper much_Det : Det = notYet "much_Det" ; +oper music_N : N = notYet "music_N" ; +oper must_VV : VV = notYet "must_VV" ; +oper n_unit_CN : Card -> CN -> CN -> CN = notYet "n_unit_CN" ; +oper n_units_AP : Card -> CN -> A -> AP = notYet "n_units_AP" ; +oper n_units_of_NP : Card -> CN -> NP -> NP = notYet "n_units_of_NP" ; +oper narrow_A : A = notYet "narrow_A" ; +oper nd : Digit -> Dig = notYet "nd" ; +oper nd10 : Sub10 -> Digits = notYet "nd10" ; +oper nd100 : Sub100 -> Digits = notYet "nd100" ; +oper nd1000 : Sub1000 -> Digits = notYet "nd1000" ; +oper nd1000000 : Sub1000000 -> Digits = notYet "nd1000000" ; +oper near_A : A = notYet "near_A" ; +oper neck_N : N = notYet "neck_N" ; +oper new_A : A = notYet "new_A" ; +oper newspaper_N : N = notYet "newspaper_N" ; +oper night_N : N = notYet "night_N" ; +oper no_Quant : Quant = notYet "no_Quant" ; +oper nobody_NP : NP = notYet "nobody_NP" ; +oper nose_N : N = notYet "nose_N" ; +oper not_Predet : Predet = notYet "not_Predet" ; +oper nothing_NP : NP = notYet "nothing_NP" ; +oper num2digits : Numeral -> Digits = notYet "num2digits" ; +oper number_N : N = notYet "number_N" ; +oper oil_N : N = notYet "oil_N" ; +oper old_A : A = notYet "old_A" ; +oper on_Prep : Prep = notYet "on_Prep" ; +oper open_V2 : V2 = notYet "open_V2" ; +oper otherwise_PConj : PConj = notYet "otherwise_PConj" ; +oper paint_V2A : V2A = notYet "paint_V2A" ; +oper paper_N : N = notYet "paper_N" ; +oper paris_PN : PN = notYet "paris_PN" ; +oper peace_N : N = notYet "peace_N" ; +oper pen_N : N = notYet "pen_N" ; +oper planet_N : N = notYet "planet_N" ; +oper plastic_N : N = notYet "plastic_N" ; +oper play_V : V = notYet "play_V" ; +oper play_V2 : V2 = notYet "play_V2" ; +oper please_Voc : Voc = notYet "please_Voc" ; +oper policeman_N : N = notYet "policeman_N" ; +oper possess_Prep : Prep = notYet "possess_Prep" ; +oper priest_N : N = notYet "priest_N" ; +oper probable_AS : A = notYet "probable_AS" ; +oper pull_V2 : V2 = notYet "pull_V2" ; +oper push_V2 : V2 = notYet "push_V2" ; +oper put_V2 : V2 = notYet "put_V2" ; +oper queen_N : N = notYet "queen_N" ; +oper question_N : N = notYet "question_N" ; +oper quite_Adv : AdA = notYet "quite_Adv" ; +oper radio_N : N = notYet "radio_N" ; +oper rain_N : N = notYet "rain_N" ; +oper rain_V0 : V = notYet "rain_V0" ; +oper read_V2 : V2 = notYet "read_V2" ; +oper ready_A : A = notYet "ready_A" ; +oper ready_VP : VP = notYet "ready_VP" ; +oper reason_N : N = notYet "reason_N" ; +oper religion_N : N = notYet "religion_N" ; +oper restaurant_N : N = notYet "restaurant_N" ; +oper right_Ord : Ord = notYet "right_Ord" ; +oper river_N : N = notYet "river_N" ; +oper road_N : N = notYet "road_N" ; +oper rock_N : N = notYet "rock_N" ; +oper roof_N : N = notYet "roof_N" ; +oper root_N : N = notYet "root_N" ; +oper rope_N : N = notYet "rope_N" ; +oper rotten_A : A = notYet "rotten_A" ; +oper round_A : A = notYet "round_A" ; +oper rub_V2 : V2 = notYet "rub_V2" ; +oper rubber_N : N = notYet "rubber_N" ; +oper rule_N : N = notYet "rule_N" ; +oper run_V : V = notYet "run_V" ; +oper salt_N : N = notYet "salt_N" ; +oper sand_N : N = notYet "sand_N" ; +oper say_VS : VS = notYet "say_VS" ; +oper scared_VP : VP = notYet "scared_VP" ; +oper school_N : N = notYet "school_N" ; +oper science_N : N = notYet "science_N" ; +oper scratch_V2 : V2 = notYet "scratch_V2" ; +oper sea_N : N = notYet "sea_N" ; +oper seed_N : N = notYet "seed_N" ; +oper seek_V2 : V2 = notYet "seek_V2" ; +oper sell_V3 : V3 = notYet "sell_V3" ; +oper send_V3 : V3 = notYet "send_V3" ; +oper sew_V : V = notYet "sew_V" ; +oper sharp_A : A = notYet "sharp_A" ; +oper sheep_N : N = notYet "sheep_N" ; +oper ship_N : N = notYet "ship_N" ; +oper shoe_N : N = notYet "shoe_N" ; +oper shop_N : N = notYet "shop_N" ; +oper silver_N : N = notYet "silver_N" ; +oper sister_N : N = notYet "sister_N" ; +oper sit_V : V = notYet "sit_V" ; +oper skin_N : N = notYet "skin_N" ; +oper sky_N : N = notYet "sky_N" ; +oper sleep_V : V = notYet "sleep_V" ; +oper smell_V : V = notYet "smell_V" ; +oper smoke_N : N = notYet "smoke_N" ; +oper smooth_A : A = notYet "smooth_A" ; +oper snake_N : N = notYet "snake_N" ; +oper snow_N : N = notYet "snow_N" ; +oper so_AdA : AdA = notYet "so_AdA" ; +oper sock_N : N = notYet "sock_N" ; +oper somebody_NP : NP = notYet "somebody_NP" ; +oper somewhere_Adv : Adv = notYet "somewhere_Adv" ; +oper song_N : N = notYet "song_N" ; +oper speak_V2 : V2 = notYet "speak_V2" ; +oper spit_V : V = notYet "spit_V" ; +oper split_V2 : V2 = notYet "split_V2" ; +oper squeeze_V2 : V2 = notYet "squeeze_V2" ; +oper stab_V2 : V2 = notYet "stab_V2" ; +oper stand_V : V = notYet "stand_V" ; +oper star_N : N = notYet "star_N" ; +oper steel_N : N = notYet "steel_N" ; +oper stick_N : N = notYet "stick_N" ; +oper stone_N : N = notYet "stone_N" ; +oper stop_V : V = notYet "stop_V" ; +oper stove_N : N = notYet "stove_N" ; +oper straight_A : A = notYet "straight_A" ; +oper student_N : N = notYet "student_N" ; +oper stupid_A : A = notYet "stupid_A" ; +oper suck_V2 : V2 = notYet "suck_V2" ; +oper sun_N : N = notYet "sun_N" ; +oper swell_V : V = notYet "swell_V" ; +oper swim_V : V = notYet "swim_V" ; +oper switch8off_V2 : V2 = notYet "switch8off_V2" ; +oper switch8on_V2 : V2 = notYet "switch8on_V2" ; +oper table_N : N = notYet "table_N" ; +oper tail_N : N = notYet "tail_N" ; +oper talk_V3 : V3 = notYet "talk_V3" ; +oper teach_V2 : V2 = notYet "teach_V2" ; +oper teacher_N : N = notYet "teacher_N" ; +oper television_N : N = notYet "television_N" ; +oper that_Subj : Subj = notYet "that_Subj" ; +oper there7from_Adv : Adv = notYet "there7from_Adv" ; +oper there7to_Adv : Adv = notYet "there7to_Adv" ; +oper there_Adv : Adv = notYet "there_Adv" ; +oper therefore_PConj : PConj = notYet "therefore_PConj" ; +oper they_Pron : Pron = notYet "they_Pron" ; +oper thick_A : A = notYet "thick_A" ; +oper thin_A : A = notYet "thin_A" ; +oper think_V : V = notYet "think_V" ; +oper thirsty_VP : VP = notYet "thirsty_VP" ; +oper through_Prep : Prep = notYet "through_Prep" ; +oper throw_V2 : V2 = notYet "throw_V2" ; +oper tie_V2 : V2 = notYet "tie_V2" ; +oper tired_VP : VP = notYet "tired_VP" ; +oper tongue_N : N = notYet "tongue_N" ; +oper too_AdA : AdA = notYet "too_AdA" ; +oper tooth_N : N = notYet "tooth_N" ; +oper train_N : N = notYet "train_N" ; +oper travel_V : V = notYet "travel_V" ; +oper tree_N : N = notYet "tree_N" ; +oper turn_V : V = notYet "turn_V" ; +oper ugly_A : A = notYet "ugly_A" ; +oper uncertain_A : A = notYet "uncertain_A" ; +oper under_Prep : Prep = notYet "under_Prep" ; +oper understand_V2 : V2 = notYet "understand_V2" ; +oper university_N : N = notYet "university_N" ; +oper village_N : N = notYet "village_N" ; +oper vomit_V : V = notYet "vomit_V" ; +oper wait_V2 : V2 = notYet "wait_V2" ; +oper walk_V : V = notYet "walk_V" ; +oper want_VV : VV = notYet "want_VV" ; +oper war_N : N = notYet "war_N" ; +oper warm_A : A = notYet "warm_A" ; +oper wash_V2 : V2 = notYet "wash_V2" ; +oper watch_V2 : V2 = notYet "watch_V2" ; +oper water_N : N = notYet "water_N" ; +oper we_Pron : Pron = notYet "we_Pron" ; +oper weather_adjCl : AP -> Cl = notYet "weather_adjCl" ; +oper wet_A : A = notYet "wet_A" ; +oper whatPl_IP : IP = notYet "whatPl_IP" ; +oper whatSg_IP : IP = notYet "whatSg_IP" ; +oper what_name_QCl : NP -> QCl = notYet "what_name_QCl" ; +oper when_IAdv : IAdv = notYet "when_IAdv" ; +oper when_Subj : Subj = notYet "when_Subj" ; +oper where_IAdv : IAdv = notYet "where_IAdv" ; +oper which_IQuant : IQuant = notYet "which_IQuant" ; +oper white_A : A = notYet "white_A" ; +oper whoPl_IP : IP = notYet "whoPl_IP" ; +oper whoSg_IP : IP = notYet "whoSg_IP" ; +oper why_IAdv : IAdv = notYet "why_IAdv" ; +oper wide_A : A = notYet "wide_A" ; +oper wife_N : N = notYet "wife_N" ; +oper win_V2 : V2 = notYet "win_V2" ; +oper wind_N : N = notYet "wind_N" ; +oper window_N : N = notYet "window_N" ; +oper wine_N : N = notYet "wine_N" ; +oper wing_N : N = notYet "wing_N" ; +oper wipe_V2 : V2 = notYet "wipe_V2" ; +oper with_Prep : Prep = notYet "with_Prep" ; +oper without_Prep : Prep = notYet "without_Prep" ; +oper wonder_VQ : VQ = notYet "wonder_VQ" ; +oper wood_N : N = notYet "wood_N" ; +oper worm_N : N = notYet "worm_N" ; +oper write_V2 : V2 = notYet "write_V2" ; +oper year_N : N = notYet "year_N" ; +oper yellow_A : A = notYet "yellow_A" ; +oper young_A : A = notYet "young_A" ; +} diff --git a/src/hungarian/MorphoHun.gf b/src/hungarian/MorphoHun.gf deleted file mode 100644 index fa984088..00000000 --- a/src/hungarian/MorphoHun.gf +++ /dev/null @@ -1,47 +0,0 @@ ---# -path=.:../../prelude - ---1 A Simple Hunlish Resource Morphology --- --- Aarne Ranta 2002 -- 2005 --- --- This resource morphology contains definitions needed in the resource --- syntax. To build a lexicon, it is better to use $ParadigmsHun$, which --- gives a higher-level access to this module. - -resource MorphoHun = open Prelude, (Predef=Predef), ResHun in -{ ---{ --- --- flags optimize=all ; --- -----2 Determiners --- --- oper --- --- mkDeterminer : Number -> Str -> --- {s : Str ; sp : NPCase => Str; n : Number ; hasNum : Bool} = \n,s -> --- {s = s; --- sp = \\c => regGenitiveS s ! npcase2case c ; --- n = n ; --- hasNum = True ; -- doesn't matter since s = sp --- } ; --- -----2 Pronouns --- --- --- mkPron : (i,me,my,mine : Str) -> Number -> Person -> Gender -> --- {s : NPCase => Str ; sp : Case => Str ; a : Agr} = --- \i,me,my,mine,n,p,g -> { --- s = table { --- NCase Nom => i ; --- NPAcc => me ; --- NCase Gen => my --- } ; --- a = toAgr n p g ; --- sp = regGenitiveS mine --- } ; --- ---} ; --- - -} diff --git a/src/hungarian/NounHun.gf b/src/hungarian/NounHun.gf index be7cc5fe..d2672263 100644 --- a/src/hungarian/NounHun.gf +++ b/src/hungarian/NounHun.gf @@ -1,144 +1,228 @@ -concrete NounHun of Noun = CatHun ** open MorphoHun, ResHun, Prelude in -{ ---{ --- --- flags optimize=all_subs ; --- --- lin --- DetCN det cn = { --- s = \\c => det.s ++ cn.s ! det.n ! npcase2case c ; --- a = agrgP3 det.n cn.g --- } ; --- --- UsePN pn = {s = \\c => pn.s ! npcase2case c ; a = agrgP3 Sg pn.g} ; --- UsePron p = p ; --- --- PredetNP pred np = { --- s = \\c => pred.s ++ np.s ! c ; --- a = np.a --- } ; --- --- PPartNP np v2 = { --- s = \\c => np.s ! c ++ v2.s ! VPPart ; --- a = np.a --- } ; --- --- RelNP np rs = { --- s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ; --- a = np.a --- } ; --- --- AdvNP np adv = { --- s = \\c => np.s ! c ++ adv.s ; --- a = np.a --- } ; --- --- DetQuant quant num = { --- s = quant.s ! num.hasCard ! num.n ++ num.s ! Nom; --- sp = \\c => case num.hasCard of { --- False => quant.sp ! num.hasCard ! num.n ! c ++ num.s ! Nom ; --- True => quant.sp ! num.hasCard ! num.n ! npNom ++ num.s ! npcase2case c --- } ; --- n = num.n ; --- hasNum = num.hasCard --- } ; --- --- DetQuantOrd quant num ord = { --- s = quant.s ! num.hasCard ! num.n ++ num.s ! Nom ++ ord.s ! Nom; --- sp = \\c => quant.sp ! num.hasCard ! num.n ! npNom ++ num.s ! Nom ++ ord.s ! npcase2case c ; --- n = num.n ; --- hasNum = True --- } ; --- --- DetNP det = { --- s = case det.hasNum of {True => \\_ => det.s ; _ => \\c => det.sp ! c} ; --- a = agrP3 det.n --- } ; --- --- PossPron p = { --- s = \\_,_ => p.s ! NCase Gen ; --- sp = \\_,_,c => p.sp ! npcase2case c --- } ; --- --- NumSg = {s = \\c => []; n = Sg ; hasCard = False} ; --- NumPl = {s = \\c => []; n = Pl ; hasCard = False} ; ------b NoOrd = {s = []} ; --- --- NumCard n = n ** {hasCard = True} ; --- --- NumDigits n = {s = n.s ! NCard ; n = n.n} ; --- OrdDigits n = {s = n.s ! NOrd} ; --- --- NumNumeral numeral = {s = numeral.s ! NCard; n = numeral.n} ; --- OrdNumeral numeral = {s = numeral.s ! NOrd} ; --- --- AdNum adn num = {s = \\c => adn.s ++ num.s!c ; n = num.n} ; --- --- OrdSuperl a = {s = \\c => a.s ! AAdj Superl c } ; --- --- DefArt = { --- s = \\hasCard,n => artDef ; --- sp = \\hasCard,n => case of { --- => table { NCase Gen => "its"; _ => "it" } ; --- => table { NCase Nom => "they"; NPAcc => "them"; NCase Gen => "theirs" } ; --- _ => \\c => artDef --- } --- } ; --- --- IndefArt = { --- s = \\hasCard,n => case of { --- => artIndef ; --- _ => [] --- } ; --- sp = \\hasCard,n => case of { --- => table {NCase Gen => "one's"; _ => "one" }; --- => table {NCase Gen => "ones'"; _ => "ones" } ; --- _ => \\c => [] --- } --- } ; --- --- MassNP cn = { --- s = \\c => cn.s ! Sg ! npcase2case c ; --- a = agrP3 Sg --- } ; --- --- UseN n = n ; --- UseN2 n = n ; ------b UseN3 n = n ; --- --- Use2N3 f = { --- s = \\n,c => f.s ! n ! Nom ; --- g = f.g ; --- c2 = f.c2 --- } ; --- --- Use3N3 f = { --- s = \\n,c => f.s ! n ! Nom ; --- g = f.g ; --- c2 = f.c3 --- } ; --- --- ComplN2 f x = {s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! NPAcc ; g = f.g} ; --- ComplN3 f x = { --- s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! NPAcc ; --- g = f.g ; --- c2 = f.c3 --- } ; --- --- AdjCN ap cn = { --- s = \\n,c => preOrPost ap.isPre (ap.s ! agrgP3 n cn.g) (cn.s ! n ! c) ; --- g = cn.g --- } ; --- RelCN cn rs = { --- s = \\n,c => cn.s ! n ! c ++ rs.s ! agrgP3 n cn.g ; --- g = cn.g --- } ; --- AdvCN cn ad = {s = \\n,c => cn.s ! n ! c ++ ad.s ; g = cn.g} ; --- --- SentCN cn sc = {s = \\n,c => cn.s ! n ! c ++ sc.s ; g = cn.g} ; --- --- ApposCN cn np = {s = \\n,c => cn.s ! n ! Nom ++ np.s ! NCase c ; g = cn.g} ; --- ---} +concrete NounHun of Noun = CatHun ** open ResHun, Prelude, Coordination in { + + flags optimize=all_subs ; + + lin + +--2 Noun phrases + +-- : Det -> CN -> NP + DetCN det cn = emptyNP ** det ** { + s = \\c => det.s ! c ++ cn.s ! det.n ! c ; + agr = ; + } ; + + -- : PN -> NP ; + UsePN pn = pn ; + + -- : Pron -> NP ; + UsePron pron = pron ; + + -- : Predet -> NP -> NP ; -- only the man + PredetNP predet np = np ** { + s = \\c => predet.s ++ np.s ! c ; + } ; + +-- A noun phrase can also be postmodified by the past participle of a +-- verb, by an adverb, or by a relative clause + + -- : NP -> V2 -> NP ; -- the man seen + -- PPartNP np v2 = np ** { + -- s = \\c => v2.s ! ??? ++ np.s ! c } ; ---- + + -- : NP -> Adv -> NP ; -- Paris today + AdvNP np adv = np ** { + s = \\c => np.s ! c ++ adv.s ; + } ; + -- : NP -> Adv -> NP ; -- boys, such as .. + ExtAdvNP np adv = np ** { + s = \\c => np.s ! c ++ bindComma ++ adv.s ; + } ; + -- : NP -> RS -> NP ; -- Paris, which is here + RelNP np rs = np ** { + s = \\c => np.s ! c ++ bindComma ++ rs.s ! np.agr.p2 ! c ; + } ; + +-- Determiners can form noun phrases directly. + + -- : Det -> NP ; + DetNP det = emptyNP ** { + s = det.sp ; + agr = ; + } ; + + -- : CN -> NP ; + MassNP cn = emptyNP ** { + s = \\c => cn.s ! Sg ! c ; + agr = ; + } ; + +--2 Determiners + +-- The determiner has a fine-grained structure, in which a 'nucleus' +-- quantifier and an optional numeral can be discerned. + + -- : Quant -> Num -> Det ; + DetQuant quant num = quant ** num ** { + s = \\c => case of { + => [] ; -- don't output "a 2 cars" + _ => quant.s ! num.n ! c } + ++ num.s ! Attrib ; -- TODO: add inflection table in numbers + sp = \\c => quant.sp ! num.n ! c + ++ num.s ! Indep ; + } ; + + -- : Quant -> Num -> Ord -> Det ; -- these five best + DetQuantOrd quant num ord = + let theseFive = DetQuant quant num in theseFive ** { + s = \\c => theseFive.s ! c ++ ord.s ! num.n ; + sp = \\c => theseFive.sp ! c ++ ord.s ! num.n ; + } ; + +-- Whether the resulting determiner is singular or plural depends on the +-- cardinal. + +-- All parts of the determiner can be empty, except $Quant$, which is +-- the "kernel" of a determiner. It is, however, the $Num$ that determines +-- the inherent number. + + NumSg = baseNum ; + NumPl = baseNum ** {n = Pl} ; + + -- : Card -> Num ; + NumCard card = card ** { + n = Sg -- Numerals take noun in Sg: e.g. öt város, literally 'five city' + } ; + + -- : Digits -> Card ; + NumDigits dig = dig ** { + s = \\place => dig.s ! NCard ; + numtype = IsNum ; + } ; + + -- : Numeral -> Card ; + NumNumeral num = num ; + +{- + -- : AdN -> Card -> Card ; + AdNum adn card = card ** { s = adn.s ++ card.s } ; + + -- : Digits -> Ord ; + OrdDigits digs = digs ** { s = digs.s ! NOrd } ; + + -- : Numeral -> Ord ; + OrdNumeral num = num ** { + s = \\_ => num.ord + } ; +-} + -- : A -> Ord ; + OrdSuperl a = { + s = a.s ! Superl ; + n = Sg -- ?? is this meaningful? + } ; + +-- One can combine a numeral and a superlative. + + -- : Numeral -> A -> Ord ; -- third largest + -- OrdNumeralSuperl num a = num ** { } ; + + -- : Quant + DefArt = { + s, + sp = \\_,_ => pre {"a" ; "az" / v } ; + isIndefArt = False ; + objdef = Def ; + } ; + + -- : Quant + IndefArt = { + s, + sp = \\n,_ => case n of {Sg => "egy" ; Pl => []} ; + isIndefArt = True ; + objdef = Indef ; + } ; + + -- : Pron -> Quant + -- PossPron pron = + -- let p = pron.poss ; + -- in DefArt ** { + -- } ; + +--2 Common nouns + + -- : N -> CN + -- : N2 -> CN ; + UseN,UseN2 = \n -> n ; + + -- : N2 -> NP -> CN ; + -- ComplN2 n2 np = + + -- : N3 -> NP -> N2 ; -- distance from this city (to Paris) + -- ComplN3 n3 np = + + + -- : N3 -> N2 ; -- distance (from this city) + -- Use2N3 n3 = lin N2 n3 ** { c2 = n3.c3 } ; + + -- : N3 -> N2 ; -- distance (to Paris) + -- Use3N3 n3 = lin N2 n3 ; + + -- : AP -> CN -> CN + AdjCN ap cn = cn ** { + s = \\n,c => ap.s ! Sg ++ cn.s ! n ! c ++ ap.compar + } ; + + -- : CN -> RS -> CN ; + RelCN cn rs = cn ** { + s = \\n,c => cn.s ! n ! c ++ rs.s ! n ! c + } ; + + -- : CN -> Adv -> CN ; + AdvCN cn adv = cn ** { + s = \\n,c => cn.s ! n ! c ++ adv.s + } ; + +-- Nouns can also be modified by embedded sentences and questions. +-- For some nouns this makes little sense, but we leave this for applications +-- to decide. Sentential complements are defined in VerbHun. + + -- : CN -> SC -> CN ; -- question where she sleeps + -- SentCN cn sc = cn ** { } ; + +--2 Apposition + +-- This is certainly overgenerating. + + -- : CN -> NP -> CN ; -- city Paris (, numbers x and y) + ApposCN cn np = cn ** { + s = \\n,c => cn.s ! n ! c ++ np.s ! Nom + } ; + +--2 Possessive and partitive constructs + + -- : PossNP : CN -> NP -> CN ; + -- PossNP cn np = cn ** { + -- } ; + + -- : CN -> NP -> CN ; -- glass of wine / two kilos of red apples + -- PartNP cn np = cn ** { + -- } ; + +{- + +-- This is different from the partitive, as shown by many languages. + + -- : Det -> NP -> NP ; + CountNP det np = np ** + { } ; -- Nonsense for DefArt or IndefArt + +--3 Conjoinable determiners and ones with adjectives + + -- : DAP -> AP -> DAP ; -- the large (one) + AdjDAP dap ap = dap ** { } ; + + -- : Det -> DAP ; -- this (or that) + DetDAP det = det ; +-} } diff --git a/src/hungarian/NounMorphoHun.gf b/src/hungarian/NounMorphoHun.gf new file mode 100644 index 00000000..b09c33c6 --- /dev/null +++ b/src/hungarian/NounMorphoHun.gf @@ -0,0 +1,336 @@ +resource NounMorphoHun = ParamHun ** open Prelude, Predef in { + +oper + Noun = {s : Number => Case => Str} ; + + -- Paradigm functions + -- http://www.cse.chalmers.se/~aarne/articles/smart-preprint.pdf + + -- Words like alma, kefe: + dAlma : Str -> Noun = \alma -> + let almá : Str = lengthen alma ; + + -- Apply mkNoun to the lengthened stem "almá" or "kefé" + nAlmá : Noun = mkNoun almá ; + in {s = \\n,c => case of { + -- Singular nominative uses the given form, e.g. "alma" or "kefe" + => alma ; + + -- The rest of the forms are formed with the regular constructor, + -- using "almá" or "kefé" as the stem. + _ => nAlmá.s ! n ! c + } ; + } ; + + -- Handles words like "madár, nyár, név, bogár" with shortened stem vowel in plural + -- No special case here + dMadár : Str -> Noun = \madár -> + let r = last madár ; + madá = init madár ; + mada = shorten madá ; -- shortens vowels + a = last mada ; + madara = mada + r + a ; + nMadara = mkNounHarm (getHarm madara) "k" madara ; + nMadár = mkNoun madár ; + in {s = \\n,c => case of { + -- All plural forms and Sg Acc use the "madara"/"neve" stem + | => nMadara.s ! n ! c ; + + -- The rest of the forms are formed with the regular constructor, + -- using "madár"/"név" as the stem. + _ => nMadár.s ! n ! c + + } ; + } ; + + --Handles words like "ló, lé, kő" which are "lovak, levek, kövek" in plural. + -- "lovon" instead of "lón" fixed but that gives the following problems: + --TODO: special case "lén" not "leven" + --TODO: also "kövön" not "köven", but that is due to H_e, which is needed for "köveket" so it's conflicting + dLó : Str -> Noun = \ló -> + let lo = shorten ló ; + lov = lo + "v" ; + ak : Str = case ló of { + _ + ("ö" | "ő") => "ek" ; + _ + ("o" | "ó") => "ak" ; + lé => shorten (last lé) + "k"} ; + harmonyPlural : Harm = case ló of { + _ + ("ö" | "ő") => H_e ; -- All plural allomorphs have E harmony, singular ones have O. + _ + ("o" | "ó") => H_a ; + lé => getHarm (lé)} ; + nLov = mkNounHarm harmonyPlural ak lov ; + nLó = mkNoun ló ; + in {s = \\n,c => case of { + + -- All plural forms and Sg Acc, Sg Sup use the "lov" stem + | | => nLov.s ! n ! c ; + + -- The rest of the forms are formed with the regular constructor, + -- using "ló" as the stem. + _ => nLó.s ! n ! c + + } ; + } ; + + --Handles words like "tó, hó"" which are "tavak, havak" in plural. + --(Since I only have these examples for now I do a simplified case with ó, a) + -- "tavon" instead of "tón" case fixed, works automatically with the Sup rules + --TODO: szó special case which fulfills the plural cases but not the or case ("szót" not "szavat") + dTó : Str -> Noun = \tó -> + let t = init tó ; + tav = t + "av" ; + nTav = mkNounHarm H_a "ak" tav ; + nTó = mkNoun tó ; + in {s = \\n,c => case of { + + -- All plural forms and Sg Acc use the "tav" stem + || => nTav.s ! n ! c ; + + -- The rest of the forms are formed with the regular constructor, + -- using "tó" as the stem. + _ => nTó.s ! n ! c + + } ; + } ; + + --Handles words like "gyomor, majom, retek" which are "gyomrot, majmot, retket" in accusative (wovel dropping base) + --More examples: "ajak, bokor, cukor, csokor, eper, fészek, fodor, gödör, haszon, iker, izom, kölyök, köröm, méreg, piszok, sarok, selyem, szeder, szobor, takony, terem, titok, torok, torony, tükör, vödör" -> + -- "ajkat, bokrot, cukrot, csokrot, epret, fészket, fodrot, gödröt, hasznot, ikret, izmot, kölyköt, körmet, mérget, piszkot, sarkot, selymet, szedret, szobrot, taknyot, termet, titkot, torkot, tornyot, tükröt, vödröt" + -- case handled + dMajom : Str -> Noun = \majom -> + -- Str*Str is syntactic sugar for {p1 : Str ; p2 : Str} ; + -- confusing syntax: you can't write let : Str*Str = … + -- it has to be called something else, and then you + -- can get "tako" and "ny" with p1, p2. + let tako_ny : Str*Str = case majom of { + x + dzs@#trigraph => ; + x + zs@#digraph => ; + -- ? pattern matches exactly 1 character + x + s@? => } ; + tako = tako_ny.p1 ; + ny = tako_ny.p2 ; + + nyo = ny + last tako ; + tak = init tako ; + taknyo = tak + nyo ; + nMajmo = mkNounHarm (getHarm taknyo) "k" taknyo ; + nMajom = mkNoun majom ; + in {s = \\n,c => case of { + -- All plural forms and Sg Acc and Sg Sup use the "majmo" stem + | | => nMajmo.s ! n ! c ; + + -- The rest of the forms are formed with the regular constructor, + -- using "majom" as the stem. + _ => nMajom.s ! n ! c + } ; + } ; + + --Handles words like "sátor, álom, alkalom, farok, halom, vászon" + -- "sátrat, álmat, alkalmat, farkat, halmat, vásznat" + -- (bátor not noun) + dFarok : Str -> Noun = \farok -> + let k = last farok ; + far = init (init farok) ; + fark = far + k ; + nFark = mkNounHarm (getHarm fark) "ak" fark ; + nFarok = mkNoun farok ; + in {s = \\n,c => case of { + -- All plural forms and Sg Acc and Sg Sup use the "fark" stem + | | => nFark.s ! n ! c ; + + -- The rest of the forms are formed with the regular constructor, + -- using "farok" as the stem. + _ => nFarok.s ! n ! c + } ; + } ; + + -- More words not covered by current paradigms: + -- https://cl.lingfil.uu.se/~bea/publ/megyesi-hungarian.pdf + -- TODO: falu ~ falva-k (v-case) + -- TODO: teher ~ terhet (consonant-crossing) + -- TODO: do we need possessive forms? e.g. fiú ~ fia{m,d,tok} + + -- regNoun is a /smart paradigm/: it takes one or a couple of forms, + -- and decides which (non-smart) paradigm is the most likely to match. + regNoun : Str -> Noun = \sgnom -> case sgnom of { + _ + "a"|"e" => dAlma sgnom ; + _ + ("á"|"é") + ? => dMadár sgnom ; + _ + ("ó"|"ő") => dLó sgnom ; + _ + "alom" => dFarok sgnom ; + _ + "elem" => dMajom sgnom ; + + -- TODO: more non-smart paradigms + more pattern matching + -- TODO: smart paradigms with >1 form. Which forms are the most descriptive? + + _ => mkNoun sgnom -- Fall back to the regular paradigm + } ; + +-------------------------------------------------------------------------------- +-- Following code by EG in 2009 (?), comments and some additions by IL 2020 + +param + -- Harmony types + Harm = H_a | H_e | H_o ; + +oper + + -- Vowels as a pattern. + v : pattern Str = #("a" | "e" | "i" | "o" | "u" | "ö" | "ü" | + "á" | "é" | "í" | "ó" | "ú" | "ő" | "ű") ; + -- Digraphs + digraph : pattern Str = #("cs"|"dz"|"gy"|"ly"|"ny"|"sz"|"ty"|"zs") ; + + -- Trigraphs + trigraph : pattern Str = #("dzs") ; + + duplicateLast : Str -> Str = \str -> case str of { + x + "dzs" => x + "ddzs" ; + x + "ny" => x + "nny" ; -- takony : takonnyal + x + "cs" => x + "ccs" ; + x + "dz" => x + "ddz" ; + x + "gy" => x + "ggy" ; + x + "ly" => x + "lly" ; + x + "sz" => x + "ssz" ; + x + "ty" => x + "tty" ; + x + "zs" => x + "zzs" ; + + -- Base cacse: just duplicate the single letter + x + s@? => x + s + s } ; + + -- Function to test if a string ends in a vowel + vowFinal : Str -> Bool = \str -> + case str of { + _ + #v => True ; -- Matching a string against a pattern. + _ => False + } ; + + lengthen : Str -> Str = \str -> case str of { + x + "a" => x + "á" ; + x + "e" => x + "é" ; + x + "i" => x + "í" ; + x + "o" => x + "ó" ; + x + "u" => x + "ú" ; + x + "ö" => x + "ő" ; + x + "ü" => x + "ű" ; + _ => Predef.error "Lengthening not applicable to" ++ str + } ; + + shorten : Str -> Str = \str -> case str of { + x + "á" => x + "a" ; + x + "é" => x + "e" ; + x + "í" => x + "i" ; + x + "ó" => x + "o" ; + x + "ú" => x + "u" ; + x + "ő" => x + "ö" ; + x + "ű" => x + "ü" ; + _ => Predef.error "Shortening not applicable to" ++ str + } ; + + -- Function to get a harmony from a string + getHarm : Str -> Harm = \s -> case s of { + _ + ("a" | "á" | "o" | "ó" | "u" | "ú") + _ => H_a ; + _ + ("ö" | "ő" | "ü") + _ => H_o ; + _ => H_e + } ; + + -- Used as a table of allomorphs for a give case. + HarmForms : Type = Harm => Str ; + + -- Functions for constructing a HarmForms table. + harm3 : Str -> Str -> Str -> HarmForms = \a,e,o -> table { + H_a => a ; + H_e => e ; + H_o => o + } ; + harm : Str -> Str -> HarmForms = \a,e -> harm3 a e e ; + harm1 : Str -> HarmForms = \i -> harm i i ; + + -- Variant of case forms when the noun stem ends in consonant. + endCaseCons : Case -> HarmForms = \c -> case c of { + Nom => harm1 [] ; + Acc => harm3 "ot" "et" "öt" ; + Dat => harm "nak" "nek" ; + Ill => harm "ba" "be" ; + Ine => harm "ban" "ben" ; + Ela => harm "ból" "ből" ; + All => harm3 "hoz" "hez" "höz" ; + Ade => harm "nál" "nél" ; + Abl => harm "tól" "től" ; + Sub => harm "ra" "re" ; + Sup => harm3 "on" "en" "ön" ; + Del => harm "ról" "ről" ; + Cau => harm1 "ért" ; + Ins => harm "al" "el" ; + Tra => harm "á" "é" + -- Ess => harm "stul" "stül" ; -- Essive-modal 'with and its parts' + -- Ter => harm1 "ig" ; -- Terminative 'as far as ' + -- For => harm1 "ként" ; -- Formal 'as ' + -- Tem => harm1 "kor" -- Temporal 'at '. Only used with numerals. + } ; + + -- Variant where accusative has the allomorph -at + endCaseConsAccAt : Case -> HarmForms = \c -> case c of { + Acc => harm3 "at" "et" "öt" ; + _ => endCaseCons c + } ; + + -- Variant of case forms when the noun stem ends in vowel. + endCaseVow : Case -> HarmForms = \c -> case c of { + Acc => harm1 "t" ; + Sup => harm1 "n" ; + Ins => harm "val" "vel" ; + Tra => harm "vá" "vé" ; + + -- Other forms are shared with endCaseCons. + _ => endCaseCons c + } ; + + -- Function to return a plural allomorph given the stem (e.g. név, almá). + -- TODO: seems to be many "ak" cases, add? + -- Examples: ág, ágy, ár, díj, fal, fog, gyár, hal, has, hát, ház, hold, láz, lyuk, nyak, olaj, oldal, toll, ujj, vonal + pluralAllomorph : (stem : Str) -> Str = \stem -> + case vowFinal stem of { + True => "k" ; + False => harm3 "ok" "ek" "ök" ! getHarm stem + } ; + + + -- Harmony and plural allomorph read from the singular nominative + mkNoun : Str -> Noun = \w -> + mkNounHarm (getHarm w) (pluralAllomorph w) w ; + + -- Harmony and plural allomorph given explicitly (check if the True makes it bad) + mkNounHarm : Harm -> (plural : Str) -> Str -> Noun = mkNounHarmAcc True ; + + mkNounHarmAcc : (useAt : Bool) -> Harm -> (plural : Str) -> Str -> Noun = \useAt,h,plural,w -> + let endCaseSg : Case -> HarmForms = case of { + => endCaseVow ; + => endCaseConsAccAt ; + _ => endCaseCons} ; + endCasePl : Case -> HarmForms = case of { + <"ak",_> => endCaseConsAccAt ; + <_,True> => endCaseConsAccAt ; + _ => endCaseCons } ; + -- Last consonant doubles before instrumental and translative + duplConsStem : Str = case vowFinal w of { + True => w ; + False => duplicateLast w } ; + + -- Noun is {s : Number => Case => Str}, we construct nested tables. + in {s = table { + Sg => table { + -- Double the last letter (if consonant) before Ins, Tra + c@(Ins|Tra) => duplConsStem + endCaseSg c ! h ; + c@_ => w + endCaseSg c ! h } ; + + Pl => table { + -- Double the plural k before Ins, Tra + c@(Ins|Tra) => w + plural + "k" + endCasePl c ! h ; + + -- endCaseCons, because we only use -k as plural morpheme. + -- If we add possessive forms with allomorph -i, then revise. + c@_ => w + plural + endCasePl c ! h } + } + } ; + +} diff --git a/src/hungarian/NumeralHun.gf b/src/hungarian/NumeralHun.gf index 68091349..f9c66af1 100644 --- a/src/hungarian/NumeralHun.gf +++ b/src/hungarian/NumeralHun.gf @@ -1,99 +1,129 @@ -concrete NumeralHun of Numeral = CatHun [Numeral,Digits] ** open ResHun in -{ ---{ --- ---lincat --- Digit = {s : DForm => CardOrd => Case => Str} ; --- Sub10 = {s : DForm => CardOrd => Case => Str ; n : Number} ; --- Sub100 = {s : CardOrd => Case => Str ; n : Number} ; --- Sub1000 = {s : CardOrd => Case => Str ; n : Number} ; --- Sub1000000 = {s : CardOrd => Case => Str ; n : Number} ; --- ---lin num x = x ; ---lin n2 = let two = mkNum "two" "twelve" "twenty" "second" in --- {s = \\f,o => case of { --- => regGenitiveS "twelfth" ; --- _ => two.s ! f ! o --- } --- } ; --- ---lin n3 = mkNum "three" "thirteen" "thirty" "third" ; ---lin n4 = mkNum "four" "fourteen" "forty" "fourth" ; ---lin n5 = mkNum "five" "fifteen" "fifty" "fifth" ; ---lin n6 = regNum "six" ; ---lin n7 = regNum "seven" ; ---lin n8 = mkNum "eight" "eighteen" "eighty" "eighth" ; ---lin n9 = mkNum "nine" "nineteen" "ninety" "ninth" ; --- ---lin pot01 = mkNum "one" "eleven" "ten" "first" ** {n = Sg} ; ---lin pot0 d = d ** {n = Pl} ; ---lin pot110 = regCardOrd "ten" ** {n = Pl} ; ---lin pot111 = regCardOrd "eleven" ** {n = Pl} ; ---lin pot1to19 d = {s = d.s ! teen} ** {n = Pl} ; ---lin pot0as1 n = {s = n.s ! unit} ** {n = n.n} ; ---lin pot1 d = {s = d.s ! ten} ** {n = Pl} ; ---lin pot1plus d e = { --- s = \\o,c => d.s ! ten ! NCard ! Nom ++ "-" ++ e.s ! unit ! o ! c ; n = Pl} ; ---lin pot1as2 n = n ; ---lin pot2 d = {s = \\o,c => d.s ! unit ! NCard ! Nom ++ mkCard o "hundred" ! c} ** {n = Pl} ; ---lin pot2plus d e = { --- s = \\o,c => d.s ! unit ! NCard ! Nom ++ "hundred" ++ "and" ++ e.s ! o ! c ; n = Pl} ; ---lin pot2as3 n = n ; ---lin pot3 n = { --- s = \\o,c => n.s ! NCard ! Nom ++ mkCard o "thousand" ! c ; n = Pl} ; ---lin pot3plus n m = { --- s = \\o,c => n.s ! NCard ! Nom ++ "thousand" ++ m.s ! o ! c; n = Pl} ; --- ----- numerals as sequences of digits --- --- lincat --- Dig = TDigit ; --- --- lin --- IDig d = d ** {tail = T1} ; --- --- IIDig d i = { --- s = \\o,c => d.s ! NCard ! Nom ++ commaIf i.tail ++ i.s ! o ! c ; --- n = Pl ; --- tail = inc i.tail --- } ; --- --- D_0 = mkDig "0" ; --- D_1 = mk3Dig "1" "1st" Sg ; --- D_2 = mk2Dig "2" "2nd" ; --- D_3 = mk2Dig "3" "3rd" ; --- D_4 = mkDig "4" ; --- D_5 = mkDig "5" ; --- D_6 = mkDig "6" ; --- D_7 = mkDig "7" ; --- D_8 = mkDig "8" ; --- D_9 = mkDig "9" ; --- --- oper --- commaIf : DTail -> Str = \t -> case t of { --- T3 => BIND++","++BIND ; --- _ => BIND --- } ; --- --- inc : DTail -> DTail = \t -> case t of { --- T1 => T2 ; --- T2 => T3 ; --- T3 => T1 --- } ; --- --- mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ; --- mkDig : Str -> TDigit = \c -> mk2Dig c (c + "th") ; --- --- mk3Dig : Str -> Str -> Number -> TDigit = \c,o,n -> { --- s = table {NCard => regGenitiveS c ; NOrd => regGenitiveS o} ; --- n = n --- } ; --- --- TDigit = { --- n : Number ; --- s : CardOrd => Case => Str --- } ; --- ---} +concrete NumeralHun of Numeral = CatHun [Numeral,Digits] ** + open Prelude, ResHun in { + +lincat + Digit, + Sub10 = LinDigit ; + Sub100, + Sub1000, + Sub1000000 = ResHun.Numeral ; +lin + -- TODO: Add case inflection and ordinal forms to all numerals + + -- : Sub1000000 -> Numeral + num x = x ; + + -- : Digit + n2 = mkNum5 "kettő" "húsz" "két" "huszon" "második" ; + n3 = mkNum3 "három" "harminc" "harmadik" ; + n4 = mkNum3 "négy" "negyven" "negyedik" ; + n5 = mkNum3 "öt" "ötven" "ötödik" ; + n6 = mkNum3 "hat" "hatvan" "hatodik" ; + n7 = mkNum3 "hét" "hetven" "hetedik" ; + n8 = mkNum3 "nyolc" "nyolcvan" "nyolcadik" ; + n9 = mkNum3 "kilenc" "kilencven" "kilencedik" ; + + -- : Sub10 ; -- 1 + pot01 = mkNum3 "egy" "tíz" "első" ** {n=Sg} ; + -- : Digit -> Sub10 ; -- d * 1 + pot0 d = d ; + + -- : Sub100 ; -- 10 + pot110 = {s = table {p => "tíz"} ; n = numNumber ; numtype = IsNum} ; + -- : Sub100 ; -- 11 + pot111 = {s = table {p => "tizenegy"} ; n = numNumber ; numtype = IsNum} ; + -- : Digit -> Sub100 ; -- 10 + d + pot1to19 d = + {s = table {p => "tizen" ++ d.s ! } ; + n = numNumber ; numtype = IsNum} ; + -- : Sub10 -> Sub100 ; -- coercion of 1..9 + pot0as1 n = + {s = table {p => n.s ! } ; + n = numNumber ; numtype = IsNum} ; + + -- : Digit -> Sub100 ; -- d * 10 + pot1 d = + {s = table {p => d.s ! } ; + n = numNumber ; numtype = IsNum} ; + -- : Digit -> Sub10 -> Sub100 ; -- d * 10 + n + pot1plus d e = + {s = table {p => (d.s ! ) ++ e.s ! } ; + n = numNumber ; numtype = IsNum} ; + + -- : Sub100 -> Sub1000 ; -- coercion of 1..99 + pot1as2 n = n ; + -- : Sub10 -> Sub1000 ; -- m * 100 + pot2 d = + {s = table {p => (d.s ! ) ++ "száz"} ; + n = numNumber ; numtype = IsNum} ; + -- : Sub10 -> Sub100 -> Sub1000 ; -- m * 100 + n + pot2plus d e = + {s = table {p => (d.s ! ) ++ "száz" ++ e.s ! p} ; + n = numNumber ; numtype = IsNum} ; + + -- : Sub1000 -> Sub1000000 ; -- coercion of 1..999 + pot2as3 n = n ; + -- : Sub1000 -> Sub1000000 ; -- m * 1000 + pot3 n = + {s = table {p => n.s ! Attrib ++ "ezer"} ; + n = numNumber ; numtype = IsNum} ; + -- : Sub1000 -> Sub1000 -> Sub1000000 ; -- m * 1000 + n + pot3plus n m = + {s = table {p => n.s ! Attrib ++ "ezer" ++ m.s ! p} ; + n = numNumber ; numtype = IsNum} ; + +oper + LinDigit : Type = {s : DForm*Place => Str ; n : Number} ; + + mkNum3 : (x1,_,x3 : Str) -> LinDigit = \három,harminc,harmadik -> + mkNum5 három harminc három harminc harmadik ; + + mkNum5 : (x1,_,_,_,x5 : Str) -> LinDigit = \ui,ti,ua,ta,ord -> { + s = table { => ui ; + => ti ; + => ua ; + => ta } ; +-- ord = ord ; -- TODO figure out where to use ordinal + n = numNumber ; + numType = IsNum ; + } ; + + numNumber = Sg ; + + -- numerals as sequences of digits + lincat + Dig = TDigit ; + + lin + -- : Dig -> Digits ; -- 8 + IDig d = d ** {s = \\_ => d.s} ; + + -- : Dig -> Digits -> Digits ; -- 876 + IIDig d i = { + s = \\x => d.s ++ BIND ++ i.s ! x ; + n = numNumber + } ; + + D_0 = mkDig "0" ; + D_1 = mkDig "1" ; + D_2 = mkDig "2" ; + D_3 = mkDig "3" ; + D_4 = mkDig "4" ; + D_5 = mkDig "5" ; + D_6 = mkDig "6" ; + D_7 = mkDig "7" ; + D_8 = mkDig "8" ; + D_9 = mkDig "9" ; + + oper + mkDig : Str -> TDigit = \s -> { + s = s ; + n = numNumber + } ; + + TDigit = { + s : Str ; -- TODO add ordinals + n : Number + } ; } diff --git a/src/hungarian/ParadigmsHun.gf b/src/hungarian/ParadigmsHun.gf index 5f3da0c5..247fe301 100644 --- a/src/hungarian/ParadigmsHun.gf +++ b/src/hungarian/ParadigmsHun.gf @@ -1,733 +1,186 @@ ---# -path=.:../abstract:../../prelude:../common - ---1 Hunlish Lexical Paradigms --- --- Aarne Ranta 2003--2005 --- --- This is an API for the user of the resource grammar --- for adding lexical items. It gives functions for forming --- expressions of open categories: nouns, adjectives, verbs. --- --- Closed categories (determiners, pronouns, conjunctions) are --- accessed through the resource syntax API, $Structural.gf$. --- --- The main difference with $MorphoHun.gf$ is that the types --- referred to are compiled resource grammar types. We have moreover --- had the design principle of always having existing forms, rather --- than stems, as string arguments of the paradigms. --- --- The structure of functions for each word class $C$ is the following: --- first we give a handful of patterns that aim to cover all --- regular cases. Then we give a worst-case function $mkC$, which serves as an --- escape to construct the most irregular words of type $C$. --- However, this function should only seldom be needed: we have a --- separate module [``IrregHun`` ../../english/IrregHun.gf], --- which covers irregular verbss. - -resource ParadigmsHun = open - (Predef=Predef), - Prelude, - ResHun, - CatHun - in -{ - flags optimize = noexpand ; - ---{ -----2 Parameters ----- ----- To abstract over gender names, we define the following identifiers. --- ---oper --- Gender : Type ; --- --- human : Gender ; --- nonhuman : Gender ; --- masculine : Gender ; --% --- feminine : Gender ; --% --- ----- To abstract over number names, we define the following. --- --- Number : Type ; --- --- singular : Number ; --- plural : Number ; --- ----- To abstract over case names, we define the following. --- --- Case : Type ; --% --- --- nominative : Case ; --% --- genitive : Case ; --% --- ----- Prepositions are used in many-argument functions for rection. ----- The resource category $Prep$ is used. --- ----- The number of a noun phrase can be extracted with the following ----- function. --- --- npNumber : NP -> Number ; -- exctract the number of a noun phrase --- --- -----2 Nouns --- ----- Nouns are constructed by the function $mkN$, which takes a varying ----- number of arguments. --- +resource ParadigmsHun = open CatHun, ResHun, ParamHun, NounHun, Prelude in { oper - mkN = overload { - mkN : Str -> Noun = - \s -> lin N (regNoun s) ; +--2 Parameters +-- +-- To abstract over number, valency and (some) case names, +-- we define the following identifiers. The application programmer +-- should always use these constants instead of the constructors +-- defined in $ResKor$. + + Harmony : Type ; + harmA : Harmony ; + harmE : Harmony ; + harmO : Harmony ; + +--2 Nouns + + mkN : overload { + mkN : (sgnom : Str) -> N ; -- Predictable nouns + mkN : (madár : Str) -> (ak : Str) -> N ; -- Noun with unpredictable plural allomorph + mkN : (férfi : Str) -> (harm : Harmony) -> (ak : Str) -> N ; -- Noun with unpredictable vowel harmony and plural allomorph + } ; + + mkPN : overload { + mkPN : Str -> PN ; -- Singular PN out of a string + mkPN : Str -> Number -> PN -- PN with a given number + -- mkPN : N -> Number -> PN ; } ; --- ----- The regular function captures the variants for nouns ending with ----- "s","sh","x","z" or "y": "kiss - kisses", "flash - flashes"; ----- "fly - flies" (but "toy - toys"), --- --- mkN : (flash : Str) -> N ; -- plural s, incl. flash-flashes, fly-flies --- ----- In practice the worst case is to give singular and plural nominative. --- --- mkN : (man,men : Str) -> N ; -- irregular plural --- ----- The theoretical worst case: give all four forms. --- --- mkN : (man,men,man's,men's : Str) -> N ; -- irregular genitives --- ----- Change gender from the default $nonhuman$. --- --- mkN : Gender -> N -> N ; -- default nonhuman --- -----3 Compound nouns ----- ----- A compound noun is an uninflected string attached to an inflected noun, ----- such as "baby boom", "chief executive officer". --- --- mkN : Str -> N -> N -- e.g. baby + boom --- } ; --- --- -----3 Relational nouns --- --- mkN2 : overload { --- mkN2 : Str -> N2 ; -- reg. noun, prep. "of" --% --- mkN2 : N -> N2 ; -- e.g. wife of (default prep. to) --- mkN2 : N -> Str -> N2 ; -- access to --% --- mkN2 : N -> Prep -> N2 ; -- e.g. access to --- mkN2 : Str -> Str -> N2 ; -- access to (regular noun) --% --- } ; --- ----- Use the function $mkPrep$ or see the section on prepositions below to ----- form other prepositions. ----- ----- Three-place relational nouns ("the connection from x to y") need two prepositions. --- --- mkN3 : N -> Prep -> Prep -> N3 ; -- e.g. connection from x to y --- --- --- -----3 Proper names and noun phrases ----- ----- Proper names, with a regular genitive, are formed from strings. --- --- mkPN : overload { --- --- mkPN : Str -> PN ; --- ----- Sometimes a common noun can be reused as a proper name, e.g. "Bank" --- --- mkPN : N -> PN --% --- } ; --- -----3 Determiners and quantifiers --- --- mkQuant : overload { --- mkQuant : (this, these : Str) -> Quant ; --% --- mkQuant : (no_sg, no_pl, none_sg, non_pl : Str) -> Quant ; --% --- } ; --- --- mkOrd : Str -> Ord ; --% --- -----2 Adjectives --- --- mkA : overload { --- ----- For regular adjectives, the adverbial and comparison forms are derived. This holds ----- even for cases with the variations "happy - happily - happier - happiest", ----- "free - freely - freer - freest", and "rude - rudest". --- --- mkA : (happy : Str) -> A ; -- regular adj, incl. happy-happier, rude-ruder --- ----- However, the duplication of the final consonant cannot be predicted, ----- but a separate case is used to give the comparative --- --- mkA : (fat,fatter : Str) -> A ; -- irreg. comparative --- ----- As many as four forms may be needed. --- --- mkA : (good,better,best,well : Str) -> A -- completely irreg. --- } ; --- ----- Regular comparison is formed by "more - most" for words with two vowels separated ----- and terminated by some other letters. To force this or the opposite, ----- the following can be used: --- --- compoundA : A -> A ; -- force comparison with more/most --- simpleA : A -> A ; -- force comparison with -er,-est --- irregAdv : A -> Str -> A ; -- adverb irreg, e.g. "fast" --- -----3 Two-place adjectives --- --- mkA2 : overload { --- mkA2 : A -> Prep -> A2 ; -- absent from --- mkA2 : A -> Str -> A2 ; -- absent from --% --- mkA2 : Str -> Prep -> A2 ; -- absent from --% --- mkA2 : Str -> Str -> A2 -- absent from --% --- --- } ; --- --- -----2 Adverbs --- ----- Adverbs are not inflected. Most lexical ones have position ----- after the verb. Some can be preverbal (e.g. "always"). --- --- mkAdv : Str -> Adv ; -- e.g. today --- mkAdV : Str -> AdV ; -- e.g. always --- ----- Adverbs modifying adjectives and sentences can also be formed. --- --- mkAdA : Str -> AdA ; -- e.g. quite --- ----- Adverbs modifying numerals --- --- mkAdN : Str -> AdN ; -- e.g. approximately --- -----2 Prepositions ----- ----- A preposition as used for rection in the lexicon, as well as to ----- build $PP$s in the resource API, just requires a string. --- --- mkPrep : Str -> Prep ; -- e.g. "in front of" --- noPrep : Prep ; -- no preposition --- ----- (These two functions are synonyms.) --- -----2 Conjunctions ----- --- --- mkConj : overload { --- mkConj : Str -> Conj ; -- and (plural agreement) --% --- mkConj : Str -> Number -> Conj ; -- or (agrement number given as argument) --% --- mkConj : Str -> Str -> Conj ; -- both ... and (plural) --% --- mkConj : Str -> Str -> Number -> Conj ; -- either ... or (agrement number given as argument) --% --- } ; --- -----2 Verbs ----- --- ----- Verbs are constructed by the function $mkV$, which takes a varying ----- number of arguments. --- --- mkV : overload { --- ----- The regular verb function recognizes the special cases where the last ----- character is "y" ("cry-cries" but "buy-buys") or a sibilant ----- ("kiss-"kisses", "jazz-jazzes", "rush-rushes", "munch - munches", ----- "fix - fixes"). --- --- mkV : (cry : Str) -> V ; -- regular, incl. cry-cries, kiss-kisses etc --- ----- Give the present and past forms for regular verbs where ----- the last letter is duplicated in some forms, ----- e.g. "rip - ripped - ripping". --- --- mkV : (stop, stopped : Str) -> V ; -- reg. with consonant duplication --- ----- There is an extensive list of irregular verbs in the module $IrregularHun$. ----- In practice, it is enough to give three forms, ----- e.g. "drink - drank - drunk". --- --- mkV : (drink, drank, drunk : Str) -> V ; -- ordinary irregular --- ----- Irregular verbs with duplicated consonant in the present participle. --- --- mkV : (run, ran, run, running : Str) -> V ; -- irregular with duplication --% --- ----- Except for "be", the worst case needs five forms: the infinitive and ----- the third person singular present, the past indicative, and the ----- past and present participles. --- --- mkV : (go, goes, went, gone, going : Str) -> V ; -- totally irregular --- ----- Adds a prefix to an exisiting verb. This is most useful to create ----- prefix-variants of irregular verbs from $IrregHun$, e.g. "undertake". --- --- mkV : Str -> V -> V ; -- fix compound, e.g. under+take --- }; --- ----- Verbs with a particle. ----- The particle, such as in "switch on", is given as a string. --- --- partV : V -> Str -> V ; -- with particle, e.g. switch + on --- ----- Reflexive verbs. ----- By default, verbs are not reflexive; this function makes them that. --- --- reflV : V -> V ; -- reflexive e.g. behave oneself --- -----3 Two-place verbs ----- ----- Two-place verbs need a preposition, except the special case with direct object. ----- (transitive verbs). Notice that a particle comes from the $V$. --- --- mkV2 : overload { --- mkV2 : Str -> V2 ; -- kill --% --- mkV2 : V -> V2 ; -- transitive, e.g. hit --- mkV2 : V -> Prep -> V2 ; -- with preposiiton, e.g. believe in --- mkV2 : V -> Str -> V2 ; -- believe in --% --- mkV2 : Str -> Prep -> V2 ; -- believe in --% --- mkV2 : Str -> Str -> V2 -- believe in --% --- }; --- -----3 Three-place verbs ----- ----- Three-place (ditransitive) verbs need two prepositions, of which ----- the first one or both can be absent. --- --- mkV3 : overload { --- mkV3 : V -> V3 ; -- ditransitive, e.g. give,_,_ --- mkV3 : V -> Prep -> Prep -> V3 ; -- two prepositions, e.g. speak, with, about --- mkV3 : V -> Prep -> V3 ; -- give,_,to --% --- mkV3 : V -> Str -> V3 ; -- give,_,to --% --- mkV3 : Str -> Str -> V3 ; -- give,_,to --% --- mkV3 : Str -> V3 ; -- give,_,_ --% --- }; --- -----3 Other complement patterns ----- ----- Verbs and adjectives can take complements such as sentences, ----- questions, verb phrases, and adjectives. --- --- mkV0 : V -> V0 ; --% --- mkVS : V -> VS ; -- sentence-compl e.g. say (that S) --- mkV2S : V -> Prep -> V2S ; -- e.g. tell (NP) (that S) --- mkVV : V -> VV ; -- e.g. want (to VP) --- ingVV : V -> VV ; -- e.g. start (VPing) --- mkV2V : V -> Prep -> Prep -> V2V ; -- e.g. want (noPrep NP) (to VP) --- ingV2V : V -> Prep -> Prep -> V2V ; -- e.g. prevent (noPrep NP) (from VP-ing) --- mkVA : V -> VA ; -- e.g. become (AP) --- mkV2A : V -> Prep -> V2A ; -- e.g. paint (NP) (AP) --- mkVQ : V -> VQ ; -- e.g. wonder (QS) --- mkV2Q : V -> Prep -> V2Q ; -- e.g. ask (NP) (QS) --- --- mkAS : A -> AS ; --% --- mkA2S : A -> Prep -> A2S ; --% --- mkAV : A -> AV ; --% --- mkA2V : A -> Prep -> A2V ; --% --- ----- Notice: Categories $V0, AS, A2S, AV, A2V$ are just $A$. ----- $V0$ is just $V$; the second argument is treated as adverb. --- --- V0 : Type ; --% --- AS, A2S, AV, A2V : Type ; --% --- -----2 Other categories --- ---mkSubj : Str -> Subj = \s -> lin Subj {s = s} ; --% --- -----. -----2 Definitions of paradigms ----- ----- The definitions should not bother the user of the API. So they are ----- hidden from the document. --- --- Gender = ResHun.Gender ; --- Number = ResHun.Number ; --- Case = ResHun.NPCase ; --- human = Masc ; --- nonhuman = Neutr ; --- masculine = Masc ; --- feminine = Fem ; --- singular = Sg ; --- plural = Pl ; --- nominative = npNom ; --- genitive = npGen ; --- --- npNumber np = (fromAgr np.a).n ; --- --- Preposition : Type = Str ; -- obsolete --- --- regN = \ray -> --- let rays = add_s ray --- in --- mk2N ray rays ; --- --- --- add_s : Str -> Str = \w -> case w of { --- _ + ("io" | "oo") => w + "s" ; -- radio, bamboo --- _ + ("s" | "z" | "x" | "sh" | "ch" | "o") => w + "es" ; -- bus, hero --- _ + ("a" | "o" | "u" | "e") + "y" => w + "s" ; -- boy --- x + "y" => x + "ies" ; -- fly --- _ => w + "s" -- car --- } ; --- --- duplFinal : Str -> Str = \w -> case w of { --- _ + ("a" | "e" | "o") + ("a" | "e" | "i" | "o" | "u") + ? => w ; -- waited, needed --- _ + ("a" | "e" | "i" | "o" | "u") + --- c@("b"|"d"|"g"|"m"|"n"|"p"|"r"|"t") => w + c ; -- omitted, manned --- _ => w --- } ; --- --- mk2N = \man,men -> --- let mens = case last men of { --- "s" => men + "'" ; --- _ => men + "'s" --- } --- in --- mk4N man men (man + "'s") mens ; --- --- mk4N = \man,men,man's,men's -> --- lin N (mkNoun man man's men men's ** {g = Neutr}) ; --- --- genderN g man = lin N {s = man.s ; g = g} ; --- --- compoundN s n = lin N {s = \\x,y => s ++ n.s ! x ! y ; g=n.g} ; --- --- mkPN = overload { --- mkPN : Str -> PN = regPN ; --- mkPN : N -> PN = nounPN --- } ; --- --- mkN2 = overload { --- mkN2 : N -> Prep -> N2 = prepN2 ; --- mkN2 : N -> Str -> N2 = \n,s -> prepN2 n (mkPrep s); --- mkN2 : Str -> Str -> N2 = \n,s -> prepN2 (regN n) (mkPrep s); --- mkN2 : N -> N2 = \n -> prepN2 n (mkPrep "of") ; --- mkN2 : Str -> N2 = \s -> prepN2 (regN s) (mkPrep "of") --- } ; --- --- prepN2 = \n,p -> lin N2 (n ** {c2 = p.s}) ; --- regN2 n = prepN2 (regN n) (mkPrep "of") ; --- --- mkN3 = \n,p,q -> lin N3 (n ** {c2 = p.s ; c3 = q.s}) ; --- -----3 Relational common noun phrases ----- ----- In some cases, you may want to make a complex $CN$ into a ----- relational noun (e.g. "the old town hall of"). --- --- cnN2 : CN -> Prep -> N2 ; --- cnN3 : CN -> Prep -> Prep -> N3 ; --- ----- This is obsolete. --- cnN2 = \n,p -> lin N2 (n ** {c2 = p.s}) ; --- cnN3 = \n,p,q -> lin N3 (n ** {c2 = p.s ; c3 = q.s}) ; --- --- regPN n = regGenPN n human ; --- regGenPN n g = lin PN {s = table {Gen => n + "'s" ; _ => n} ; g = g} ; --- nounPN n = lin PN {s = n.s ! singular ; g = n.g} ; --- --- mkQuant = overload { --- mkQuant : (this, these : Str) -> Quant = \sg,pl -> mkQuantifier sg pl sg pl; --- mkQuant : (no_sg, no_pl, none_sg, non_pl : Str) -> Quant = mkQuantifier; --- } ; --- --- mkQuantifier : Str -> Str -> Str -> Str -> Quant = --- \sg,pl,sg',pl' -> lin Quant { --- s = \\_ => table { Sg => sg ; Pl => pl } ; --- sp = \\_ => table { --- Sg => \\c => regGenitiveS sg' ! npcase2case c ; Pl => \\c => regGenitiveS pl' ! npcase2case c} --- } ; --- --- mkOrd : Str -> Ord = \x -> lin Ord { s = regGenitiveS x}; --- --- mk2A a b = mkAdjective a a a b ; --- regA a = case a of { --- _ + ("a" | "e" | "i" | "o" | "u" | "y") + ? + _ + --- ("a" | "e" | "i" | "o" | "u" | "y") + ? + _ => --- lin A (compoundADeg (regADeg a)) ; --- _ => lin A (regADeg a) --- } ; --- --- prepA2 a p = lin A2 (a ** {c2 = p.s}) ; --- --- ADeg = A ; ---- --- --- mkADeg a b c d = mkAdjective a b c d ; --- --- regADeg happy = --- let --- happ = init happy ; --- y = last happy ; --- happie = case y of { --- "y" => happ + "ie" ; --- "e" => happy ; --- _ => duplFinal happy + "e" --- } ; --- in mkADeg happy (happie + "r") (happie + "st") (adj2adv happy) ; --- --- adj2adv : Str -> Str = \happy -> --- case happy of { --- _ + "ble" => init happy + "y" ; --- _ + "y" => init happy + "ily" ; --- _ + "ll" => happy + "y" ; --- _ => happy + "ly" --- } ; --- --- duplADeg fat = --- mkADeg fat --- (fat + last fat + "er") (fat + last fat + "est") (adj2adv fat) ; --- --- compoundADeg a = --- let ad = (a.s ! AAdj Posit Nom) --- in mkADeg ad ("more" ++ ad) ("most" ++ ad) (a.s ! AAdv) ; --- --- adegA a = a ; --- --- mkAdv x = lin Adv (ss x) ; --- mkAdV x = lin AdV (ss x) ; --- mkAdA x = lin AdA (ss x) ; --- mkAdN x = lin AdN (ss x) ; --- --- mkPrep p = lin Prep (ss p) ; --- noPrep = mkPrep [] ; --- --- mk5V a b c d e = lin V (mkVerb a b c d e ** {s1 = []}) ; --- --- regV cry = --- let --- cries = (regN cry).s ! Pl ! Nom ; -- ! --- cried : Str = case cries of { --- _ + "es" => init cries + "d" ; --- _ => duplFinal cry + "ed" --- } ; --- crying : Str = case cry of { --- _ + "ee" => cry + "ing" ; --- d + "ie" => d + "ying" ; --- us + "e" => us + "ing" ; --- _ => duplFinal cry + "ing" --- } --- in mk5V cry cries cried cried crying ; --- --- reg2V fit fitted = --- let fitt = Predef.tk 2 fitted ; --- in --- if_then_else V (pbool2bool (Predef.eqStr (last fit) (last fitt))) --- (mk5V fit (fit + "s") (fitt + "ed") (fitt + "ed") (fitt + "ing")) --- (regV fit) ; --- --- regDuplV fit = --- case last fit of { --- ("a" | "e" | "i" | "o" | "u" | "y") => --- Predef.error (["final duplication makes no sense for"] ++ fit) ; --- t => --- let fitt = fit + t in --- mk5V fit (fit + "s") (fitt + "ed") (fitt + "ed") (fitt + "ing") --- } ; --- --- irregV x y z = let reg = (regV x).s in --- mk5V x (reg ! VPres) y z (reg ! VPresPart) ** {s1 = []} ; --- --- irreg4V x y z w = let reg = (regV x).s in --- mk5V x (reg ! VPres) y z w ** {s1 = []} ; --- --- irregDuplV fit y z = --- let --- fitting = (regDuplV fit).s ! VPresPart --- in --- mk5V fit (fit + "s") y z fitting ; --- --- partV v p = lin V {s = \\f => v.s ! f ++ p ; isRefl = v.isRefl} ; --- reflV v = lin V {s = v.s ; part = v.part ; isRefl = True} ; --- --- prepV2 v p = lin V2 {s = v.s ; s1 = v.s1 ; c2 = p.s ; isRefl = v.isRefl} ; --- dirV2 v = prepV2 v noPrep ; --- --- prepPrepV3 v p q = --- lin V3 {s = v.s ; s1 = v.s1 ; c2 = p.s ; c3 = q.s ; isRefl = v.isRefl} ; --- dirV3 v p = prepPrepV3 v noPrep p ; --- dirdirV3 v = dirV3 v noPrep ; --- --- mkVS v = lin VS v ; --- mkVV v = lin VV { --- s = table {VVF vf => v.s ! vf ; _ => v.s ! VInf} ; --- typ = VVInf --- } ; --- ingVV v = lin VV { --- s = table {VVF vf => v.s ! vf ; _ => v.s ! VInf} ; --- typ = VVPresPart --- } ; --- mkVQ v = lin VQ v ; --- --- V0 : Type = V ; ----- V2S, V2V, V2Q : Type = V2 ; --- AS, A2S, AV : Type = A ; --- A2V : Type = A2 ; --- --- mkV0 v = v ; --- mkV2S v p = lin V2S (prepV2 v p) ; --- mkV2V v p t = lin V2V (prepV2 v p ** {c3 = t.s ; typ = VVAux}) ; --- ingV2V v p t = lin V2V (prepV2 v p ** {c3 = t.s ; typ = VVPresPart}) ; --- mkVA v = lin VA v ; --- mkV2A v p = lin V2A (prepV2 v p) ; --- mkV2Q v p = lin V2Q (prepV2 v p) ; --- --- mkAS v = v ; --- mkA2S v p = lin A (prepA2 v p) ; --- mkAV v = v ; --- mkA2V v p = prepA2 v p ; --- --- ----- pre-overload API and overload definitions --- --- mk4N : (man,men,man's,men's : Str) -> N ; --- regN : Str -> N ; --- mk2N : (man,men : Str) -> N ; --- genderN : Gender -> N -> N ; --- compoundN : Str -> N -> N ; --- --- mkN = overload { --- mkN : (man,men,man's,men's : Str) -> N = mk4N ; --- mkN : Str -> N = regN ; --- mkN : (man,men : Str) -> N = mk2N ; --- mkN : Gender -> N -> N = genderN ; --- mkN : Str -> N -> N = compoundN --- } ; --- ----- Relational nouns ("daughter of x") need a preposition. --- --- prepN2 : N -> Prep -> N2 ; --- ----- The most common preposition is "of", and the following is a ----- shortcut for regular relational nouns with "of". --- --- regN2 : Str -> N2 ; --- --- mk2A : (free,freely : Str) -> A ; --- regA : Str -> A ; --- --- mkA = overload { --- mkA : Str -> A = regA ; --- mkA : (fat,fatter : Str) -> A = \fat,fatter -> --- mkAdjective fat fatter (init fatter + "st") (adj2adv fat) ; --- mkA : (good,better,best,well : Str) -> A = \a,b,c,d -> --- mkAdjective a b c d --- } ; --- --- compoundA = compoundADeg ; --- simpleA a = --- let ad = (a.s ! AAdj Posit Nom) --- in regADeg ad ; --- --- irregAdv a adv = lin A {s = table {AAdv => adv; aform => a.s ! aform}} ; --- --- prepA2 : A -> Prep -> A2 ; --- --- mkA2 = overload { --- mkA2 : A -> Prep -> A2 = prepA2 ; --- mkA2 : A -> Str -> A2 = \a,p -> prepA2 a (mkPrep p) ; --- mkA2 : Str -> Prep -> A2 = \a,p -> prepA2 (regA a) p; --- mkA2 : Str -> Str -> A2 = \a,p -> prepA2 (regA a) (mkPrep p); --- } ; --- --- mk5V : (go, goes, went, gone, going : Str) -> V ; --- regV : (cry : Str) -> V ; --- reg2V : (stop, stopped : Str) -> V; --- irregV : (drink, drank, drunk : Str) -> V ; --- irreg4V : (run, ran, run, running : Str) -> V ; --- --- -- Use reg2V instead --- regDuplV : Str -> V ; --- -- Use irreg4V instead --- irregDuplV : (get, got, gotten : Str) -> V ; --- --- mkV = overload { --- mkV : (cry : Str) -> V = regV ; --- mkV : (stop, stopped : Str) -> V = reg2V ; --- mkV : (drink, drank, drunk : Str) -> V = irregV ; --- mkV : (run, ran, run, running : Str) -> V = irreg4V ; --- mkV : (go, goes, went, gone, going : Str) -> V = mk5V ; --- mkV : Str -> V -> V = prefixV --- }; --- --- prepV2 : V -> Prep -> V2 ; --- dirV2 : V -> V2 ; --- prefixV : Str -> V -> V = \p,v -> lin V { s = \\vform => p + v.s ! vform; isRefl = v.isRefl } ; --- --- mkV2 = overload { --- mkV2 : V -> V2 = dirV2 ; --- mkV2 : Str -> V2 = \s -> dirV2 (regV s) ; --- mkV2 : V -> Prep -> V2 = prepV2 ; --- mkV2 : V -> Str -> V2 = \v,p -> prepV2 v (mkPrep p) ; --- mkV2 : Str -> Prep -> V2 = \v,p -> prepV2 (regV v) p ; --- mkV2 : Str -> Str -> V2 = \v,p -> prepV2 (regV v) (mkPrep p) --- }; --- --- prepPrepV3 : V -> Prep -> Prep -> V3 ; --- dirV3 : V -> Prep -> V3 ; --- dirdirV3 : V -> V3 ; --- --- mkV3 = overload { --- mkV3 : V -> Prep -> Prep -> V3 = prepPrepV3 ; --- mkV3 : V -> Prep -> V3 = dirV3 ; --- mkV3 : V -> Str -> V3 = \v,s -> dirV3 v (mkPrep s); --- mkV3 : Str -> Str -> V3 = \v,s -> dirV3 (regV v) (mkPrep s); --- mkV3 : V -> V3 = dirdirV3 ; --- mkV3 : Str -> V3 = \v -> dirdirV3 (regV v) ; --- } ; --- --- mkConj = overload { --- mkConj : Str -> Conj = \y -> mk2Conj [] y plural ; --- mkConj : Str -> Number -> Conj = \y,n -> mk2Conj [] y n ; --- mkConj : Str -> Str -> Conj = \x,y -> mk2Conj x y plural ; --- mkConj : Str -> Str -> Number -> Conj = mk2Conj ; --- } ; --- --- mk2Conj : Str -> Str -> Number -> Conj = \x,y,n -> --- lin Conj (sd2 x y ** {n = n}) ; --- ------- obsolete --- ----- Comparison adjectives may two more forms. --- --- ADeg : Type ; --- --- mkADeg : (good,better,best,well : Str) -> ADeg ; --- ----- The regular pattern recognizes two common variations: ----- "-e" ("rude" - "ruder" - "rudest") and ----- "-y" ("happy - happier - happiest - happily") --- --- regADeg : Str -> ADeg ; -- long, longer, longest --- ----- However, the duplication of the final consonant is nor predicted, ----- but a separate pattern is used: --- --- duplADeg : Str -> ADeg ; -- fat, fatter, fattest --- ----- If comparison is formed by "more", "most", as in general for ----- long adjective, the following pattern is used: --- --- compoundADeg : A -> ADeg ; -- -/more/most ridiculous --- ----- From a given $ADeg$, it is possible to get back to $A$. --- --- adegA : ADeg -> A ; --- --- --- regPN : Str -> PN ; --- regGenPN : Str -> Gender -> PN ; -- John, John's --- ----- Sometimes you can reuse a common noun as a proper name, e.g. "Bank". --- --- nounPN : N -> PN ; --- --- --- ---} ; +--2 Adjectives + + mkA : overload { + mkA : (adj : Str) -> A ; -- Regular adjective, given in ??? form + -- mkA : (kiga : Str) -> (jakda : A) -> A ; -- Compound adjective, e.g. 키가 작다 'short', literally 'height (is) small'. 키가 'height' given as string, 작다 'small' given as preconstructed A. + } ; + + mkA2 : overload { + mkA2 : Str -> Prep -> A2 ; + mkA2 : Str -> Case -> A2 + } ; + +--2 Verbs + + -- Verbs + mkV : overload { + mkV : (sg3 : Str) -> V ; -- Predictable verb. Takes singular P3 form in present tense. + -- mkV : (nore : Str) -> (hada : V) -> V ; -- Add a prefix to an existing verb, e.g. 노래+하다 + } ; + + copula : V ; -- The copula verb '' + + mkV2 : overload { + mkV2 : (sg3 : Str) -> V2 ; -- Predictable verb. Takes singular P3 form in present tense, object case is accusative. + mkV2 : V -> V2 ; -- Takes preconstructed V, object case is accusative. + } ; + + -- mkV3 : overload { + -- } ; + + -- mkVV : overload { + -- } ; + + -- + -- mkVA : Str -> VA + -- = \s -> lin VA (regV s) ; + -- mkVQ : Str -> VQ + -- = \s -> lin VQ (regV s) ; + -- mkVS : Str -> VS + -- = \s -> lin VS (regV s) ; + -- + -- mkV2A : Str -> V2A + -- = \s -> lin V2A (regV s ** {c2 = noPrep}) ; + -- mkV2V : Str -> V2V + -- = \s -> lin V2V (regV s ** {c2 = noPrep}) ; + -- mkV2Q : Str -> V2Q + -- = \s -> lin V2Q (regV s ** {c2 = noPrep}) ; + + ----- + +--2 Structural categories + + mkPrep : overload { + mkPrep : Str -> Prep ; -- Postposition, takes nominative + mkPrep : Str -> Case -> Prep ; -- Postposition and case + } ; + + casePrep : Case -> Prep ; -- No postposition, only case + + -- mkConj : (_,_ : Str) -> Number -> Conj = \s1,s2,num -> + -- lin Conj { s = s1 ; s2 = s2 } ; + + -- mkSubj : Str -> Bool -> Subj = \s,b -> + -- lin Subj { } ; + + mkAdv : Str -> Adv + = \s -> lin Adv {s = s} ; + + mkAdV : Str -> AdV + = \s -> lin AdV {s = s} ; + + mkAdA : Str -> AdA + = \s -> lin AdA {s = s} ; + + +--. +------------------------------------------------------------------------------- +-- The definitions should not bother the user of the API. So they are +-- hidden from the document. + + Harmony : Type = ResHun.Harm ; + harmA = ResHun.H_a ; + harmE = ResHun.H_e ; + harmO = ResHun.H_o ; + + mkN = overload { + mkN : Str -> N = + \s -> lin N (regNoun s) ; + + mkN : Str -> Str -> N = + \s,ak -> lin N (mkNounHarm (getHarm s) ak s) ; + + mkN : Str -> Harmony -> N = + \s,h -> lin N (mkNounHarm h (pluralAllomorph s) s) ; + + mkN : Str -> (plural : Str) -> Harmony -> N = + \s,pl,h -> lin N (mkNounHarm h pl s) ; + } ; + + + mkN2 = overload { + mkN2 : Str -> N2 = \s -> lin N2 (regNoun s) ; + mkN2 : N -> N2 = \n -> lin N2 n ; + } ; + + mkPN = overload { + mkPN : Str -> PN = \s -> lin PN (defNP s Sg) ; + mkPN : Str -> Number -> PN = \s,n -> lin PN (defNP s n) ; + -- mkPN : N -> Number -> PN ; + } ; + + mkA = overload { + mkA : (adj : Str) -> A = \s -> lin A (mkAdj s) ; + -- mkA : (kiga : Str) -> (jakda : A) -> A = \kiga,jakda -> + -- jakda ** {s = \\af => kiga ++ jakda.s ! af} ; + } ; + + mkA2 = overload { + mkA2 : Str -> Prep -> A2 = \s,p -> + lin A2 {s = (mkAdj s).s ; c2 = p} ; + mkA2 : Str -> Case -> A2 = \s,c -> + lin A2 {s = (mkAdj s).s ; c2 = {s = [] ; c = c}} + } ; + + mkV = overload { + mkV : (sg3 : Str) -> V = \v -> lin V (mkVerb v) ; + -- mkV : (nore : Str) -> (hada : V) -> V = \nore,hada -> hada ** { + -- s = \\vf => nore + hada.s ! vf} ; + } ; + + copula = ResHun.copula ; + + mkV2 = overload { + mkV2 : (plain : Str) -> V2 = \v2 -> lin V2 (mkVerb2 v2) ; + mkV2 : V -> V2 = vtov2 ; + } ; + + mkV3 = overload { + mkV3 : (plain : Str) -> V3 = \v3 -> lin V3 (mkVerb3 v3) ; + } ; + -- + -- mkVV = overload { + -- } ; + + mkPrep = overload { + mkPrep : (e : Str) -> Prep + = \str -> lin Prep (ResHun.mkPrep str) ; + mkPrep : Str -> Case -> Prep + = \str,c -> lin Prep (ResHun.mkPrep str ** {c = c}) ; + } ; + + casePrep : Case -> Prep + = \c -> lin Prep (ResHun.mkPrep [] ** {c = c}) ; +-------------------------------------------------------------------------------- } diff --git a/src/hungarian/ParamHun.gf b/src/hungarian/ParamHun.gf new file mode 100644 index 00000000..35d4e5ad --- /dev/null +++ b/src/hungarian/ParamHun.gf @@ -0,0 +1,111 @@ +resource ParamHun = ParamX ** open Prelude in { + +-------------------------------------------------------------------------------- +-- Phonology + +-------------------------------------------------------------------------------- +-- Morphophonology + + + +-------------------------------------------------------------------------------- +-- Nouns + +param + + Case = Nom | Acc | Dat + -- | PossStem -- TODO: Stem where possessive suffixes attach? + | Ill | Ine | Ela | All | Ade | Abl | Sub | Sup | Del -- Locatives + | Cau -- Causal-final 'for the purpose of, for the reason that' + | Ins -- Instrumental + | Tra -- Translative + -- | Ess | Ter | For + -- | Tem -- Temporal, e.g. hatkor ‘six o’clock’ (from hat ‘6’) + ; + + + SubjCase = SCNom | SCDat ; -- Limited set of subject cases + +oper + + caseTable : (x1,_,_,_,_,_,_,_,_,_,_,_,_,_,x15 : Str) -> Case=>Str = + \n,a,d,il,ine,el,al,ad,ab,sub,sup,del,ca,ins,tra -> table { + Nom => n ; + Acc => a ; + Dat => d ; + Ill => il ; + Ine => ine ; + Ela => el ; + All => al ; + Ade => ad ; + Abl => ab ; + Sub => sub ; + Sup => sup ; + Del => del ; + Cau => ca ; + Ins => ins ; + Tra => tra } ; + + sc2case : SubjCase -> Case = \sc -> + case sc of { + SCNom => Nom ; + SCDat => Dat + } ; + +-------------------------------------------------------------------------------- +-- Numerals + +param + DForm = Unit | Ten ; + Place = Indep | Attrib ; + + CardOrd = NOrd | NCard ; -- Not used yet + + NumType = NoNum | IsDig | IsNum ; + +oper + isNum : {numtype : NumType} -> Bool = \nt -> case nt.numtype of { + NoNum => False ; + _ => True + } ; +-------------------------------------------------------------------------------- +-- Adjectives + + +-------------------------------------------------------------------------------- +-- Conjunctions + + + +-------------------------------------------------------------------------------- +-- Verbs +param + + -- For object agreement in V2 + ObjDef = + Def + | Indef ; + + VForm = + VInf + | VFin Person Number ; + +oper + + agr2vf : Person*Number -> VForm = \pn -> + case of { + => VFin p n + } ; + +-------------------------------------------------------------------------------- +-- Clauses + +-- param + + -- ClType = + -- Statement + -- | PolarQuestion + -- | WhQuestion + -- | Subord ; + +} diff --git a/src/hungarian/ParseEngHun.gf b/src/hungarian/ParseEngHun.gf deleted file mode 100644 index b4775d37..00000000 --- a/src/hungarian/ParseEngHun.gf +++ /dev/null @@ -1,50 +0,0 @@ -abstract ParseHunAbs = - Tense, - Cat, - Noun, - Adjective, - Numeral, - Symbol, - Conjunction, - Verb - [SlashV2V, PassV2], - Adverb, - Phrase, - Sentence, - Relative, - Idiom [VP, ProgrVP], - Extra [NP, Quant, VPSlash, VP, GenNP, PassVPSlash], - DictHunAbs ** -{ ---{ --- ---fun CompoundCN : Num -> N -> CN -> CN ; --- DashCN : N -> N -> N ; --- GerundN : V -> N ; --- GerundAP : V -> AP ; --- PastPartAP : V2 -> AP ; --- myself_NP : NP ; --- yourselfSg_NP : NP ; --- himself_NP : NP ; --- herself_NP : NP ; --- itself_NP : NP ; --- ourself_NP : NP ; --- yourselfPl_NP : NP ; --- themself_NP : NP ; --- OrdCompar : A -> Ord ; --- --- PositAdVAdj : A -> AdV ; --- --- UseQuantPN : Quant -> PN -> NP; --- --- SlashV2V : V2V -> Pol -> VP -> VPSlash ; --- --- ComplPredVP : NP -> VP -> Cl ; --- --- that_RP, no_RP : RP ; --- --- CompS : S -> Comp ; --- CompVP : VP -> Comp ; --- ---} - -} diff --git a/src/hungarian/ParseHun.gf b/src/hungarian/ParseHun.gf deleted file mode 100644 index 29263ff2..00000000 --- a/src/hungarian/ParseHun.gf +++ /dev/null @@ -1,101 +0,0 @@ ---# -path=alltenses -concrete ParseHun of ParseHunAbs = - TenseX - [Pol, PNeg, PPos], - CatHun, - NounHun, - AdjectiveHun, - NumeralHun, - SymbolHun, - ConjunctionHun, - VerbHun - [SlashV2V, PassV2], - AdverbHun, - PhraseHun, - SentenceHun, - RelativeHun, - IdiomHun [VP, Tense, ProgrVP], - ExtraHun [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash], - DictHun ** -open MorphoHun, ResHun, ParadigmsHun, Prelude in -{ ---{ --- ---flags --- literal=Symb ; --- ---lin --- myself_NP = regNP "myself" singular ; --- yourselfSg_NP = regNP "yourself" singular ; --- himself_NP = regNP "himself" singular ; --- herself_NP = regNP "herself" singular ; --- itself_NP = regNP "itself" singular ; --- ourself_NP = regNP "ourself" plural ; --- yourselfPl_NP = regNP "yourself" plural ; --- themself_NP = regNP "themself" plural ; --- --- CompoundCN num noun cn = { --- s = \\n,c => num.s ! Nom ++ noun.s ! num.n ! Nom ++ cn.s ! n ! c ; --- g = cn.g --- } ; --- --- DashCN noun1 noun2 = { --- s = \\n,c => noun1.s ! Sg ! Nom ++ "-" ++ noun2.s ! n ! c ; --- g = noun2.g --- } ; --- --- GerundN v = { --- s = \\n,c => v.s ! VPresPart ; --- g = Neutr --- } ; --- --- GerundAP v = { --- s = \\agr => v.s ! VPresPart ; --- isPre = True --- } ; --- --- PastPartAP v = { --- s = \\agr => v.s ! VPPart ; --- isPre = True --- } ; --- --- OrdCompar a = {s = \\c => a.s ! AAdj Compar c } ; --- --- PositAdVAdj a = {s = a.s ! AAdv} ; --- --- UseQuantPN q pn = {s = \\c => q.s ! False ! Sg ++ pn.s ! npcase2case c ; a = agrgP3 Sg pn.g} ; --- --- SlashV2V v p vp = insertObjc (\\a => p.s ++ case p.p of {CPos => ""; _ => "not"} ++ --- v.c3 ++ --- infVP v.typ vp a) --- (predVc v) ; --- --- ComplPredVP np vp = { --- s = \\t,a,b,o => --- let --- verb = vp.s ! t ! a ! b ! o ! np.a ; --- compl = vp.s2 ! np.a --- in --- case o of { --- ODir => compl ++ "," ++ np.s ! npNom ++ verb.aux ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ; --- OQuest => verb.aux ++ compl ++ "," ++ np.s ! npNom ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf --- } --- } ; --- --- that_RP = { --- s = \\_ => "that" ; --- a = RNoAg --- } ; --- no_RP = { --- s = \\_ => "" ; --- a = RNoAg --- } ; --- --- CompS s = {s = \\_ => "that" ++ s.s} ; --- CompVP vp = {s = \\a => infVP VVInf vp a} ; --- ---lin --- PPos = {s = [] ; p = CPos} ; --- PNeg = {s = [] ; p = CNeg True} ; -- contracted: don't --- ---} - -} diff --git a/src/hungarian/PhraseHun.gf b/src/hungarian/PhraseHun.gf index 4f1fe813..14fcb2ca 100644 --- a/src/hungarian/PhraseHun.gf +++ b/src/hungarian/PhraseHun.gf @@ -1,32 +1,29 @@ -concrete PhraseHun of Phrase = CatHun ** open Prelude, ResHun in -{ ---{ --- --- lin --- PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ; --- --- UttS s = s ; --- UttQS qs = {s = qs.s ! QDir} ; --- UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Sg False} ; --- UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Pl False} ; --- UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Sg True} ; --- --- UttIP ip = {s = ip.s ! npNom} ; --- Acc also --- UttIAdv iadv = iadv ; --- UttNP np = {s = np.s ! npNom} ; --- UttVP vp = {s = infVP VVInf vp (agrP3 Sg)} ; --- UttAdv adv = adv ; --- UttCN n = {s = n.s ! Sg ! Nom} ; --- UttCard n = {s = n.s ! Nom} ; --- UttAP ap = {s = ap.s ! agrP3 Sg} ; --- UttInterj i = i ; --- --- NoPConj = {s = []} ; --- PConjConj conj = {s = conj.s2} ; --- --- --- NoVoc = {s = []} ; --- VocNP np = {s = "," ++ np.s ! npNom} ; --- ---} +concrete PhraseHun of Phrase = CatHun ** open Prelude, ResHun in { + + lin + PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ; + + UttS s = s ; + UttQS qs = qs ; + UttIAdv iadv = iadv ; +{- + UttImpSg pol imp = + UttImpPl pol imp = + UttImpPol = UttImpSg ; +-} + UttIP, + UttNP = \np -> {s = np.s ! Nom} ; + UttVP vp = {s = vp.obj ++ vp.adv ++ vp.s ! VInf} ; + UttAdv adv = adv ; + UttCN cn = {s = cn.s ! Sg ! Nom} ; + UttCard n = {s = n.s ! Indep} ; + UttAP ap = {s = ap.s ! Sg ++ ap.compar} ; + UttInterj i = i ; + + NoPConj = {s = []} ; +-- PConjConj conj = {s = conj.s1 ++ conj.s2 ! …} ; + + NoVoc = {s = []} ; +-- VocNP np = { s = "," ++ np.s ! … } ; -} } diff --git a/src/hungarian/QuestionHun.gf b/src/hungarian/QuestionHun.gf index 1768fff4..ace6c3a7 100644 --- a/src/hungarian/QuestionHun.gf +++ b/src/hungarian/QuestionHun.gf @@ -1,73 +1,77 @@ -concrete QuestionHun of Question = CatHun ** open ResHun, Prelude in -{ ---{ --- --- flags optimize=all_subs ; --- --- lin --- --- QuestCl cl = { --- s = \\t,a,p => --- let cls = cl.s ! t ! a ! p --- in table { --- QDir => cls ! OQuest ; --- QIndir => "if" ++ cls ! ODir --- } ---- "whether" in ExtHun --- } ; --- --- QuestVP qp vp = --- let cl = mkClause (qp.s ! npNom) (agrP3 qp.n) vp --- in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir} ; --- --- QuestSlash ip slash = --- mkQuestion (ss (slash.c2 ++ ip.s ! NPAcc)) slash ; --- --- stranding in ExratHun --- --- QuestIAdv iadv cl = mkQuestion iadv cl ; --- --- QuestIComp icomp np = --- mkQuestion icomp (mkClause (np.s ! npNom) np.a (predAux auxBe)) ; --- --- --- PrepIP p ip = {s = p.s ++ ip.s ! NPAcc} ; --- --- AdvIP ip adv = { --- s = \\c => ip.s ! c ++ adv.s ; --- n = ip.n --- } ; --- --- IdetCN idet cn = { --- s = \\c => idet.s ++ cn.s ! idet.n ! npcase2case c ; --- n = idet.n --- } ; --- --- IdetIP idet = { --- s = \\c => idet.s ; --- n = idet.n --- } ; --- --- IdetQuant idet num = { --- s = idet.s ! num.n ++ num.s ! Nom ; --- n = num.n --- } ; --- --- AdvIAdv i a = ss (i.s ++ a.s) ; --- --- CompIAdv a = a ; --- CompIP p = ss (p.s ! npNom) ; --- --- lincat --- QVP = ResHun.VP ; --- lin --- ComplSlashIP vp np = insertObjPre (\\_ => vp.c2 ++ np.s ! NPAcc) vp ; --- AdvQVP vp adv = insertObj (\\_ => adv.s) vp ; --- AddAdvQVP vp adv = insertObj (\\_ => adv.s) vp ; --- --- QuestQVP qp vp = --- let cl = mkClause (qp.s ! npNom) (agrP3 qp.n) vp --- in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir} ; --- --- ---} +concrete QuestionHun of Question = CatHun ** open + Prelude, ResHun, ParadigmsHun, (NH=NounHun) in { + +-- A question can be formed from a clause ('yes-no question') or +-- with an interrogative. + +{- + lin + -- : Cl -> QCl ; + QuestCl = + + -- : IP -> VP -> QCl ; + QuestVP ip vp = + + -- : IP -> ClSlash -> QCl ; -- whom does John love + QuestSlash ip cls = + + -- : IAdv -> Cl -> QCl ; -- why does John walk + QuestIAdv iadv cls = + + + -- : IComp -> NP -> QCl ; -- where is John? + QuestIComp icomp np = + + +-- Interrogative pronouns can be formed with interrogative +-- determiners, with or without a noun. + + -- : IDet -> CN -> IP ; -- which five songs + IdetCN idet cn = {…} ** NH.DetCN idet cn ; + + -- : IDet -> IP ; -- which five + IdetIP idet = {…} ** NH.DetNP idet ; + +-- They can be modified with adverbs. + -- : IP -> Adv -> IP ; -- who in Paris + --AdvIP = NH.AdvNP ; + +-- Interrogative quantifiers have number forms and can take number modifiers. + + -- : IQuant -> Num -> IDet ; -- which (five) + IdetQuant = NH.DetQuant ; + +-- Interrogative adverbs can be formed prepositionally. + -- : Prep -> IP -> IAdv ; -- with whom + PrepIP prep ip = ; + +-- They can be modified with other adverbs. + + -- : IAdv -> Adv -> IAdv ; -- where in Paris + -- AdvIAdv iadv adv = + +-- Interrogative complements to copulas can be both adverbs and +-- pronouns. + + -- : IAdv -> IComp ; + CompIAdv iadv = iadv ; -- where (is it) + + -- : IP -> IComp ; + CompIP ip = {s = ip.s ! Abs} ; -- who (is it) + + +-- More $IP$, $IDet$, and $IAdv$ are defined in $Structural$. + +-- Wh questions with two or more question words require a new, special category. + + cat + QVP ; -- buy what where + fun + ComplSlashIP : VPSlash -> IP -> QVP ; -- buys what + AdvQVP : VP -> IAdv -> QVP ; -- lives where + AddAdvQVP : QVP -> IAdv -> QVP ; -- buys what where + + QuestQVP : IP -> QVP -> QCl ; -- who buys what where +-} } diff --git a/src/hungarian/README.md b/src/hungarian/README.md new file mode 100644 index 00000000..f9857d1e --- /dev/null +++ b/src/hungarian/README.md @@ -0,0 +1,26 @@ +# Hungarian + +## Language info + +* English name: Hungarian +* Autonym: Magyar +* ISO code: Hun + +## Authors + +Inari Listenmaa, Julia Jansson, 2020- + +With contributions from Erzsébet Galgóczy (initial nominal morphology) and Patrik Jansson (numerals). + +## Publications + +- + +## Implementation information + +So far (2020-03) just copypasted a dummy module with Hungarian words that inflect mostly wrong or not at all. This will change in a few weeks. + + +## Maintainer + +Inari Listenmaa ([@inariksit](https://github.com/inariksit)) diff --git a/src/hungarian/RelativeHun.gf b/src/hungarian/RelativeHun.gf index 67316dc1..84b873a1 100644 --- a/src/hungarian/RelativeHun.gf +++ b/src/hungarian/RelativeHun.gf @@ -1,56 +1,31 @@ -concrete RelativeHun of Relative = CatHun ** open ResHun in -{ ---{ --- --- flags optimize=all_subs ; --- --- lin --- --- RelCl cl = { --- s = \\t,a,p,_ => "such" ++ "that" ++ cl.s ! t ! a ! p ! ODir ; --- c = npNom --- } ; --- --- RelVP rp vp = { --- s = \\t,ant,b,ag => --- let --- agr = case rp.a of { --- RNoAg => ag ; --- RAg a => a --- } ; --- cl = mkClause (rp.s ! RC (fromAgr agr).g npNom) agr vp --- in --- cl.s ! t ! ant ! b ! ODir ; --- c = npNom --- } ; --- ----- Pied piping: "at which we are looking". Stranding and empty ----- relative are defined in $ExtraHun.gf$ ("that we are looking at", ----- "we are looking at"). --- --- RelSlash rp slash = { --- s = \\t,a,p,agr => --- slash.c2 ++ rp.s ! RPrep (fromAgr agr).g ++ slash.s ! t ! a ! p ! ODir ; --- c = NPAcc --- } ; --- --- FunRP p np rp = { --- s = \\c => np.s ! NPAcc ++ p.s ++ rp.s ! RPrep (fromAgr np.a).g ; --- a = RAg np.a --- } ; --- --- IdRP = --- { s = table { --- RC _ (NCase Gen) => "whose" ; --- RC Neutr _ => "which" ; --- RC _ NPAcc => "whom" ; --- RC _ (NCase Nom) => "who" ; --- RPrep Neutr => "which" ; --- RPrep _ => "whom" --- } ; --- a = RNoAg --- } ; --- ---} +concrete RelativeHun of Relative = CatHun ** open + ResHun, Prelude, (NS=NounHun), (SS=StructuralHun) in { + +lin + -- : Cl -> RCl ; -- such that John loves her + -- RelCl cl = ; + + -- : RP -> VP -> RCl ; + RelVP = relVP ; + + -- : RP -> ClSlash -> RCl ; -- whom John loves + RelSlash = relSlash ; + + -- : RP ; + IdRP = {s = + table {Sg => caseTable "ami" "amit" "aminek" -- nom, acc, dat + "amibe" "amiben" "amiből" -- ill, ine, ela + "amihez" "aminél" "amitől" -- all, ade, abl + "amire" "amin" "amiről" -- sub, sup, del + "amiért" "amivel" "amivé" ; -- cau, ins, tra + Pl => caseTable "amik" "amiket" "amiknek" -- nom, acc, dat + "amikbe" "amikben" "amikből" -- ill, ine, ela + "amikhez" "amiknél" "amiktől" -- all, ade, abl + "amikre" "amiken" "amikről" -- sub, sup, del + "amikért" "amikkel" "amikké"}; -- cau, ins, tra + } ; + + -- : Prep -> NP -> RP -> RP ; -- the mother of whom + --FunRP prep np rp = {} ; } diff --git a/src/hungarian/ResHun.gf b/src/hungarian/ResHun.gf index 81da3b47..4d669793 100644 --- a/src/hungarian/ResHun.gf +++ b/src/hungarian/ResHun.gf @@ -3,550 +3,363 @@ --1 Hungarian auxiliary operations. -- This module contains operations that are needed to make the --- resource syntax work. - -resource ResHun = ParamX ** open Prelude in -{ - - flags - optimize=noexpand ; - coding = utf8 ; - +-- resource syntax work. -- Some parameters, such as $Number$, are inherited from $ParamX$. --- ---2 For $Noun$ --- --- This is case as needed when inflecting nouns. --- - param - Case = Nom | Acc | Dat | Ins | Ess | Tra | Cau - | Ill | Sub | All | Ine | Sup | Ade | Ela - | Del | Abl | Ter | For | Tem - ; +resource ResHun = NounMorphoHun ** open Prelude, Predef in { - Harm = H_a | H_e | H_o ; +-------------------------------------------------------------------------------- +-- NP - oper - Noun = {s : Number => Case => Str} ; +-- Noun morphology is in NounMorphoHun - endCase : Case -> HarmForms = \c -> case c of { - Nom => harm1 [] ; - Acc => harm3 "ot" "et" "öt" ; - Dat => harm "nak" "nek" ; - Ins => harm "al" "el" ; - Ess => harm "stul" "stül" ; - Tra => harm "á" "é" ; - Cau => harm1 "ért" ; - Ill => harm "ba" "be" ; - Sub => harm "ra" "re" ; - All => harm3 "hoz" "hez" "höz" ; - Ine => harm "ban" "ben" ; - Sup => harm3 "on" "en" "ön" ; - Ade => harm "nál" "nél" ; - Ela => harm "ból" "ből" ; - Del => harm "ról" "ről" ; - Abl => harm "tól" "től" ; - Ter => harm1 "ig" ; - For => harm1 "ként" ; - Tem => harm1 "kor" +oper + BaseNP : Type = { + agr : Person*Number ; + objdef : ObjDef ; + empty : Str ; -- standard trick for pro-drop + } ; + + NounPhrase : Type = BaseNP ** { + s : Case => Str ; + } ; + + emptyNP : NounPhrase = { + s = \\_ => [] ; + agr = ; + objdef = Indef ; + empty = [] ; + } ; + + indeclNP : Str -> NounPhrase = \s -> emptyNP ** {s = \\c => s} ; + + defNP : Str -> Number -> NounPhrase = \s,n -> emptyNP ** { + s = (mkNoun s).s ! n ; + n = n ; + objdef = Def ; + } ; +-------------------------------------------------------------------------------- +-- Pronouns + + Pronoun : Type = NounPhrase ** { + --poss : Str ; -- for PossPron : Pron -> Quant + } ; + +-------------------------------------------------------------------------------- +-- Det, Quant, Card, Ord + + -- Quant has variable number: + -- e.g. this_Quant has both "this" and "these" + Quant : Type = { + s, -- form that comes before noun: "{this} car" + sp : Number => Case => Str ; -- independent form, "I like {this}" (DetNP) + isIndefArt : Bool ; -- standard trick to prevent "a one car" + objdef : ObjDef ; -- How V2 agrees if NP with this Det is an object + } ; + + mkQuant : (s,sp : Str) -> Quant = \s,sp -> { + s = (mkNoun s).s ; + sp = (mkNoun sp).s ; + isIndefArt = False ; + objdef = Def ; + } ; + + -- Det is formed in DetQuant : Quant -> Num -> Det + -- so it has an inherent number. + Determiner : Type = { + s, + sp : Case => Str ; + n : Number ; + numtype : NumType ; -- Whether its Num component is digit, numeral or Sg/Pl + objdef : ObjDef ; -- How V2 agrees if NP with this Det is an object + } ; + + mkDet : (s : Str) -> ObjDef -> Number -> Determiner = \s,d,n -> { + s, + sp = (mkNoun s).s ! n ; + n = n ; + numtype = NoNum ; + objdef = d ; + } ; + + Numeral : Type = { + s : Place => Str ; -- Independent or attribute + numtype : NumType ; -- Digit, numeral or Sg/Pl : makes a difference in many languages + -- TODO add ordinal + } ; + + {- Numeral can become Num via + Noun.gf: NumNumeral : Numeral -> Card ; + Noun.gf: NumCard : Card -> Num ; + -} + Num : Type = Numeral ** { + n : Number ; -- Singular or plural + } ; + + baseNum : Num = { + s = \\_ => [] ; + n = Sg ; + numtype = NoNum + } ; + +-------------------------------------------------------------------------------- +-- Postpositions + + -- TODO: personal suffixes, e.g. felettem, általam, not *felett/által én + Postposition : Type = {s : Str ; c : Case} ; + + mkPrep : Str -> Postposition = \str -> {s=str ; c=Nom} ; + + emptyPP : Postposition = mkPrep [] ; + +------------------ +-- Conj + + Conj : Type = { + s1 : Str ; + s2 : Str ; + n : Number ; + } ; + + mkConj : Str -> Number -> Conj = mkDConj [] ; + + mkDConj : (s1,s2 : Str) -> Number -> Conj = \s1,s2,num -> { + s1 = s1 ; + s2 = s2 ; + n = num ; + } ; +-------------------------------------------------------------------------------- +-- Adjectives + + AdjPhrase : Type = { + s : Number => Str ; + compar : Str -- Discontinuous: Én *nagyobb* vagyok *nálad*. + } ; + + emptyAP : AdjPhrase = { + s = \\_ => [] ; + compar = [] ; + } ; + + Adjective : Type = { + s : Degree => Number => Str + } ; + Adjective2 : Type = Adjective ** { + c2 : Postposition ; + } ; + + mkAdj : Str -> Adjective = \sg -> { + s = \\d,n => + let adj = case d of { + Compar => comparAdj sg ; + Superl => "leg" + comparAdj sg ; + _ => sg } ; + plural = case n of { + Sg => [] ; + Pl => pluralAdj adj } + in adj + plural + } ; + + -- https://en.wikisource.org/wiki/Simplified_Grammar_of_the_Hungarian_Language/Adjectives + comparAdj : Str -> Str = \stem -> + case stem of { +-- Final a and e become lengthened at the end of a word, if the comparative suffix -bb is joined to it—e.g., drága, drágább; fekete, feketébb, &c.; ó shortens its sound only in jó; jobb, legjobb. + "szép" => "szebb" ; + "könnyű" => "könnyebb" ; + "ifju" => "ifjabb" ; + "hosszú" => "hosszabb" ; + "sok" => "több" ; + "felső" => "felsőbb" ; + "belső" => "belsőbb" ; + _ + #v => stem + "bb" ; + _ => stem + harm "abb" "ebb" ! getHarm stem + } ; + + pluralAdj : Str -> Str = \stem -> + case vowFinal stem of { + True => -- https://en.wikisource.org/wiki/Simplified_Grammar_of_the_Hungarian_Language/Adjectives + case last stem of { "ü" => "ek" ; + "i" => harm "ak" "ek" ! getHarm stem ; + _ => "k" } ; + + False => harm3 "ok" "ek" "ök" ! getHarm stem + } ; +-------------------------------------------------------------------------------- +-- Verbs + + VerbEndings : Type = Person*Number => HarmForms ; + -- TODO: incomplete + endingsDef : VerbEndings = table { + => harm3 "om" "em" "öm" ; + => harm3 "od" "ed" "öd" ; + => harm "ja" "i" ; + => harm "juk" "jük" ; + => harm "játok" "itek" ; + => harm "ják" "ik" + } ; + + -- by EG 2009, needs more special cases + endingsIndef : VerbEndings = table { + => harm3 "ok" "ek" "ök" ; + => harm1 "sz" ; + => harm1 [] ; + => harm "unk" "ünk" ; + => harm3 "tok" "tek" "tök" ; -- TODO allomorphs -otok, -etek, -ötök + => harm "nak" "nek" -- TODO allomorphs -anak, -enek + } ; + + BaseVerb : Type = { + sc : SubjCase ; -- subject case + } ; + Verb : Type = BaseVerb ** { + s : VForm => Str ; + } ; + Verb2 : Type = BaseVerb ** { + s : ObjDef => VForm => Str ; + c2 : Case -- object case + } ; + Verb3 : Type = Verb2 ** { + -- c3 : Case -- indirect object case + } ; + + datV2 : Verb -> Verb2 = \v -> { + s = \\_ => v.s ; + sc = SCDat ; + c2 = Nom + } ; + + mkVerb2 : Str -> Verb2 = \sg3 -> vtov2 (mkVerb sg3) ; + mkVerb3 : Str -> Verb3 = \sg3 -> v2tov3 (mkVerb2 sg3) ; + + vtov2 : Verb -> Verb2 = \v -> v ** { + s = table { + Def => let vDef : Verb = mkVerbReg endingsDef (v.s ! VInf) (v.s ! VFin P3 Sg) + in vDef.s ; + Indef => v.s } ; + c2 = Acc + } ; + v2tov3 : Verb2 -> Verb3 = \v -> v ** {c3 = Dat} ; + + mkVerb : (sg3 : Str) -> Verb = mkVerbReg endingsIndef "TODO:infinitive" ; -- TODO + + mkVerbReg : VerbEndings -> (inf, stem : Str) -> Verb = \hf,inf,stem -> + let h : Harm = getHarm stem ; + sg1 : Str = stem + hf ! ! h ; + sg2 : Str = stem + hf ! ! h ; + sg3 : Str = stem + hf ! ! h ; + pl1 : Str = stem + hf ! ! h ; + pl2 : Str = stem + hf ! ! h ; + pl3 : Str = stem + hf ! ! h ; + in mkVerbFull sg1 sg2 sg3 pl1 pl2 pl3 inf ; + + mkVerbFull : (x1,_,_,_,_,_,x7 : Str) -> Verb = + \sg1,sg2,sg3,pl1,pl2,pl3,inf -> { + s = table { + VInf => inf ; + VFin P1 Sg => sg1 ; + VFin P2 Sg => sg2 ; + VFin P3 Sg => sg3 ; + VFin P1 Pl => pl1 ; + VFin P2 Pl => pl2 ; + VFin P3 Pl => pl3 } ; - - endNumber : Number -> HarmForms = \n -> case n of { - Sg => harm1 [] ; - Pl => harm3 "ok" "ek" "ök" - } ; - - harm3 : Str -> Str -> Str -> HarmForms = \a,e,o -> ; - harm : Str -> Str -> HarmForms = \a,e -> harm3 a e e ; - harm1 : Str -> HarmForms = \i -> harm i i ; - - getHarm : Str -> Harm = \s -> case s of { - _ + ("a" | "á" | "o" | "ó" | "u" | "ú") + _ => H_a ; - _ + ("ö" | "ő" | "ü") + _ => H_o ; - _ => H_e + sc = SCNom } ; - HarmForms : Type = Str * Str * Str ; + copula : Verb = mkVerbFull + "vagyok" + "vagy" + "van" + "vagyunk" + "vagytok" + "vannak" + "lenni" ; - useHarm : Harm -> HarmForms -> Str = \h,ss -> case h of { - H_a => ss.p1 ; - H_e => ss.p2 ; - H_o => ss.p3 +------------------ +-- VP + + VerbPhrase : Type = Verb ** { + obj : Str ; + adv : Str ; + c2 : Case ; -- for RelSlash + } ; -- TODO more fields + + VPSlash : Type = Verb2 ** { + adv : Str ; } ; - putHarmEnding : HarmForms -> Str -> Str = \hs,w -> - w + useHarm (getHarm w) hs ; + useV : Verb -> VerbPhrase = \v -> v ** { + obj,adv = [] ; + c2 = Acc ; -- TODO check + } ; - regNoun : Str -> Noun = \w -> { - s = \\n,c => - let h = getHarm w - in - w + useHarm h (endNumber n) + useHarm h (endCase c) - } ; + useVc : Verb2 -> VPSlash = \v2 -> v2 ** { + adv = [] ; + } ; + + insertObj : VPSlash -> NounPhrase -> VerbPhrase = \vps,np -> vps ** { + obj = np.s ! vps.c2 ; + + -- If verb's subject case is Dat and object Nom, verb agrees with obj. + s = \\vf => case of { + => vps.s ! np.objdef ! agr2vf np.agr ; + _ => vps.s ! np.objdef ! vf } ; + } ; + + insertAdv : VerbPhrase -> SS -> VerbPhrase = \vp,adv -> vp ** {adv = adv.s} ; + insertAdvSlash : VPSlash -> SS -> VPSlash = \vps,adv -> vps ** {adv = adv.s} ; + +-------------------------------------------------------------------------------- +-- Cl, S + + Clause : Type = {s : Tense => Anteriority => Polarity => Str} ; + + {- After PredVP, we might still want to add more adverbs (QuestIAdv), + but we're done with verb inflection. + -} + ClSlash : Type = Clause ** { + c2 : Case ; -- For RelSlash + } ; + + QClause : Type = Clause ; --- --- param --- Agr = AgP1 Number | AgP2 Number | AgP3Sg Gender | AgP3Pl ; --- --- param --- Gender = Neutr | Masc | Fem ; --- --- -----2 For $Verb$ --- ----- Only these five forms are needed for open-lexicon verbs. --- --- param --- VForm = --- VInf --- | VPres --- | VPPart --- | VPresPart --- | VPast --# notpresent --- ; --- ----- Auxiliary verbs have special negative forms. --- --- VVForm = --- VVF VForm --- | VVPresNeg --- | VVPastNeg --# notpresent --- ; --- ----- The order of sentence is needed already in $VP$. --- --- Order = ODir | OQuest ; --- ----- The type of complement of a VV --- --- VVType = VVAux | VVInf | VVPresPart ; -- can do / try to do / start doing --- -----2 For $Adjective$ --- --- AForm = AAdj Degree Case | AAdv ; --- -----2 For $Relative$ --- --- RAgr = RNoAg | RAg Agr ; --- RCase = RPrep Gender | RC Gender NPCase ; --- -----2 For $Numeral$ --- --- CardOrd = NCard | NOrd ; --- DForm = unit | teen | ten ; --- -----2 Transformations between parameter types --- --- oper --- toAgr : Number -> Person -> Gender -> Agr = \n,p,g -> --- case p of { --- P1 => AgP1 n ; --- P2 => AgP2 n ; --- P3 => case n of { --- Sg => AgP3Sg g ; --- Pl => AgP3Pl --- } --- } ; --- --- fromAgr : Agr -> {n : Number ; p : Person ; g : Gender} = \a -> case a of { --- AgP1 n => {n = n ; p = P1 ; g = Masc} ; --- AgP2 n => {n = n ; p = P2 ; g = Masc} ; --- AgP3Pl => {n = Pl ; p = P3 ; g = Masc} ; --- AgP3Sg g => {n = Sg ; p = P3 ; g = g} --- } ; --- --- agrP3 : Number -> Agr = \n -> agrgP3 n Neutr ; --- --- agrgP3 : Number -> Gender -> Agr = \n,g -> toAgr n P3 g ; --- --- conjAgr : Agr -> Agr -> Agr = \a0,b0 -> --- let a = fromAgr a0 ; b = fromAgr b0 --- in --- toAgr --- (conjNumber a.n b.n) --- (conjPerson a.p b.p) a.g ; --- ----- For $Lex$. --- ----- For each lexical category, here are the worst-case constructors. --- --- mkNoun : (_,_,_,_ : Str) -> {s : Number => Case => Str} = --- \man,mans,men,mens -> { --- s = table { --- Sg => table { --- Gen => mans ; --- _ => man --- } ; --- Pl => table { --- Gen => mens ; --- _ => men --- } --- } --- } ; --- --- mkAdjective : (_,_,_,_ : Str) -> {s : AForm => Str; lock_A : {}} = --- \good,better,best,well -> lin A { --- s = table { --- AAdj Posit c => (regGenitiveS good) ! c ; --- AAdj Compar c => (regGenitiveS better) ! c ; --- AAdj Superl c => (regGenitiveS best) ! c ; --- AAdv => well --- } --- } ; --- --- mkVerb : (_,_,_,_,_ : Str) -> Verb = --- \go,goes,went,gone,going -> { --- s = table { --- VInf => go ; --- VPres => goes ; --- VPast => went ; --# notpresent --- VPPart => gone ; --- VPresPart => going --- } ; --- isRefl = False --- } ; --- --- mkIP : (i,me,my : Str) -> Number -> {s : NPCase => Str ; n : Number} = --- \i,me,my,n -> let who = mkNP i me my n P3 Neutr in { --- s = who.s ; --- n = n --- } ; --- --- mkNP : (i,me,my : Str) -> Number -> Person -> Gender -> --- {s : NPCase => Str ; a : Agr} = \i,me,my,n,p,g -> --- { s = table { --- NCase Nom => i ; --- NPAcc => me ; --- NCase Gen => my --- } ; --- a = toAgr n p g ; --- }; --- --- regNP : Str -> Number -> {s : NPCase => Str ; a : Agr} = \that,n -> --- mkNP that that (that + "'s") n P3 Neutr ; --- --- regGenitiveS : Str -> Case => Str = \s -> --- table { Gen => genitiveS s; _ => s } ; --- --- genitiveS : Str -> Str = \dog -> --- case last dog of { --- "s" => dog + "'" ; --- _ => dog + "'s" --- }; --- ----- We have just a heuristic definition of the indefinite article. ----- There are lots of exceptions: consonantic "e" ("euphemism"), consonantic ----- "o" ("one-sided"), vocalic "u" ("umbrella"). --- --- artIndef = pre { --- "eu" | "Eu" | "uni" | "up" => "a" ; --- "un" => "an" ; --- "a" | "e" | "i" | "o" | "A" | "E" | "I" | "O" => "an" ; --- "SMS" | "sms" => "an" ; --- --- _ => "a" --- } ; --- --- artDef = "the" ; --- ----- For $Verb$. --- --- Verb : Type = { --- s : VForm => Str ; --- isRefl : Bool --- } ; --- --- param --- CPolarity = --- CPos --- | CNeg Bool ; -- contracted or not --- --- oper --- contrNeg : Bool -> Polarity -> CPolarity = \b,p -> case p of { --- Pos => CPos ; --- Neg => CNeg b --- } ; --- --- VerbForms : Type = --- Tense => Anteriority => CPolarity => Order => Agr => --- {aux, adv, fin, inf : Str} ; -- would, not, sleeps, slept --- --- VP : Type = { --- s : VerbForms ; --- prp : Str ; -- present participle --- ptp : Str ; -- past participle --- inf : Str ; -- the infinitive form ; VerbForms would be the logical place --- ad : Str ; -- sentence adverb --- s2 : Agr => Str -- complement --- } ; --- --- --- SlashVP = VP ** {c2 : Str} ; --- --- predVc : (Verb ** {c2 : Str}) -> SlashVP = \verb -> --- predV verb ** {c2 = verb.c2} ; --- --- predV : Verb -> VP = \verb -> { --- s = \\t,ant,b,ord,agr => --- let --- inf = verb.s ! VInf ; --- fin = presVerb verb agr ; --- part = verb.s ! VPPart ; --- in --- case of { --- => vff fin [] ; --- => vf (does agr) inf ; --- => vf (have agr) part ; --# notpresent --- => vfn c (have agr) (havent agr) part ; --# notpresent --- => vff (verb.s ! VPast) [] ; --# notpresent --- => vf "did" inf ; --# notpresent --- => vfn c "did" "didn't" inf ; --# notpresent --- => vf "had" part ; --# notpresent --- => vfn c "had" "hadn't" part ; --# notpresent --- => vf "will" inf ; --# notpresent --- => vfn c "will" "won't" inf ; --# notpresent --- => vf "will" ("have" ++ part) ; --# notpresent --- => vfn c "will" "won't"("have" ++ part) ; --# notpresent --- => vf "would" inf ; --# notpresent --- => vfn c "would" "wouldn't" inf ; --# notpresent --- => vf "would" ("have" ++ part) ; --# notpresent --- => vfn c "would" "wouldn't" ("have" ++ part) ; --# notpresent --- => vfn c (does agr) (doesnt agr) inf --- } ; --- prp = verb.s ! VPresPart ; --- ptp = verb.s ! VPPart ; --- inf = verb.s ! VInf ; --- ad = [] ; --- s2 = \\a => if_then_Str verb.isRefl (reflPron ! a) [] --- } ; --- --- predAux : Aux -> VP = \verb -> { --- s = \\t,ant,cb,ord,agr => --- let --- b = case cb of { --- CPos => Pos ; --- _ => Neg --- } ; --- inf = verb.inf ; --- fin = verb.pres ! b ! agr ; --- finp = verb.pres ! Pos ! agr ; --- part = verb.ppart ; --- in --- case of { --- => vf (have agr) part ; --# notpresent --- => vfn c (have agr) (havent agr) part ; --# notpresent --- => vf (verb.past ! b ! agr) [] ; --# notpresent --- => vfn c (verb.past!Pos!agr)(verb.past!Neg!agr) [] ; --# notpresent --- => vf "had" part ; --# notpresent --- => vfn c "had" "hadn't" part ; --# notpresent --- => vf "will" inf ; --# notpresent --- => vfn c "will" "won't" inf ; --# notpresent --- => vf "will" ("have" ++ part) ; --# notpresent --- => vfn c "will" "won't"("have" ++ part) ; --# notpresent --- => vf "would" inf ; --# notpresent --- => vfn c "would" "wouldn't" inf ; --# notpresent --- => vf "would" ("have" ++ part) ; --# notpresent --- => vfn c "would" "wouldn't" ("have" ++ part) ; --# notpresent --- => vf fin [] ; --- => vfn c finp fin [] --- } ; --- prp = verb.prpart ; --- ptp = verb.ppart ; --- inf = verb.inf ; --- ad = [] ; --- s2 = \\_ => [] --- } ; --- --- vff : Str -> Str -> {aux, adv, fin, inf : Str} = \x,y -> --- {aux = [] ; adv = [] ; fin = x ; inf = y} ; --- --- vf : Str -> Str -> {aux, adv, fin, inf : Str} = \x,y -> vfn True x x y ; --- --- vfn : Bool -> Str -> Str -> Str -> {aux, fin, adv, inf : Str} = --- \contr,x,y,z -> --- case contr of { --- True => {aux = y ; adv = [] ; fin = [] ; inf = z} ; --- False => {aux = x ; adv = "not" ; fin = [] ; inf = z} --- } ; --- --- insertObj : (Agr => Str) -> VP -> VP = \obj,vp -> { --- s = vp.s ; --- prp = vp.prp ; --- ptp = vp.ptp ; --- inf = vp.inf ; --- ad = vp.ad ; --- s2 = \\a => vp.s2 ! a ++ obj ! a --- } ; --- --- insertObjPre : (Agr => Str) -> VP -> VP = \obj,vp -> { --- s = vp.s ; --- prp = vp.prp ; --- ptp = vp.ptp ; --- inf = vp.inf ; --- ad = vp.ad ; --- s2 = \\a => obj ! a ++ vp.s2 ! a --- } ; --- --- insertObjc : (Agr => Str) -> SlashVP -> SlashVP = \obj,vp -> --- insertObj obj vp ** {c2 = vp.c2} ; --- ------ The adverb should be before the finite verb. --- --- insertAdV : Str -> VP -> VP = \ad,vp -> { --- s = vp.s ; --- prp = vp.prp ; --- ptp = vp.ptp ; --- inf = vp.inf ; --- ad = vp.ad ++ ad ; --- s2 = \\a => vp.s2 ! a --- } ; --- ----- --- --- predVV : {s : VVForm => Str ; typ : VVType} -> VP = \verb -> --- let verbs = verb.s --- in --- case verb.typ of { --- VVAux => predAux { --- pres = table { --- Pos => \\_ => verbs ! VVF VPres ; --- Neg => \\_ => verbs ! VVPresNeg --- } ; --- past = table { --# notpresent --- Pos => \\_ => verbs ! VVF VPast ; --# notpresent --- Neg => \\_ => verbs ! VVPastNeg --# notpresent --- } ; --# notpresent --- inf = verbs ! VVF VInf ; --- ppart = verbs ! VVF VPPart ; --- prpart = verbs ! VVF VPresPart ; --- } ; --- _ => predV {s = \\vf => verbs ! VVF vf ; isRefl = False} --- } ; --- --- presVerb : {s : VForm => Str} -> Agr -> Str = \verb -> --- agrVerb (verb.s ! VPres) (verb.s ! VInf) ; --- --- infVP : VVType -> VP -> Agr -> Str = \typ,vp,a -> --- vp.ad ++ --- case typ of { --- VVAux => vp.inf ; --- VVInf => "to" ++ vp.inf ; --- _ => vp.prp --- } ++ --- vp.s2 ! a ; --- --- agrVerb : Str -> Str -> Agr -> Str = \has,have,agr -> --- case agr of { --- AgP3Sg _ => has ; --- _ => have --- } ; --- --- have = agrVerb "has" "have" ; --- havent = agrVerb "hasn't" "haven't" ; --- does = agrVerb "does" "do" ; --- doesnt = agrVerb "doesn't" "don't" ; --- --- Aux = { --- pres : Polarity => Agr => Str ; --- past : Polarity => Agr => Str ; --# notpresent --- inf,ppart,prpart : Str --- } ; --- --- auxBe : Aux = { --- pres = \\b,a => case of { --- => "am" ; --- => ["am not"] ; --- am not I --- _ => agrVerb (posneg b "is") (posneg b "are") a --- } ; --- past = \\b,a => case a of { --# notpresent --- AgP1 Sg | AgP3Sg _ => posneg b "was" ; --# notpresent --- _ => (posneg b "were") --# notpresent --- } ; --# notpresent --- inf = "be" ; --- ppart = "been" ; --- prpart = "being" --- } ; --- --- posneg : Polarity -> Str -> Str = \p,s -> case p of { --- Pos => s ; --- Neg => s + "n't" --- } ; --- --- conjThat : Str = "that" ; --- --- reflPron : Agr => Str = table { --- AgP1 Sg => "myself" ; --- AgP2 Sg => "yourself" ; --- AgP3Sg Masc => "himself" ; --- AgP3Sg Fem => "herself" ; --- AgP3Sg Neutr => "itself" ; --- AgP1 Pl => "ourselves" ; --- AgP2 Pl => "yourselves" ; --- AgP3Pl => "themselves" --- } ; --- ----- For $Sentence$. --- --- Clause : Type = { --- s : Tense => Anteriority => CPolarity => Order => Str --- } ; --- --- mkClause : Str -> Agr -> VP -> Clause = --- \subj,agr,vp -> { --- s = \\t,a,b,o => --- let --- verb = vp.s ! t ! a ! b ! o ! agr ; --- compl = vp.s2 ! agr --- in --- case o of { --- ODir => subj ++ verb.aux ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ++ compl ; --- OQuest => verb.aux ++ subj ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ++ compl --- } --- } ; --- --- ----- For $Numeral$. --- --- mkNum : Str -> Str -> Str -> Str -> {s : DForm => CardOrd => Case => Str} = --- \two, twelve, twenty, second -> --- {s = table { --- unit => table {NCard => regGenitiveS two ; NOrd => regGenitiveS second} ; --- teen => \\c => mkCard c twelve ; --- ten => \\c => mkCard c twenty --- } --- } ; --- --- regNum : Str -> {s : DForm => CardOrd => Case => Str} = --- \six -> mkNum six (six + "teen") (six + "ty") (regOrd six) ; --- --- regCardOrd : Str -> {s : CardOrd => Case => Str} = \ten -> --- {s = table {NCard => regGenitiveS ten ; --- NOrd => regGenitiveS (regOrd ten)} } ; --- --- mkCard : CardOrd -> Str -> Case => Str = \o,ten -> --- (regCardOrd ten).s ! o ; --- --- regOrd : Str -> Str = \ten -> --- case last ten of { --- "y" => init ten + "ieth" ; --- _ => ten + "th" --- } ; --- --- mkQuestion : --- {s : Str} -> Clause -> --- {s : Tense => Anteriority => CPolarity => QForm => Str} = \wh,cl -> --- { --- s = \\t,a,p => --- let --- cls = cl.s ! t ! a ! p ; --- why = wh.s --- in table { --- QDir => why ++ cls ! OQuest ; --- QIndir => why ++ cls ! ODir --- } --- } ; --- --- ---} + Sentence : Type = {s : Str} ; + + predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp -> vp ** { + s = let rel : RClause = relVP' (np2rp np) vp ; + in \\t,a,p => rel.s ! t ! a ! p ! np.agr.p2 ! sc2case vp.sc + ++ np.empty ; -- standard trick for prodrop+metavariable problem + } ; + + -- Relative + + RP : Type = {s : Number => Case => Str} ; + RClause : Type = {s : Tense => Anteriority => Polarity => Number => Case => Str} ; + + np2rp : NounPhrase -> RP ** {agr : Person*Number} = \np -> np ** { + s = \\n => np.s ; + } ; + + relVP : RP -> VerbPhrase -> RClause = \rp -> relVP' (rp ** {agr=}) ; + + relVP' : RP ** {agr : Person*Number} -> VerbPhrase -> RClause = \rp,vp -> { + s = \\t,a,p,n,c => let subjcase : Case = case vp.sc of { + SCNom => c ; + SCDat => Dat } + in rp.s ! n ! subjcase + ++ vp.s ! VFin rp.agr.p1 n -- variable by number + ++ vp.obj + ++ vp.adv + } ; + + relSlash : RP -> ClSlash -> RClause = \rp,cls -> { + s = \\t,a,p,n,c => let objcase : Case = case cls.c2 of { + Acc => c ; + _ => cls.c2 } + in rp.s ! n ! objcase + ++ cls.s ! t ! a ! p + } ; +-------------------------------------------------------------------------------- +-- linrefs } diff --git a/src/hungarian/SentenceHun.gf b/src/hungarian/SentenceHun.gf index 0760d91f..7cbafa7c 100644 --- a/src/hungarian/SentenceHun.gf +++ b/src/hungarian/SentenceHun.gf @@ -1,75 +1,79 @@ -concrete SentenceHun of Sentence = CatHun ** open Prelude, ResHun in -{ ---{ --- --- flags optimize=all_subs ; --- --- lin --- --- PredVP np vp = mkClause (np.s ! npNom) np.a vp ; --- --- PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ; --- --- ImpVP vp = { --- s = \\pol,n => --- let --- agr = AgP2 (numImp n) ; --- verb = infVP VVAux vp agr ; --- dont = case pol of { --- CNeg True => "don't" ; --- CNeg False => "do" ++ "not" ; --- _ => [] --- } --- in --- dont ++ verb --- } ; --- --- SlashVP np vp = --- mkClause (np.s ! npNom) np.a vp ** {c2 = vp.c2} ; --- --- AdvSlash slash adv = { --- s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ; --- c2 = slash.c2 --- } ; --- --- SlashPrep cl prep = cl ** {c2 = prep.s} ; --- --- SlashVS np vs slash = --- mkClause (np.s ! npNom) np.a --- (insertObj (\\_ => conjThat ++ slash.s) (predV vs)) ** --- {c2 = slash.c2} ; --- --- EmbedS s = {s = conjThat ++ s.s} ; --- EmbedQS qs = {s = qs.s ! QIndir} ; --- EmbedVP vp = {s = infVP VVInf vp (agrP3 Sg)} ; --- agr --- --- UseCl t p cl = { --- s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! ODir --- } ; --- UseQCl t p cl = { --- s = \\q => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! q --- } ; --- UseRCl t p cl = { --- s = \\r => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! r ; --- c = cl.c --- } ; --- UseSlash t p cl = { --- s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! ODir ; --- c2 = cl.c2 --- } ; --- --- AdvS a s = {s = a.s ++ s.s} ; --- ExtAdvS a s = {s = a.s ++ "," ++ s.s} ; --- --- SSubjS a s b = {s = a.s ++ s.s ++ b.s} ; --- --- RelS s r = {s = s.s ++ "," ++ r.s ! agrP3 Sg} ; --- --- oper --- ctr : CPolarity -> CPolarity = \x -> x ; ------ ctr = contrNeg True ; -- contracted negations --- ---} --- +concrete SentenceHun of Sentence = CatHun ** open + TenseX, ResHun, (AK=AdverbHun), Prelude in { + +flags optimize=all_subs ; + +lin + +--2 Clauses + + -- : NP -> VP -> Cl + PredVP = predVP ; + + -- : SC -> VP -> Cl ; -- that she goes is good (Saeed p. 94) + --PredSCVP sc vp = ; + +--2 Clauses missing object noun phrases + -- : NP -> VPSlash -> ClSlash ; + SlashVP np vps = predVP np (vps ** {s = vps.s ! Def ; obj = []}) ; +{- + -- : ClSlash -> Adv -> ClSlash ; -- (whom) he sees today + AdvSlash cls adv = cls ** insertAdv adv cls ; + +-- SlashPrep : Cl -> Prep -> ClSlash ; -- (with whom) he walks + + -- : NP -> VS -> SSlash -> ClSlash ; -- (whom) she says that he loves +-- SlashVS np vs ss = {} ; + + + -- : Temp -> Pol -> ClSlash -> SSlash ; -- (that) she had not seen + UseSlash t p cls = { + } ; + +--2 Imperatives + -- : VP -> Imp ; + ImpVP vp = {s = \\num,pol => linVP (VImp num pol) Statement vp} ; + +--2 Embedded sentences + + -- : S -> SC ; + EmbedS s = {s = s.s ! True} ; -- choose subordinate + + -- : QS -> SC ; + -- EmbedQS qs = { } ; + + -- : VP -> SC ; + EmbedVP vp = {s = infVP vp} ; +-} +--2 Sentences + + -- : Temp -> Pol -> Cl -> S ; + UseCl t p cl = { + s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p + } ; + + -- : Temp -> Pol -> QCl -> QS ; + UseQCl t p cl = {s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p} ; + + -- : Temp -> Pol -> RCl -> RS ; + UseRCl t p cl = {s = \\n,c => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! n ! c} ; + + -- AdvS : Adv -> S -> S ; -- then I will go home + AdvS = advS "" ; + + -- ExtAdvS : Adv -> S -> S ; -- next week, I will go home + ExtAdvS = advS (SOFT_BIND ++ ","); + + -- : S -> Subj -> S -> S ; + -- SSubjS s1 subj s2 = AdvS (AK.SubjS subj s2) s1 ; + + -- : S -> RS -> S ; -- she sleeps, which is good + -- RelS sent rs = advS {s = rs.s ! Sg3 Masc ++ SOFT_BIND ++ ","} sent ; + +oper + + advS : (comma : Str) -> SS -> S -> S = \comma,a,sent -> sent ** { + s = a.s ++ comma ++ sent.s + } ; } diff --git a/src/hungarian/StructuralHun.gf b/src/hungarian/StructuralHun.gf index 66654f5d..c7411544 100644 --- a/src/hungarian/StructuralHun.gf +++ b/src/hungarian/StructuralHun.gf @@ -1,148 +1,229 @@ -concrete StructuralHun of Structural = CatHun ** - open MorphoHun, ResHun, ParadigmsHun, - (C = ConstructX), Prelude in -{ ---{ --- --- flags optimize=all ; --- --- lin --- above_Prep = mkPrep "above" ; --- after_Prep = mkPrep "after" ; --- all_Predet = ss "all" ; --- almost_AdA = mkAdA "almost" ; --- almost_AdN = mkAdN "almost" ; --- although_Subj = ss "although" ; --- always_AdV = mkAdV "always" ; --- and_Conj = mkConj "and" ; --- because_Subj = ss "because" ; --- before_Prep = mkPrep "before" ; --- behind_Prep = mkPrep "behind" ; --- between_Prep = mkPrep "between" ; --- both7and_DConj = mkConj "both" "and"; --- but_PConj = ss "but" ; --- by8agent_Prep = mkPrep "by" ; --- by8means_Prep = mkPrep "by" ; --- can8know_VV, can_VV = { --- s = table { --- VVF VInf => ["be able to"] ; --- VVF VPres => "can" ; --- VVF VPPart => ["been able to"] ; --- VVF VPresPart => ["being able to"] ; --- VVF VPast => "could" ; --# notpresent --- VVPastNeg => "couldn't" ; --# notpresent --- VVPresNeg => "can't" --- } ; --- typ = VVAux --- } ; --- during_Prep = mkPrep "during" ; --- either7or_DConj = mkConj "either" "or" singular ; --- everybody_NP = regNP "everybody" singular ; --- every_Det = mkDeterminer singular "every" ; --- everything_NP = regNP "everything" singular ; --- everywhere_Adv = mkAdv "everywhere" ; --- few_Det = mkDeterminer plural "few" ; ------ first_Ord = ss "first" ; DEPRECATED --- for_Prep = mkPrep "for" ; --- from_Prep = mkPrep "from" ; --- he_Pron = mkPron "he" "him" "his" "his" singular P3 masculine ; --- here_Adv = mkAdv "here" ; --- here7to_Adv = mkAdv ["to here"] ; --- here7from_Adv = mkAdv ["from here"] ; --- how_IAdv = ss "how" ; --- how8much_IAdv = ss "how much" ; --- how8many_IDet = mkDeterminer plural ["how many"] ; --- if_Subj = ss "if" ; --- in8front_Prep = mkPrep ["in front of"] ; --- i_Pron = mkPron "I" "me" "my" "mine" singular P1 human ; --- in_Prep = mkPrep "in" ; --- it_Pron = mkPron "it" "it" "its" "its" singular P3 nonhuman ; --- less_CAdv = C.mkCAdv "less" "than" ; --- many_Det = mkDeterminer plural "many" ; --- more_CAdv = C.mkCAdv "more" "than" ; --- most_Predet = ss "most" ; --- much_Det = mkDeterminer singular "much" ; --- must_VV = { --- s = table { --- VVF VInf => ["have to"] ; --- VVF VPres => "must" ; --- VVF VPPart => ["had to"] ; --- VVF VPresPart => ["having to"] ; --- VVF VPast => ["had to"] ; --# notpresent --- VVPastNeg => ["hadn't to"] ; --# notpresent --- VVPresNeg => "mustn't" --- } ; --- typ = VVAux --- } ; ------b no_Phr = ss "no" ; --- no_Utt = ss "no" ; --- on_Prep = mkPrep "on" ; ------- one_Quant = mkDeterminer singular "one" ; -- DEPRECATED --- only_Predet = ss "only" ; --- or_Conj = mkConj "or" singular ; --- otherwise_PConj = ss "otherwise" ; --- part_Prep = mkPrep "of" ; --- please_Voc = ss "please" ; --- possess_Prep = mkPrep "of" ; --- quite_Adv = mkAdv "quite" ; --- she_Pron = mkPron "she" "her" "her" "hers" singular P3 feminine ; --- so_AdA = mkAdA "so" ; --- somebody_NP = regNP "somebody" singular ; --- someSg_Det = mkDeterminer singular "some" ; --- somePl_Det = mkDeterminer plural "some" ; --- something_NP = regNP "something" singular ; --- somewhere_Adv = mkAdv "somewhere" ; --- that_Quant = mkQuant "that" "those" ; --- there_Adv = mkAdv "there" ; --- there7to_Adv = mkAdv "there" ; --- there7from_Adv = mkAdv ["from there"] ; --- therefore_PConj = ss "therefore" ; --- they_Pron = mkPron "they" "them" "their" "theirs" plural P3 human ; --- this_Quant = mkQuant "this" "these" ; --- through_Prep = mkPrep "through" ; --- too_AdA = mkAdA "too" ; --- to_Prep = mkPrep "to" ; --- under_Prep = mkPrep "under" ; --- very_AdA = mkAdA "very" ; --- want_VV = mkVV (regV "want") ; --- we_Pron = mkPron "we" "us" "our" "ours" plural P1 human ; --- whatPl_IP = mkIP "what" "what" "what's" plural ; --- whatSg_IP = mkIP "what" "what" "what's" singular ; --- when_IAdv = ss "when" ; --- when_Subj = ss "when" ; --- where_IAdv = ss "where" ; --- which_IQuant = {s = \\_ => "which"} ; ------b whichPl_IDet = mkDeterminer plural ["which"] ; ------b whichSg_IDet = mkDeterminer singular ["which"] ; --- whoPl_IP = mkIP "who" "whom" "whose" plural ; --- whoSg_IP = mkIP "who" "whom" "whose" singular ; --- why_IAdv = ss "why" ; --- without_Prep = mkPrep "without" ; --- with_Prep = mkPrep "with" ; ------b yes_Phr = ss "yes" ; --- yes_Utt = ss "yes" ; --- youSg_Pron = mkPron "you" "you" "your" "yours" singular P2 human ; --- youPl_Pron = mkPron "you" "you" "your" "yours" plural P2 human ; --- youPol_Pron = mkPron "you" "you" "your" "yours" singular P2 human ; --- --- not_Predet = {s = "not" ; lock_Predet = <>} ; --- no_Quant = mkQuant "no" "no" "none" "none" ; --- if_then_Conj = mkConj "if" "then" singular ; --- nobody_NP = regNP "nobody" singular ; --- nothing_NP = regNP "nothing" singular ; --- --- at_least_AdN = mkAdN "at least" ; --- at_most_AdN = mkAdN "at most" ; --- --- except_Prep = mkPrep "except" ; --- --- as_CAdv = C.mkCAdv "as" "as" ; --- --- have_V2 = dirV2 (mk5V "have" "has" "had" "had" "having") ; --- that_Subj = ss "that" ; --- lin language_title_Utt = ss "Hunlish" ; --- ---} --- +concrete StructuralHun of Structural = CatHun ** + open Prelude, ResHun, ParadigmsHun in { +{- +------- +-- Ad* + +lin almost_AdA = mkAdA "" ; +lin almost_AdN = ss "" ; +lin at_least_AdN = ss "" ; +lin at_most_AdN = ss "" ; +lin so_AdA = mkAdA "" ; +lin too_AdA = mkAdA "" ; +lin very_AdA = mkAdA "" ; +-} +lin as_CAdv = {s = "olyan" ; p = "mint"} ; +{- +lin less_CAdv = { s = "" ; p = [] } ; +lin more_CAdv = { s = "" ; p = [] } ; +lin how_IAdv = ss "" : + +lin how8much_IAdv = ss "" ; +lin when_IAdv = ss "" ; +lin where_IAdv = ss "" : +lin why_IAdv = ss "" : + +lin always_AdV = ss "" ; + +lin everywhere_Adv = ss "" ; +lin here7from_Adv = ss "" ; +lin here7to_Adv = ss "" ; +lin here_Adv = ss "" ; +lin quite_Adv = ss "" ; +lin somewhere_Adv = ss "" ; +lin there7from_Adv = ss "" ; +lin there7to_Adv = ss "" ; +lin there_Adv = ss "" ; +-} +------- +-- Conj + +lin and_Conj = mkConj "és" Pl ; +lin or_Conj = mkConj "vagy" Sg ; +-- lin if_then_Conj = +-- lin both7and_DConj = +lin either7or_DConj = mkDConj "vagy" "vagy" Sg ; +{- +lin but_PConj = ss "" ; +lin otherwise_PConj = ss "" ; +lin therefore_PConj = ss "" ; + +----------------- +-- *Det and Quant + + +lin how8many_IDet = ; + +lin all_Predet = {s = ""} ; +lin not_Predet = {s = ""} ; +lin only_Predet = {s = ""} ; +lin most_Predet = {s = ""} ; +-} + +--lin every_Det = +lin few_Det = mkDet "kevés" Def Sg ; -- TODO check +lin many_Det = mkDet "sok" Def Sg ; -- TODO check +--lin much_Det = + +lin somePl_Det = mkDet "némely" Indef Pl ; +lin someSg_Det = mkDet "némely" Indef Sg ; +--lin no_Quant = + +lin that_Quant = mkQuant "az" "az" ; +lin this_Quant = mkQuant "ez" "ez" ; +{-lin which_IQuant = + + +----- +-- NP + +lin everybody_NP = defNP "" N.NumPl ; +lin everything_NP = defNP "" N.NumSg ; +lin nobody_NP = mkVerb; "" +lin nothing_NP = defNP "" N.NumSg ; +lin somebody_NP = defNP "" N.NumSg ; +-} +lin something_NP = defNP "valami" Sg ; + +------- +-- Prep + +-- List of postpositions requiring case: +-- https://en.wiktionary.org/wiki/Appendix:Hungarian_postpositions#Postpositions_Requiring_Case +lin above_Prep = mkPrep "fölött" ; +-- lin after_Prep = mkPrep "" +-- lin before_Prep = mkPrep "" ; +-- lin behind_Prep = mkPrep "" ; +-- lin between_Prep = = mkPrep "" ; +lin by8agent_Prep = mkPrep "által" ; +lin by8means_Prep = casePrep Ins ; +-- lin during_Prep = mkPrep ; +-- lin except_Prep = mkPrep ; +-- lin for_Prep = mkPrep "" ; +-- lin from_Prep = mkPrep "" ; +-- lin in8front_Prep = mkPrep "" ; +lin in_Prep = casePrep Ine ; +lin on_Prep = casePrep Ade ; +-- lin part_Prep = casePrep ; +-- lin possess_Prep = -- Suffix attaches to possessee, not possessor +-- lin through_Prep = mkPrep ; +lin to_Prep = casePrep All ; +lin under_Prep = mkPrep "alatt" ; +-- lin with_Prep = mkPrep "" ; +-- lin without_Prep = mkPrep "" ; + + +------- +-- Pron + +-- Pronouns are closed class, no constructor in ParadigmsHun. + -- it_Pron = + i_Pron = emptyNP ** { + s = caseTable "én" "engem" "nekem" + "belém" "bennem" "belőlem" -- inner locatives + "hozzám" "nálam" "tőlem" -- outer locatives + "rám" "rajtam" "rólam" -- outer locatives + "értem" -- Causative + "velem" -- Instrumental + nonExist ; -- Translative + agr = ; + objdef = Def ; + poss = "em" ; + } ; + youPol_Pron, + youSg_Pron = emptyNP ** { + s = caseTable "te" "teged" "neked" + "beléd" "benned" "belőled" + "hozzád" "nálad" "tőled" + "rád" "rajtad" "rólad" + "érted" -- Causative + "veled" -- Instrumental + nonExist ; -- Translative + agr = ; + objdef = Def ; + poss = "d" ; + } ; + he_Pron, + she_Pron = emptyNP ** { + s = caseTable "ő" "őt" "neki" + "belé" "benne" "belőle" + "hozzá" "nála" "tőle" + "rá" "rajta" "róla" + "érte" -- Causative + "vele" -- Instrumental + nonExist ; -- Translative + objdef = Def ; + } ; + we_Pron = emptyNP ** { + s = caseTable "mi" "minket" "nekünk" + "belénk" "bennünk" "belőlünk" + "hozzánk" "nálunk" "tőlünk" + "ránk" "rajtunk" "rólunk" + "értünk" -- Causative + "velünk" -- Instrumental + nonExist ; -- Translative + agr = ; + objdef = Def ; + } ; + + youPl_Pron = emptyNP ** { + s = caseTable "ti" "titeket" "nektek" + "belétek" "bennetek" "belőletek" + "hozzátok" "nálatok" "tőletek" + "rátok" "rajtatok" "rólatok" + "értetek" -- Causative + "veletek" -- Instrumental + nonExist ; -- Translative + agr = ; + objdef = Def ; + } ; + they_Pron = emptyNP ** { + s = caseTable "ők" "őket" "nekik" + "beléjük" "bennük" "belőlük" + "hozzájuk" "náluk" "tőlük" + "rájuk" "rajtuk" "róluk" + "értük" -- Causative + "velük" -- Instrumental + nonExist ; -- Translative + agr = ; + objdef = Def ; + } ; + +--lin whatPl_IP = ; +--lin whatSg_IP = : +--lin whoPl_IP = ; +--lin whoSg_IP = ; + +------- +-- Subj + +-- lin although_Subj = +-- lin because_Subj = +-- lin if_Subj = +-- lin that_Subj = +-- lin when_Subj = + + +------ +-- Utt + +lin language_title_Utt = ss "magyar" ; +lin no_Utt = ss "nem" ; +lin yes_Utt = ss "igen" ; + +------- +-- Verb + +lin have_V2 = datV2 copula ; +{-lin can8know_VV = can_VV ; -- can (capacity) +lin can_VV = mkVV "" ; -- can (possibility) +lin must_VV = mkVV "" ; +lin want_VV = mkVV "" subjunctive ; + +------ +-- Voc + +lin please_Voc = ss "" ; +-} } diff --git a/src/hungarian/SymbolHun.gf b/src/hungarian/SymbolHun.gf index 0866083a..47f7c990 100644 --- a/src/hungarian/SymbolHun.gf +++ b/src/hungarian/SymbolHun.gf @@ -1,48 +1,56 @@ ---# -path=.:../abstract:../common +concrete SymbolHun of Symbol = CatHun ** + open Prelude, ResHun, (NH=NounHun) in { -concrete SymbolHun of Symbol = CatHun ** open Prelude, ResHun in -{ ---{ --- ---lin --- SymbPN i = {s = addGenitiveS i.s ; g = Neutr} ; --- IntPN i = {s = addGenitiveS i.s ; g = Neutr} ; --- FloatPN i = {s = addGenitiveS i.s ; g = Neutr} ; --- NumPN i = {s = i.s ; g = Neutr} ; --- CNIntNP cn i = { --- s = \\c => cn.s ! Sg ! Nom ++ (addGenitiveS i.s) ! npcase2case c ; --- a = agrgP3 Sg cn.g --- } ; --- CNSymbNP det cn xs = { --- s = \\c => det.s ++ cn.s ! det.n ! Nom ++ (addGenitiveS xs.s) ! npcase2case c ; --- a = agrgP3 det.n cn.g --- } ; --- CNNumNP cn i = { --- s = \\c => cn.s ! Sg ! Nom ++ i.s ! npcase2case c ; --- a = agrgP3 Sg cn.g --- } ; --- --- SymbS sy = sy ; --- --- SymbNum sy = { s = addGenitiveS sy.s ; n = Pl ; hasCard = True } ; --- SymbOrd sy = { s = \\c => sy.s ++ (regGenitiveS "th")!c} ; --- ---lincat --- --- Symb, [Symb] = SS ; --- ---lin --- MkSymb s = s ; --- --- BaseSymb = infixSS "and" ; --- ConsSymb = infixSS "," ; --- ---oper --- -- Note: this results in a space before 's, but there's --- -- not mauch we can do about that. --- addGenitiveS : Str -> Case => Str = \s -> --- table { Gen => s ++ "'s"; _ => s } ; --- ---} +lin + + -- : Symb -> PN ; -- x + SymbPN i = mkPN i.s ; + + -- : Int -> PN ; -- 27 + IntPN i = mkPN i.s ; + + -- : Float -> PN ; -- 3.14159 + FloatPN i = mkPN i.s ; + + -- : Card -> PN ; -- twelve [as proper name] + NumPN i = mkPN (i.s ! Indep) ; + +oper + + mkPN : Str -> NounPhrase = \s -> emptyNP ** { + s = \\_ => s ; + } ; + +lin + -- : CN -> Int -> NP + CNIntNP cn i = NH.MassNP (cn ** { + s = \\n,c => cn.s ! n ! c ++ i.s}) ; + + -- : Det -> CN -> [Symb] -> NP ; -- (the) (2) numbers x and y + CNSymbNP det cn xs = + let cnSymb : CN = cn ** {s = \\n,c => cn.s ! n ! c ++ xs.s} + in NH.DetCN det cnSymb ; + + -- : CN -> Card -> NP ; -- level five ; level 5 + CNNumNP cn i = NH.MassNP (cn ** { + s = \\n,c => cn.s ! n ! c ++ i.s ! Indep}) ; + + -- : Symb -> S ; + SymbS sy = sy ; + + -- : Symb -> Card ; + SymbNum sy = baseNum ** {s = \\_ => sy.s} ; + + -- : Symb -> Ord ; + SymbOrd sy = {s = \\n => sy.s ; n=Pl} ; + +lincat + Symb, [Symb] = SS ; + +lin + MkSymb s = s ; + + BaseSymb = infixSS "és" ; + ConsSymb = infixSS "," ; } diff --git a/src/hungarian/VerbHun.gf b/src/hungarian/VerbHun.gf index 215b24ed..0202aa98 100644 --- a/src/hungarian/VerbHun.gf +++ b/src/hungarian/VerbHun.gf @@ -1,63 +1,141 @@ -concrete VerbHun of Verb = CatHun ** open ResHun in -{ ---{ --- --- flags optimize=all_subs ; --- --- lin --- UseV = predV ; --- --- SlashV2a v = predVc v ; --- Slash2V3 v np = --- insertObjc (\\_ => v.c2 ++ np.s ! NPAcc) (predV v ** {c2 = v.c3}) ; --- Slash3V3 v np = --- insertObjc (\\_ => v.c3 ++ np.s ! NPAcc) (predVc v) ; ---- --- --- ComplVV v vp = insertObj (\\a => infVP v.typ vp a) (predVV v) ; --- ComplVS v s = insertObj (\\_ => conjThat ++ s.s) (predV v) ; --- ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ; --- ComplVA v ap = insertObj (ap.s) (predV v) ; --- --- SlashV2V v vp = insertObjc (\\a => v.c3 ++ infVP v.typ vp a) (predVc v) ; --- SlashV2S v s = insertObjc (\\_ => conjThat ++ s.s) (predVc v) ; --- SlashV2Q v q = insertObjc (\\_ => q.s ! QIndir) (predVc v) ; --- SlashV2A v ap = insertObjc (\\a => ap.s ! a) (predVc v) ; ---- --- --- ComplSlash vp np = insertObjPre (\\_ => vp.c2 ++ np.s ! NPAcc) vp ; --- --- SlashVV vv vp = --- insertObj (\\a => infVP vv.typ vp a) (predVV vv) ** --- {c2 = vp.c2} ; --- SlashV2VNP vv np vp = --- insertObjPre (\\_ => vv.c2 ++ np.s ! NPAcc) --- (insertObjc (\\a => vv.c3 ++ infVP vv.typ vp a) (predVc vv)) ** --- {c2 = vp.c2} ; --- --- UseComp comp = insertObj comp.s (predAux auxBe) ; --- --- AdvVP vp adv = insertObj (\\_ => adv.s) vp ; --- AdVVP adv vp = insertAdV adv.s vp ; --- --- AdvVPSlash vp adv = insertObj (\\_ => adv.s) vp ** {c2 = vp.c2} ; --- AdVVPSlash adv vp = insertAdV adv.s vp ** {c2 = vp.c2} ; --- --- ReflVP v = insertObjPre (\\a => v.c2 ++ reflPron ! a) v ; --- --- PassV2 v = insertObj (\\_ => v.s ! VPPart) (predAux auxBe) ; --- ------b UseVS, UseVQ = \vv -> {s = vv.s ; c2 = [] ; isRefl = vv.isRefl} ; -- no "to" --- --- CompAP ap = ap ; --- CompNP np = {s = \\_ => np.s ! NPAcc} ; --- CompAdv a = {s = \\_ => a.s} ; --- CompCN cn = {s = \\a => case (fromAgr a).n of { --- Sg => artIndef ++ cn.s ! Sg ! Nom ; --- Pl => cn.s ! Pl ! Nom --- } --- } ; --- --- UseCopula = predAux auxBe ; --- ---} +concrete VerbHun of Verb = CatHun ** open ResHun, AdverbHun, Prelude in { + + +lin + +----- +-- VP + -- : V -> VP + UseV = ResHun.useV ; + + -- : V2 -> VP ; -- be loved + -- PassV2 = ResHun.passV2 ; + + -- : VPSlash -> VP ; + -- ReflVP = ResHun.insertRefl ; + + -- : VV -> VP -> VP ; + -- ComplVV vv vp = let vc = vp.vComp in case vv.vvtype of { + -- + -- } ; + + -- : VS -> S -> VP ; + -- ComplVS vs s = + -- let vps = useV vs ; + -- subord = SubjS {s=""} s ; + -- in vps ** {} ; + +{- + -- : VQ -> QS -> VP ; + ComplVQ vq qs = ; + + -- : VA -> AP -> VP ; -- they become red + ComplVA va ap = ResHun.insertObj (CompAP ap).s (useV va) ; + +-------- +-- Slash +-} + -- : V2 -> VPSlash + SlashV2a = ResHun.useVc ; + +{- + -- : V3 -> NP -> VPSlash ; -- give it (to her) + -- : V3 -> NP -> VPSlash ; -- give (it) to her + Slash2V3, + Slash3V3 = \v3 -> insertObj (useVc3 v3) ; + + -- : V2S -> S -> VPSlash ; -- answer (to him) that it is good + SlashV2S v2s s = + let vps = useVc v2s ; + subord = SubjS {s=""} s ; + in vps ** {obj = } ; + + + -- : V2V -> VP -> VPSlash ; -- beg (her) to go + SlashV2V v2v vp = ; + + -- : V2Q -> QS -> VPSlash ; -- ask (him) who came + SlashV2Q v2q qs = ; + + -- : V2A -> AP -> VPSlash ; -- paint (it) red + SlashV2A v2a ap = useVc v2a ** { + aComp = \\_ => (CompAP ap).aComp ! Sg3 Masc + } ; +-} + -- : VPSlash -> NP -> VP + ComplSlash = ResHun.insertObj ; +{- + -- : VV -> VPSlash -> VPSlash ; + -- Just like ComplVV except missing subject! + SlashVV vv vps = ComplVV vv vps ** { missing = vps.missing ; + post = vps.post } ; + + -- : V2V -> NP -> VPSlash -> VPSlash ; -- beg me to buy + SlashV2VNP v2v np vps = + ComplVV v2v vps ** + { missing = vps.missing ; + post = vps.post ; + iobj = np ** { s = np.s ! Dat } } ; + +-} + + -- : Comp -> VP ; + UseComp comp = comp ; + + + -- : VP -> Adv -> VP ; -- sleep here + AdvVP = insertAdv ; + + -- : VPSlash -> Adv -> VPSlash ; -- use (it) here + AdvVPSlash = insertAdvSlash ; +{- + -- : VP -> Adv -> VP ; -- sleep , even though ... + ExtAdvVP vp adv = vp ** { } ; + + -- : AdV -> VP -> VP ; -- always sleep + AdVVP adv vp = vp ** { } ; + + -- : AdV -> VPSlash -> VPSlash ; -- always use (it) + AdVVPSlash adv vps = vps ** { } ; + + -- : VP -> Prep -> VPSlash ; -- live in (it) + VPSlashPrep vp prep = +-} + +--2 Complements to copula + +-- Adjectival phrases, noun phrases, and adverbs can be used. + + -- : AP -> Comp ; + CompAP ap = UseCopula ** { + 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.compar ; + } ; + + -- : CN -> Comp ; + CompCN cn = UseCopula ** { + s = \\vf => case vf of { + VFin P3 n => cn.s ! n ! Nom ; + VFin _ n => cn.s ! n ! Nom ++ copula.s ! vf ; + _ => cn.s ! Sg ! Nom ++ copula.s ! vf} ; + } ; + + -- : NP -> Comp ; + CompNP np = UseCopula ** { + s = \\vf => case vf of { + VFin P3 _ => np.s ! Nom ; + _ => np.s ! Nom ++ copula.s ! vf } ; + } ; + + -- : Adv -> Comp ; + CompAdv adv = UseCopula ** { + s = \\vf => adv.s ++ copula.s ! vf ; + } ; + + -- : VP -- Copula alone; + UseCopula = useV copula ; } diff --git a/src/hungarian/unittest/adjective.gftest b/src/hungarian/unittest/adjective.gftest new file mode 100644 index 00000000..24236353 --- /dev/null +++ b/src/hungarian/unittest/adjective.gftest @@ -0,0 +1,34 @@ +-------------------------------- +-- Adjectives with complement -- +-------------------------------- +-- LangEng: I am married to you +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (UseComp (CompAP (ComplA2 married_A2 (UsePron youSg_Pron))))))) NoVoc +LangHun: én házas vagyok veled + + +---------------- +-- Comparison -- +---------------- +-- LangEng: I am as red as you +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (UseComp (CompAP (CAdvAP as_CAdv (PositA red_A) (UsePron youSg_Pron))))))) NoVoc +LangHun: én olyan piros vagyok mint te + +-- LangEng: I am redder than you +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (UseComp (CompAP (ComparA red_A (UsePron youSg_Pron))))))) NoVoc +LangHun: én pirosabb vagyok nálad + + +------------------ +-- Superlatives -- +------------------ +-- LangEng: I am reddest +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (UseComp (CompAP (AdjOrd (OrdSuperl red_A))))))) NoVoc +LangHun: én legpirosabb vagyok + +-- LangEng: I am the reddest +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (UseComp (CompNP (DetNP (DetQuantOrd DefArt NumSg (OrdSuperl red_A)))))))) NoVoc +LangHun: én a legpirosabb vagyok + +-- !! I suspect this is nonsense +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (UseComp (CompNP (DetNP (DetQuantOrd DefArt NumPl (OrdSuperl red_A)))))))) NoVoc +LangHun: én a legpirosabbok vagyok diff --git a/src/hungarian/unittest/dative.gftest b/src/hungarian/unittest/dative.gftest new file mode 100644 index 00000000..2e81c531 --- /dev/null +++ b/src/hungarian/unittest/dative.gftest @@ -0,0 +1,7 @@ +-- LangEng: I have a cat +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a have_V2) (DetCN (DetQuant IndefArt NumSg) (UseN cat_N)))))) NoVoc +LangHun: nekem van egy macska + +-- LangEng: I have the cat +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a have_V2) (DetCN (DetQuant DefArt NumSg) (UseN cat_N)))))) NoVoc +LangHun: nekem van a macska diff --git a/src/hungarian/unittest/inflection.gftest b/src/hungarian/unittest/inflection.gftest new file mode 100644 index 00000000..741ec01a --- /dev/null +++ b/src/hungarian/unittest/inflection.gftest @@ -0,0 +1,364 @@ +--------------------- +-- Noun inflection -- +--------------------- + +-- Beer +Lang: PrepNP under_Prep (DetCN (DetQuant DefArt NumSg) (UseN beer_N)) +LangEng: under the beer +LangHun: a sör alatt + +Lang: PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (UseN beer_N)) +LangEng: in the beer +LangHun: a sörben + +Lang: PrepNP on_Prep (DetCN (DetQuant DefArt NumSg) (UseN beer_N)) +LangEng: on the beer +LangHun: a sörnél + +# Lang: PrepNP possess_Prep (DetCN (DetQuant DefArt NumSg) (UseN beer_N)) +# LangEng: of the beer +# LangHun: a söré + +Lang: PrepNP to_Prep (DetCN (DetQuant DefArt NumSg) (UseN beer_N)) +LangEng: to the beer +LangHun: a sörhöz + +Lang: PrepNP in_Prep (DetCN (DetQuant DefArt NumPl) (UseN beer_N)) +LangHun: a sörökben + +Lang: PrepNP on_Prep (DetCN (DetQuant DefArt NumPl) (UseN beer_N)) +LangHun: a söröknél + +# Lang: PrepNP possess_Prep (DetCN (DetQuant DefArt NumPl) (UseN beer_N)) +# LangHun: a söröké + +Lang: PrepNP to_Prep (DetCN (DetQuant DefArt NumPl) (UseN beer_N)) +LangHun: a sörökhöz + +Lang: PrepNP under_Prep (DetCN (DetQuant DefArt NumPl) (UseN beer_N)) +LangHun: a sörök alatt + +--látom not látok +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (UseN beer_N)))))) NoVoc +LangEng: I see the beer +LangHun: én látom a söröt + +--söröket not sörököt +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumPl) (UseN beer_N)))))) NoVoc +LangEng: I see the beers +LangHun: én látom a söröket + + +-- Woman +-- nő-nőt, not *nő-növet +Lang: PrepNP under_Prep (DetCN (DetQuant DefArt NumSg) (UseN woman_N)) +LangEng: under the woman +LangHun: a nő alatt + +Lang: PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (UseN woman_N)) +LangEng: in the woman +LangHun: a nőben + +Lang: PrepNP on_Prep (DetCN (DetQuant DefArt NumSg) (UseN woman_N)) +LangEng: on the woman +LangHun: a nőnél + +# Lang: PrepNP possess_Prep (DetCN (DetQuant DefArt NumSg) (UseN woman_N)) +# LangEng: of the woman +# LangHun: a nőé + +Lang: PrepNP to_Prep (DetCN (DetQuant DefArt NumSg) (UseN woman_N)) +LangEng: to the woman +LangHun: a nőhöz + +Lang: PrepNP in_Prep (DetCN (DetQuant DefArt NumPl) (UseN woman_N)) +LangHun: a nőkben + +Lang: PrepNP on_Prep (DetCN (DetQuant DefArt NumPl) (UseN woman_N)) +LangHun: a nőknél + +# Lang: PrepNP possess_Prep (DetCN (DetQuant DefArt NumPl) (UseN woman_N)) +# LangHun: a nőké + +Lang: PrepNP to_Prep (DetCN (DetQuant DefArt NumPl) (UseN woman_N)) +LangHun: a nőkhöz + +Lang: PrepNP under_Prep (DetCN (DetQuant DefArt NumPl) (UseN woman_N)) +LangHun: a nők alatt + +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (UseN woman_N)))))) NoVoc +LangEng: I see the woman +LangHun: én látom a nőt + +--nőket not nőköt +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumPl) (UseN woman_N)))))) NoVoc +LangEng: I see the women +LangHun: én látom a nőket + +-- Apple +Lang: PrepNP under_Prep (DetCN (DetQuant DefArt NumSg) (UseN apple_N)) +LangEng: under the apple +LangHun: az alma alatt + +Lang: PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (UseN apple_N)) +LangEng: in the apple +LangHun: az almában + +Lang: PrepNP on_Prep (DetCN (DetQuant DefArt NumSg) (UseN apple_N)) +LangEng: on the apple +LangHun: az almánál + +# Lang: PrepNP possess_Prep (DetCN (DetQuant DefArt NumSg) (UseN apple_N)) +# LangEng: of the apple +# LangHun: az almáé + +Lang: PrepNP to_Prep (DetCN (DetQuant DefArt NumSg) (UseN apple_N)) +LangEng: to the apple +LangHun: az almához + +Lang: PrepNP in_Prep (DetCN (DetQuant DefArt NumPl) (UseN apple_N)) +LangHun: az almákban + +Lang: PrepNP on_Prep (DetCN (DetQuant DefArt NumPl) (UseN apple_N)) +LangHun: az almáknál + +# Lang: PrepNP possess_Prep (DetCN (DetQuant DefArt NumPl) (UseN apple_N)) +# LangHun: az almáké + +Lang: PrepNP to_Prep (DetCN (DetQuant DefArt NumPl) (UseN apple_N)) +LangHun: az almákhoz + +Lang: PrepNP under_Prep (DetCN (DetQuant DefArt NumPl) (UseN apple_N)) +LangHun: az almák alatt + + +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (UseN apple_N)))))) NoVoc +LangEng: I see the apple +LangHun: én látom az almát + +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumPl) (UseN apple_N)))))) NoVoc +LangEng: I see the apples +LangHun: én látom az almákat + +-- Bird +Lang: PrepNP under_Prep (DetCN (DetQuant DefArt NumSg) (UseN bird_N)) +LangEng: under the bird +LangHun: a madár alatt + +Lang: PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (UseN bird_N)) +LangEng: in the bird +LangHun: a madárban + +Lang: PrepNP on_Prep (DetCN (DetQuant DefArt NumSg) (UseN bird_N)) +LangEng: on the bird +LangHun: a madárnál + +# Lang: PrepNP possess_Prep (DetCN (DetQuant DefArt NumSg) (UseN bird_N)) +# LangEng: of the bird +# LangHun: a madáré + +Lang: PrepNP to_Prep (DetCN (DetQuant DefArt NumSg) (UseN bird_N)) +LangEng: to the bird +LangHun: a madárhoz + +Lang: PrepNP in_Prep (DetCN (DetQuant DefArt NumPl) (UseN bird_N)) +LangHun: a madarakban + +Lang: PrepNP on_Prep (DetCN (DetQuant DefArt NumPl) (UseN bird_N)) +LangHun: a madaraknál + +# Lang: PrepNP possess_Prep (DetCN (DetQuant DefArt NumPl) (UseN bird_N)) +# LangHun: a madaraké + +Lang: PrepNP to_Prep (DetCN (DetQuant DefArt NumPl) (UseN bird_N)) +LangHun: a madarakhoz + +Lang: PrepNP under_Prep (DetCN (DetQuant DefArt NumPl) (UseN bird_N)) +LangHun: a madarak alatt + +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (UseN bird_N)))))) NoVoc +LangEng: I see the bird +LangHun: én látom a madarat + +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumPl) (UseN bird_N)))))) NoVoc +LangEng: I see the birds +LangHun: én látom a madarakat + +-- Name +Lang: PrepNP under_Prep (DetCN (DetQuant DefArt NumSg) (UseN name_N)) +LangEng: under the name +LangHun: a név alatt + +Lang: PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (UseN name_N)) +LangEng: in the name +LangHun: a névben + +Lang: PrepNP on_Prep (DetCN (DetQuant DefArt NumSg) (UseN name_N)) +LangEng: on the name +LangHun: a névnél + +# Lang: PrepNP possess_Prep (DetCN (DetQuant DefArt NumSg) (UseN name_N)) +# LangEng: of the name +# LangHun: a névé + +Lang: PrepNP to_Prep (DetCN (DetQuant DefArt NumSg) (UseN name_N)) +LangEng: to the name +LangHun: a névhez + +Lang: PrepNP in_Prep (DetCN (DetQuant DefArt NumPl) (UseN name_N)) +LangHun: a nevekben + +Lang: PrepNP on_Prep (DetCN (DetQuant DefArt NumPl) (UseN name_N)) +LangHun: a neveknél + +# Lang: PrepNP possess_Prep (DetCN (DetQuant DefArt NumPl) (UseN name_N)) +# LangHun: a neveké + +Lang: PrepNP to_Prep (DetCN (DetQuant DefArt NumPl) (UseN name_N)) +LangHun: a nevekhez + +Lang: PrepNP under_Prep (DetCN (DetQuant DefArt NumPl) (UseN name_N)) +LangHun: a nevek alatt + + +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (UseN name_N)))))) NoVoc +LangEng: I see the name +LangHun: én látom a nevet + +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumPl) (UseN name_N)))))) NoVoc +LangEng: I see the names +LangHun: én látom a neveket + +-- Man +Lang: PrepNP under_Prep (DetCN (DetQuant DefArt NumSg) (UseN man_N)) +LangEng: under the man +LangHun: a férfi alatt + +Lang: PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (UseN man_N)) +LangEng: in the man +LangHun: a férfiban + +Lang: PrepNP on_Prep (DetCN (DetQuant DefArt NumSg) (UseN man_N)) +LangEng: on the man +LangHun: a férfinál + +# Lang: PrepNP possess_Prep (DetCN (DetQuant DefArt NumSg) (UseN man_N)) +# LangEng: of the man +# LangHun: a férfié + +Lang: PrepNP to_Prep (DetCN (DetQuant DefArt NumSg) (UseN man_N)) +LangEng: to the man +LangHun: a férfihoz + +Lang: PrepNP in_Prep (DetCN (DetQuant DefArt NumPl) (UseN man_N)) +LangHun: a férfiakban + +Lang: PrepNP on_Prep (DetCN (DetQuant DefArt NumPl) (UseN man_N)) +LangHun: a férfiaknál + +# Lang: PrepNP possess_Prep (DetCN (DetQuant DefArt NumPl) (UseN man_N)) +# LangHun: a férfiaké + +Lang: PrepNP to_Prep (DetCN (DetQuant DefArt NumPl) (UseN man_N)) +LangHun: a férfiakhoz + +Lang: PrepNP under_Prep (DetCN (DetQuant DefArt NumPl) (UseN man_N)) +LangHun: a férfiak alatt + +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (UseN man_N)))))) NoVoc +LangEng: I see the man +LangHun: én látom a férfit + +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumPl) (UseN man_N)))))) NoVoc +LangEng: I see the men +LangHun: én látom a férfiakat + + +-- Horse +Lang: PrepNP by8means_Prep (DetCN (DetQuant DefArt NumSg) (UseN horse_N)) +LangEng: by the horse +LangHun: a lóval + +Lang: PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (UseN horse_N)) +LangEng: in the horse +LangHun: a lóban + +Lang: PrepNP on_Prep (DetCN (DetQuant DefArt NumSg) (UseN horse_N)) +LangEng: on the horse +LangHun: a lónál + +Lang: PrepNP to_Prep (DetCN (DetQuant DefArt NumSg) (UseN horse_N)) +LangEng: to the horse +LangHun: a lóhoz + +Lang: PrepNP under_Prep (DetCN (DetQuant DefArt NumSg) (UseN horse_N)) +LangEng: under the horse +LangHun: a ló alatt + +Lang: PrepNP by8means_Prep (DetCN (DetQuant DefArt NumPl) (UseN horse_N)) +LangEng: by the horses +LangHun: a lovakkal + +Lang: PrepNP in_Prep (DetCN (DetQuant DefArt NumPl) (UseN horse_N)) +LangEng: in the horses +LangHun: a lovakban + +Lang: PrepNP on_Prep (DetCN (DetQuant DefArt NumPl) (UseN horse_N)) +LangEng: on the horses +LangHun: a lovaknál + +Lang: PrepNP to_Prep (DetCN (DetQuant DefArt NumPl) (UseN horse_N)) +LangEng: to the horses +LangHun: a lovakhoz + +Lang: PrepNP under_Prep (DetCN (DetQuant DefArt NumPl) (UseN horse_N)) +LangEng: under the horses +LangHun: a lovak alatt + +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (UseN horse_N)))))) NoVoc +LangEng: I see the horse +LangHun: én látom a lovat + +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumPl) (UseN horse_N)))))) NoVoc +LangEng: I see the horses +LangHun: én látom a lovakat + + +-- Stone +Lang: PrepNP by8means_Prep (DetCN (DetQuant DefArt NumSg) (UseN stone_N)) +LangHun: a kővel + +Lang: PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (UseN stone_N)) +LangHun: a kőben + +Lang: PrepNP on_Prep (DetCN (DetQuant DefArt NumSg) (UseN stone_N)) +LangHun: a kőnél + +Lang: PrepNP to_Prep (DetCN (DetQuant DefArt NumSg) (UseN stone_N)) +LangHun: a kőhöz + +Lang: PrepNP under_Prep (DetCN (DetQuant DefArt NumSg) (UseN stone_N)) +LangHun: a kő alatt + +Lang: PrepNP by8means_Prep (DetCN (DetQuant DefArt NumPl) (UseN stone_N)) +LangHun: a kövekkel + +Lang: PrepNP in_Prep (DetCN (DetQuant DefArt NumPl) (UseN stone_N)) +LangHun: a kövekben + +Lang: PrepNP on_Prep (DetCN (DetQuant DefArt NumPl) (UseN stone_N)) +LangHun: a köveknél + +Lang: PrepNP to_Prep (DetCN (DetQuant DefArt NumPl) (UseN stone_N)) +LangHun: a kövekhez + +Lang: PrepNP under_Prep (DetCN (DetQuant DefArt NumPl) (UseN stone_N)) +LangHun: a kövek alatt + +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (UseN stone_N)))))) NoVoc +LangEng: I see the stone +LangHun: én látom a követ + +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumPl) (UseN stone_N)))))) NoVoc +LangEng: I see the stones +LangHun: én látom a köveket diff --git a/src/hungarian/unittest/numerals.gftest b/src/hungarian/unittest/numerals.gftest new file mode 100644 index 00000000..23543b59 --- /dev/null +++ b/src/hungarian/unittest/numerals.gftest @@ -0,0 +1,9 @@ +-- Plural +-- LangEng: the cats fly +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumPl) (UseN cat_N)) (UseV fly_V)))) NoVoc +LangHun: a macskák repülnek + +-- Numeral +-- LangEng: two cats fly +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant IndefArt (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n2)))))))) (UseN cat_N)) (UseV fly_V)))) NoVoc +LangHun: két macska repül diff --git a/src/hungarian/unittest/relative.gftest b/src/hungarian/unittest/relative.gftest new file mode 100644 index 00000000..01a9c4d8 --- /dev/null +++ b/src/hungarian/unittest/relative.gftest @@ -0,0 +1,68 @@ +------------------------------ +-- These need to be correct -- +------------------------------ + + +-- LangEng: I see a man that flies +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant IndefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (UseV fly_V))))))))) NoVoc +LangHun: én látok egy férfit amit repül + +-- LangEng: I see the man that flies +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (UseV fly_V))))))))) NoVoc +LangHun: én látom a férfit amit repül + +-- LangEng: I see the man that sees a cat +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant IndefArt NumSg) (UseN cat_N))))))))))) NoVoc +LangHun: én látom a férfit amit lát egy macskát + +-- LangEng: I see the man that sees the cat +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (UseN cat_N))))))))))) NoVoc +LangHun: én látom a férfit amit látja a macskát + +-- LangEng: I see the man that has a cat +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a have_V2) (DetCN (DetQuant IndefArt NumSg) (UseN cat_N))))))))))) NoVoc +LangHun: én látom a férfit aminek van egy macska + +-- LangEng: I see the man that has the cat +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a have_V2) (DetCN (DetQuant DefArt NumSg) (UseN cat_N))))))))))) NoVoc +LangHun: én látom a férfit aminek van a macska + +-- LangEng: I see the cat that flies and that is red +-- Do we need copula in "is red" or is it still fine without? +-- This constructor repeats amit, we have other constructors that don't. +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN cat_N) (ConjRS and_Conj (BaseRS (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (UseV fly_V))) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (UseComp (CompAP (PositA red_A))))))))))))) NoVoc +LangHun: én látom a macskát amit repül és amit piros + +-- LangEng: I see the man that flies and that has a cat +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN man_N) (ConjRS and_Conj (BaseRS (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (UseV fly_V))) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a have_V2) (DetCN (DetQuant IndefArt NumSg) (UseN cat_N))))))))))))) NoVoc +LangHun: én látom a férfit amit repül és aminek van egy macska + + +------------------------------------------------------------- +-- These are just for fun and lower prio to fix in grammar -- +------------------------------------------------------------- + +-- LangEng: I see the man that the cat sees +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (UseN cat_N)) (SlashV2a see_V2)))))))))) NoVoc +LangHun: én látom a férfit amit a macska látja + +-- LangEng: I see a man that the cat sees +-- Should this be "amit a macska lát"? +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant IndefArt NumSg) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (UseN cat_N)) (SlashV2a see_V2)))))))))) NoVoc +LangHun: én látok egy férfit amit a macska látja + +-- LangEng: I see a cat that the man has +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant IndefArt NumSg) (RelCN (UseN cat_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (UseN man_N)) (SlashV2a have_V2)))))))))) NoVoc +LangHun: én látok egy macskát amit a férfinak van + +-- LangEng: I see the cat that the man has +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN cat_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (UseN man_N)) (SlashV2a have_V2)))))))))) NoVoc +LangHun: én látom a macskát amit a férfinak van + +-- LangEng: I see the cat that the man has and that flies +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN cat_N) (ConjRS and_Conj (BaseRS (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (UseN man_N)) (SlashV2a have_V2)))) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (UseV fly_V))))))))))) NoVoc +LangHun: én látom a macskát amit a férfinak van és amit repül + +-- LangEng: I am redder than the cats that those women have +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (UseComp (CompAP (ComparA red_A (DetCN (DetQuant DefArt NumPl) (RelCN (UseN cat_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant that_Quant NumPl) (UseN woman_N)) (SlashV2a have_V2)))))))))))) NoVoc +LangHun: én pirosabb vagyok a macskáknál amik azoknak nőknek vannak