*** empty log message ***

This commit is contained in:
janna
2005-11-13 19:35:06 +00:00
parent f0b22f18f1
commit 857094ae0e
4 changed files with 230 additions and 60 deletions

View File

@@ -43,11 +43,20 @@ oper
NounPhrase : Type = { s : PronForm => Str ; n : Number ;
p : Person ; g: PronGen ; anim : Animacy ; pron: Bool} ;
-- No direct correspondance in Russian. Usually expressed by infinitive:
-- "Если очень захотеть, можно в космос улететь"
-- (If one really wants one can fly into the space).
-- Note that the modal verb "can" is trasferred into adverb
-- "можно" (it is possible) in Russian
-- The closest subject is "ты" (you), which is omitted in the final sentence:
-- "Если очень захочешь, можешь в космос улететь"
npOne: NounPhrase = { s=\\_=>""; n=Sg; p=P2; g=PNoGen; anim=Animate;pron=False};
-- The following construction has to be refined for genitive forms:
-- "we two", "us two" are OK, but "our two" is not.
-- actually also "Animacy" for numerals 1-4 should be resent
Numeral : Type = {s : Case => Gender => Str} ;
Numeral : Type = {s : Case => Gender => Str} ;
pronWithNum : NounPhrase -> Numeral -> NounPhrase = \mu,dva ->
{s = \\pf => mu.s!pf ++ dva.s ! (extCase pf) ! (pgen2gen mu.g) ;
@@ -408,8 +417,10 @@ let {n = ivan.n ; nf = if_then_else Number coll Sg n} in
VerbPhrase : Type = Verb ** {s2 : Str ; s3 : Gender => Number => Str ;
negBefore: Bool} ;
VerbPhraseInf : Type = {s : Str; a: Aspect; w:Voice; s2 : Str ;
s3 : Gender => Number => Str ; negBefore: Bool} ;
-- VerbGroup is new in "lib"-verion of the resource.
-- VerbGroup is new in "lib"-verion of the resource.
-- Unlike VerbPhrase, VerbGroup does not have RusTense parameter fixed.
-- It also not yet negated (s2):
@@ -417,7 +428,7 @@ let {n = ivan.n ; nf = if_then_else Number coll Sg n} in
-- A 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 (Bool).
predVerbGroup : Bool -> RusTense -> VerbGroup -> VerbPhrase = \b,t, vidit ->
(extVerb vidit vidit.w t)** {
s2 = negation b ;
@@ -451,7 +462,7 @@ let {n = ivan.n ; nf = if_then_else Number coll Sg n} in
-- Verb phrases can also be formed from adjectives (" молод"),
-- common nouns (" человек"), and noun phrases (" самый молодой").
-- The third rule is overgenerating: " каждый человек" has to be ruled out
-- The third rule is overgenerating: " каждый человек" has to be ruled out
-- on semantic grounds.
-- Note: we omit a dash "-" because it will cause problems with negation word order:
@@ -518,6 +529,10 @@ let {n = ivan.n ; nf = if_then_else Number coll Sg n} in
--2 Adverbials
--
adVerbPhrase : VerbPhrase -> Adverb -> VerbPhrase = \poet, khorosho ->
{s = \\vf => khorosho.s ++ poet.s ! vf ; s2 = poet.s2; s3 = poet.s3;
a = poet.a; w = poet.w; t = poet.t ; negBefore = poet.negBefore } ;
adVerbPhraseInf : VerbPhraseInf -> Adverb -> VerbPhraseInf = \poet, khorosho ->
{s = khorosho.s ++ poet.s ; s2 = poet.s2; s3 = poet.s3;
a = poet.a; w = poet.w; negBefore = poet.negBefore } ;
@@ -572,8 +587,14 @@ oper
in
if_then_else Str tebyaNeVizhu.negBefore
(ya ++ ne ++ vizhu ++ tebya)
(ya ++ vizhu ++ ne ++ tebya)
} ;
} ;
param
Anteriority = Simul | Anter ;
-- for compatibility with Rules.gf:
ClTense = ClPresent | ClPast | ClFuture | ClConditional;
ClForm = ClIndic RusTense Anteriority | ClCondit | ClInfinit ;
-- "naked infinitive" clauses
@@ -588,7 +609,7 @@ oper
ClInfinit => (mkPronForm Acc No NonPoss);
_ =>(mkPronForm Nom No NonPoss)
});
vizhu = tebyaNeVizhu.s ! (case c of {
ne = tebyaNeVizhu.s2 ! b;
vizhu = tebyaNeVizhu.s ! (case c of {
ClInfinit => VFORM tebyaNeVizhu.w (VIMP Ya.n Ya.p);
ClIndic t _ => VFORM tebyaNeVizhu.w (VIND (pgNum Ya.g Ya.n) (getVTense t Ya.p));
@@ -633,7 +654,7 @@ oper
-- 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 = Verbum ;
@@ -671,6 +692,12 @@ oper
negBefore = True;
s3 = table{_=> table{_ => ""}} })) **
complementOfTransVerb lubit ;
thereIs : NounPhrase -> Sentence = \bar ->
{s = "есть" ++ bar.s ! PF Nom No NonPoss} ;
--existCN : CommNoun -> Clause = \ bar ->
-- {s = "есть" ++ bar.s ! PF Nom No NonPoss} ;
--existNumCN: Numeral -> CommNoun -> Clause=\tri, bara ->
-- {s = "есть" ++ bara.s ! PF Nom No NonPoss} ;
@@ -706,17 +733,18 @@ oper
mama.s ! nu ! c ++
mama.s2 ++ kotoruj.s ! gn ! mama.c ! anim
} ;
-- slash expressions ("я вижу").
-- Relative clauses can be formed from both verb phrases ("видит Машу") and
-- slash expressions ("я вижу").
RelClause : Type = {s : Bool => ClForm => GenNum => Case => Animacy => Str} ;
relVerbPhrase : RelPron -> VerbPhrase -> RelClause = \kotoruj, gulyaet ->
{ s = \\b,clf,gn, c, anim => let { nu = numGNum gn } in
kotoruj.s ! gn ! c ! anim ++ gulyaet.s2 ++ gulyaet.s ! VFin gn P3 ++
gulyaet.s3 ! genGNum gn ! nu
relSlash : RelPron -> SentenceSlashNounPhrase -> RelClause =
} ;
relSlash : RelPron -> SentenceSlashNounPhrase -> RelClause =
\kotoruj, yaVizhu ->
@@ -724,7 +752,7 @@ oper
++ yaVizhu.s
} ;
-- A 'degenerate' relative clause is the one often used in mathematics, e.g.
-- "число x, такое что x - четное".
relSuch : Sentence -> RelClause = \A ->
@@ -733,8 +761,8 @@ oper
-- The main use of relative clauses is to modify common nouns.
-- The result is a common noun, out of which noun phrases can be formed
-- by determiners. A comma is used before the relative clause.
\chelovek,kotorujSmeetsya ->
{ s = \\n,c => chelovek.s ! n ! c ++ "," ++
modRelClause : CommNounPhrase -> RelClause -> CommNounPhrase =
\chelovek,kotorujSmeetsya ->
{ s = \\n,c => chelovek.s ! n ! c ++ "," ++
kotorujSmeetsya.s ! True ! ClIndic Present Simul ! gNum chelovek.g n ! Nom ! chelovek.anim;
@@ -904,6 +932,9 @@ isThere : NounPhrase -> Question = \bar ->
imperUtterance : Gender -> Number -> Imperative -> Utterance = \g,n,I ->
ss (I.s ! g ! n ++ "!") ;
--2 Sentence adverbials
--
-- This class covers adverbials such as "otherwise", "therefore", which are prefixed
-- to a sentence to form a phrase.
advSentence : SS -> Sentence -> Utterance = \sledovatelno, mamaMulaRamu ->
ss (sledovatelno.s ++ mamaMulaRamu.s ++ ".") ;
@@ -1140,7 +1171,7 @@ VFORM _ (VIND (ASg _) (VFuture P1))=> "буду"++ masha.s ! (mkPronForm Inst N
predAdjective : AdjPhrase -> VerbGroup = \zloj ->
{ s= table {
-- person is ignored !
VFORM _ (VIMP Sg _) => "будь" ++ zloj.s ! AF Inst Animate (ASg Masc);
VFORM _ (VIMP Pl _) => "будьте" ++ zloj.s ! AF Inst Animate APl ;
-- person is ignored !
VFORM _ VINF => "быть" ++ zloj.s ! AF Inst Animate (ASg Masc) ;