diff options
| author | aarne <aarne@cs.chalmers.se> | 2006-05-24 15:40:15 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2006-05-24 15:40:15 +0000 |
| commit | 1aa8abb074787dde7124a0e548b98dfbf670d409 (patch) | |
| tree | c834383db79c96a77ab2c9196cae836be693874b /examples/dialogue/DialogueI.gf | |
| parent | 750ef2ca30b7e075d0a0b1404ee2dc741b3f2166 (diff) | |
updated dialogue to multimodal ; bug fixes in grammar compilation
Diffstat (limited to 'examples/dialogue/DialogueI.gf')
| -rw-r--r-- | examples/dialogue/DialogueI.gf | 84 |
1 files changed, 52 insertions, 32 deletions
diff --git a/examples/dialogue/DialogueI.gf b/examples/dialogue/DialogueI.gf index 20da618ac..9337638c9 100644 --- a/examples/dialogue/DialogueI.gf +++ b/examples/dialogue/DialogueI.gf @@ -1,10 +1,10 @@ -incomplete concrete DialogueI of Dialogue = open Lang, Prelude in { +incomplete concrete DialogueI of Dialogue = open Multi, Prelude in { lincat Move = Phr ; - Action = {s : ActType => Str} ; - Proposition = Phr ; ---- - Question = Phr ; + Action = {s : ActType => Str ; point : Str} ; + Proposition = Utt ; ---- + Question = Utt ; Kind = CN ; Object = NP ; Oper0 = V ; @@ -12,26 +12,26 @@ incomplete concrete DialogueI of Dialogue = open Lang, Prelude in { Oper2 = V3 ; lin - MRequest a = ss (a.s ! ARequest) ; - MConfirm a = ss (a.s ! AConfirm) ; - MAnswer a = a ; - MIssue a = a ; + IRequest a = {s = a.s ! ARequest ; point = a.point} ; + IConfirm a = {s = a.s ! AConfirm ; point = a.point} ; + IAnswer a = a ; + IIssue a = a ; - MYes = yes_Phr ; - MNo = no_Phr ; - MObject _ ob = PhrUtt NoPConj (UttNP ob) optPlease ; + IYes = yes_Phr ** noPoint ; + INo = no_Phr ** noPoint ; + IObject _ ob = UttNP ob ; - PAction a = ss (a.s ! AConfirm) ; + PAction a = {s = a.s ! AConfirm ; point = a.point} ; QKind k = - PhrUtt NoPConj (UttQS (UseQCl TPres ASimul PPos - (ExistIP (IDetCN whichPl_IDet NoNum NoOrd k)))) NoVoc ; + UttQS (UseQCl TPres ASimul PPos + (ExistIP (IDetCN whichPl_IDet NoNum NoOrd k))) ; AOper0 op = mkAction (UseV op) ; AOper1 _ op x = mkAction (ComplV2 op x) ; AOper2 _ _ op x y = mkAction (ComplV3 op x y) ; - OAll k = PredetNP all_Predet (DetCN (DetPl (PlQuant IndefArt) NoNum NoOrd) k) ; + OAll k = PredetNP all_Predet (DetCN (DetPl (PlQuant IndefArt) NoNum NoOrd) k) ; OIndef k = DetCN (DetSg (SgQuant IndefArt) NoOrd) k ; ODef k = DetCN (DetSg (SgQuant DefArt) NoOrd) k ; @@ -43,34 +43,54 @@ incomplete concrete DialogueI of Dialogue = open Lang, Prelude in { -- this should perhaps be language dependent - but at least these -- variants seem to make sense in all languages - mkAction : VP -> {s : ActType => Str} = \vp -> { + mkAction : VP -> {s : ActType => Str ; point : Str} = \vp -> { s = table { - ARequest => variants { + ARequest => (variants { aImp vp ; aWant vp ; aCanYou vp - } ; - AConfirm => variants { + }).s ; + AConfirm => (variants { aInf vp - } - } + }).s + } ; + point = vp.point } ; - optPlease : Voc = variants {NoVoc ; please_Voc} ; + optPlease : Voc = variants {NoVoc ; please_Voc} ; + + aImp : VP -> Utt = \vp -> + UttImpSg PPos (ImpVP vp) ; - aImp : VP -> Str = \vp -> - (PhrUtt NoPConj (UttImpSg PPos (ImpVP vp)) optPlease).s ; + aWant : VP -> Utt = \vp -> + UttS (UseCl TPres ASimul PPos + (PredVP (UsePron i_Pron) (ComplVV want_VV vp))) ; - aWant : VP -> Str = \vp -> - (PhrUtt NoPConj (UttS (UseCl TPres ASimul PPos (PredVP (UsePron i_Pron) - (ComplVV want_VV vp)))) optPlease).s ; + aCanYou : VP -> Utt = \vp -> + UttQS (UseQCl TPres ASimul PPos (QuestCl + (PredVP (UsePron youSg_Pron) (ComplVV can_VV vp)))) ; - aCanYou : VP -> Str = \vp -> - (PhrUtt NoPConj (UttQS (UseQCl TPres ASimul PPos (QuestCl (PredVP - (UsePron youSg_Pron) (ComplVV can_VV vp))))) optPlease).s ; + aInf : VP -> Utt = \vp -> + UttVP vp ; - aInf : VP -> Str = \vp -> - (PhrUtt NoPConj (UttVP vp) NoVoc).s ; +-- multimodality + + lincat + Click = Point ; + Input = Utt ; + Speech = Multi.Speech ; + + lin + OThis k c = this8point_NP c ; + OThisKind k c = DetCN (DetSg (SgQuant (this8point_Quant c)) NoOrd) k ; + + MInput i = PhrUtt NoPConj i optPlease ; + SInput i = SpeechUtt NoPConj i optPlease ; + + MkClick = MkPoint ; + + oper + noPoint = {point = []} ; } |
