summaryrefslogtreecommitdiff
path: root/next-lib/src/scandinavian/QuestionScand.gf
blob: f053e71ccae994be7ab4d7722997826a1f73796d (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
incomplete concrete QuestionScand of Question = 
  CatScand ** open CommonScand, ResScand in {

  flags optimize=all_subs ;

  lin

    QuestCl cl = {
      s = \\t,a,p => 
            let cls = cl.s ! t ! a ! p 
            in table {
              QDir   => cls ! Inv ;
              QIndir => subjIf ++ cls ! Sub
              }
      } ;

    QuestVP qp vp = {
      s = \\t,a,b,q => 
        let 
          somo = case q of {
            QIndir => <"som",Sub> ;
            _      => <[],   Main>
            } ;
          cl = mkClause (qp.s ! nominative ++ somo.p1) {gn = qp.gn ; p = P3} vp  
        in
        cl.s ! t ! a ! b ! somo.p2
      } ;   

    QuestSlash ip slash = {
      s = \\t,a,p => 
            let 
              agr = {gn = ip.gn ; p = P3} ;
              cls : Order => Str = \\o => slash.s ! t ! a ! p ! o ++ slash.n3 ! agr ;
              who = slash.c2.s ++ ip.s ! accusative --- stranding in ExtScand 
            in table {
              QDir   => who ++ cls ! Inv ;
              QIndir => who ++ cls ! Sub
              }
      } ;

    QuestIAdv iadv cl = {
      s = \\t,a,p => 
            let 
              cls = cl.s ! t ! a ! p ;
              why = iadv.s
            in table {
              QDir   => why ++ cls ! Inv ;
              QIndir => why ++ cls ! Sub
              }
      } ;

    QuestIComp icomp np = {
      s = \\t,a,p => 
            let 
              cls = 
                (mkClause (np.s ! nominative) np.a (predV verbBe)).s ! t ! a ! p ;
              why = icomp.s ! agrAdj np.a.gn DIndef
            in table {
              QDir   => why ++ cls ! Inv ;
              QIndir => why ++ cls ! Sub
              }
      } ;

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

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

    IdetCN idet cn = let g = cn.g in {
      s  = \\c => 
           idet.s ! g ++ cn.s ! idet.n ! idet.det ! caseNP c ;
      gn = gennum g idet.n
      } ;

    IdetIP idet = 
      let
        g = Neutr ;
      in {
      s  = \\c => idet.s ! g  ;
      gn = (agrP3 g idet.n).gn
      } ;

    IdetQuant idet num = {
      s = \\g => idet.s ! num.n ! g ++ num.s ! g ;
      n = num.n ;
      det = idet.det
      } ;

    CompIAdv a = {s = \\_ => a.s} ;
    CompIP ip = {s = \\_ => ip.s ! nominative} ;

}