mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-13 05:02:50 -06:00
examples of dialogue system grammars
This commit is contained in:
18
examples/dialogue/ResGodis.gf
Normal file
18
examples/dialogue/ResGodis.gf
Normal file
@@ -0,0 +1,18 @@
|
||||
resource ResGodis = open Prelude in {
|
||||
|
||||
oper
|
||||
bracket : Str -> Str = \s -> "[" ++ s ++ "]" ;
|
||||
|
||||
app1 : Str -> Str -> Str = \f,x -> f ++ paren x ;
|
||||
|
||||
apps : Str -> SS -> SS = \f,x -> ss (app1 f x.s) ;
|
||||
|
||||
request : Str -> Str = app1 "request" ;
|
||||
answer : Str -> Str = app1 "answer" ;
|
||||
|
||||
req_ans : Str -> Str -> Str -> Str = \f,t,k ->
|
||||
bracket (request f ++ "," ++ answer (app1 t k)) ;
|
||||
|
||||
}
|
||||
|
||||
-- [request(add_event), answer(event_to_store(meeting))]
|
||||
Reference in New Issue
Block a user