summaryrefslogtreecommitdiff
path: root/next-lib/src/romance/QuestionRomance.gf
blob: 6d2fa86695ac208910e9c8429cf08559e25b9c15 (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
incomplete concrete QuestionRomance of Question = 
  CatRomance ** open CommonRomance, ResRomance, Prelude in {

  flags optimize=all_subs ;

  lin

    QuestCl cl = {
      s = \\t,a,p => 
            let cls = cl.s ! DDir ! t ! a ! p ---- DInv? 
            in table {
              QDir   => cls ! Indic ;
              QIndir => subjIf ++ cls ! Indic
              }
      } ;

    QuestVP qp vp = {
      s = \\t,a,b,_ => 
        let
          cl = mkClause (qp.s ! Nom) False (agrP3 qp.a.g qp.a.n) vp  
        in
        cl.s ! DDir ! t ! a ! b ! Indic
      } ;   

    QuestSlash ip slash = {
      s = \\t,a,p => 
            let 
              cls : Direct -> Str = 
                    \d -> slash.s ! ip.a ! d ! t ! a ! p ! Indic ;
              who = slash.c2.s ++ ip.s ! slash.c2.c
            in table {
              QDir   => who ++ cls DInv ;
              QIndir => who ++ cls DDir
              }
      } ;

    QuestIAdv iadv cl = {
      s = \\t,a,p,q => 
            let 
              ord = case q of {
                QDir   => DInv ;
                QIndir => DDir
              } ;
              cls = cl.s ! ord ! t ! a ! p ! Indic ;
              why = iadv.s
            in why ++ cls
      } ;

    QuestIComp icomp np = {
      s = \\t,a,p,_ => 
            let 
              vp  = predV copula ;
              cls = (mkClause (np.s ! Aton Nom) np.hasClit np.a vp).s ! 
                       DInv ! t ! a ! p ! Indic ;
              why = icomp.s ! {g = np.a.g ; n = np.a.n}
            in why ++ cls
      } ;

    PrepIP p ip = {
      s = p.s ++ ip.s ! p.c
      } ;

    AdvIP ip adv = {
      s = \\c => ip.s ! c ++ adv.s ;
      a = ip.a
      } ;

    IdetCN idet cn = 
      let 
        g = cn.g ;
        n = idet.n ;
        a = aagr g n
      in {
      s = \\c => idet.s ! g ! c ++ cn.s ! n ; 
      a = a
      } ;

    IdetIP idet = 
      let 
        g = Masc ; ---- Fem in Extra
        n = idet.n ;
        a = aagr g n
      in {
      s = \\c => idet.s ! g ! c ; 
      a = a
      } ;

    IdetQuant idet num = 
      let 
        n = num.n ;
      in {
      s = \\g,c => idet.s ! n ! g ! c ++ num.s ! g ;
      n = n
      } ;


    CompIAdv a = {s = \\_  => a.s} ;

    CompIP p = {s = \\_  => p.s ! Nom} ;

}

{- ---b 
    IDetCN idet num ord cn = 
      let 
        g = cn.g ;
        n = idet.n ;
        a = aagr g n
      in {
      s = \\c => idet.s ! g ! c ++ num.s ! g ++ ord.s ! a ++ cn.s ! n ; 
      a = a
      } ;
-}