summaryrefslogtreecommitdiff
path: root/deprecated/old-lib/resource/russian/SentenceRus.gf
blob: 9636946733e6381a901181629b7030bfe0c1032b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115

--# -path=.:../abstract:../common:../../prelude


concrete SentenceRus of Sentence = CatRus ** open Prelude, ResRus in {

  flags optimize=all_subs ; coding=utf8 ;

  lin

    PredVP Ya tebyaNeVizhu = { s = \\b,clf =>
       let  { 
          ya = Ya.s ! (case clf of {
              ClInfinit => (mkPronForm Acc No NonPoss); 
               _ => (mkPronForm Nom No NonPoss)
               });
         ne = case b of {Pos=>""; Neg=>"не"};
         vizhu = tebyaNeVizhu.s ! clf ! (pgNum Ya.g Ya.n)! Ya.p;
         khorosho = tebyaNeVizhu.s2 ;
         tebya = tebyaNeVizhu.s3 ! (pgen2gen Ya.g) ! Ya.n 
       }
       in
       if_then_else Str tebyaNeVizhu.negBefore  
        (ya ++ ne ++ vizhu ++ tebya ++ khorosho)
        (ya ++ vizhu ++ ne ++ tebya ++ khorosho)
    } ;


    PredSCVP sc vp = { s = \\b,clf => 
       let  { 
         ne = case b of {Pos=>""; Neg=>"не"};
         vizhu = vp.s ! clf ! (ASg Neut)! P3;
         tebya = vp.s3 ! Neut ! Sg 
       }
       in
       if_then_else Str vp.negBefore  
        (sc.s ++ ne ++ vizhu ++ tebya)
        (sc.s ++ vizhu ++ ne ++ tebya)
    } ;
{-
    SlashV2 ivan lubit = { s=\\b,clf => ivan.s ! PF Nom No NonPoss ++ 
         lubit.s! (getActVerbForm clf (pgen2gen ivan.g) ivan.n ivan.p) ;
         s2=lubit.s2; c=lubit.c };

    SlashVVV2 ivan khotet lubit =
   { s=\\b,clf => ivan.s ! PF Nom No NonPoss ++ khotet.s! (getActVerbForm clf (pgen2gen ivan.g) ivan.n ivan.p) ++ lubit.s! VFORM Act VINF ;
    s2=lubit.s2; 
    c=lubit.c  };
-}
    AdvSlash slash adv = {
      s  = \\b,clf => slash.s ! b ! clf ++ adv.s ;
      c = slash.c;
      s2 = slash.s2;
    } ;

    SlashPrep cl p =  {s=cl.s; s2=p.s; c=p.c} ;     

    --- AR 3/11/2007
    SlashVS ivan vidit tuUlubaeshsya = { 
      s=\\b,clf => ivan.s ! PF Nom No NonPoss ++ 
         vidit.s! (getActVerbForm clf (pgen2gen ivan.g) ivan.n ivan.p) ++
         [", что"] ++ tuUlubaeshsya.s ;
      s2=tuUlubaeshsya.s2; 
      c=tuUlubaeshsya.c 
    } ;



    ImpVP inf = {s = \\pol, g,n =>          
        let 
          dont  = case pol of {
            Neg => "не" ;
            _ => []
            }
        in
        dont ++ inf.s ! ClImper ! (gNum g n )!P2 ++ 
        inf.s2++inf.s3!g!n
    } ;

    EmbedS  s  = {s = "что" ++ s.s} ;
 -- In Russian "Whether you go" transformed in "go whether you":
    EmbedQS qs = {s = qs.s ! QIndir} ;
    EmbedVP vp = {s = vp.s2  ++ vp.s!ClInfinit!(ASg Masc) !P3 ++ vp.s3!Masc!Sg} ;

    UseCl  t a p cl = {s = case t.t of { 
      Cond => cl.s! p.p ! ClCondit ; --# notpresent
      Pres => cl.s! p.p ! ClIndic Present a.a ;  ---- AR work-around 13/12/2007
      _ => cl.s! p.p ! ClIndic (getTense t.t) a.a}};

    UseQCl t a p qcl= {s = case t.t of { 
      Cond => qcl.s! p.p ! ClCondit ; --# notpresent
      Pres => qcl.s! p.p ! ClIndic Present a.a ;
      _ => qcl.s!p.p! ClIndic (getTense t.t) a.a }};

    UseRCl t a p rcl ={s = \\gn,c,anim => case t.t of { 
      Cond => [", "] ++ rcl.s! p.p ! ClCondit ! gn !c !anim ; --# notpresent
      Pres => [", "] ++ rcl.s! p.p ! ClIndic Present a.a !gn !c !anim;
      _ => [", "] ++ rcl.s! p.p ! ClIndic (getTense t.t) a.a !gn !c !anim}};

    UseSlash  t a p cl = {
      s = case t.t of { 
        Cond => cl.s! p.p ! ClCondit ; --# notpresent
        Pres => cl.s! p.p ! ClIndic Present a.a ;
        _ => cl.s! p.p ! ClIndic (getTense t.t) a.a
        } ;
      s2 = cl.s2 ;
      c = cl.c
    };


    AdvS a s = {s = a.s ++ "," ++ s.s} ; ---- AR 19/6/2007


}