forked from GitHub/gf-core
*** empty log message ***
This commit is contained in:
@@ -54,18 +54,20 @@ lincat
|
|||||||
-- = {s : Case => Gender => Str} ;
|
-- = {s : Case => Gender => Str} ;
|
||||||
|
|
||||||
V = Verb ;
|
V = Verb ;
|
||||||
-- = {s : VF => Str ; t: Tense ; a : Aspect ; v: Voice} ;
|
-- = {s : VF => Str ; t: Tense ; a : Aspect ; w: Voice} ;
|
||||||
VG = {s : Bool => VF => Str ; s2 : Bool => Str ; t: Tense ; a : Aspect ; v: Voice} ;
|
VG = VerbGroup ;
|
||||||
|
-- = Verb ;
|
||||||
VP = VerbPhrase ;
|
VP = VerbPhrase ;
|
||||||
-- = Verb ** {s2 : Str ; s3 : Gender => Number => Str ;
|
-- = Verb ** {s2 : Str ; s3 : Gender => Number => Str ;
|
||||||
-- negBefore: Bool} ;
|
-- negBefore: Bool} ;
|
||||||
TV = TransVerb ;
|
TV = TransVerb ;
|
||||||
-- = Verb ** {s2 : Str ; c: Case } ;
|
-- = Verb ** {s2 : Str ; c: Case } ;
|
||||||
V3 = TransVerb ** {s4 : Str; c2: Case} ;
|
V3 = DitransVerb ;
|
||||||
|
-- = TransVerb ** {s4 : Str; c2: Case} ;
|
||||||
VS = SentenceVerb ;
|
VS = SentenceVerb ;
|
||||||
-- = Verb ;
|
-- = Verb ;
|
||||||
VV = Verb ;
|
VV = VerbVerb ;
|
||||||
|
-- = Verb ;
|
||||||
AdV = Adverb ;
|
AdV = Adverb ;
|
||||||
-- = {s : Str} ;
|
-- = {s : Str} ;
|
||||||
Prep = Preposition;
|
Prep = Preposition;
|
||||||
@@ -147,6 +149,22 @@ lin
|
|||||||
--PosVS = complSentVerb True ;
|
--PosVS = complSentVerb True ;
|
||||||
--NegVS = complSentVerb False ;
|
--NegVS = complSentVerb False ;
|
||||||
|
|
||||||
|
PosVG = predVerbGroup True ;
|
||||||
|
NegVG = predVerbGroup False ;
|
||||||
|
|
||||||
|
PredV v = v ;
|
||||||
|
PredAP = predAdjective ;
|
||||||
|
PredCN = predCommNoun ;
|
||||||
|
PredTV = complTransVerb ;
|
||||||
|
PredV3 = complDitransVerb ;
|
||||||
|
PredPassV v = v ;
|
||||||
|
PredNP = predNounPhrase ;
|
||||||
|
PredAdV = predAdverb ;
|
||||||
|
PredVS = complSentVerb ;
|
||||||
|
PredVV = complVerbVerb ;
|
||||||
|
VTrans = verbOfTransVerb ;
|
||||||
|
|
||||||
|
|
||||||
AdjAdv a = mkAdverb (a.s ! AdvF) ;
|
AdjAdv a = mkAdverb (a.s ! AdvF) ;
|
||||||
PrepNP p = prepPhrase p ;
|
PrepNP p = prepPhrase p ;
|
||||||
AdvVP = adVerbPhrase ;
|
AdvVP = adVerbPhrase ;
|
||||||
@@ -156,8 +174,8 @@ lin
|
|||||||
|
|
||||||
PosSlashTV = slashTransVerb True ;
|
PosSlashTV = slashTransVerb True ;
|
||||||
NegSlashTV = slashTransVerb False ;
|
NegSlashTV = slashTransVerb False ;
|
||||||
-- OneVP = predVerbPhrase (nameNounPhrase (nameReg "one")) ;
|
OneVP = predVerbPhrase (pron2NounPhrase pronKtoTo Animate) ;
|
||||||
--ThereNP = thereIs ;
|
ThereNP = thereIs ;
|
||||||
|
|
||||||
IdRP = identRelPron ;
|
IdRP = identRelPron ;
|
||||||
FunRP = funRelPron ;
|
FunRP = funRelPron ;
|
||||||
@@ -178,7 +196,7 @@ lin
|
|||||||
IntVP = intVerbPhrase ;
|
IntVP = intVerbPhrase ;
|
||||||
IntSlash = intSlash ;
|
IntSlash = intSlash ;
|
||||||
QuestAdv = questAdverbial ;
|
QuestAdv = questAdverbial ;
|
||||||
--IsThereNP = isThere ;
|
IsThereNP = isThere ;
|
||||||
|
|
||||||
ImperVP = imperVerbPhrase ;
|
ImperVP = imperVerbPhrase ;
|
||||||
|
|
||||||
|
|||||||
@@ -457,6 +457,7 @@ oper eEndInAnimateDecl: Str -> CommNoun = \proizvedeni ->
|
|||||||
SF Pl Gen => proizvedeni+"й" ;
|
SF Pl Gen => proizvedeni+"й" ;
|
||||||
SF Pl Dat => proizvedeni+"ям" ;
|
SF Pl Dat => proizvedeni+"ям" ;
|
||||||
SF Pl Acc => proizvedeni+"я" ;
|
SF Pl Acc => proizvedeni+"я" ;
|
||||||
|
SF Pl Inst => proizvedeni+"ями" ;
|
||||||
SF Pl Prepos => proizvedeni+"ях"
|
SF Pl Prepos => proizvedeni+"ях"
|
||||||
} ;
|
} ;
|
||||||
g = Neut ; anim = Inanimate
|
g = Neut ; anim = Inanimate
|
||||||
@@ -555,7 +556,9 @@ oper EN_softSignEndDeclMasc: Str -> CommNoun = \rem ->
|
|||||||
SF Sg Acc => rem+"ень" ;
|
SF Sg Acc => rem+"ень" ;
|
||||||
SF Sg Inst => rem+"нем" ;
|
SF Sg Inst => rem+"нем" ;
|
||||||
|
|
||||||
|
SF Sg Prepos => rem+"не" ;
|
||||||
SF Pl Nom => rem+"ни" ;
|
SF Pl Nom => rem+"ни" ;
|
||||||
|
SF Pl Gen => rem+"ней" ;
|
||||||
SF Pl Dat => rem+"ням" ;
|
SF Pl Dat => rem+"ням" ;
|
||||||
SF Pl Acc => rem+"ни" ;
|
SF Pl Acc => rem+"ни" ;
|
||||||
SF Pl Inst => rem+"нями" ;
|
SF Pl Inst => rem+"нями" ;
|
||||||
@@ -717,6 +720,8 @@ oper eEnd_Decl: Str -> CommNoun = \vs ->
|
|||||||
SF Sg Dat => vs+"ем" ;
|
SF Sg Dat => vs+"ем" ;
|
||||||
SF Sg Acc => vs+"ех" ;
|
SF Sg Acc => vs+"ех" ;
|
||||||
SF Sg Inst => vs+"еми" ;
|
SF Sg Inst => vs+"еми" ;
|
||||||
|
SF Sg Prepos => vs+"ех" ;
|
||||||
|
SF Pl Nom => vs+"е" ;
|
||||||
SF Pl Gen => vs +"ех";
|
SF Pl Gen => vs +"ех";
|
||||||
|
|
||||||
SF Pl Dat => vs+"ем" ;
|
SF Pl Dat => vs+"ем" ;
|
||||||
@@ -742,6 +747,7 @@ oper mkAdjDeg: Adjective -> Str -> AdjDegr = \adj, s ->
|
|||||||
kazhdujDet: Adjective = uy_j_EndDecl "кажд" ;
|
kazhdujDet: Adjective = uy_j_EndDecl "кажд" ;
|
||||||
samuj: Adjective = uy_j_EndDecl "сам" ;
|
samuj: Adjective = uy_j_EndDecl "сам" ;
|
||||||
lubojDet: Adjective = uy_oj_EndDecl "люб" ;
|
lubojDet: Adjective = uy_oj_EndDecl "люб" ;
|
||||||
|
kotorujDet: Adjective = uy_j_EndDecl "котор";
|
||||||
nekotorujDet: Adjective = uy_j_EndDecl "некотор";
|
nekotorujDet: Adjective = uy_j_EndDecl "некотор";
|
||||||
takoj: Adjective = i_oj_EndDecl "так" [];
|
takoj: Adjective = i_oj_EndDecl "так" [];
|
||||||
kakojNibudDet: Adjective = i_oj_EndDecl "как" "-нибудь";
|
kakojNibudDet: Adjective = i_oj_EndDecl "как" "-нибудь";
|
||||||
@@ -1001,7 +1007,7 @@ oper have: Verbum = {s=\\ vf => "-" ; asp = Imperfective} ;
|
|||||||
AF _ _ (ASg Masc) => s;
|
AF _ _ (ASg Masc) => s;
|
||||||
AF _ _ (ASg Fem) => s+"а";
|
AF _ _ (ASg Fem) => s+"а";
|
||||||
AF _ _ (ASg Neut) => s+"о";
|
AF _ _ (ASg Neut) => s+"о";
|
||||||
AF _ _ APl => s+"ы" ;
|
AF _ _ APl => s+"ы" ;
|
||||||
AdvF => "о"
|
AdvF => "о"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
@@ -1012,11 +1018,16 @@ oper verbZhdat : Verbum = verbDecl Imperfective First "жд" "у" "ждал" "ж
|
|||||||
AF _ _ APl => s+"ны" ;
|
AF _ _ APl => s+"ны" ;
|
||||||
AdvF => "о"
|
AdvF => "о"
|
||||||
}
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
-- 2 Adverbs
|
-- 2 Adverbs
|
||||||
|
|
||||||
oper vsegda: Adverb = { s = "всегда" } ;
|
oper vsegda: Adverb = { s = "всегда" } ;
|
||||||
|
oper chorosho: Adverb = { s = "хорошо" } ;
|
||||||
|
|
||||||
|
-- 2 Verbs
|
||||||
|
|
||||||
|
|
||||||
-- Dummy verbum "have" that corresponds to the phrases like
|
-- Dummy verbum "have" that corresponds to the phrases like
|
||||||
-- "I have a headache" in English. The corresponding sentence
|
-- "I have a headache" in English. The corresponding sentence
|
||||||
@@ -1069,6 +1080,15 @@ oper presentConj2: Str -> Str -> PresentVerb = \del, sgP1End ->
|
|||||||
-- so that the full type can be described as a combination
|
-- so that the full type can be described as a combination
|
||||||
-- of the intermediate types. For example "AspectVoice"
|
-- of the intermediate types. For example "AspectVoice"
|
||||||
-- is a type for defining a pattern for a particular
|
-- is a type for defining a pattern for a particular
|
||||||
|
-- aspect and voice.
|
||||||
|
|
||||||
|
oper AspectVoice: Type = { s : VerbConj => Str ; asp: Aspect } ;
|
||||||
|
|
||||||
|
-- "PresentVerb" takes care of the present tense conjugation.
|
||||||
|
|
||||||
|
param PresentVF = PRF Number Person ;
|
||||||
|
oper PresentVerb : Type = PresentVF => Str ;
|
||||||
|
oper presentConjDolzhen: Str -> Str -> PresentVerb = \del, sgP1End ->
|
||||||
table {
|
table {
|
||||||
PRF Sg P1 => del+ sgP1End ;
|
PRF Sg P1 => del+ sgP1End ;
|
||||||
PRF Sg P2 => del+ sgP1End ;
|
PRF Sg P2 => del+ sgP1End ;
|
||||||
@@ -1106,12 +1126,14 @@ oper verbDecl: Aspect -> Conjugation -> Str -> Str -> Str -> Str ->Str -> Verbum
|
|||||||
PRF Pl P3 => del+ sgP1End + "т"
|
PRF Pl P3 => del+ sgP1End + "т"
|
||||||
};
|
};
|
||||||
oper presentConj1: Str -> Str -> PresentVerb = \del, sgP1End ->
|
oper presentConj1: Str -> Str -> PresentVerb = \del, sgP1End ->
|
||||||
|
table {
|
||||||
PRF Sg P1 => del+ sgP1End ;
|
PRF Sg P1 => del+ sgP1End ;
|
||||||
PRF Sg P2 => del+ "ешь" ;
|
PRF Sg P2 => del+ "ешь" ;
|
||||||
PRF Sg P3 => del+ "ет" ;
|
PRF Sg P3 => del+ "ет" ;
|
||||||
PRF Pl P1 => del+ "ем" ;
|
PRF Pl P1 => del+ "ем" ;
|
||||||
|
|
||||||
PRF Pl P2 => del+ "ете'" ;
|
PRF Pl P2 => del+ "ете'" ;
|
||||||
|
PRF Pl P3 => del+ sgP1End + "т"
|
||||||
};
|
};
|
||||||
|
|
||||||
-- "PastVerb" takes care of the past tense conjugation.
|
-- "PastVerb" takes care of the past tense conjugation.
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
--# -path=.:../abstract:../../prelude
|
--# -path=.:../abstract:../../prelude
|
||||||
|
|
||||||
resource ResourceRus = reuse StructuralRus ;
|
resource ResourceRus = reuse StructuralRus ;
|
||||||
|
|||||||
@@ -175,7 +175,6 @@ oper
|
|||||||
-- (for semantic reasons) is useful, e.g. "русский".
|
-- (for semantic reasons) is useful, e.g. "русский".
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
|
||||||
extAdjective : AdjDegr -> Adjective = \adj ->
|
extAdjective : AdjDegr -> Adjective = \adj ->
|
||||||
{ s = \\af => adj.s ! Pos ! af } ;
|
{ s = \\af => adj.s ! Pos ! af } ;
|
||||||
|
|
||||||
@@ -365,10 +364,9 @@ oper
|
|||||||
|
|
||||||
-- The rule for using transitive verbs is the complementization rule:
|
-- The rule for using transitive verbs is the complementization rule:
|
||||||
|
|
||||||
complTransVerb : Bool -> TransVerb -> NounPhrase -> VerbPhrase = \b,se,tu ->
|
complTransVerb :TransVerb -> NounPhrase -> VerbGroup = \se,tu ->
|
||||||
{s = se.s ; a = se.a ; t = se.t ; w = se.w ; s2 = negation b ;
|
{s =\\vf => se.s ! vf ++ se.s2 ++ tu.s ! (mkPronForm se.c No NonPoss) ;
|
||||||
s3 = \\_,_ => se.s2 ++ tu.s ! (mkPronForm se.c No NonPoss) ;
|
a = se.a ; t = se.t ; w = se.w } ;
|
||||||
negBefore = True } ;
|
|
||||||
|
|
||||||
--3 Verb phrases
|
--3 Verb phrases
|
||||||
--
|
--
|
||||||
@@ -377,17 +375,18 @@ oper
|
|||||||
-- (s3) complement. This discontinuity is needed in sentence formation
|
-- (s3) complement. This discontinuity is needed in sentence formation
|
||||||
-- to account for word order variations.
|
-- to account for word order variations.
|
||||||
|
|
||||||
|
VerbGroup = Verb ;
|
||||||
|
|
||||||
VerbPhrase : Type = Verb ** {s2 : Str ; s3 : Gender => Number => Str ;
|
VerbPhrase : Type = Verb ** {s2 : Str ; s3 : Gender => Number => Str ;
|
||||||
negBefore: Bool} ;
|
negBefore: Bool} ;
|
||||||
|
|
||||||
-- A simple verb can be made into a verb phrase with an empty complement.
|
-- A simple verb can be made into a verb phrase with an empty complement.
|
||||||
-- There are two versions, depending on if we want to negate the verb.
|
-- There are two versions, depending on if we want to negate the verb.
|
||||||
|
predVerbGroup : Bool -> VerbGroup -> VerbPhrase = \b,vidit ->
|
||||||
predVerb : Bool -> Verb -> VerbPhrase = \b,vidit ->
|
|
||||||
vidit ** {
|
vidit ** {
|
||||||
s2 = negation b ;
|
s2 = negation b ;
|
||||||
s3 = \\_,_ => [] ;
|
s3 = \\_,_ => [] ;
|
||||||
negBefore = True
|
negBefore = True -- this should be a parameter !
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
negation : Bool -> Str = \b -> if_then_else Str b [] "не" ;
|
negation : Bool -> Str = \b -> if_then_else Str b [] "не" ;
|
||||||
@@ -405,37 +404,56 @@ oper
|
|||||||
-- Note: in some case we can even omit a dash "-" :
|
-- Note: in some case we can even omit a dash "-" :
|
||||||
-- "Я думаю, что это хорошая машина".
|
-- "Я думаю, что это хорошая машина".
|
||||||
|
|
||||||
predAdjective : Bool -> Adjective -> VerbPhrase = \b,zloj ->
|
predAdverb : Adverb -> VerbGroup = \zloj ->
|
||||||
{ s= \\_ => "-" ;
|
{ s= \\vf => case vf of {
|
||||||
|
VFin _ _ => "-" ++ zloj.s ;
|
||||||
|
VImper _ _ => "";
|
||||||
|
VInf => "";
|
||||||
|
VSubj _ => ""
|
||||||
|
} ;
|
||||||
t = Present ;
|
t = Present ;
|
||||||
a = Imperfective ;
|
a = Imperfective ;
|
||||||
w = Act ;
|
w = Act
|
||||||
s2 = negation b ;
|
|
||||||
s3 = \\g,n => case n of {
|
|
||||||
Sg => zloj.s ! AF Nom Animate (ASg g) ;
|
|
||||||
Pl => zloj.s ! AF Nom Animate APl
|
|
||||||
} ;
|
|
||||||
negBefore = False
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
predCommNoun : Bool -> CommNounPhrase -> VerbPhrase = \b,chelovek ->
|
predAdjective : AdjPhrase -> VerbGroup = \zloj ->
|
||||||
{ s= \\_ => "-" ;
|
{ s= \\vf => case vf of {
|
||||||
|
VFin gn _ => case (numGNum gn) of {
|
||||||
|
Sg => "-" ++ zloj.s ! AF Nom Animate (ASg (genGNum gn)) ;
|
||||||
|
Pl => "-" ++ zloj.s ! AF Nom Animate APl
|
||||||
|
} ;
|
||||||
|
VImper _ _ => "";
|
||||||
|
VInf => "";
|
||||||
|
VSubj _ => ""
|
||||||
|
} ;
|
||||||
t = Present ;
|
t = Present ;
|
||||||
a = Imperfective ;
|
a = Imperfective ;
|
||||||
w = Act ;
|
w = Act
|
||||||
s2 = negation b ;
|
|
||||||
s3 = \\_,n => (indefNounPhrase n chelovek ).s ! (mkPronForm Nom No NonPoss) ;
|
|
||||||
negBefore = False
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
predNounPhrase : Bool -> NounPhrase -> VerbPhrase = \b,masha ->
|
predCommNoun : CommNounPhrase -> VerbGroup = \chelovek ->
|
||||||
{ s= \\_ => "-" ;
|
{ s= \\vf => case vf of {
|
||||||
|
VFin gn _ => "-" ++
|
||||||
|
(indefNounPhrase (numGNum gn) chelovek ).s ! (mkPronForm Nom No NonPoss) ;
|
||||||
|
VImper _ _ => "";
|
||||||
|
VInf => "";
|
||||||
|
VSubj _ => ""
|
||||||
|
} ;
|
||||||
t = Present ;
|
t = Present ;
|
||||||
a = Imperfective ;
|
a = Imperfective ;
|
||||||
w = Act ;
|
w = Act
|
||||||
s2 = negation b ;
|
} ;
|
||||||
s3 = \\_,_ => masha.s ! (mkPronForm Nom No NonPoss) ;
|
|
||||||
negBefore = False
|
predNounPhrase : NounPhrase -> VerbGroup = \masha ->
|
||||||
|
{ s= \\vf => case vf of {
|
||||||
|
VFin _ _ => "-" ++ masha.s ! (mkPronForm Nom No NonPoss) ;
|
||||||
|
VImper _ _ => "";
|
||||||
|
VInf => "";
|
||||||
|
VSubj _ => ""
|
||||||
|
} ;
|
||||||
|
t = Present ;
|
||||||
|
a = Imperfective ;
|
||||||
|
w = Act
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- A function specific for Russian :
|
-- A function specific for Russian :
|
||||||
@@ -462,6 +480,28 @@ oper
|
|||||||
s2 = poezd.s3; c = poezd.c2
|
s2 = poezd.s3; c = poezd.c2
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
-- *Ditransitive verbs* are verbs with three argument places.
|
||||||
|
-- We treat so far only the rule in which the ditransitive
|
||||||
|
-- verb takes both complements to form a verb phrase.
|
||||||
|
|
||||||
|
DitransVerb = TransVerb ** {s4 : Str; c2: Case} ;
|
||||||
|
|
||||||
|
mkDitransVerb : Verb -> Case -> Case -> DitransVerb = \v,c1,c2 ->
|
||||||
|
v ** {s2 = ""; c = c1; s4 = ""; c2=c2 } ;
|
||||||
|
|
||||||
|
complDitransVerb : DitransVerb -> NounPhrase -> NounPhrase -> VerbGroup =
|
||||||
|
\dat,tu,pivo ->
|
||||||
|
let
|
||||||
|
tebepivo = dat.s2 ++
|
||||||
|
tu.s ! PF dat.c Yes NonPoss ++ dat.s4 ++ pivo.s ! PF dat.c2 Yes NonPoss
|
||||||
|
in
|
||||||
|
{s = \\vf => (dat.s ! vf) ++ tebepivo ;
|
||||||
|
t = dat.t ;
|
||||||
|
a = dat.a ;
|
||||||
|
w = dat.w
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
--2 Adverbials
|
--2 Adverbials
|
||||||
--
|
--
|
||||||
adVerbPhrase : VerbPhrase -> Adverb -> VerbPhrase = \poet, khorosho ->
|
adVerbPhrase : VerbPhrase -> Adverb -> VerbPhrase = \poet, khorosho ->
|
||||||
@@ -539,7 +579,7 @@ oper
|
|||||||
-- This is a macro for simultaneous predication and complementation.
|
-- This is a macro for simultaneous predication and complementation.
|
||||||
|
|
||||||
predTransVerb : Bool -> TransVerb -> NounPhrase -> NounPhrase -> Sentence =
|
predTransVerb : Bool -> TransVerb -> NounPhrase -> NounPhrase -> Sentence =
|
||||||
\b,vizhu,ya,tu -> predVerbPhrase ya (complTransVerb b vizhu tu) ;
|
\b,vizhu,ya,tu -> predVerbPhrase ya (predVerbGroup b (complTransVerb vizhu tu)) ;
|
||||||
|
|
||||||
--3 Sentence-complement verbs
|
--3 Sentence-complement verbs
|
||||||
--
|
--
|
||||||
@@ -549,12 +589,33 @@ oper
|
|||||||
|
|
||||||
-- To generate "сказал, что Иван гуляет" / "не сказал, что Иван гуляет":
|
-- To generate "сказал, что Иван гуляет" / "не сказал, что Иван гуляет":
|
||||||
|
|
||||||
complSentVerb : Bool -> SentenceVerb -> Sentence -> VerbPhrase =
|
complSentVerb : SentenceVerb -> Sentence -> VerbGroup =
|
||||||
\b,vidit,tuUlubaeshsya ->
|
\vidit,tuUlubaeshsya ->
|
||||||
{s = vidit.s ; s2 = negation b ; s3 = \\_,_ => [", что"] ++
|
{s = \\vf => vidit.s ! vf ++ [", что"] ++ tuUlubaeshsya.s ;
|
||||||
tuUlubaeshsya.s ;
|
t = vidit.t ; w = vidit.w ; a = vidit.a } ;
|
||||||
t = vidit.t ; w = vidit.w ; a = vidit.a ; negBefore = True } ;
|
|
||||||
|
|
||||||
|
--3 Verb-complement verbs
|
||||||
|
--
|
||||||
|
-- Sentence-complement verbs take verb phrases as complements.
|
||||||
|
-- They can be auxiliaries ("can", "must") or ordinary verbs
|
||||||
|
-- ("try"); this distinction cannot be done in the multilingual
|
||||||
|
-- API and leads to some anomalies in English, such as the necessity
|
||||||
|
-- to create the infinitive form "to be able to" for "can" so that
|
||||||
|
-- the construction can be iterated, and the corresponding complication
|
||||||
|
-- in the parameter structure.
|
||||||
|
|
||||||
|
VerbVerb : Type = Verb ;
|
||||||
|
|
||||||
|
-- To generate "can walk"/"can't walk"; "tries to walk"/"does not try to walk":
|
||||||
|
-- The contraction of "not" is not provided, since it would require changing
|
||||||
|
-- the verb parameter type.
|
||||||
|
|
||||||
|
complVerbVerb : VerbVerb -> VerbGroup -> VerbGroup = \putatsya,bezhat ->
|
||||||
|
{ s = \\vf => putatsya.s ! vf ++ bezhat.s ! VInf ;
|
||||||
|
t = putatsya.t ;
|
||||||
|
a = putatsya.a ;
|
||||||
|
w = putatsya.w
|
||||||
|
} ;
|
||||||
|
|
||||||
--2 Sentences missing noun phrases
|
--2 Sentences missing noun phrases
|
||||||
--
|
--
|
||||||
@@ -570,16 +631,13 @@ oper
|
|||||||
|
|
||||||
slashTransVerb : Bool -> NounPhrase -> TransVerb -> SentenceSlashNounPhrase =
|
slashTransVerb : Bool -> NounPhrase -> TransVerb -> SentenceSlashNounPhrase =
|
||||||
\b,ivan,lubit ->
|
\b,ivan,lubit ->
|
||||||
predVerbPhrase ivan (predVerb b (verbOfTransVerb lubit)) **
|
predVerbPhrase ivan (predVerbGroup b (verbOfTransVerb lubit)) **
|
||||||
complementOfTransVerb lubit ;
|
complementOfTransVerb lubit ;
|
||||||
|
|
||||||
--thereIs : NounPhrase -> Sentence = \abar ->
|
thereIs : NounPhrase -> Sentence = \bar ->
|
||||||
-- predVerbPhrase
|
predVerbPhrase
|
||||||
-- (case abar.n of {
|
({s = \\_ => "есть" ; n = bar.n ; p = P3; g = bar.g; anim = bar.anim; pron = bar.pron })
|
||||||
-- Sg => nameNounPhrase (nameReg "there") ;
|
(predVerbGroup True (predNounPhrase bar)) ;
|
||||||
-- Pl => {s = \\_ => "there" ; n = Pl ; p = P3}
|
|
||||||
-- })
|
|
||||||
-- (predVerbGroup True (predNounPhrase abar)) ;
|
|
||||||
|
|
||||||
--2 Coordination
|
--2 Coordination
|
||||||
--
|
--
|
||||||
@@ -752,13 +810,10 @@ oper
|
|||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--isThere : NounPhrase -> Question = \abar ->
|
isThere : NounPhrase -> Question = \bar ->
|
||||||
-- questVerbPhrase
|
questVerbPhrase
|
||||||
-- (case abar.n of {
|
({s = \\_ => ["есть ли"] ; n = bar.n ; p = P3; g = bar.g; anim = bar.anim; pron = bar.pron})
|
||||||
-- Sg => nameNounPhrase (nameReg "there") ;
|
(predVerbGroup True (predNounPhrase bar)) ;
|
||||||
-- Pl => {s = \\_ => "there" ; n = Pl ; p = P3}
|
|
||||||
-- })
|
|
||||||
-- (predVerbGroup True (predNounPhrase abar)) ;
|
|
||||||
|
|
||||||
--3 Wh-questions
|
--3 Wh-questions
|
||||||
--
|
--
|
||||||
|
|||||||
@@ -14,12 +14,17 @@ lin
|
|||||||
Old = staruj ;
|
Old = staruj ;
|
||||||
Young = molodoj ;
|
Young = molodoj ;
|
||||||
|
|
||||||
--Connection = cnNoHum (nounReg "connection") ** {s2 = "from" ; s3 = "to"} ; Fun2
|
Connection = (noun2CommNounPhrase (doroga) )** {s2 = "из" ; c = Gen; s3 = "в"; c2=Acc} ;
|
||||||
-- American = adj1Malenkij "американск" ;
|
American = ij_EndK_G_KH_Decl "американск" ; -- adj1Malenkij from Paradigms
|
||||||
-- Finnish = adj1Malenkij "финск" ;
|
Finnish = ij_EndK_G_KH_Decl "финск" ; -- adj1Malenkij from Paradigms
|
||||||
-- Married = adjInvar "замужем" ** {s2 = "за"; c = instructive} ;
|
Married = adjInvar "замужем" ** {s2 = "за"; c = Inst} ; -- adjinvar from Paradigms
|
||||||
--Give = mkDitransVerb (verbNoPart (mkVerb "give" "gave" "given")) [] [] ; V3
|
Give = mkDitransVerb (extVerb verbDavat Act Present) Acc Dat;
|
||||||
--Prefer = mkDitransVerb (mkVerb "prefer" "preferred" "preferred")) [] "to" ; V3
|
Prefer = mkDitransVerb (extVerb verbPredpochitat Act Present) Acc Dat ;
|
||||||
|
Bar = bar ;
|
||||||
|
Bottle = butyulka ;
|
||||||
|
Wine = vino ;
|
||||||
|
Drink = mkDirectVerb (extVerb verbPit Act Present ) ;
|
||||||
|
Happy = schastlivyuj ;
|
||||||
|
|
||||||
Man = muzhchina ;
|
Man = muzhchina ;
|
||||||
Woman = zhenchina ;
|
Woman = zhenchina ;
|
||||||
|
|||||||
Reference in New Issue
Block a user