summaryrefslogtreecommitdiff
path: root/next-lib/src/russian/ConjunctionRus.gf
blob: 783399ad038bc08355c2ce72d944f83f0e8eed3f (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
--# -path=.:../abstract:../common:../../prelude

concrete ConjunctionRus of Conjunction = 
  CatRus ** open ResRus, Coordination, Prelude in {

  flags optimize=all_subs ;  coding=utf8 ;

  lin

    ConjS = conjunctDistrSS ;

    ConjAdv = conjunctDistrSS ;
                                                    
    ConjNP c xs =
    conjunctDistrTable PronForm c xs ** {n = conjNumber c.n xs.n ; 
      p = xs.p ; pron = xs.pron ; anim = xs.anim ; 
       g = xs.g } ;


    ConjAP c xs = conjunctDistrTable AdjForm c xs ** {p = xs.p} ;

  ---- AR 17/12/2008
    ConjRS c xs = conjunctDistrTable3 GenNum Case Animacy c xs ** {p = xs.p} ;

-- These fun's are generated from the list cat's.

    BaseS = twoSS ;
    ConsS = consrSS comma ;
    BaseAdv = twoSS ;
    ConsAdv = consrSS comma ;


    ConsNP  x xs =
    consTable PronForm comma xs x ** 
       {n = conjNumber xs.n x.n ; g = conjPGender x.g xs.g ;
          anim = conjAnim x.anim xs.anim ;
          p = conjPerson xs.p x.p; pron = conjPron xs.pron x.pron} ;
      
    ConsAP x xs = consTable AdjForm comma xs x ** {p = andB xs.p x.p} ;


    BaseAP x y = twoTable AdjForm x y ** {p = andB x.p y.p} ;

    BaseNP x y = twoTable PronForm x y ** {n = conjNumber x.n y.n ; 
       g = conjPGender x.g y.g ; p = conjPerson x.p y.p ;
       pron = conjPron x.pron y.pron ; anim = conjAnim x.anim y.anim } ;

  ---- AR 17/12/2008
    BaseRS x y = twoTable3 GenNum Case Animacy x y ** {c = y.c} ;
    ConsRS xs x = consrTable3 GenNum Case Animacy comma xs x ** {c = xs.c} ;



  lincat
    [S] = {s1,s2 : Str} ;
    [Adv] = {s1,s2 : Str} ;
 -- The structure is the same as for sentences. The result is either always plural
 -- or plural if any of the components is, depending on the conjunction.
    [NP] = { s1,s2 : PronForm => Str ; g: PronGen ; 
             anim : Animacy ; n : Number ; p : Person ;  pron : Bool } ;
 -- The structure is the same as for sentences. The result is a prefix adjective
 -- if and only if all elements are prefix.
    [AP] =  {s1,s2 : AdjForm => Str ; p : Bool} ;

  ---- AR 17/12/2008
   [RS] = {s1,s2 : GenNum => Case => Animacy => Str} ;

oper

-- We have to define a calculus of numbers of persons. For numbers,
-- it is like the conjunction with $Pl$ corresponding to $False$.
--
-- The following are given in $ParamX$.
--
--  conjNumber : Number -> Number -> Number = \m,n -> case <m,n> of {
--    <Sg,Sg> => Sg ;
--    _ => Pl 
--    } ;

-- For persons, we let the latter argument win ("либо ты, либо я пойду"
-- but "либо я, либо ты пойдешь"). This is not quite clear.

--  conjPerson : Person -> Person -> Person = \_,p -> 
--    p ;

-- For pron, we let the latter argument win - "Маша или моя мама" (Nominative case)
-- but - "моей или Машина мама" (Genetive case) both corresponds to 
-- "Masha's or my mother"), which is actually not exactly correct, since
-- different cases should be used - "Машина или моя мама".

  conjPron : Bool -> Bool -> Bool = \_,p -> 
    p ;

-- For gender in a similar manner as for person:
-- Needed for adjective predicates like:
-- "Маша или Оля - красивая", "Антон или Олег - красивый",
-- "Маша или Олег - красивый".
-- The later is not totally correct, but there is no correct way to say that.

  conjGender : Gender -> Gender -> Gender = \_,m -> m ; 
 conjPGender : PronGen -> PronGen -> PronGen = \_,m -> m ; 

  conjAnim : Animacy -> Animacy -> Animacy = \_,m -> m ; 


}