summaryrefslogtreecommitdiff
path: root/examples/godis-tram/Tram/TramSystemI.gf
blob: b94720836e16fd674010a925a26f9edbf71a4415 (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
--# -path=.:../Common:prelude:resource-1.0/abstract:resource-1.0/common

incomplete concrete TramSystemI of TramSystem = 
    GodisSystemI ** open Grammar, GodisLang, TramLexicon in {

lincat
Route = NP;
Leg = NP; 
[Leg] = [NP];


lin

-----------------------------------------------------------------------------
-- Route 

lineLeg line from to = AdvNP (AdvNP line (PrepNP from_Prep from)) (PrepNP to_Prep to);

oneLeg  leg  = leg;
mkRoute legs = ConjNP and_then_Conj legs;
BaseLeg = BaseNP;
ConsLeg = ConsNP;

-------------------------------------------------------------------------------
-- Predicates and Questions 

shortest_route_Q     = isDoing ** what_is_NP (the_A_super_N_sg short_A route_N);
shortest_route_P   x = isDoing ** GenericCl (ComplV2 take_V2 x);

dest_stop_Q          = isDoing ** which_N_do_you_want_to_V2 stop_N go_to_V2;
dest_stop_P        x = isDoing ** you_want_to_VP (ComplV2 go_to_V2 x);

dept_stop_Q          = isDoing ** which_N_do_you_want_to_V2 stop_N go_from_V2;
dept_stop_P        x = isDoing ** you_want_to_VP (ComplV2 go_from_V2 x);


---------------------------------------------------------------------------
-- Short Answers

stop x = x;

-----------------------------------------------------------------------
-- Actions

top              = isDoing ** UseV restart_V;

help             = isDoing ** UseV help_V;

}