mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 01:18:57 -06:00
(Hun) Fresh copypaste from generic dummy template. Compiles, isn't good.
This commit is contained in:
@@ -1,59 +1,58 @@
|
|||||||
concrete AdjectiveHun of Adjective = CatHun ** open ResHun, Prelude in
|
concrete AdjectiveHun of Adjective = CatHun ** open ResHun, Prelude in {
|
||||||
{
|
|
||||||
--{
|
flags optimize=all_subs ;
|
||||||
--
|
|
||||||
-- lin
|
lin
|
||||||
--
|
|
||||||
-- PositA a = {
|
-- : A -> AP ;
|
||||||
-- s = \\_ => a.s ! AAdj Posit Nom ;
|
PositA a = a ;
|
||||||
-- isPre = True
|
|
||||||
-- } ;
|
-- : A -> NP -> AP ;
|
||||||
-- ComparA a np = {
|
-- ComparA a np = a ** {
|
||||||
-- s = \\_ => a.s ! AAdj Compar Nom ++ "than" ++ np.s ! npNom ;
|
--
|
||||||
-- isPre = False
|
-- } ;
|
||||||
-- } ;
|
|
||||||
-- UseComparA a = {
|
-- : A2 -> NP -> AP ; -- married to her
|
||||||
-- s = \\_ => a.s ! AAdj Compar Nom ;
|
-- ComplA2 a2 np = a2 ** { } ;
|
||||||
-- isPre = True
|
|
||||||
-- } ;
|
-- : A2 -> AP ; -- married to itself
|
||||||
--
|
-- ReflA2 a2 = a2 ** { } ;
|
||||||
-- AdjOrd ord = {
|
|
||||||
-- s = \\_ => ord.s ! Nom ;
|
-- : A2 -> AP ; -- married
|
||||||
-- isPre = True
|
-- UseA2 = PositA ;
|
||||||
-- } ;
|
|
||||||
--
|
-- : A -> AP ; -- warmer
|
||||||
-- CAdvAP ad ap np = {
|
-- UseComparA a = a ** {
|
||||||
-- s = \\a => ad.s ++ ap.s ! a ++ ad.p ++ np.s ! npNom ;
|
-- s = \\af => "???" ++ a.s ! af ;
|
||||||
-- isPre = False
|
-- compar = []
|
||||||
-- } ;
|
-- } ;
|
||||||
--
|
|
||||||
-- ComplA2 a np = {
|
|
||||||
-- s = \\_ => a.s ! AAdj Posit Nom ++ a.c2 ++ np.s ! NPAcc ;
|
-- : CAdv -> AP -> NP -> AP ; -- as cool as John
|
||||||
-- isPre = False
|
-- CAdvAP adv ap np = ap ** { } ;
|
||||||
-- } ;
|
|
||||||
--
|
-- The superlative use is covered in $Ord$.
|
||||||
-- ReflA2 a = {
|
|
||||||
-- s = \\ag => a.s ! AAdj Posit Nom ++ a.c2 ++ reflPron ! ag ;
|
-- : Ord -> AP ; -- warmest
|
||||||
-- isPre = False
|
AdjOrd ord = ord ** {
|
||||||
-- } ;
|
s = \\_ => ord.s ;
|
||||||
--
|
} ;
|
||||||
-- SentAP ap sc = {
|
|
||||||
-- s = \\a => ap.s ! a ++ sc.s ;
|
-- Sentence and question complements defined for all adjectival
|
||||||
-- isPre = False
|
-- phrases, although the semantics is only clear for some adjectives.
|
||||||
-- } ;
|
|
||||||
--
|
-- : AP -> SC -> AP ; -- good that she is here
|
||||||
-- AdAP ada ap = {
|
-- SentAP ap sc = ap ** {} ;
|
||||||
-- s = \\a => ada.s ++ ap.s ! a ;
|
|
||||||
-- isPre = ap.isPre
|
-- An adjectival phrase can be modified by an *adadjective*, such as "very".
|
||||||
-- } ;
|
|
||||||
--
|
-- : AdA -> AP -> AP ;
|
||||||
-- UseA2 a = {
|
AdAP ada ap = ap ** {s = \\af => ada.s ++ ap.s ! af} ;
|
||||||
-- s = \\_ => a.s ! AAdj Posit Nom ;
|
|
||||||
-- isPre = True
|
|
||||||
-- } ;
|
-- It can also be postmodified by an adverb, typically a prepositional phrase.
|
||||||
--
|
|
||||||
-- AdvAP ap adv = {s = \\a => ap.s ! a ++ adv.s ; isPre = False} ;
|
-- : AP -> Adv -> AP ; -- warm by nature
|
||||||
--
|
-- AdvAP ap adv = ap ** {} ;
|
||||||
--}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,35 @@
|
|||||||
concrete AdverbHun of Adverb = CatHun ** open ResHun, Prelude in
|
concrete AdverbHun of Adverb = CatHun ** open ResHun, ParamHun, ParadigmsHun, 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} ;
|
|
||||||
--
|
|
||||||
--}
|
|
||||||
|
|
||||||
}
|
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 = } ;
|
||||||
|
} ;
|
||||||
|
|||||||
@@ -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
|
lincat
|
||||||
--
|
|
||||||
---- exception to CommonX, due to the distinction contracted/uncontracted negation
|
--2 Sentences and clauses
|
||||||
--
|
-- Constructed in SentenceHun, and also in IdiomHun
|
||||||
-- Pol = {s : Str ; p : CPolarity} ;
|
|
||||||
--
|
S = ResHun.Sentence ;
|
||||||
---- Tensed/Untensed
|
QS = SS ;
|
||||||
--
|
RS = SS ;
|
||||||
-- S = {s : Str} ;
|
-- relative sentence. Tense and polarity fixed,
|
||||||
-- QS = {s : QForm => Str} ;
|
-- but agreement may depend on the CN/NP it modifies.
|
||||||
-- RS = {s : Agr => Str ; c : NPCase} ; -- c for it clefts
|
|
||||||
-- SSlash = {s : Str ; c2 : Str} ;
|
Cl = ResHun.ClSlash ;
|
||||||
--
|
ClSlash = ResHun.ClSlash ;
|
||||||
---- Sentence
|
SSlash = ResHun.Sentence ; -- sentence missing NP; e.g. "she has looked at"
|
||||||
--
|
Imp = {s : Number => Polarity => Str} ; -- imperative e.g. "look at this"
|
||||||
-- Cl = {s : ResHun.Tense => Anteriority => CPolarity => Order => Str} ;
|
|
||||||
-- ClSlash = {
|
--2 Questions and interrogatives
|
||||||
-- s : ResHun.Tense => Anteriority => CPolarity => Order => Str ;
|
|
||||||
-- c2 : Str
|
-- Constructed in QuestionHun.
|
||||||
-- } ;
|
|
||||||
-- Imp = {s : CPolarity => ImpForm => Str} ;
|
QCl = ResHun.QClause ;
|
||||||
--
|
IComp = SS ; -- interrogative complement of copula e.g. "where"
|
||||||
---- Question
|
IDet = ResHun.Determiner ; -- interrogative determiner e.g. "how many"
|
||||||
--
|
IQuant = ResHun.Quant ; -- interrogative quantifier e.g. "which"
|
||||||
-- QCl = {s : ResHun.Tense => Anteriority => CPolarity => QForm => Str} ;
|
IP = ResHun.NounPhrase ; -- interrogative pronoun e.g. "who"
|
||||||
-- IP = {s : NPCase => Str ; n : Number} ;
|
|
||||||
-- IComp = {s : Str} ;
|
--2 Subord clauses and pronouns
|
||||||
-- IDet = {s : Str ; n : Number} ;
|
|
||||||
-- IQuant = {s : Number => Str} ;
|
--RCl = ResHun.RClause ;
|
||||||
--
|
--RP = SS ;
|
||||||
---- Relative
|
|
||||||
--
|
--2 Verb phrases
|
||||||
-- RCl = {
|
|
||||||
-- s : ResHun.Tense => Anteriority => CPolarity => Agr => Str ;
|
-- Constructed in VerbHun.
|
||||||
-- c : NPCase
|
|
||||||
-- } ;
|
VP = ResHun.VerbPhrase ;
|
||||||
-- RP = {s : RCase => Str ; a : RAgr} ;
|
VPSlash = ResHun.VPSlash ;
|
||||||
--
|
Comp = ResHun.VerbPhrase ;
|
||||||
---- Verb
|
|
||||||
--
|
|
||||||
-- VP = ResHun.VP ;
|
--2 Adjectival phrases
|
||||||
-- VPSlash = ResHun.VP ** {c2 : Str} ;
|
|
||||||
-- Comp = {s : Agr => Str} ;
|
-- Constructed in AdjectiveHun.
|
||||||
--
|
|
||||||
---- Adjective
|
AP = ResHun.Adjective ;
|
||||||
--
|
|
||||||
-- AP = {s : Agr => Str ; isPre : Bool} ;
|
|
||||||
--
|
--2 Nouns and noun phrases
|
||||||
---- Noun
|
|
||||||
--
|
-- Constructed in NounHun.
|
||||||
N = {s : Number => Case => Str} ;
|
-- Many atomic noun phrases e.g. "everybody"
|
||||||
-- NP = {s : NPCase => Str ; a : Agr} ;
|
-- are constructed in StructuralHun.
|
||||||
-- Pron = {s : NPCase => Str ; sp : Case => Str ; a : Agr} ;
|
-- The determiner structure is
|
||||||
-- Det = {s : Str ; sp : NPCase => Str ; n : Number ; hasNum : Bool} ;
|
-- ``` Predet (QuantSg | QuantPl Num) Ord
|
||||||
-- Predet = {s : Str} ;
|
-- as defined in NounHun.
|
||||||
-- Ord = { s : Case => Str } ;
|
|
||||||
-- Num = {s : Case => Str ; n : Number ; hasCard : Bool} ;
|
CN = ResHun.Noun ;
|
||||||
-- Card = {s : Case => Str ; n : Number} ;
|
NP = ResHun.NounPhrase ;
|
||||||
-- Quant = {s : Bool => Number => Str ; sp : Bool => Number => NPCase => Str} ;
|
Pron = ResHun.Pronoun ; --Pronouns need enough info to turn it into NP or Quant.
|
||||||
--
|
Det = ResHun.Determiner ;
|
||||||
---- Numeral
|
Predet = {s : Str} ;
|
||||||
--
|
Quant = ResHun.Quant ;
|
||||||
-- Numeral = {s : CardOrd => Case => Str ; n : Number} ;
|
Num = ResHun.Num ;
|
||||||
-- Digits = {s : CardOrd => Case => Str ; n : Number ; tail : DTail} ;
|
Ord = {
|
||||||
--
|
s : Str ; -- Number => Case => Str ; -- Ord can come from AP and become AP again
|
||||||
---- Structural
|
n : Number -- Ord can come from Num, which has inherent number
|
||||||
--
|
} ;
|
||||||
-- Conj = {s1,s2 : Str ; n : Number} ;
|
DAP = ResHun.Determiner ;
|
||||||
-----b Conj = {s : Str ; n : Number} ;
|
|
||||||
-----b DConj = {s1,s2 : Str ; n : Number} ;
|
|
||||||
-- Subj = {s : Str} ;
|
--2 Numerals
|
||||||
-- Prep = {s : Str} ;
|
|
||||||
--
|
-- Constructed in NumeralHun.
|
||||||
---- Open lexical classes, e.g. Lexicon
|
|
||||||
--
|
Card = ResHun.Num ;
|
||||||
-- V, VS, VQ, VA = Verb ; -- = {s : VForm => Str} ;
|
Numeral = ResHun.Numeral ;
|
||||||
-- V2, V2A, V2Q, V2S = Verb ** {c2 : Str} ;
|
Digits = {s : CardOrd => Str ; n : Number} ;
|
||||||
-- V3 = Verb ** {c2, c3 : Str} ;
|
|
||||||
-- VV = {s : VVForm => Str ; typ : VVType} ;
|
|
||||||
-- V2V = Verb ** {c2,c3 : Str ; typ : VVType} ;
|
|
||||||
--
|
--2 Structural words
|
||||||
-- A = {s : AForm => Str} ;
|
|
||||||
-- A2 = {s : AForm => Str ; c2 : Str} ;
|
-- Constructed in StructuralHun.
|
||||||
--
|
Conj = ResHun.Conj ;
|
||||||
-- N = {s : Number => Case => Str ; g : Gender} ;
|
Subj = SS ;
|
||||||
-- N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ;
|
Prep = ResHun.Postposition ;
|
||||||
-- N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Str} ;
|
|
||||||
-- PN = {s : Case => Str ; g : Gender} ;
|
|
||||||
--
|
|
||||||
--}
|
--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.Adjective ;
|
||||||
|
|
||||||
|
N,
|
||||||
|
N2,
|
||||||
|
N3 = ResHun.Noun ;
|
||||||
|
PN = ResHun.NounPhrase ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,58 +1,93 @@
|
|||||||
concrete ConjunctionHun of Conjunction =
|
concrete ConjunctionHun of Conjunction =
|
||||||
CatHun ** open ResHun, Coordination, Prelude in
|
CatHun ** open ResHun, Coordination, Prelude in {
|
||||||
{
|
|
||||||
--{
|
{- Conjunction for category X needs four things:
|
||||||
--
|
lincat [X]
|
||||||
-- flags optimize=all_subs ;
|
lin BaseX
|
||||||
--
|
lin ConsX
|
||||||
-- lin
|
lin ConjX
|
||||||
--
|
|
||||||
-- ConjS = conjunctDistrSS ;
|
For example, if X is defined as
|
||||||
--
|
|
||||||
-- ConjAdv = conjunctDistrSS ;
|
lincat X = {s : Number => Str ; g : Gender} ;
|
||||||
--
|
|
||||||
-- ConjNP conj ss = conjunctDistrTable NPCase conj ss ** {
|
then [X] will split its s field into two, and retain its other fields as is:
|
||||||
-- a = conjAgr (agrP3 conj.n) ss.a
|
|
||||||
-- } ;
|
lincat [X] = {s1,s2 : Number => Str ; g : Gender} ;
|
||||||
--
|
|
||||||
-- ConjAP conj ss = conjunctDistrTable Agr conj ss ** {
|
Let us look at a simple case: Adv is of type {s : Str}
|
||||||
-- isPre = ss.isPre
|
Then [Adv] is {s1,s2 : Str}.
|
||||||
-- } ;
|
BaseAdv, ConsAdv and ConjAdv can all use functions defined in prelude/Coordination:
|
||||||
--
|
|
||||||
-- ConjRS conj ss = conjunctDistrTable Agr conj ss ** {
|
BaseAdv = twoSS ;
|
||||||
-- c = ss.c
|
ConsAdv = consrSS comma ;
|
||||||
-- } ;
|
ConjAdv = conjunctSS ;
|
||||||
--
|
|
||||||
-- ConjIAdv = conjunctDistrSS ;
|
--}
|
||||||
--
|
|
||||||
-- ConjCN co ns = conjunctDistrTable2 Number Case co ns ** {g = Neutr} ; --- gender?
|
|
||||||
--
|
-- Adverb and other simple {s : Str} types.
|
||||||
---- These fun's are generated from the list cat's.
|
lincat
|
||||||
--
|
[Adv],[AdV],[IAdv] = {s1,s2 : Str} ;
|
||||||
-- BaseS = twoSS ;
|
|
||||||
-- ConsS = consrSS comma ;
|
lin
|
||||||
-- BaseAdv = twoSS ;
|
BaseAdv, BaseAdV, BaseIAdv = twoSS ;
|
||||||
-- ConsAdv = consrSS comma ;
|
ConsAdv, ConsAdV, ConsIAdv = consrSS comma ;
|
||||||
-- BaseNP x y = twoTable NPCase x y ** {a = conjAgr x.a y.a} ;
|
ConjAdv, ConjAdV, ConjIAdv = conjunctDistrSS ;
|
||||||
-- 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} ;
|
-- RS depends on X, Y and Z, otherwise exactly like previous.
|
||||||
-- BaseRS x y = twoTable Agr x y ** {c = y.c} ;
|
-- RS can modify CNs, which are open for …, and have inherent …
|
||||||
-- ConsRS xs x = consrTable Agr comma xs x ** {c = xs.c} ;
|
lincat
|
||||||
-- BaseIAdv = twoSS ;
|
[RS] = {s1,s2 : … => Str} ;
|
||||||
-- ConsIAdv = consrSS comma ;
|
|
||||||
-- BaseCN = twoTable2 Number Case ;
|
lin
|
||||||
-- ConsCN = consrTable2 Number Case comma ;
|
BaseRS = twoTable … ;
|
||||||
--
|
ConsRS = consrTable … comma ;
|
||||||
-- lincat
|
ConjRS = conjunctDistrTable ;
|
||||||
-- [S] = {s1,s2 : Str} ;
|
|
||||||
-- [Adv] = {s1,s2 : Str} ;
|
lincat
|
||||||
-- [IAdv] = {s1,s2 : Str} ;
|
[S] = {} ;
|
||||||
-- [NP] = {s1,s2 : NPCase => Str ; a : Agr} ;
|
|
||||||
-- [AP] = {s1,s2 : Agr => Str ; isPre : Bool} ;
|
lin
|
||||||
-- [RS] = {s1,s2 : Agr => Str ; c : NPCase} ;
|
BaseS x y = y ** { } ;
|
||||||
-- [CN] = {s1,s2 : Number => Case => Str} ;
|
ConsS x xs =
|
||||||
--
|
xs ** { } ;
|
||||||
--}
|
ConjS co xs = {} ;
|
||||||
|
|
||||||
|
lincat
|
||||||
|
[AP] = {} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
BaseAP x y = twoTable … x y ** y ;
|
||||||
|
ConsAP a as = consrTable … comma as a ** as ;
|
||||||
|
ConjAP co as = conjunctDistrTable … co as ** as ;
|
||||||
|
|
||||||
|
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 **
|
||||||
|
|
||||||
|
|
||||||
|
-- Noun phrases
|
||||||
|
lincat
|
||||||
|
[NP] =
|
||||||
|
|
||||||
|
lin
|
||||||
|
BaseNP x y = twoTable … x y ** y ;
|
||||||
|
ConsNP x xs = consrTable … comma as a ** as ;
|
||||||
|
ConjNP co as = conjunctDistrTable … co as ** as ;
|
||||||
|
-}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
113
src/hungarian/ConstructionHun.gf
Normal file
113
src/hungarian/ConstructionHun.gf
Normal file
@@ -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" ;
|
||||||
|
-}
|
||||||
|
|
||||||
|
} ;
|
||||||
8
src/hungarian/ExtendHun.gf
Normal file
8
src/hungarian/ExtendHun.gf
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
--# -path=.:../common:../abstract
|
||||||
|
|
||||||
|
concrete ExtendHun of Extend = CatHun
|
||||||
|
-- ** ExtendFunctor - []
|
||||||
|
-- with (Grammar=GrammarHun)
|
||||||
|
** open Prelude, ResHun, NounHun in {
|
||||||
|
|
||||||
|
} ;
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
--# -path=.:../abstract:../common:prelude
|
|
||||||
|
|
||||||
concrete GrammarHun of Grammar =
|
concrete GrammarHun of Grammar =
|
||||||
NounHun,
|
NounHun,
|
||||||
VerbHun,
|
VerbHun,
|
||||||
@@ -11,21 +9,12 @@ concrete GrammarHun of Grammar =
|
|||||||
RelativeHun,
|
RelativeHun,
|
||||||
ConjunctionHun,
|
ConjunctionHun,
|
||||||
PhraseHun,
|
PhraseHun,
|
||||||
TextX - [Pol,PPos,PNeg],
|
TextX,
|
||||||
StructuralHun,
|
StructuralHun,
|
||||||
IdiomHun,
|
IdiomHun,
|
||||||
TenseX - [Pol,PPos,PNeg]
|
TenseX
|
||||||
** open ResHun, Prelude in
|
** {
|
||||||
{
|
|
||||||
--{
|
|
||||||
--
|
|
||||||
--flags startcat = Phr ; unlexer = text ; lexer = text ;
|
|
||||||
--
|
|
||||||
--lin
|
|
||||||
-- PPos = {s = [] ; p = CPos} ;
|
|
||||||
-- PNeg = {s = [] ; p = CNeg True} ; -- contracted: don't
|
|
||||||
--
|
|
||||||
--
|
|
||||||
--} ;
|
|
||||||
|
|
||||||
}
|
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
|
||||||
|
} ;
|
||||||
|
|||||||
@@ -1,36 +1,47 @@
|
|||||||
concrete IdiomHun of Idiom = CatHun ** open Prelude, ResHun in
|
|
||||||
{
|
--1 Idiom: Idiomatic Expressions
|
||||||
--{
|
|
||||||
--
|
concrete IdiomHun of Idiom = CatHun ** open Prelude, ResHun, VerbHun, NounHun, StructuralHun in {
|
||||||
-- flags optimize=all_subs ;
|
|
||||||
--
|
-- This module defines constructions that are formed in fixed ways,
|
||||||
-- lin
|
-- often different even in closely related languages.
|
||||||
-- ImpersCl vp = mkClause "it" (agrP3 Sg) vp ;
|
|
||||||
-- GenericCl vp = mkClause "one" (agrP3 Sg) vp ;
|
{- lin
|
||||||
--
|
|
||||||
-- CleftNP np rs = mkClause "it" (agrP3 Sg)
|
|
||||||
-- (insertObj (\\_ => rs.s ! np.a)
|
-- ImpersCl : VP -> Cl ; -- it is hot
|
||||||
-- (insertObj (\\_ => np.s ! rs.c) (predAux auxBe))) ;
|
-- GenericCl : VP -> Cl ; -- one sleeps
|
||||||
--
|
ImpersCl,
|
||||||
-- CleftAdv ad s = mkClause "it" (agrP3 Sg)
|
GenericCl = \vp -> predVP impersNP (passVP vp) ;
|
||||||
-- (insertObj (\\_ => conjThat ++ s.s)
|
|
||||||
-- (insertObj (\\_ => ad.s) (predAux auxBe))) ;
|
CleftNP : NP -> RS -> Cl ; -- it is I who did it
|
||||||
--
|
CleftAdv : Adv -> S -> Cl ; -- it is here she slept
|
||||||
-- ExistNP np =
|
|
||||||
-- mkClause "there" (agrP3 (fromAgr np.a).n)
|
-- : NP -> Cl ; -- there is a house
|
||||||
-- (insertObj (\\_ => np.s ! NPAcc) (predAux auxBe)) ;
|
ExistNP np =
|
||||||
--
|
|
||||||
-- ExistIP ip =
|
ExistIP : IP -> QCl ; -- which houses are there
|
||||||
-- mkQuestion (ss (ip.s ! npNom))
|
|
||||||
-- (mkClause "there" (agrP3 ip.n) (predAux auxBe)) ;
|
-- 7/12/2012 generalizations of these
|
||||||
--
|
|
||||||
-- ProgrVP vp = insertObj (\\a => vp.ad ++ vp.prp ++ vp.s2 ! a) (predAux auxBe) ;
|
ExistNPAdv : NP -> Adv -> Cl ; -- there is a house in Paris
|
||||||
--
|
ExistIPAdv : IP -> Adv -> QCl ; -- which houses are there in Paris
|
||||||
-- ImpPl1 vp = {s = "let's" ++ infVP VVAux vp (AgP1 Pl)} ;
|
|
||||||
--
|
-- : VP -> VP ;
|
||||||
-- ImpP3 np vp = {s = "let" ++ np.s ! NPAcc ++ infVP VVAux vp np.a} ;
|
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)
|
||||||
|
-}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,4 @@
|
|||||||
--# -path=.:../abstract:../common:../prelude
|
|
||||||
|
|
||||||
concrete LangHun of Lang =
|
concrete LangHun of Lang =
|
||||||
GrammarHun,
|
GrammarHun,
|
||||||
LexiconHun
|
LexiconHun,
|
||||||
**
|
ConstructionHun ;
|
||||||
{
|
|
||||||
--{
|
|
||||||
--
|
|
||||||
--flags startcat = Phr ; unlexer = text ; lexer = text ;
|
|
||||||
--
|
|
||||||
--} ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,383 +1,418 @@
|
|||||||
--# -path=.:prelude
|
|
||||||
|
|
||||||
concrete LexiconHun of Lexicon = CatHun **
|
concrete LexiconHun of Lexicon = CatHun **
|
||||||
open ParadigmsHun, Prelude in
|
open ParadigmsHun 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 "" ;
|
||||||
|
-- lin apartment_N = mkN "" ;
|
||||||
|
lin apple_N = mkN "alma" ;
|
||||||
|
-- lin art_N = mkN "" ;
|
||||||
|
-- lin ashes_N = mkN "" ;
|
||||||
|
-- lin ask_V2Q = mkV2 "" ;
|
||||||
|
|
||||||
|
----
|
||||||
|
-- B
|
||||||
|
|
||||||
|
-- lin baby_N = mkN "" ;
|
||||||
|
-- lin back_N = mkN "" ;
|
||||||
|
-- lin bad_A = mkA "" ;
|
||||||
|
-- lin bank_N = mkN "" ;
|
||||||
|
-- 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 "" ;
|
||||||
|
-- lin big_A = mkA "" ;
|
||||||
|
-- lin bike_N = mkN "" ;
|
||||||
|
-- lin bird_N = mkN "" ;
|
||||||
|
-- lin bite_V2 = mkV2 "" ;
|
||||||
|
-- lin black_A = mkA "" ;
|
||||||
|
-- lin blood_N = mkN "" ;
|
||||||
|
-- lin blow_V = mkV "" ;
|
||||||
|
-- lin blue_A = mkA "" ;
|
||||||
|
-- lin boat_N = mkN "" ;
|
||||||
|
-- lin bone_N = mkN "" ;
|
||||||
|
-- lin boot_N = mkN "" ;
|
||||||
|
-- lin boss_N = mkN "" ;
|
||||||
|
-- lin book_N = mkN "" ;
|
||||||
|
-- lin boy_N = mkN "" ;
|
||||||
|
-- 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 "" ;
|
||||||
|
-- lin ceiling_N = mkN "" ;
|
||||||
|
-- lin chair_N = mkN "" ;
|
||||||
|
-- lin cheese_N = mkN "" ;
|
||||||
|
-- lin child_N = mkN "" ;
|
||||||
|
-- lin church_N = mkN "" ;
|
||||||
|
-- lin city_N = mkN "" ;
|
||||||
|
-- lin clean_A = mkA "" ;
|
||||||
|
-- lin clever_A = mkA "" ;
|
||||||
|
-- lin close_V2 = mkV2 "" ;
|
||||||
|
-- lin cloud_N = mkN "" ;
|
||||||
|
-- lin coat_N = mkN "" ;
|
||||||
|
-- lin cold_A = mkA "" ;
|
||||||
|
-- lin come_V = mkV "" ;
|
||||||
|
-- lin computer_N = mkN "" ;
|
||||||
|
-- lin correct_A = mkA "" ;
|
||||||
|
-- lin count_V2 = mkV2 "" ;
|
||||||
|
-- lin country_N = mkN "" ;
|
||||||
|
-- lin cousin_N = mkN "" ;
|
||||||
|
-- lin cow_N = mkN "" ;
|
||||||
|
-- lin cut_V2 = mkV2 "" ;
|
||||||
--
|
--
|
||||||
lin
|
-- ----
|
||||||
-- airplane_N = regN "airplane" ;
|
-- -- D
|
||||||
-- 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" ;
|
|
||||||
--
|
--
|
||||||
-- do_V2 = dirV2 (mk5V "do" "does" "did" "done" "doing") ;
|
-- lin day_N = mkN "" ;
|
||||||
-- now_Adv = mkAdv "now" ;
|
-- lin die_V = mkV "" ;
|
||||||
-- already_Adv = mkAdv "already" ;
|
-- lin dig_V = mkV "" ;
|
||||||
-- song_N = regN "song" ;
|
-- lin dirty_A = mkA "" ;
|
||||||
-- add_V3 = dirV3 (regV "add") toP ;
|
-- lin distance_N3 = mkN "" ;
|
||||||
-- number_N = regN "number" ;
|
-- lin do_V2 = mkV2 do_V ;
|
||||||
-- put_V2 = prepV2 (irregDuplV "put" "put" "put") noPrep ;
|
-- lin doctor_N = mkN "" ;
|
||||||
-- stop_V = regDuplV "stop" ;
|
-- lin dog_N = mkN "" ;
|
||||||
-- jump_V = regV "jump" ;
|
-- lin door_N = mkN "" ;
|
||||||
|
-- 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 "" ;
|
||||||
|
|
||||||
|
----
|
||||||
|
-- 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 "" ;
|
||||||
|
-- lin float_V = mkV "" ;
|
||||||
|
-- lin floor_N = mkN "" ;
|
||||||
|
-- lin flow_V = mkV "" ;
|
||||||
|
-- lin flower_N = mkN "" ;
|
||||||
|
-- lin fly_V = mkV "" ;
|
||||||
|
-- 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 "" ;
|
||||||
|
-- lin full_A = mkA "" ;
|
||||||
|
-- --lin fun_AV
|
||||||
|
|
||||||
|
----
|
||||||
|
-- G
|
||||||
|
|
||||||
|
-- lin garden_N = mkN "" ;
|
||||||
|
-- lin girl_N = mkN "" ;
|
||||||
|
-- lin give_V3 = mkV3 "" ;
|
||||||
|
-- lin glove_N = mkN "" ;
|
||||||
|
-- lin go_V = mkV "" ;
|
||||||
|
-- lin gold_N = mkN "" ;
|
||||||
|
-- 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 "" ;
|
||||||
|
-- lin harbour_N = mkN "" ;
|
||||||
|
-- lin hat_N = mkN "" ;
|
||||||
|
-- lin hate_V2 = mkV2 "" ;
|
||||||
|
-- lin head_N = mkN "" ;
|
||||||
|
-- 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 "" ;
|
||||||
|
-- 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" ;
|
||||||
|
-- lin married_A2 = mkA "" ;
|
||||||
|
-- lin meat_N = mkN "" ;
|
||||||
|
-- lin milk_N = mkN "" ;
|
||||||
|
-- lin moon_N = mkN "" ;
|
||||||
|
-- lin mother_N2 = mkN2 "" ;
|
||||||
|
-- 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" ;
|
-- -- O - P
|
||||||
-- 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" ;
|
|
||||||
--
|
--
|
||||||
-- 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 "" ;
|
||||||
|
-- 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 "" ;
|
||||||
|
-- lin pen_N = mkN "" ;
|
||||||
|
-- lin person_N = mkN "" ;
|
||||||
|
-- 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" ;
|
-- -- Q - R
|
||||||
-- rule_N = regN "rule" ;
|
|
||||||
--
|
--
|
||||||
---- added 4/6/2007
|
-- lin queen_N = mkN "" ;
|
||||||
-- john_PN = mkPN (mkN masculine (mkN "John")) ;
|
-- lin question_N = mkN "" ;
|
||||||
-- question_N = regN "question" ;
|
-- lin radio_N = mkN "" ;
|
||||||
-- ready_A = regA "ready" ;
|
-- lin rain_N = mkN "" ;
|
||||||
-- reason_N = regN "reason" ;
|
-- lin rain_V0 = mkV "" ;
|
||||||
-- today_Adv = mkAdv "today" ;
|
-- lin read_V2 = mkV2 "" ;
|
||||||
-- uncertain_A = regA "uncertain" ;
|
-- lin ready_A = mkA "" ;
|
||||||
--
|
-- lin reason_N = mkN "" ;
|
||||||
--oper
|
lin red_A = mkA "piros" ;
|
||||||
-- aboutP = mkPrep "about" ;
|
-- lin religion_N = mkN "" ;
|
||||||
-- atP = mkPrep "at" ;
|
-- lin restaurant_N = mkN "" ;
|
||||||
-- forP = mkPrep "for" ;
|
-- lin river_N = mkN "" ;
|
||||||
-- fromP = mkPrep "from" ;
|
-- lin road_N = mkN "" ;
|
||||||
-- inP = mkPrep "in" ;
|
-- lin rock_N = mkN "" ;
|
||||||
-- onP = mkPrep "on" ;
|
-- lin roof_N = mkN "" ;
|
||||||
-- toP = mkPrep "to" ;
|
-- 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 "" ;
|
||||||
|
-- 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 "" ;
|
||||||
|
-- lin shoe_N = mkN "" ;
|
||||||
|
-- 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 "" ;
|
||||||
|
-- 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 "" ;
|
||||||
|
-- lin tail_N = mkN "" ;
|
||||||
|
-- lin talk_V3 = mkV3 "" ;
|
||||||
|
-- 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 "" ;
|
||||||
|
-- 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 = mkNoun "" ;
|
||||||
|
-- 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 "" ;
|
||||||
|
-- lin wine_N = mkN "" ;
|
||||||
|
-- lin wing_N = mkN "" ;
|
||||||
|
-- lin wipe_V2 = mkV2 "" ;
|
||||||
|
lin woman_N = mkN "nő" ;
|
||||||
|
-- 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 "" ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,144 +1,208 @@
|
|||||||
concrete NounHun of Noun = CatHun ** open MorphoHun, ResHun, Prelude in
|
concrete NounHun of Noun = CatHun ** open ResHun, Prelude in {
|
||||||
{
|
|
||||||
--{
|
flags optimize=all_subs ;
|
||||||
--
|
|
||||||
-- flags optimize=all_subs ;
|
lin
|
||||||
--
|
|
||||||
-- lin
|
--2 Noun phrases
|
||||||
-- DetCN det cn = {
|
|
||||||
-- s = \\c => det.s ++ cn.s ! det.n ! npcase2case c ;
|
-- : Det -> CN -> NP
|
||||||
-- a = agrgP3 det.n cn.g
|
DetCN det cn = emptyNP ** {
|
||||||
-- } ;
|
s = \\c => det.s ! c ++ cn.s ! det.n ! c ;
|
||||||
--
|
agr = <P3,det.n> ;
|
||||||
-- UsePN pn = {s = \\c => pn.s ! npcase2case c ; a = agrgP3 Sg pn.g} ;
|
} ;
|
||||||
-- UsePron p = p ;
|
|
||||||
--
|
{-
|
||||||
-- PredetNP pred np = {
|
-- : PN -> NP ;
|
||||||
-- s = \\c => pred.s ++ np.s ! c ;
|
UsePN pn = pn ** {} ;
|
||||||
-- a = np.a
|
|
||||||
-- } ;
|
-- : Pron -> NP ;
|
||||||
--
|
UsePron pron = pron ;
|
||||||
-- PPartNP np v2 = {
|
|
||||||
-- s = \\c => np.s ! c ++ v2.s ! VPPart ;
|
-- : Predet -> NP -> NP ; -- only the man
|
||||||
-- a = np.a
|
PredetNP predet np = np ** {s = } ;
|
||||||
-- } ;
|
|
||||||
--
|
-- A noun phrase can also be postmodified by the past participle of a
|
||||||
-- RelNP np rs = {
|
-- verb, by an adverb, or by a relative clause
|
||||||
-- s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ;
|
|
||||||
-- a = np.a
|
|
||||||
-- } ;
|
-- : NP -> V2 -> NP ; -- the man seen
|
||||||
--
|
PPartNP np v2 = np ** {
|
||||||
-- AdvNP np adv = {
|
s = \\c => v2.s ! ??? ++ np.s ! c } ; ----
|
||||||
-- s = \\c => np.s ! c ++ adv.s ;
|
|
||||||
-- a = np.a
|
-- : NP -> Adv -> NP ; -- Paris today ; boys, such as ..
|
||||||
-- } ;
|
AdvNP,ExtAdvNP = \np,adv -> np ** {} ;
|
||||||
--
|
|
||||||
-- DetQuant quant num = {
|
-- : NP -> RS -> NP ; -- Paris, which is here
|
||||||
-- s = quant.s ! num.hasCard ! num.n ++ num.s ! Nom;
|
RelNP np rs = np ** {} ;
|
||||||
-- sp = \\c => case num.hasCard of {
|
|
||||||
-- False => quant.sp ! num.hasCard ! num.n ! c ++ num.s ! Nom ;
|
-- Determiners can form noun phrases directly.
|
||||||
-- True => quant.sp ! num.hasCard ! num.n ! npNom ++ num.s ! npcase2case c
|
|
||||||
-- } ;
|
-- : Det -> NP ;
|
||||||
-- n = num.n ;
|
DetNP det = emptyNP ** {
|
||||||
-- hasNum = num.hasCard
|
s = det.sp ;
|
||||||
-- } ;
|
agr = <P3,det.n> ;
|
||||||
--
|
} ;
|
||||||
-- DetQuantOrd quant num ord = {
|
|
||||||
-- s = quant.s ! num.hasCard ! num.n ++ num.s ! Nom ++ ord.s ! Nom;
|
-- : CN -> NP ;
|
||||||
-- sp = \\c => quant.sp ! num.hasCard ! num.n ! npNom ++ num.s ! Nom ++ ord.s ! npcase2case c ;
|
MassNP cn = emptyNP ** {
|
||||||
-- n = num.n ;
|
s = \\c => cn.s ! Sg ! c ;
|
||||||
-- hasNum = True
|
agr = <P3,Sg> ;
|
||||||
-- } ;
|
} ;
|
||||||
--
|
-}
|
||||||
-- DetNP det = {
|
|
||||||
-- s = case det.hasNum of {True => \\_ => det.s ; _ => \\c => det.sp ! c} ;
|
--2 Determiners
|
||||||
-- a = agrP3 det.n
|
|
||||||
-- } ;
|
-- The determiner has a fine-grained structure, in which a 'nucleus'
|
||||||
--
|
-- quantifier and an optional numeral can be discerned.
|
||||||
-- PossPron p = {
|
|
||||||
-- s = \\_,_ => p.s ! NCase Gen ;
|
-- : Quant -> Num -> Det ;
|
||||||
-- sp = \\_,_,c => p.sp ! npcase2case c
|
DetQuant quant num = quant ** num ** {
|
||||||
-- } ;
|
s = \\c => quant.s ! num.n ! c
|
||||||
--
|
++ num.s ! Attrib ; -- TODO: add inflection table in numbers
|
||||||
-- NumSg = {s = \\c => []; n = Sg ; hasCard = False} ;
|
sp = \\c => quant.sp ! num.n ! c
|
||||||
-- NumPl = {s = \\c => []; n = Pl ; hasCard = False} ;
|
++ num.s ! Indep
|
||||||
-----b NoOrd = {s = []} ;
|
} ;
|
||||||
--
|
|
||||||
-- NumCard n = n ** {hasCard = True} ;
|
-- : Quant -> Num -> Ord -> Det ; -- these five best
|
||||||
--
|
-- DetQuantOrd quant num ord =
|
||||||
-- NumDigits n = {s = n.s ! NCard ; n = n.n} ;
|
-- let theseFive = DetQuant quant num in theseFive ** {
|
||||||
-- OrdDigits n = {s = n.s ! NOrd} ;
|
-- } ;
|
||||||
--
|
|
||||||
-- NumNumeral numeral = {s = numeral.s ! NCard; n = numeral.n} ;
|
-- Whether the resulting determiner is singular or plural depends on the
|
||||||
-- OrdNumeral numeral = {s = numeral.s ! NOrd} ;
|
-- cardinal.
|
||||||
--
|
|
||||||
-- AdNum adn num = {s = \\c => adn.s ++ num.s!c ; n = num.n} ;
|
-- All parts of the determiner can be empty, except $Quant$, which is
|
||||||
--
|
-- the "kernel" of a determiner. It is, however, the $Num$ that determines
|
||||||
-- OrdSuperl a = {s = \\c => a.s ! AAdj Superl c } ;
|
-- the inherent number.
|
||||||
--
|
|
||||||
-- DefArt = {
|
NumSg = baseNum ;
|
||||||
-- s = \\hasCard,n => artDef ;
|
NumPl = baseNum ** {n = Pl} ;
|
||||||
-- sp = \\hasCard,n => case <n,hasCard> of {
|
|
||||||
-- <Sg,False> => table { NCase Gen => "its"; _ => "it" } ;
|
-- : Card -> Num ;
|
||||||
-- <Pl,False> => table { NCase Nom => "they"; NPAcc => "them"; NCase Gen => "theirs" } ;
|
NumCard card = card ;
|
||||||
-- _ => \\c => artDef
|
|
||||||
-- }
|
-- : Digits -> Card ;
|
||||||
-- } ;
|
-- NumDigits dig =
|
||||||
--
|
|
||||||
-- IndefArt = {
|
-- : Numeral -> Card ;
|
||||||
-- s = \\hasCard,n => case <n,hasCard> of {
|
NumNumeral num = num ;
|
||||||
-- <Sg,False> => artIndef ;
|
|
||||||
-- _ => []
|
{-
|
||||||
-- } ;
|
-- : AdN -> Card -> Card ;
|
||||||
-- sp = \\hasCard,n => case <n,hasCard> of {
|
AdNum adn card = card ** { s = adn.s ++ card.s } ;
|
||||||
-- <Sg,False> => table {NCase Gen => "one's"; _ => "one" };
|
|
||||||
-- <Pl,False> => table {NCase Gen => "ones'"; _ => "ones" } ;
|
-- : Digits -> Ord ;
|
||||||
-- _ => \\c => []
|
OrdDigits digs = digs ** { s = digs.s ! NOrd } ;
|
||||||
-- }
|
|
||||||
-- } ;
|
-- : Numeral -> Ord ;
|
||||||
--
|
OrdNumeral num = num ** {
|
||||||
-- MassNP cn = {
|
s = \\_ => num.ord
|
||||||
-- s = \\c => cn.s ! Sg ! npcase2case c ;
|
} ;
|
||||||
-- a = agrP3 Sg
|
|
||||||
-- } ;
|
-- : A -> Ord ;
|
||||||
--
|
OrdSuperl a = {
|
||||||
-- UseN n = n ;
|
s = \\af => "제일" ++ a.s ! af ;
|
||||||
-- UseN2 n = n ;
|
n = Sg -- ?? is this meaningful?
|
||||||
-----b UseN3 n = n ;
|
} ;
|
||||||
--
|
|
||||||
-- Use2N3 f = {
|
-- One can combine a numeral and a superlative.
|
||||||
-- s = \\n,c => f.s ! n ! Nom ;
|
|
||||||
-- g = f.g ;
|
-- : Numeral -> A -> Ord ; -- third largest
|
||||||
-- c2 = f.c2
|
OrdNumeralSuperl num a = num ** { } ;
|
||||||
-- } ;
|
-}
|
||||||
--
|
-- : Quant
|
||||||
-- Use3N3 f = {
|
DefArt = {
|
||||||
-- s = \\n,c => f.s ! n ! Nom ;
|
s,
|
||||||
-- g = f.g ;
|
sp = \\_,_ => pre {"a" ; "az" / v } ;
|
||||||
-- c2 = f.c3
|
} ;
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- ComplN2 f x = {s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! NPAcc ; g = f.g} ;
|
-- : Quant
|
||||||
-- ComplN3 f x = {
|
IndefArt = {
|
||||||
-- s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! NPAcc ;
|
s,
|
||||||
-- g = f.g ;
|
sp = \\_,_ => "egy" ;
|
||||||
-- c2 = f.c3
|
} ;
|
||||||
-- } ;
|
|
||||||
--
|
-- : Pron -> Quant
|
||||||
-- AdjCN ap cn = {
|
-- PossPron pron =
|
||||||
-- s = \\n,c => preOrPost ap.isPre (ap.s ! agrgP3 n cn.g) (cn.s ! n ! c) ;
|
-- let p = pron.poss ;
|
||||||
-- g = cn.g
|
-- in DefArt ** {
|
||||||
-- } ;
|
-- } ;
|
||||||
-- RelCN cn rs = {
|
|
||||||
-- s = \\n,c => cn.s ! n ! c ++ rs.s ! agrgP3 n cn.g ;
|
--2 Common nouns
|
||||||
-- g = cn.g
|
|
||||||
-- } ;
|
-- : N -> CN
|
||||||
-- AdvCN cn ad = {s = \\n,c => cn.s ! n ! c ++ ad.s ; g = cn.g} ;
|
-- : N2 -> CN ;
|
||||||
--
|
UseN,UseN2 = \n -> n ;
|
||||||
-- SentCN cn sc = {s = \\n,c => cn.s ! n ! c ++ sc.s ; g = cn.g} ;
|
|
||||||
--
|
-- : N2 -> NP -> CN ;
|
||||||
-- ApposCN cn np = {s = \\n,c => cn.s ! n ! Nom ++ np.s ! NCase c ; g = cn.g} ;
|
-- 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
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- : CN -> RS -> CN ;
|
||||||
|
-- RelCN cn rs = cn ** {
|
||||||
|
-- } ;
|
||||||
|
|
||||||
|
{-
|
||||||
|
-- : CN -> Adv -> CN ;
|
||||||
|
AdvCN cn adv = cn ** { } ;
|
||||||
|
|
||||||
|
-- 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 = } ;
|
||||||
|
-}
|
||||||
|
|
||||||
|
--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 ;
|
||||||
|
-}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,99 +1,91 @@
|
|||||||
concrete NumeralHun of Numeral = CatHun [Numeral,Digits] ** open ResHun in
|
concrete NumeralHun of Numeral = CatHun [Numeral,Digits] **
|
||||||
{
|
open Prelude, 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 <f,o> of {
|
|
||||||
-- <teen,NOrd> => 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
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
--}
|
|
||||||
|
|
||||||
}
|
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=Pl} ;
|
||||||
|
-- : Sub100 ; -- 11
|
||||||
|
pot111 = {s = table {p => "tizenegy"} ; n=Pl} ;
|
||||||
|
-- : Digit -> Sub100 ; -- 10 + d
|
||||||
|
pot1to19 d =
|
||||||
|
{s = table {p => "tizen" ++ d.s ! <Unit,p>} ;
|
||||||
|
n = Pl} ;
|
||||||
|
-- : Sub10 -> Sub100 ; -- coercion of 1..9
|
||||||
|
pot0as1 n =
|
||||||
|
{s = table {p => n.s ! <Unit,p>} ;
|
||||||
|
n = Pl} ;
|
||||||
|
|
||||||
|
-- : Digit -> Sub100 ; -- d * 10
|
||||||
|
pot1 d =
|
||||||
|
{s = table {p => d.s ! <Ten,p>} ;
|
||||||
|
n = Pl} ;
|
||||||
|
-- : Digit -> Sub10 -> Sub100 ; -- d * 10 + n
|
||||||
|
pot1plus d e =
|
||||||
|
{s = table {p => (d.s ! <Ten,Attrib>) ++ e.s ! <Unit,p>} ;
|
||||||
|
n = Pl} ;
|
||||||
|
|
||||||
|
-- : Sub100 -> Sub1000 ; -- coercion of 1..99
|
||||||
|
pot1as2 n = n ;
|
||||||
|
-- : Sub10 -> Sub1000 ; -- m * 100
|
||||||
|
pot2 d =
|
||||||
|
{s = table {p => (d.s ! <Unit,Attrib>) ++ "száz"} ;
|
||||||
|
n = Pl} ;
|
||||||
|
-- : Sub10 -> Sub100 -> Sub1000 ; -- m * 100 + n
|
||||||
|
pot2plus d e =
|
||||||
|
{s = table {p => (d.s ! <Unit,Attrib>) ++ "száz" ++ e.s ! p} ;
|
||||||
|
n = Pl} ;
|
||||||
|
|
||||||
|
-- : Sub1000 -> Sub1000000 ; -- coercion of 1..999
|
||||||
|
pot2as3 n = n ;
|
||||||
|
-- : Sub1000 -> Sub1000000 ; -- m * 1000
|
||||||
|
pot3 n =
|
||||||
|
{s = table {p => n.s ! Attrib ++ "ezer"} ;
|
||||||
|
n = Pl} ;
|
||||||
|
-- : Sub1000 -> Sub1000 -> Sub1000000 ; -- m * 1000 + n
|
||||||
|
pot3plus n m =
|
||||||
|
{s = table {p => n.s ! Attrib ++ "ezer" ++ m.s ! p} ;
|
||||||
|
n = Pl} ;
|
||||||
|
|
||||||
|
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 {<Unit,Indep> => ui ;
|
||||||
|
<Ten,Indep> => ti ;
|
||||||
|
<Unit,Attrib> => ua ;
|
||||||
|
<Ten, Attrib> => ta } ;
|
||||||
|
-- ord = ord ; -- TODO figure out where to use ordinal
|
||||||
|
n = Pl
|
||||||
|
} ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,733 +1,141 @@
|
|||||||
--# -path=.:../abstract:../../prelude:../common
|
resource ParadigmsHun = open CatHun, ResHun, ParamHun, NounHun, Prelude in {
|
||||||
|
|
||||||
--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.
|
|
||||||
--
|
|
||||||
|
|
||||||
oper
|
oper
|
||||||
mkN = overload {
|
|
||||||
|
|
||||||
mkN : Str -> Noun =
|
--2 Parameters
|
||||||
\s -> lin N (regNoun s) ;
|
--
|
||||||
|
-- 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$.
|
||||||
|
|
||||||
|
|
||||||
|
--2 Nouns
|
||||||
|
|
||||||
|
mkN : overload {
|
||||||
|
mkN : (noun : Str) -> N ; -- Predictable nouns
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--
|
--2 Adjectives
|
||||||
---- The regular function captures the variants for nouns ending with
|
|
||||||
---- "s","sh","x","z" or "y": "kiss - kisses", "flash - flashes";
|
mkA : overload {
|
||||||
---- "fly - flies" (but "toy - toys"),
|
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.
|
||||||
-- mkN : (flash : Str) -> N ; -- plural s, incl. flash-flashes, fly-flies
|
} ;
|
||||||
--
|
|
||||||
---- In practice the worst case is to give singular and plural nominative.
|
-- mkA2 : Str -> Prep -> A2 ;
|
||||||
--
|
|
||||||
-- mkN : (man,men : Str) -> N ; -- irregular plural
|
--2 Verbs
|
||||||
--
|
|
||||||
---- The theoretical worst case: give all four forms.
|
-- Verbs
|
||||||
--
|
mkV : overload {
|
||||||
-- mkN : (man,men,man's,men's : Str) -> N ; -- irregular genitives
|
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. 노래+하다
|
||||||
---- Change gender from the default $nonhuman$.
|
} ;
|
||||||
--
|
|
||||||
-- mkN : Gender -> N -> N ; -- default nonhuman
|
copula : V ; -- The copula verb ''
|
||||||
--
|
|
||||||
----3 Compound nouns
|
mkV2 : overload {
|
||||||
----
|
mkV2 : (sg3 : Str) -> V2 ; -- Predictable verb. Takes singular P3 form in present tense, object case is accusative.
|
||||||
---- A compound noun is an uninflected string attached to an inflected noun,
|
mkV2 : V -> V2 ; -- Takes preconstructed V, object case is accusative.
|
||||||
---- such as "baby boom", "chief executive officer".
|
} ;
|
||||||
--
|
|
||||||
-- mkN : Str -> N -> N -- e.g. baby + boom
|
-- mkV3 : overload {
|
||||||
-- } ;
|
-- } ;
|
||||||
--
|
|
||||||
--
|
-- mkVV : overload {
|
||||||
----3 Relational nouns
|
-- } ;
|
||||||
--
|
|
||||||
-- mkN2 : overload {
|
--
|
||||||
-- mkN2 : Str -> N2 ; -- reg. noun, prep. "of" --%
|
-- mkVA : Str -> VA
|
||||||
-- mkN2 : N -> N2 ; -- e.g. wife of (default prep. to)
|
-- = \s -> lin VA (regV s) ;
|
||||||
-- mkN2 : N -> Str -> N2 ; -- access to --%
|
-- mkVQ : Str -> VQ
|
||||||
-- mkN2 : N -> Prep -> N2 ; -- e.g. access to
|
-- = \s -> lin VQ (regV s) ;
|
||||||
-- mkN2 : Str -> Str -> N2 ; -- access to (regular noun) --%
|
-- mkVS : Str -> VS
|
||||||
-- } ;
|
-- = \s -> lin VS (regV s) ;
|
||||||
--
|
--
|
||||||
---- Use the function $mkPrep$ or see the section on prepositions below to
|
-- mkV2A : Str -> V2A
|
||||||
---- form other prepositions.
|
-- = \s -> lin V2A (regV s ** {c2 = noPrep}) ;
|
||||||
----
|
-- mkV2V : Str -> V2V
|
||||||
---- Three-place relational nouns ("the connection from x to y") need two prepositions.
|
-- = \s -> lin V2V (regV s ** {c2 = noPrep}) ;
|
||||||
--
|
-- mkV2Q : Str -> V2Q
|
||||||
-- mkN3 : N -> Prep -> Prep -> N3 ; -- e.g. connection from x to y
|
-- = \s -> lin V2Q (regV s ** {c2 = noPrep}) ;
|
||||||
--
|
|
||||||
--
|
-----
|
||||||
--
|
|
||||||
----3 Proper names and noun phrases
|
--2 Structural categories
|
||||||
----
|
|
||||||
---- Proper names, with a regular genitive, are formed from strings.
|
mkPrep : overload {
|
||||||
--
|
mkPrep : Str -> Prep ; -- Postposition, takes nominative
|
||||||
-- mkPN : overload {
|
mkPrep : Str -> Case -> Prep ; -- Postposition and case
|
||||||
--
|
} ;
|
||||||
-- mkPN : Str -> PN ;
|
|
||||||
--
|
-- mkConj : (_,_ : Str) -> Number -> Conj = \s1,s2,num ->
|
||||||
---- Sometimes a common noun can be reused as a proper name, e.g. "Bank"
|
-- lin Conj { s = s1 ; s2 = s2 } ;
|
||||||
--
|
|
||||||
-- mkPN : N -> PN --%
|
-- mkSubj : Str -> Bool -> Subj = \s,b ->
|
||||||
-- } ;
|
-- lin Subj { } ;
|
||||||
--
|
|
||||||
----3 Determiners and quantifiers
|
mkAdv : Str -> Adv
|
||||||
--
|
= \s -> lin Adv {s = s} ;
|
||||||
-- mkQuant : overload {
|
|
||||||
-- mkQuant : (this, these : Str) -> Quant ; --%
|
mkAdV : Str -> AdV
|
||||||
-- mkQuant : (no_sg, no_pl, none_sg, non_pl : Str) -> Quant ; --%
|
= \s -> lin AdV {s = s} ;
|
||||||
-- } ;
|
|
||||||
--
|
mkAdA : Str -> AdA
|
||||||
-- mkOrd : Str -> Ord ; --%
|
= \s -> lin AdA {s = s} ;
|
||||||
--
|
|
||||||
----2 Adjectives
|
|
||||||
--
|
--.
|
||||||
-- mkA : overload {
|
-------------------------------------------------------------------------------
|
||||||
--
|
-- The definitions should not bother the user of the API. So they are
|
||||||
---- For regular adjectives, the adverbial and comparison forms are derived. This holds
|
-- hidden from the document.
|
||||||
---- even for cases with the variations "happy - happily - happier - happiest",
|
|
||||||
---- "free - freely - freer - freest", and "rude - rudest".
|
mkN = overload {
|
||||||
--
|
mkN : Str -> N = \s -> lin N (mkNoun s) ;
|
||||||
-- 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
|
mkN2 = overload {
|
||||||
--
|
mkN2 : Str -> N2 = \s -> lin N2 (mkNoun s) ;
|
||||||
-- mkA : (fat,fatter : Str) -> A ; -- irreg. comparative
|
mkN2 : N -> N2 = \n -> lin N2 n ;
|
||||||
--
|
} ;
|
||||||
---- As many as four forms may be needed.
|
|
||||||
--
|
-- mkPN = overload {
|
||||||
-- mkA : (good,better,best,well : Str) -> A -- completely irreg.
|
-- } ;
|
||||||
-- } ;
|
|
||||||
--
|
mkA = overload {
|
||||||
---- Regular comparison is formed by "more - most" for words with two vowels separated
|
mkA : (adj : Str) -> A = \s -> lin A (mkAdj s) ;
|
||||||
---- and terminated by some other letters. To force this or the opposite,
|
-- mkA : (kiga : Str) -> (jakda : A) -> A = \kiga,jakda ->
|
||||||
---- the following can be used:
|
-- jakda ** {s = \\af => kiga ++ jakda.s ! af} ;
|
||||||
--
|
} ;
|
||||||
-- compoundA : A -> A ; -- force comparison with more/most
|
|
||||||
-- simpleA : A -> A ; -- force comparison with -er,-est
|
mkV = overload {
|
||||||
-- irregAdv : A -> Str -> A ; -- adverb irreg, e.g. "fast"
|
mkV : (sg3 : Str) -> V = \v -> lin V (mkVerb v) ;
|
||||||
--
|
-- mkV : (nore : Str) -> (hada : V) -> V = \nore,hada -> hada ** {
|
||||||
----3 Two-place adjectives
|
-- s = \\vf => nore + hada.s ! vf} ;
|
||||||
--
|
} ;
|
||||||
-- mkA2 : overload {
|
|
||||||
-- mkA2 : A -> Prep -> A2 ; -- absent from
|
copula = ResHun.copula ;
|
||||||
-- mkA2 : A -> Str -> A2 ; -- absent from --%
|
|
||||||
-- mkA2 : Str -> Prep -> A2 ; -- absent from --%
|
mkV2 = overload {
|
||||||
-- mkA2 : Str -> Str -> A2 -- absent from --%
|
mkV2 : (plain : Str) -> V2 = \v2 -> lin V2 (mkVerb2 v2) ;
|
||||||
--
|
mkV2 : V -> V2 = vtov2 ;
|
||||||
-- } ;
|
} ;
|
||||||
--
|
|
||||||
--
|
mkV3 = overload {
|
||||||
----2 Adverbs
|
mkV3 : (plain : Str) -> V3 = \v3 -> lin V3 (mkVerb3 v3) ;
|
||||||
--
|
} ;
|
||||||
---- Adverbs are not inflected. Most lexical ones have position
|
--
|
||||||
---- after the verb. Some can be preverbal (e.g. "always").
|
-- mkVV = overload {
|
||||||
--
|
-- } ;
|
||||||
-- mkAdv : Str -> Adv ; -- e.g. today
|
|
||||||
-- mkAdV : Str -> AdV ; -- e.g. always
|
mkPrep = overload {
|
||||||
--
|
mkPrep : (e : Str) -> Prep
|
||||||
---- Adverbs modifying adjectives and sentences can also be formed.
|
= \str -> lin Prep (ResHun.mkPrep str) ;
|
||||||
--
|
mkPrep : Str -> Case -> Prep
|
||||||
-- mkAdA : Str -> AdA ; -- e.g. quite
|
= \str,c -> lin Prep (ResHun.mkPrep str ** {c = c}) ;
|
||||||
--
|
} ;
|
||||||
---- 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 ;
|
|
||||||
--
|
|
||||||
--
|
|
||||||
--
|
|
||||||
--} ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
82
src/hungarian/ParamHun.gf
Normal file
82
src/hungarian/ParamHun.gf
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
resource ParamHun = ParamX ** open Prelude in {
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Phonology
|
||||||
|
|
||||||
|
oper
|
||||||
|
v : pattern Str = #("a" | "e" | "i" | "o" | "u" | "ö" | "ü" |
|
||||||
|
"á" | "é" | "í" | "ó" | "ú" | "ő" | "ű") ;
|
||||||
|
|
||||||
|
-- not used yet
|
||||||
|
vowFinal : Str -> Bool = \str ->
|
||||||
|
case str of {_ + #v => True ; _ => False} ;
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Morphophonology
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Nouns
|
||||||
|
|
||||||
|
param
|
||||||
|
Case = Nom | Acc | Dat | Ins | Ess | Tra | Cau
|
||||||
|
| Ill | Sub | All | Ine | Sup | Ade | Ela
|
||||||
|
| Del | Abl | Ter | For | Tem
|
||||||
|
;
|
||||||
|
|
||||||
|
Harm = H_a | H_e | H_o ;
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- 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
|
||||||
|
|
||||||
|
-- TODO: object agreement
|
||||||
|
VForm =
|
||||||
|
VInf
|
||||||
|
| VFin Person Number ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
|
||||||
|
agr2vf : Person*Number -> VForm = \pn ->
|
||||||
|
case <pn.p1,pn.p2> of {
|
||||||
|
<p,n> => VFin p n
|
||||||
|
} ;
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Clauses
|
||||||
|
|
||||||
|
-- param
|
||||||
|
|
||||||
|
-- ClType =
|
||||||
|
-- Statement
|
||||||
|
-- | PolarQuestion
|
||||||
|
-- | WhQuestion
|
||||||
|
-- | Subord ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,32 +1,29 @@
|
|||||||
concrete PhraseHun of Phrase = CatHun ** open Prelude, ResHun in
|
concrete PhraseHun of Phrase = CatHun ** open Prelude, ResHun in {
|
||||||
{
|
|
||||||
--{
|
lin
|
||||||
--
|
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||||
-- lin
|
|
||||||
-- PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
UttS s = s ;
|
||||||
--
|
UttQS qs = qs ;
|
||||||
-- UttS s = s ;
|
UttIAdv iadv = iadv ;
|
||||||
-- UttQS qs = {s = qs.s ! QDir} ;
|
{-
|
||||||
-- UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Sg False} ;
|
UttImpSg pol imp =
|
||||||
-- UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Pl False} ;
|
UttImpPl pol imp =
|
||||||
-- UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Sg True} ;
|
UttImpPol = UttImpSg ;
|
||||||
--
|
|
||||||
-- UttIP ip = {s = ip.s ! npNom} ; --- Acc also
|
UttIP ip = {s = ip.s ! } ;
|
||||||
-- UttIAdv iadv = iadv ;
|
UttNP np = {s = np.s ! } ;
|
||||||
-- UttNP np = {s = np.s ! npNom} ;
|
UttVP vp = {s = } ;
|
||||||
-- UttVP vp = {s = infVP VVInf vp (agrP3 Sg)} ;
|
UttAdv adv = {s = } ;
|
||||||
-- UttAdv adv = adv ;
|
UttCN n = {s = } ;
|
||||||
-- UttCN n = {s = n.s ! Sg ! Nom} ;
|
UttCard n = {s = } ;
|
||||||
-- UttCard n = {s = n.s ! Nom} ;
|
UttAP ap = { s = ap.s ! } ;
|
||||||
-- UttAP ap = {s = ap.s ! agrP3 Sg} ;
|
UttInterj i = i ;
|
||||||
-- UttInterj i = i ;
|
-}
|
||||||
--
|
NoPConj = {s = []} ;
|
||||||
-- NoPConj = {s = []} ;
|
-- PConjConj conj = {s = conj.s1 ++ conj.s2 ! …} ;
|
||||||
-- PConjConj conj = {s = conj.s2} ; ---
|
|
||||||
--
|
NoVoc = {s = []} ;
|
||||||
-- NoVoc = {s = []} ;
|
-- VocNP np = { s = "," ++ np.s ! … } ; -}
|
||||||
-- VocNP np = {s = "," ++ np.s ! npNom} ;
|
|
||||||
--
|
|
||||||
--}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,73 +1,77 @@
|
|||||||
concrete QuestionHun of Question = CatHun ** open ResHun, Prelude in
|
concrete QuestionHun of Question = CatHun ** open
|
||||||
{
|
Prelude, ResHun, ParadigmsHun, (NH=NounHun) in {
|
||||||
--{
|
|
||||||
--
|
-- A question can be formed from a clause ('yes-no question') or
|
||||||
-- flags optimize=all_subs ;
|
-- with an interrogative.
|
||||||
--
|
|
||||||
-- lin
|
{-
|
||||||
--
|
lin
|
||||||
-- QuestCl cl = {
|
-- : Cl -> QCl ;
|
||||||
-- s = \\t,a,p =>
|
QuestCl =
|
||||||
-- let cls = cl.s ! t ! a ! p
|
|
||||||
-- in table {
|
-- : IP -> VP -> QCl ;
|
||||||
-- QDir => cls ! OQuest ;
|
QuestVP ip vp =
|
||||||
-- QIndir => "if" ++ cls ! ODir
|
|
||||||
-- } ---- "whether" in ExtHun
|
-- : IP -> ClSlash -> QCl ; -- whom does John love
|
||||||
-- } ;
|
QuestSlash ip cls =
|
||||||
--
|
|
||||||
-- QuestVP qp vp =
|
-- : IAdv -> Cl -> QCl ; -- why does John walk
|
||||||
-- let cl = mkClause (qp.s ! npNom) (agrP3 qp.n) vp
|
QuestIAdv iadv cls =
|
||||||
-- in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir} ;
|
|
||||||
--
|
|
||||||
-- QuestSlash ip slash =
|
-- : IComp -> NP -> QCl ; -- where is John?
|
||||||
-- mkQuestion (ss (slash.c2 ++ ip.s ! NPAcc)) slash ;
|
QuestIComp icomp np =
|
||||||
-- --- stranding in ExratHun
|
|
||||||
--
|
|
||||||
-- QuestIAdv iadv cl = mkQuestion iadv cl ;
|
-- Interrogative pronouns can be formed with interrogative
|
||||||
--
|
-- determiners, with or without a noun.
|
||||||
-- QuestIComp icomp np =
|
|
||||||
-- mkQuestion icomp (mkClause (np.s ! npNom) np.a (predAux auxBe)) ;
|
-- : IDet -> CN -> IP ; -- which five songs
|
||||||
--
|
IdetCN idet cn = {…} ** NH.DetCN idet cn ;
|
||||||
--
|
|
||||||
-- PrepIP p ip = {s = p.s ++ ip.s ! NPAcc} ;
|
-- : IDet -> IP ; -- which five
|
||||||
--
|
IdetIP idet = {…} ** NH.DetNP idet ;
|
||||||
-- AdvIP ip adv = {
|
|
||||||
-- s = \\c => ip.s ! c ++ adv.s ;
|
-- They can be modified with adverbs.
|
||||||
-- n = ip.n
|
-- : IP -> Adv -> IP ; -- who in Paris
|
||||||
-- } ;
|
--AdvIP = NH.AdvNP ;
|
||||||
--
|
|
||||||
-- IdetCN idet cn = {
|
-- Interrogative quantifiers have number forms and can take number modifiers.
|
||||||
-- s = \\c => idet.s ++ cn.s ! idet.n ! npcase2case c ;
|
|
||||||
-- n = idet.n
|
-- : IQuant -> Num -> IDet ; -- which (five)
|
||||||
-- } ;
|
IdetQuant = NH.DetQuant ;
|
||||||
--
|
|
||||||
-- IdetIP idet = {
|
-- Interrogative adverbs can be formed prepositionally.
|
||||||
-- s = \\c => idet.s ;
|
-- : Prep -> IP -> IAdv ; -- with whom
|
||||||
-- n = idet.n
|
PrepIP prep ip = ;
|
||||||
-- } ;
|
|
||||||
--
|
-- They can be modified with other adverbs.
|
||||||
-- IdetQuant idet num = {
|
|
||||||
-- s = idet.s ! num.n ++ num.s ! Nom ;
|
-- : IAdv -> Adv -> IAdv ; -- where in Paris
|
||||||
-- n = num.n
|
-- AdvIAdv iadv adv =
|
||||||
-- } ;
|
|
||||||
--
|
-- Interrogative complements to copulas can be both adverbs and
|
||||||
-- AdvIAdv i a = ss (i.s ++ a.s) ;
|
-- pronouns.
|
||||||
--
|
|
||||||
-- CompIAdv a = a ;
|
-- : IAdv -> IComp ;
|
||||||
-- CompIP p = ss (p.s ! npNom) ;
|
CompIAdv iadv = iadv ; -- where (is it)
|
||||||
--
|
|
||||||
-- lincat
|
-- : IP -> IComp ;
|
||||||
-- QVP = ResHun.VP ;
|
CompIP ip = {s = ip.s ! Abs} ; -- who (is it)
|
||||||
-- lin
|
|
||||||
-- ComplSlashIP vp np = insertObjPre (\\_ => vp.c2 ++ np.s ! NPAcc) vp ;
|
|
||||||
-- AdvQVP vp adv = insertObj (\\_ => adv.s) vp ;
|
-- More $IP$, $IDet$, and $IAdv$ are defined in $Structural$.
|
||||||
-- AddAdvQVP vp adv = insertObj (\\_ => adv.s) vp ;
|
|
||||||
--
|
-- Wh questions with two or more question words require a new, special category.
|
||||||
-- QuestQVP qp vp =
|
|
||||||
-- let cl = mkClause (qp.s ! npNom) (agrP3 qp.n) vp
|
cat
|
||||||
-- in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir} ;
|
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
|
||||||
|
-}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,56 +1,22 @@
|
|||||||
concrete RelativeHun of Relative = CatHun ** open ResHun in
|
concrete RelativeHun of Relative = CatHun ** open
|
||||||
{
|
ResHun, Prelude, (NS=NounHun), (SS=StructuralHun) in {
|
||||||
--{
|
|
||||||
--
|
{-
|
||||||
-- flags optimize=all_subs ;
|
lin
|
||||||
--
|
-- : Cl -> RCl ; -- such that John loves her
|
||||||
-- lin
|
-- RelCl cl = ;
|
||||||
--
|
|
||||||
-- RelCl cl = {
|
-- : RP -> VP -> RCl ;
|
||||||
-- s = \\t,a,p,_ => "such" ++ "that" ++ cl.s ! t ! a ! p ! ODir ;
|
RelVP rp vp =
|
||||||
-- c = npNom
|
|
||||||
-- } ;
|
-- : RP -> ClSlash -> RCl ; -- whom John loves
|
||||||
--
|
RelSlash rp cls =
|
||||||
-- RelVP rp vp = {
|
|
||||||
-- s = \\t,ant,b,ag =>
|
-- : RP ;
|
||||||
-- let
|
IdRP = {s = ""} ;
|
||||||
-- agr = case rp.a of {
|
|
||||||
-- RNoAg => ag ;
|
-- : Prep -> NP -> RP -> RP ; -- the mother of whom
|
||||||
-- RAg a => a
|
--FunRP prep np rp = {} ;
|
||||||
-- } ;
|
-}
|
||||||
-- 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
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
--}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,29 +4,14 @@
|
|||||||
|
|
||||||
-- This module contains operations that are needed to make the
|
-- This module contains operations that are needed to make the
|
||||||
-- resource syntax work.
|
-- resource syntax work.
|
||||||
|
-- Some parameters, such as $Number$, are inherited from $ParamX$.
|
||||||
|
resource ResHun = ParamHun ** open Prelude, Predef, ParamHun in {
|
||||||
|
|
||||||
resource ResHun = ParamX ** open Prelude in
|
|
||||||
{
|
{
|
||||||
|
|
||||||
flags
|
--------------------------------------------------------------------------------
|
||||||
optimize=noexpand ;
|
-- Nouns
|
||||||
coding = utf8 ;
|
oper
|
||||||
|
|
||||||
-- 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
|
|
||||||
;
|
|
||||||
|
|
||||||
Harm = H_a | H_e | H_o ;
|
|
||||||
|
|
||||||
oper
|
|
||||||
Noun = {s : Number => Case => Str} ;
|
Noun = {s : Number => Case => Str} ;
|
||||||
|
|
||||||
endCase : Case -> HarmForms = \c -> case c of {
|
endCase : Case -> HarmForms = \c -> case c of {
|
||||||
@@ -77,476 +62,228 @@ resource ResHun = ParamX ** open Prelude in
|
|||||||
putHarmEnding : HarmForms -> Str -> Str = \hs,w ->
|
putHarmEnding : HarmForms -> Str -> Str = \hs,w ->
|
||||||
w + useHarm (getHarm w) hs ;
|
w + useHarm (getHarm w) hs ;
|
||||||
|
|
||||||
regNoun : Str -> Noun = \w -> {
|
mkNoun : Str -> Noun = \w -> {
|
||||||
s = \\n,c =>
|
s = \\n,c =>
|
||||||
let h = getHarm w
|
let h = getHarm w
|
||||||
in
|
in
|
||||||
w + useHarm h (endNumber n) + useHarm h (endCase c)
|
w + useHarm h (endNumber n) + useHarm h (endCase c)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
---------------------------------------------
|
||||||
|
-- NP
|
||||||
|
|
||||||
--
|
NounPhrase : Type = {
|
||||||
-- param
|
s : Case => Str ;
|
||||||
-- Agr = AgP1 Number | AgP2 Number | AgP3Sg Gender | AgP3Pl ;
|
agr : Person*Number ;
|
||||||
--
|
isPron : Bool ;
|
||||||
-- param
|
empty : Str ; -- standard trick for pro-drop
|
||||||
-- Gender = Neutr | Masc | Fem ;
|
} ;
|
||||||
--
|
|
||||||
--
|
emptyNP : NounPhrase = {
|
||||||
----2 For $Verb$
|
s = \\_ => [] ;
|
||||||
--
|
agr = <P3,Sg> ;
|
||||||
---- Only these five forms are needed for open-lexicon verbs.
|
isPron = False ;
|
||||||
--
|
empty = [] ;
|
||||||
-- param
|
} ;
|
||||||
-- VForm =
|
|
||||||
-- VInf
|
indeclNP : Str -> NounPhrase = \s -> emptyNP ** {s = \\c => s} ;
|
||||||
-- | VPres
|
|
||||||
-- | VPPart
|
--------------------------------------------------------------------------------
|
||||||
-- | VPresPart
|
-- Pronouns
|
||||||
-- | VPast --# notpresent
|
|
||||||
-- ;
|
Pronoun : Type = NounPhrase ** {
|
||||||
--
|
-- poss : { -- for PossPron : Pron -> Quant
|
||||||
---- Auxiliary verbs have special negative forms.
|
-- } ;
|
||||||
--
|
} ;
|
||||||
-- VVForm =
|
|
||||||
-- VVF VForm
|
--------------------------------------------------------------------------------
|
||||||
-- | VVPresNeg
|
-- Det, Quant, Card, Ord
|
||||||
-- | VVPastNeg --# notpresent
|
|
||||||
-- ;
|
-- Quant has variable number:
|
||||||
--
|
-- e.g. this_Quant has both "this" and "these"
|
||||||
---- The order of sentence is needed already in $VP$.
|
Quant : Type = {
|
||||||
--
|
s, -- form that comes before noun: "{this} car"
|
||||||
-- Order = ODir | OQuest ;
|
sp : Number => Case => Str ; -- independent form, "I like {this}" (DetNP)
|
||||||
--
|
} ;
|
||||||
---- The type of complement of a VV
|
|
||||||
--
|
mkQuant : (s,sp : Str) -> Quant = \s,sp -> {
|
||||||
-- VVType = VVAux | VVInf | VVPresPart ; -- can do / try to do / start doing
|
s = (mkNoun s).s ;
|
||||||
--
|
sp = (mkNoun sp).s ;
|
||||||
----2 For $Adjective$
|
} ;
|
||||||
--
|
|
||||||
-- AForm = AAdj Degree Case | AAdv ;
|
-- Det is formed in DetQuant : Quant -> Num -> Det
|
||||||
--
|
-- so it has an inherent number.
|
||||||
----2 For $Relative$
|
Determiner : Type = {
|
||||||
--
|
s,
|
||||||
-- RAgr = RNoAg | RAg Agr ;
|
sp : Case => Str ;
|
||||||
-- RCase = RPrep Gender | RC Gender NPCase ;
|
n : Number ;
|
||||||
--
|
-- numtype : NumType ; -- Whether its Num component is digit, numeral or Sg/Pl
|
||||||
----2 For $Numeral$
|
} ;
|
||||||
--
|
|
||||||
-- CardOrd = NCard | NOrd ;
|
Num : Type = {
|
||||||
-- DForm = unit | teen | ten ;
|
s : Place => Str ; -- Independent or attribute
|
||||||
--
|
n : Number ; -- Singular or plural
|
||||||
----2 Transformations between parameter types
|
-- numtype : NumType ; -- Digit, numeral or Sg/Pl : makes a difference in many languages
|
||||||
--
|
} ;
|
||||||
-- oper
|
|
||||||
-- toAgr : Number -> Person -> Gender -> Agr = \n,p,g ->
|
baseNum : Num = {
|
||||||
-- case p of {
|
s = \\_ => [] ;
|
||||||
-- P1 => AgP1 n ;
|
n = Sg ;
|
||||||
-- P2 => AgP2 n ;
|
-- numtype = NoNum
|
||||||
-- P3 => case n of {
|
} ;
|
||||||
-- Sg => AgP3Sg g ;
|
|
||||||
-- Pl => AgP3Pl
|
{- Numeral can become Num via
|
||||||
-- }
|
Noun.gf: NumNumeral : Numeral -> Card ;
|
||||||
-- } ;
|
Noun.gf: NumCard : Card -> Num ;
|
||||||
--
|
-}
|
||||||
-- fromAgr : Agr -> {n : Number ; p : Person ; g : Gender} = \a -> case a of {
|
Numeral : Type = Num ** {
|
||||||
-- AgP1 n => {n = n ; p = P1 ; g = Masc} ;
|
-- TODO add ordinal
|
||||||
-- AgP2 n => {n = n ; p = P2 ; g = Masc} ;
|
} ;
|
||||||
-- AgP3Pl => {n = Pl ; p = P3 ; g = Masc} ;
|
|
||||||
-- AgP3Sg g => {n = Sg ; p = P3 ; g = g}
|
--------------------------------------------------------------------------------
|
||||||
-- } ;
|
-- Postpositions
|
||||||
--
|
|
||||||
-- agrP3 : Number -> Agr = \n -> agrgP3 n Neutr ;
|
Postposition : Type = {s : Str ; c : Case} ;
|
||||||
--
|
|
||||||
-- agrgP3 : Number -> Gender -> Agr = \n,g -> toAgr n P3 g ;
|
mkPrep : Str -> Postposition = \str -> {s=str ; c=Nom} ;
|
||||||
--
|
|
||||||
-- conjAgr : Agr -> Agr -> Agr = \a0,b0 ->
|
emptyPP : Postposition = mkPrep [] ;
|
||||||
-- let a = fromAgr a0 ; b = fromAgr b0
|
|
||||||
-- in
|
------------------
|
||||||
-- toAgr
|
-- Conj
|
||||||
-- (conjNumber a.n b.n)
|
|
||||||
-- (conjPerson a.p b.p) a.g ;
|
Conj : Type = {
|
||||||
--
|
s1 : Str ;
|
||||||
---- For $Lex$.
|
s2 : Str ;
|
||||||
--
|
n : Number ;
|
||||||
---- For each lexical category, here are the worst-case constructors.
|
} ;
|
||||||
--
|
|
||||||
-- mkNoun : (_,_,_,_ : Str) -> {s : Number => Case => Str} =
|
--------------------------------------------------------------------------------
|
||||||
-- \man,mans,men,mens -> {
|
-- Adjectives
|
||||||
-- s = table {
|
|
||||||
-- Sg => table {
|
Adjective : Type = {s : Number => Str} ;
|
||||||
-- Gen => mans ;
|
|
||||||
-- _ => man
|
mkAdj : Str -> Adjective = \sg -> {
|
||||||
-- } ;
|
s = \\n =>
|
||||||
-- Pl => table {
|
let h = getHarm sg
|
||||||
-- Gen => mens ;
|
in sg + useHarm h (endNumber n)
|
||||||
-- _ => men
|
} ;
|
||||||
-- }
|
|
||||||
-- }
|
--------------------------------------------------------------------------------
|
||||||
-- } ;
|
-- Verbs
|
||||||
--
|
|
||||||
-- mkAdjective : (_,_,_,_ : Str) -> {s : AForm => Str; lock_A : {}} =
|
verbEndings : Person*Number => HarmForms = table {
|
||||||
-- \good,better,best,well -> lin A {
|
<P1,Sg> => harm3 "ok" "ek" "ök" ;
|
||||||
-- s = table {
|
<P2,Sg> => harm1 "sz" ;
|
||||||
-- AAdj Posit c => (regGenitiveS good) ! c ;
|
<P3,Sg> => harm1 [] ;
|
||||||
-- AAdj Compar c => (regGenitiveS better) ! c ;
|
<P1,Pl> => harm "unk" "ünk" ;
|
||||||
-- AAdj Superl c => (regGenitiveS best) ! c ;
|
<P2,Pl> => harm3 "tok" "tek" "tök" ; -- TODO allomorphs -otok, -etek, -ötök
|
||||||
-- AAdv => well
|
<P3,Pl> => harm "nak" "nek" -- TODO allomorphs -anak, -enek
|
||||||
-- }
|
} ;
|
||||||
-- } ;
|
|
||||||
--
|
Verb : Type = {
|
||||||
-- mkVerb : (_,_,_,_,_ : Str) -> Verb =
|
s : VForm => Str ;
|
||||||
-- \go,goes,went,gone,going -> {
|
sc : Case ; -- subject case
|
||||||
-- s = table {
|
} ;
|
||||||
-- VInf => go ;
|
Verb2 : Type = Verb ** {
|
||||||
-- VPres => goes ;
|
c2 : Case -- object case
|
||||||
-- VPast => went ; --# notpresent
|
} ;
|
||||||
-- VPPart => gone ;
|
Verb3 : Type = Verb2 ** {
|
||||||
-- VPresPart => going
|
c3 : Case -- indirect object case
|
||||||
-- } ;
|
} ;
|
||||||
-- isRefl = False
|
|
||||||
-- } ;
|
mkVerb2 : Str -> Verb2 = \sg3 -> vtov2 (mkVerb sg3) ;
|
||||||
--
|
mkVerb3 : Str -> Verb3 = \sg3 -> v2tov3 (mkVerb2 sg3) ;
|
||||||
-- 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 {
|
vtov2 : Verb -> Verb2 = \v -> v ** {c2 = Acc} ;
|
||||||
-- s = who.s ;
|
v2tov3 : Verb2 -> Verb3 = \v -> v ** {c3 = Dat} ;
|
||||||
-- n = n
|
|
||||||
-- } ;
|
mkVerb : (sg3 : Str) -> Verb = mkVerbReg "TODO:infinitive" ; -- TODO
|
||||||
--
|
|
||||||
-- mkNP : (i,me,my : Str) -> Number -> Person -> Gender ->
|
mkVerbReg : (inf, sg3 : Str) -> Verb = \inf,sg3 ->
|
||||||
-- {s : NPCase => Str ; a : Agr} = \i,me,my,n,p,g ->
|
let harmony : Harm = getHarm sg3 ;
|
||||||
-- { s = table {
|
sg1 : Str = sg3 + useHarm harmony (verbEndings!<P1,Sg>) ;
|
||||||
-- NCase Nom => i ;
|
sg2 : Str = sg3 + "sz" ;
|
||||||
-- NPAcc => me ;
|
pl1 : Str = sg3 + useHarm harmony (verbEndings!<P1,Pl>) ;
|
||||||
-- NCase Gen => my
|
pl2 : Str = sg3 + useHarm harmony (verbEndings!<P2,Pl>) ;
|
||||||
-- } ;
|
pl3 : Str = sg3 + useHarm harmony (verbEndings!<P3,Pl>) ;
|
||||||
-- a = toAgr n p g ;
|
in mkVerbFull sg1 sg2 sg3 pl1 pl2 pl3 inf ;
|
||||||
-- };
|
|
||||||
--
|
mkVerbFull : (x1,_,_,_,_,_,x7 : Str) -> Verb =
|
||||||
-- regNP : Str -> Number -> {s : NPCase => Str ; a : Agr} = \that,n ->
|
\sg1,sg2,sg3,pl1,pl2,pl3,inf -> {
|
||||||
-- mkNP that that (that + "'s") n P3 Neutr ;
|
s = table {
|
||||||
--
|
VInf => inf ;
|
||||||
-- regGenitiveS : Str -> Case => Str = \s ->
|
VFin P1 Sg => sg1 ;
|
||||||
-- table { Gen => genitiveS s; _ => s } ;
|
VFin P2 Sg => sg2 ;
|
||||||
--
|
VFin P3 Sg => sg3 ;
|
||||||
-- genitiveS : Str -> Str = \dog ->
|
VFin P1 Pl => pl1 ;
|
||||||
-- case last dog of {
|
VFin P2 Pl => pl2 ;
|
||||||
-- "s" => dog + "'" ;
|
VFin P3 Pl => pl3
|
||||||
-- _ => dog + "'s"
|
} ;
|
||||||
-- };
|
sc = Nom
|
||||||
--
|
} ;
|
||||||
---- We have just a heuristic definition of the indefinite article.
|
|
||||||
---- There are lots of exceptions: consonantic "e" ("euphemism"), consonantic
|
copula : Verb = mkVerbFull
|
||||||
---- "o" ("one-sided"), vocalic "u" ("umbrella").
|
"vagyok"
|
||||||
--
|
"vagy"
|
||||||
-- artIndef = pre {
|
"van"
|
||||||
-- "eu" | "Eu" | "uni" | "up" => "a" ;
|
"vagyunk"
|
||||||
-- "un" => "an" ;
|
"vagytok"
|
||||||
-- "a" | "e" | "i" | "o" | "A" | "E" | "I" | "O" => "an" ;
|
"vannak"
|
||||||
-- "SMS" | "sms" => "an" ; ---
|
"lenni" ;
|
||||||
-- _ => "a"
|
|
||||||
-- } ;
|
------------------
|
||||||
--
|
-- VP
|
||||||
-- artDef = "the" ;
|
|
||||||
--
|
VerbPhrase : Type = Verb ** {
|
||||||
---- For $Verb$.
|
obj : Str ;
|
||||||
--
|
adv : Str ;
|
||||||
-- Verb : Type = {
|
} ; -- TODO more fields
|
||||||
-- s : VForm => Str ;
|
|
||||||
-- isRefl : Bool
|
VPSlash : Type = Verb2 ** {
|
||||||
-- } ;
|
adv : Str ;
|
||||||
--
|
} ;
|
||||||
-- param
|
|
||||||
-- CPolarity =
|
useV : Verb -> VerbPhrase = \v -> v ** {
|
||||||
-- CPos
|
obj,adv = [] ;
|
||||||
-- | CNeg Bool ; -- contracted or not
|
} ;
|
||||||
--
|
|
||||||
-- oper
|
useVc : Verb2 -> VPSlash = \v2 -> v2 ** {
|
||||||
-- contrNeg : Bool -> Polarity -> CPolarity = \b,p -> case p of {
|
adv = [] ;
|
||||||
-- Pos => CPos ;
|
} ;
|
||||||
-- Neg => CNeg b
|
|
||||||
-- } ;
|
insertObj : VPSlash -> NounPhrase -> VerbPhrase = \vps,np -> vps ** {
|
||||||
--
|
obj = np.s ! vps.c2 ;
|
||||||
-- VerbForms : Type =
|
} ;
|
||||||
-- Tense => Anteriority => CPolarity => Order => Agr =>
|
|
||||||
-- {aux, adv, fin, inf : Str} ; -- would, not, sleeps, slept
|
insertAdv : VerbPhrase -> SS -> VerbPhrase = \vp,adv -> vp ** {adv = adv.s} ;
|
||||||
--
|
insertAdvSlash : VPSlash -> SS -> VPSlash = \vps,adv -> vps ** {adv = adv.s} ;
|
||||||
-- VP : Type = {
|
|
||||||
-- s : VerbForms ;
|
--------------------------------------------------------------------------------
|
||||||
-- prp : Str ; -- present participle
|
-- Cl, S
|
||||||
-- ptp : Str ; -- past participle
|
|
||||||
-- inf : Str ; -- the infinitive form ; VerbForms would be the logical place
|
Clause : Type = {s : Tense => Anteriority => Polarity => Str} ;
|
||||||
-- ad : Str ; -- sentence adverb
|
|
||||||
-- s2 : Agr => Str -- complement
|
{- After PredVP, we might still want to add more adverbs (QuestIAdv),
|
||||||
-- } ;
|
but we're done with verb inflection.
|
||||||
--
|
-}
|
||||||
--
|
ClSlash : Type = Clause ;
|
||||||
-- SlashVP = VP ** {c2 : Str} ;
|
|
||||||
--
|
QClause : Type = Clause ;
|
||||||
-- predVc : (Verb ** {c2 : Str}) -> SlashVP = \verb ->
|
|
||||||
-- predV verb ** {c2 = verb.c2} ;
|
-- RClause : Type = {s : NForm => Tense => Anteriority => Polarity => Str} ;
|
||||||
--
|
|
||||||
-- predV : Verb -> VP = \verb -> {
|
Sentence : Type = {s : Str} ;
|
||||||
-- s = \\t,ant,b,ord,agr =>
|
|
||||||
-- let
|
predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vp -> vp ** {
|
||||||
-- inf = verb.s ! VInf ;
|
s = \\t,a,p =>
|
||||||
-- fin = presVerb verb agr ;
|
np.s ! vp.sc
|
||||||
-- part = verb.s ! VPPart ;
|
++ vp.obj
|
||||||
-- in
|
++ vp.adv
|
||||||
-- case <t,ant,b,ord> of {
|
++ vp.s ! agr2vf np.agr
|
||||||
-- <Pres,Simul,CPos,ODir> => vff fin [] ;
|
} ;
|
||||||
-- <Pres,Simul,CPos,OQuest> => vf (does agr) inf ;
|
|
||||||
-- <Pres,Anter,CPos,_> => vf (have agr) part ; --# notpresent
|
--------------------------------------------------------------------------------
|
||||||
-- <Pres,Anter,CNeg c,_> => vfn c (have agr) (havent agr) part ; --# notpresent
|
-- linrefs
|
||||||
-- <Past,Simul,CPos,ODir> => vff (verb.s ! VPast) [] ; --# notpresent
|
|
||||||
-- <Past,Simul,CPos,OQuest> => vf "did" inf ; --# notpresent
|
|
||||||
-- <Past,Simul,CNeg c,_> => vfn c "did" "didn't" inf ; --# notpresent
|
|
||||||
-- <Past,Anter,CPos,_> => vf "had" part ; --# notpresent
|
|
||||||
-- <Past,Anter,CNeg c,_> => vfn c "had" "hadn't" part ; --# notpresent
|
|
||||||
-- <Fut, Simul,CPos,_> => vf "will" inf ; --# notpresent
|
|
||||||
-- <Fut, Simul,CNeg c,_> => vfn c "will" "won't" inf ; --# notpresent
|
|
||||||
-- <Fut, Anter,CPos,_> => vf "will" ("have" ++ part) ; --# notpresent
|
|
||||||
-- <Fut, Anter,CNeg c,_> => vfn c "will" "won't"("have" ++ part) ; --# notpresent
|
|
||||||
-- <Cond,Simul,CPos,_> => vf "would" inf ; --# notpresent
|
|
||||||
-- <Cond,Simul,CNeg c,_> => vfn c "would" "wouldn't" inf ; --# notpresent
|
|
||||||
-- <Cond,Anter,CPos,_> => vf "would" ("have" ++ part) ; --# notpresent
|
|
||||||
-- <Cond,Anter,CNeg c,_> => vfn c "would" "wouldn't" ("have" ++ part) ; --# notpresent
|
|
||||||
-- <Pres,Simul,CNeg c,_> => 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 <t,ant,cb,ord> of {
|
|
||||||
-- <Pres,Anter,CPos,_> => vf (have agr) part ; --# notpresent
|
|
||||||
-- <Pres,Anter,CNeg c,_> => vfn c (have agr) (havent agr) part ; --# notpresent
|
|
||||||
-- <Past,Simul,CPos, _> => vf (verb.past ! b ! agr) [] ; --# notpresent
|
|
||||||
-- <Past,Simul,CNeg c, _> => vfn c (verb.past!Pos!agr)(verb.past!Neg!agr) [] ; --# notpresent
|
|
||||||
-- <Past,Anter,CPos,_> => vf "had" part ; --# notpresent
|
|
||||||
-- <Past,Anter,CNeg c,_> => vfn c "had" "hadn't" part ; --# notpresent
|
|
||||||
-- <Fut, Simul,CPos,_> => vf "will" inf ; --# notpresent
|
|
||||||
-- <Fut, Simul,CNeg c,_> => vfn c "will" "won't" inf ; --# notpresent
|
|
||||||
-- <Fut, Anter,CPos,_> => vf "will" ("have" ++ part) ; --# notpresent
|
|
||||||
-- <Fut, Anter,CNeg c,_> => vfn c "will" "won't"("have" ++ part) ; --# notpresent
|
|
||||||
-- <Cond,Simul,CPos,_> => vf "would" inf ; --# notpresent
|
|
||||||
-- <Cond,Simul,CNeg c,_> => vfn c "would" "wouldn't" inf ; --# notpresent
|
|
||||||
-- <Cond,Anter,CPos,_> => vf "would" ("have" ++ part) ; --# notpresent
|
|
||||||
-- <Cond,Anter,CNeg c,_> => vfn c "would" "wouldn't" ("have" ++ part) ; --# notpresent
|
|
||||||
-- <Pres,Simul,CPos, _> => vf fin [] ;
|
|
||||||
-- <Pres,Simul,CNeg c, _> => 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 <b,a> of {
|
|
||||||
-- <Pos,AgP1 Sg> => "am" ;
|
|
||||||
-- <Neg,AgP1 Sg> => ["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
|
|
||||||
-- }
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
--
|
|
||||||
--}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,75 +1,79 @@
|
|||||||
concrete SentenceHun of Sentence = CatHun ** open Prelude, ResHun in
|
concrete SentenceHun of Sentence = CatHun ** open
|
||||||
{
|
TenseX, ResHun, (AK=AdverbHun), Prelude in {
|
||||||
--{
|
|
||||||
--
|
flags optimize=all_subs ;
|
||||||
-- flags optimize=all_subs ;
|
|
||||||
--
|
lin
|
||||||
-- lin
|
|
||||||
--
|
--2 Clauses
|
||||||
-- PredVP np vp = mkClause (np.s ! npNom) np.a vp ;
|
|
||||||
--
|
-- : NP -> VP -> Cl
|
||||||
-- PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ;
|
PredVP = predVP ;
|
||||||
--
|
|
||||||
-- ImpVP vp = {
|
-- : SC -> VP -> Cl ; -- that she goes is good (Saeed p. 94)
|
||||||
-- s = \\pol,n =>
|
--PredSCVP sc vp = ;
|
||||||
-- let
|
|
||||||
-- agr = AgP2 (numImp n) ;
|
--2 Clauses missing object noun phrases
|
||||||
-- verb = infVP VVAux vp agr ;
|
-- : NP -> VPSlash -> ClSlash ;
|
||||||
-- dont = case pol of {
|
-- SlashVP = predVP ;
|
||||||
-- CNeg True => "don't" ;
|
{-
|
||||||
-- CNeg False => "do" ++ "not" ;
|
-- : ClSlash -> Adv -> ClSlash ; -- (whom) he sees today
|
||||||
-- _ => []
|
AdvSlash cls adv = cls ** insertAdv adv cls ;
|
||||||
-- }
|
|
||||||
-- in
|
-- SlashPrep : Cl -> Prep -> ClSlash ; -- (with whom) he walks
|
||||||
-- dont ++ verb
|
|
||||||
-- } ;
|
-- : NP -> VS -> SSlash -> ClSlash ; -- (whom) she says that he loves
|
||||||
--
|
-- SlashVS np vs ss = {} ;
|
||||||
-- SlashVP np vp =
|
|
||||||
-- mkClause (np.s ! npNom) np.a vp ** {c2 = vp.c2} ;
|
|
||||||
--
|
-- : Temp -> Pol -> ClSlash -> SSlash ; -- (that) she had not seen
|
||||||
-- AdvSlash slash adv = {
|
UseSlash t p cls = {
|
||||||
-- s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ;
|
} ;
|
||||||
-- c2 = slash.c2
|
|
||||||
-- } ;
|
--2 Imperatives
|
||||||
--
|
-- : VP -> Imp ;
|
||||||
-- SlashPrep cl prep = cl ** {c2 = prep.s} ;
|
ImpVP vp = {s = \\num,pol => linVP (VImp num pol) Statement vp} ;
|
||||||
--
|
|
||||||
-- SlashVS np vs slash =
|
--2 Embedded sentences
|
||||||
-- mkClause (np.s ! npNom) np.a
|
|
||||||
-- (insertObj (\\_ => conjThat ++ slash.s) (predV vs)) **
|
-- : S -> SC ;
|
||||||
-- {c2 = slash.c2} ;
|
EmbedS s = {s = s.s ! True} ; -- choose subordinate
|
||||||
--
|
|
||||||
-- EmbedS s = {s = conjThat ++ s.s} ;
|
-- : QS -> SC ;
|
||||||
-- EmbedQS qs = {s = qs.s ! QIndir} ;
|
-- EmbedQS qs = { } ;
|
||||||
-- EmbedVP vp = {s = infVP VVInf vp (agrP3 Sg)} ; --- agr
|
|
||||||
--
|
-- : VP -> SC ;
|
||||||
-- UseCl t p cl = {
|
EmbedVP vp = {s = infVP vp} ;
|
||||||
-- s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! ODir
|
-}
|
||||||
-- } ;
|
--2 Sentences
|
||||||
-- UseQCl t p cl = {
|
|
||||||
-- s = \\q => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! q
|
-- : Temp -> Pol -> Cl -> S ;
|
||||||
-- } ;
|
UseCl t p cl = {
|
||||||
-- UseRCl t p cl = {
|
s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p
|
||||||
-- s = \\r => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! r ;
|
} ;
|
||||||
-- c = cl.c
|
|
||||||
-- } ;
|
-- : Temp -> Pol -> QCl -> QS ;
|
||||||
-- UseSlash t p cl = {
|
UseQCl t p cl = {s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p} ;
|
||||||
-- s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! ODir ;
|
|
||||||
-- c2 = cl.c2
|
-- : Temp -> Pol -> RCl -> RS ;
|
||||||
-- } ;
|
-- UseRCl t p cl = {s = } ;
|
||||||
--
|
|
||||||
-- AdvS a s = {s = a.s ++ s.s} ;
|
-- AdvS : Adv -> S -> S ; -- then I will go home
|
||||||
-- ExtAdvS a s = {s = a.s ++ "," ++ s.s} ;
|
AdvS = advS "" ;
|
||||||
--
|
|
||||||
-- SSubjS a s b = {s = a.s ++ s.s ++ b.s} ;
|
-- ExtAdvS : Adv -> S -> S ; -- next week, I will go home
|
||||||
--
|
ExtAdvS = advS (SOFT_BIND ++ ",");
|
||||||
-- RelS s r = {s = s.s ++ "," ++ r.s ! agrP3 Sg} ;
|
|
||||||
--
|
-- : S -> Subj -> S -> S ;
|
||||||
-- oper
|
-- SSubjS s1 subj s2 = AdvS (AK.SubjS subj s2) s1 ;
|
||||||
-- ctr : CPolarity -> CPolarity = \x -> x ;
|
|
||||||
----- ctr = contrNeg True ; -- contracted negations
|
-- : 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
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,148 +1,168 @@
|
|||||||
concrete StructuralHun of Structural = CatHun **
|
concrete StructuralHun of Structural = CatHun **
|
||||||
open MorphoHun, ResHun, ParadigmsHun,
|
open Prelude, ResHun, ParadigmsHun in {
|
||||||
(C = ConstructX), Prelude in
|
{-
|
||||||
{
|
-------
|
||||||
--{
|
-- Ad*
|
||||||
--
|
|
||||||
-- flags optimize=all ;
|
lin almost_AdA = mkAdA "" ;
|
||||||
--
|
lin almost_AdN = ss "" ;
|
||||||
-- lin
|
lin at_least_AdN = ss "" ;
|
||||||
-- above_Prep = mkPrep "above" ;
|
lin at_most_AdN = ss "" ;
|
||||||
-- after_Prep = mkPrep "after" ;
|
lin so_AdA = mkAdA "" ;
|
||||||
-- all_Predet = ss "all" ;
|
lin too_AdA = mkAdA "" ;
|
||||||
-- almost_AdA = mkAdA "almost" ;
|
lin very_AdA = mkAdA "" ;
|
||||||
-- almost_AdN = mkAdN "almost" ;
|
|
||||||
-- although_Subj = ss "although" ;
|
lin as_CAdv = { s = "" ; p = [] } ;
|
||||||
-- always_AdV = mkAdV "always" ;
|
lin less_CAdv = { s = "" ; p = [] } ;
|
||||||
-- and_Conj = mkConj "and" ;
|
lin more_CAdv = { s = "" ; p = [] } ;
|
||||||
-- because_Subj = ss "because" ;
|
lin how_IAdv = ss "" :
|
||||||
-- before_Prep = mkPrep "before" ;
|
|
||||||
-- behind_Prep = mkPrep "behind" ;
|
lin how8much_IAdv = ss "" ;
|
||||||
-- between_Prep = mkPrep "between" ;
|
lin when_IAdv = ss "" ;
|
||||||
-- both7and_DConj = mkConj "both" "and";
|
lin where_IAdv = ss "" :
|
||||||
-- but_PConj = ss "but" ;
|
lin why_IAdv = ss "" :
|
||||||
-- by8agent_Prep = mkPrep "by" ;
|
|
||||||
-- by8means_Prep = mkPrep "by" ;
|
lin always_AdV = ss "" ;
|
||||||
-- can8know_VV, can_VV = {
|
|
||||||
-- s = table {
|
lin everywhere_Adv = ss "" ;
|
||||||
-- VVF VInf => ["be able to"] ;
|
lin here7from_Adv = ss "" ;
|
||||||
-- VVF VPres => "can" ;
|
lin here7to_Adv = ss "" ;
|
||||||
-- VVF VPPart => ["been able to"] ;
|
lin here_Adv = ss "" ;
|
||||||
-- VVF VPresPart => ["being able to"] ;
|
lin quite_Adv = ss "" ;
|
||||||
-- VVF VPast => "could" ; --# notpresent
|
lin somewhere_Adv = ss "" ;
|
||||||
-- VVPastNeg => "couldn't" ; --# notpresent
|
lin there7from_Adv = ss "" ;
|
||||||
-- VVPresNeg => "can't"
|
lin there7to_Adv = ss "" ;
|
||||||
-- } ;
|
lin there_Adv = ss "" ;
|
||||||
-- typ = VVAux
|
|
||||||
-- } ;
|
-------
|
||||||
-- during_Prep = mkPrep "during" ;
|
-- Conj
|
||||||
-- either7or_DConj = mkConj "either" "or" singular ;
|
|
||||||
-- everybody_NP = regNP "everybody" singular ;
|
lin and_Conj =
|
||||||
-- every_Det = mkDeterminer singular "every" ;
|
lin or_Conj =
|
||||||
-- everything_NP = regNP "everything" singular ;
|
lin if_then_Conj =
|
||||||
-- everywhere_Adv = mkAdv "everywhere" ;
|
lin both7and_DConj =
|
||||||
-- few_Det = mkDeterminer plural "few" ;
|
lin either7or_DConj =
|
||||||
----- first_Ord = ss "first" ; DEPRECATED
|
|
||||||
-- for_Prep = mkPrep "for" ;
|
lin but_PConj = ss "" ;
|
||||||
-- from_Prep = mkPrep "from" ;
|
lin otherwise_PConj = ss "" ;
|
||||||
-- he_Pron = mkPron "he" "him" "his" "his" singular P3 masculine ;
|
lin therefore_PConj = ss "" ;
|
||||||
-- here_Adv = mkAdv "here" ;
|
|
||||||
-- here7to_Adv = mkAdv ["to here"] ;
|
-----------------
|
||||||
-- here7from_Adv = mkAdv ["from here"] ;
|
-- *Det and Quant
|
||||||
-- how_IAdv = ss "how" ;
|
|
||||||
-- how8much_IAdv = ss "how much" ;
|
|
||||||
-- how8many_IDet = mkDeterminer plural ["how many"] ;
|
lin how8many_IDet = ;
|
||||||
-- if_Subj = ss "if" ;
|
|
||||||
-- in8front_Prep = mkPrep ["in front of"] ;
|
lin all_Predet = {s = ""} ;
|
||||||
-- i_Pron = mkPron "I" "me" "my" "mine" singular P1 human ;
|
lin not_Predet = {s = ""} ;
|
||||||
-- in_Prep = mkPrep "in" ;
|
lin only_Predet = {s = ""} ;
|
||||||
-- it_Pron = mkPron "it" "it" "its" "its" singular P3 nonhuman ;
|
lin most_Predet = {s = ""} ;
|
||||||
-- less_CAdv = C.mkCAdv "less" "than" ;
|
|
||||||
-- many_Det = mkDeterminer plural "many" ;
|
|
||||||
-- more_CAdv = C.mkCAdv "more" "than" ;
|
lin every_Det =
|
||||||
-- most_Predet = ss "most" ;
|
lin few_Det =
|
||||||
-- much_Det = mkDeterminer singular "much" ;
|
lin many_Det =
|
||||||
-- must_VV = {
|
lin much_Det =
|
||||||
-- s = table {
|
|
||||||
-- VVF VInf => ["have to"] ;
|
lin somePl_Det =
|
||||||
-- VVF VPres => "must" ;
|
lin someSg_Det =
|
||||||
-- VVF VPPart => ["had to"] ;
|
lin no_Quant =
|
||||||
-- VVF VPresPart => ["having to"] ;
|
-}
|
||||||
-- VVF VPast => ["had to"] ; --# notpresent
|
lin that_Quant = mkQuant "az" "az" ;
|
||||||
-- VVPastNeg => ["hadn't to"] ; --# notpresent
|
lin this_Quant = mkQuant "ez" "ez" ;
|
||||||
-- VVPresNeg => "mustn't"
|
{-lin which_IQuant =
|
||||||
-- } ;
|
|
||||||
-- typ = VVAux
|
|
||||||
-- } ;
|
-----
|
||||||
-----b no_Phr = ss "no" ;
|
-- NP
|
||||||
-- no_Utt = ss "no" ;
|
|
||||||
-- on_Prep = mkPrep "on" ;
|
lin everybody_NP = defNP "" N.NumPl ;
|
||||||
------ one_Quant = mkDeterminer singular "one" ; -- DEPRECATED
|
lin everything_NP = defNP "" N.NumSg ;
|
||||||
-- only_Predet = ss "only" ;
|
lin nobody_NP = mkVerb; ""
|
||||||
-- or_Conj = mkConj "or" singular ;
|
lin nothing_NP = defNP "" N.NumSg ;
|
||||||
-- otherwise_PConj = ss "otherwise" ;
|
lin somebody_NP = defNP "" N.NumSg ;
|
||||||
-- part_Prep = mkPrep "of" ;
|
lin something_NP = defNP "" N.NumSg ;
|
||||||
-- please_Voc = ss "please" ;
|
|
||||||
-- possess_Prep = mkPrep "of" ;
|
oper
|
||||||
-- quite_Adv = mkAdv "quite" ;
|
defNP : Str -> Num -> NP = {} ;
|
||||||
-- she_Pron = mkPron "she" "her" "her" "hers" singular P3 feminine ;
|
-}
|
||||||
-- so_AdA = mkAdA "so" ;
|
|
||||||
-- somebody_NP = regNP "somebody" singular ;
|
-------
|
||||||
-- someSg_Det = mkDeterminer singular "some" ;
|
-- Prep
|
||||||
-- somePl_Det = mkDeterminer plural "some" ;
|
|
||||||
-- something_NP = regNP "something" singular ;
|
-- lin above_Prep = mkPrep ""
|
||||||
-- somewhere_Adv = mkAdv "somewhere" ;
|
-- lin after_Prep = mkPrep ""
|
||||||
-- that_Quant = mkQuant "that" "those" ;
|
-- lin before_Prep = mkPrep "" ;
|
||||||
-- there_Adv = mkAdv "there" ;
|
-- lin behind_Prep = mkPrep "" ;
|
||||||
-- there7to_Adv = mkAdv "there" ;
|
-- lin between_Prep = = mkPrep "" ;
|
||||||
-- there7from_Adv = mkAdv ["from there"] ;
|
-- lin by8agent_Prep = mkPrep ;
|
||||||
-- therefore_PConj = ss "therefore" ;
|
-- lin by8means_Prep = mkPrep ;
|
||||||
-- they_Pron = mkPron "they" "them" "their" "theirs" plural P3 human ;
|
-- lin during_Prep = mkPrep ;
|
||||||
-- this_Quant = mkQuant "this" "these" ;
|
-- lin except_Prep = mkPrep ;
|
||||||
-- through_Prep = mkPrep "through" ;
|
-- lin for_Prep = mkPrep "" ;
|
||||||
-- too_AdA = mkAdA "too" ;
|
-- lin from_Prep = mkPrep "" ;
|
||||||
-- to_Prep = mkPrep "to" ;
|
-- lin in8front_Prep = mkPrep "" ;
|
||||||
-- under_Prep = mkPrep "under" ;
|
-- lin in_Prep = mkPrep "" ;
|
||||||
-- very_AdA = mkAdA "very" ;
|
-- lin on_Prep = mkPrep "" ;
|
||||||
-- want_VV = mkVV (regV "want") ;
|
-- lin part_Prep = mkPrep ;
|
||||||
-- we_Pron = mkPron "we" "us" "our" "ours" plural P1 human ;
|
-- lin possess_Prep = mkPrep "" ;
|
||||||
-- whatPl_IP = mkIP "what" "what" "what's" plural ;
|
-- lin through_Prep = mkPrep ;
|
||||||
-- whatSg_IP = mkIP "what" "what" "what's" singular ;
|
-- lin to_Prep = mkPrep "";
|
||||||
-- when_IAdv = ss "when" ;
|
-- lin under_Prep = mkPrep "" ;
|
||||||
-- when_Subj = ss "when" ;
|
-- lin with_Prep = mkPrep "" ;
|
||||||
-- where_IAdv = ss "where" ;
|
-- lin without_Prep = mkPrep "" ;
|
||||||
-- which_IQuant = {s = \\_ => "which"} ;
|
|
||||||
-----b whichPl_IDet = mkDeterminer plural ["which"] ;
|
|
||||||
-----b whichSg_IDet = mkDeterminer singular ["which"] ;
|
-------
|
||||||
-- whoPl_IP = mkIP "who" "whom" "whose" plural ;
|
-- Pron
|
||||||
-- whoSg_IP = mkIP "who" "whom" "whose" singular ;
|
|
||||||
-- why_IAdv = ss "why" ;
|
-- Pronouns are closed class, no constructor in ParadigmsHun.
|
||||||
-- without_Prep = mkPrep "without" ;
|
-- it_Pron =
|
||||||
-- with_Prep = mkPrep "with" ;
|
-- i_Pron =
|
||||||
-----b yes_Phr = ss "yes" ;
|
-- youPol_Pron,
|
||||||
-- yes_Utt = ss "yes" ;
|
-- youSg_Pron =
|
||||||
-- youSg_Pron = mkPron "you" "you" "your" "yours" singular P2 human ;
|
-- he_Pron =
|
||||||
-- youPl_Pron = mkPron "you" "you" "your" "yours" plural P2 human ;
|
-- she_Pron =
|
||||||
-- youPol_Pron = mkPron "you" "you" "your" "yours" singular P2 human ;
|
-- we_Pron =
|
||||||
--
|
-- youPl_Pron =
|
||||||
-- not_Predet = {s = "not" ; lock_Predet = <>} ;
|
-- they_Pron =
|
||||||
-- no_Quant = mkQuant "no" "no" "none" "none" ;
|
|
||||||
-- if_then_Conj = mkConj "if" "then" singular ;
|
--lin whatPl_IP = ;
|
||||||
-- nobody_NP = regNP "nobody" singular ;
|
--lin whatSg_IP = :
|
||||||
-- nothing_NP = regNP "nothing" singular ;
|
--lin whoPl_IP = ;
|
||||||
--
|
--lin whoSg_IP = ;
|
||||||
-- at_least_AdN = mkAdN "at least" ;
|
|
||||||
-- at_most_AdN = mkAdN "at most" ;
|
-------
|
||||||
--
|
-- Subj
|
||||||
-- except_Prep = mkPrep "except" ;
|
|
||||||
--
|
-- lin although_Subj =
|
||||||
-- as_CAdv = C.mkCAdv "as" "as" ;
|
-- lin because_Subj =
|
||||||
--
|
-- lin if_Subj =
|
||||||
-- have_V2 = dirV2 (mk5V "have" "has" "had" "had" "having") ;
|
-- lin that_Subj =
|
||||||
-- that_Subj = ss "that" ;
|
-- lin when_Subj =
|
||||||
-- lin language_title_Utt = ss "Hunlish" ;
|
|
||||||
--
|
|
||||||
--}
|
------
|
||||||
--
|
-- Utt
|
||||||
|
|
||||||
|
lin language_title_Utt = ss "magyar" ;
|
||||||
|
lin no_Utt = ss "nem" ;
|
||||||
|
lin yes_Utt = ss "igen" ;
|
||||||
|
|
||||||
|
{-
|
||||||
|
-------
|
||||||
|
-- Verb
|
||||||
|
|
||||||
|
lin have_V2 = vtov2 copula ** {sc = ??};
|
||||||
|
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 "" ;
|
||||||
|
-}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,48 +1,50 @@
|
|||||||
--# -path=.:../abstract:../common
|
--# -path=.:../abstract:../common:../prelude
|
||||||
|
|
||||||
|
concrete SymbolHun of Symbol = CatHun **
|
||||||
|
open Prelude, ParadigmsHun, ResHun, (NS=NounHun) in {
|
||||||
|
|
||||||
|
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 ;
|
||||||
|
|
||||||
|
{-
|
||||||
|
lin
|
||||||
|
-- CNIntNP cn i = {} ;
|
||||||
|
|
||||||
|
-- : Det -> CN -> [Symb] -> NP ; -- (the) (2) numbers x and y
|
||||||
|
CNSymbNP det cn xs =
|
||||||
|
let cnSymb = cn ** { comp = cn.comp ++ xs.s }
|
||||||
|
in NS.DetCN det cnSymb ;
|
||||||
|
|
||||||
|
-- : CN -> Card -> NP ; -- level five ; level 5
|
||||||
|
CNNumNP cn i = NS.MassNP (cn ** { comp = cn.comp ++ i.s }) ;
|
||||||
|
|
||||||
|
-- : Symb -> S ;
|
||||||
|
SymbS sy = {s = } ;
|
||||||
|
-- : Symb -> Card ;
|
||||||
|
SymbNum sy = { s = sy.s ; n = Pl } ;
|
||||||
|
|
||||||
|
-- : Symb -> Ord ;
|
||||||
|
SymbOrd sy = { s =} ;
|
||||||
|
-}
|
||||||
|
lincat
|
||||||
|
Symb, [Symb] = SS ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
MkSymb s = s ;
|
||||||
|
|
||||||
|
BaseSymb = infixSS "és" ;
|
||||||
|
ConsSymb = infixSS "," ;
|
||||||
|
|
||||||
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 } ;
|
|
||||||
--
|
|
||||||
--}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,63 +1,138 @@
|
|||||||
concrete VerbHun of Verb = CatHun ** open ResHun in
|
concrete VerbHun of Verb = CatHun ** open ResHun, AdverbHun, Prelude in {
|
||||||
{
|
|
||||||
--{
|
|
||||||
--
|
lin
|
||||||
-- flags optimize=all_subs ;
|
|
||||||
--
|
-----
|
||||||
-- lin
|
-- VP
|
||||||
-- UseV = predV ;
|
-- : V -> VP
|
||||||
--
|
UseV = ResHun.useV ;
|
||||||
-- SlashV2a v = predVc v ;
|
|
||||||
-- Slash2V3 v np =
|
-- : V2 -> VP ; -- be loved
|
||||||
-- insertObjc (\\_ => v.c2 ++ np.s ! NPAcc) (predV v ** {c2 = v.c3}) ;
|
-- PassV2 = ResHun.passV2 ;
|
||||||
-- Slash3V3 v np =
|
|
||||||
-- insertObjc (\\_ => v.c3 ++ np.s ! NPAcc) (predVc v) ; ----
|
-- : VPSlash -> VP ;
|
||||||
--
|
-- ReflVP = ResHun.insertRefl ;
|
||||||
-- ComplVV v vp = insertObj (\\a => infVP v.typ vp a) (predVV v) ;
|
|
||||||
-- ComplVS v s = insertObj (\\_ => conjThat ++ s.s) (predV v) ;
|
-- : VV -> VP -> VP ;
|
||||||
-- ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ;
|
-- ComplVV vv vp = let vc = vp.vComp in case vv.vvtype of {
|
||||||
-- 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) ;
|
-- : VS -> S -> VP ;
|
||||||
-- SlashV2Q v q = insertObjc (\\_ => q.s ! QIndir) (predVc v) ;
|
-- ComplVS vs s =
|
||||||
-- SlashV2A v ap = insertObjc (\\a => ap.s ! a) (predVc v) ; ----
|
-- let vps = useV vs ;
|
||||||
--
|
-- subord = SubjS {s=""} s ;
|
||||||
-- ComplSlash vp np = insertObjPre (\\_ => vp.c2 ++ np.s ! NPAcc) vp ;
|
-- in vps ** {} ;
|
||||||
--
|
|
||||||
-- SlashVV vv vp =
|
{-
|
||||||
-- insertObj (\\a => infVP vv.typ vp a) (predVV vv) **
|
-- : VQ -> QS -> VP ;
|
||||||
-- {c2 = vp.c2} ;
|
ComplVQ vq qs = ;
|
||||||
-- SlashV2VNP vv np vp =
|
|
||||||
-- insertObjPre (\\_ => vv.c2 ++ np.s ! NPAcc)
|
-- : VA -> AP -> VP ; -- they become red
|
||||||
-- (insertObjc (\\a => vv.c3 ++ infVP vv.typ vp a) (predVc vv)) **
|
ComplVA va ap = ResHun.insertObj (CompAP ap).s (useV va) ;
|
||||||
-- {c2 = vp.c2} ;
|
|
||||||
--
|
--------
|
||||||
-- UseComp comp = insertObj comp.s (predAux auxBe) ;
|
-- Slash
|
||||||
--
|
-- : V2 -> VPSlash
|
||||||
-- AdvVP vp adv = insertObj (\\_ => adv.s) vp ;
|
SlashV2a = ResHun.useVc ;
|
||||||
-- AdVVP adv vp = insertAdV adv.s vp ;
|
|
||||||
--
|
-- : V3 -> NP -> VPSlash ; -- give it (to her)
|
||||||
-- AdvVPSlash vp adv = insertObj (\\_ => adv.s) vp ** {c2 = vp.c2} ;
|
-- : V3 -> NP -> VPSlash ; -- give (it) to her
|
||||||
-- AdVVPSlash adv vp = insertAdV adv.s vp ** {c2 = vp.c2} ;
|
Slash2V3,
|
||||||
--
|
Slash3V3 = \v3 -> insertObj (useVc3 v3) ;
|
||||||
-- ReflVP v = insertObjPre (\\a => v.c2 ++ reflPron ! a) v ;
|
|
||||||
--
|
-- : V2S -> S -> VPSlash ; -- answer (to him) that it is good
|
||||||
-- PassV2 v = insertObj (\\_ => v.s ! VPPart) (predAux auxBe) ;
|
SlashV2S v2s s =
|
||||||
--
|
let vps = useVc v2s ;
|
||||||
-----b UseVS, UseVQ = \vv -> {s = vv.s ; c2 = [] ; isRefl = vv.isRefl} ; -- no "to"
|
subord = SubjS {s=""} s ;
|
||||||
--
|
in vps ** {obj = } ;
|
||||||
-- CompAP ap = ap ;
|
|
||||||
-- CompNP np = {s = \\_ => np.s ! NPAcc} ;
|
|
||||||
-- CompAdv a = {s = \\_ => a.s} ;
|
-- : V2V -> VP -> VPSlash ; -- beg (her) to go
|
||||||
-- CompCN cn = {s = \\a => case (fromAgr a).n of {
|
SlashV2V v2v vp = ;
|
||||||
-- Sg => artIndef ++ cn.s ! Sg ! Nom ;
|
|
||||||
-- Pl => cn.s ! Pl ! Nom
|
-- : V2Q -> QS -> VPSlash ; -- ask (him) who came
|
||||||
-- }
|
SlashV2Q v2q qs = ;
|
||||||
-- } ;
|
|
||||||
--
|
-- : V2A -> AP -> VPSlash ; -- paint (it) red
|
||||||
-- UseCopula = predAux auxBe ;
|
SlashV2A v2a ap = useVc v2a ** {
|
||||||
--
|
aComp = \\_ => (CompAP ap).aComp ! Sg3 Masc
|
||||||
--}
|
} ;
|
||||||
|
|
||||||
|
-- : VPSlash -> NP -> VP
|
||||||
|
ComplSlash = ResHun.insertComp ;
|
||||||
|
|
||||||
|
-- : 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} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- : 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 ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user