From 2001788b0242a0c945655c503262ccf104bcc3bd Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Tue, 30 Aug 2011 17:29:13 +0000 Subject: few more fixes in the NLG grammar --- examples/nlg/LogicCnc.gf | 23 +++++++++++++++++++++++ examples/nlg/LogicEng.gf | 23 ----------------------- examples/nlg/NLG.gf | 4 ++-- examples/nlg/NLGEng.gf | 2 +- 4 files changed, 26 insertions(+), 26 deletions(-) create mode 100644 examples/nlg/LogicCnc.gf delete mode 100644 examples/nlg/LogicEng.gf (limited to 'examples') diff --git a/examples/nlg/LogicCnc.gf b/examples/nlg/LogicCnc.gf new file mode 100644 index 000000000..b9a2013c9 --- /dev/null +++ b/examples/nlg/LogicCnc.gf @@ -0,0 +1,23 @@ +--# -path=present +concrete LogicCnc of Logic = { + +lincat + Ind = {s : Str}; + Prop = {s:Str}; + +lin + john = {s="john"}; + mary = {s="mary"}; + boy x = {s="boy"++"("++x.s++")"}; + smart x = {s="smart"++"("++x.s++")"}; + love x y = {s="love"++"("++x.s++","++y.s++")"}; + leave x = {s="leave"++"("++x.s++")"}; + and x y = {s=x.s++"&&"++y.s}; + or x y = {s=x.s++"||"++y.s}; + impl x y = {s=x.s++"=>"++y.s}; + forall f = {s="forall"++f.$0++"."++"("++f.s++")"}; + exists f = {s="exists"++f.$0++"."++"("++f.s++")"}; + not p = {s="not"++"("++p.s++")"}; + eq x y = {s=x.s++"="++y.s}; + +} diff --git a/examples/nlg/LogicEng.gf b/examples/nlg/LogicEng.gf deleted file mode 100644 index b1ff655eb..000000000 --- a/examples/nlg/LogicEng.gf +++ /dev/null @@ -1,23 +0,0 @@ ---# -path=present -concrete LogicEng of Logic = open (Eng=GrammarEng), ParadigmsEng, ResEng in { - -lincat - Ind = {s : Str}; - Prop = {s:Str}; - -lin - john = {s="john"}; - mary = {s="mary"}; - boy x = {s="boy"++"("++x.s++")"}; - smart x = {s="smart"++"("++x.s++")"}; - love x y = {s="love"++"("++x.s++","++y.s++")"}; - leave x = {s="leave"++"("++x.s++")"}; - and x y = {s=x.s++"&&"++y.s}; - or x y = {s=x.s++"||"++y.s}; - impl x y = {s=x.s++"=>"++y.s}; - forall f = {s="forall"++f.$0++"."++"("++f.s++")"}; - exists f = {s="exists"++f.$0++"."++"("++f.s++")"}; - not p = {s="not"++"("++p.s++")"}; - eq x y = {s=x.s++"="++y.s}; - -} diff --git a/examples/nlg/NLG.gf b/examples/nlg/NLG.gf index 594911a68..d3afc73cf 100644 --- a/examples/nlg/NLG.gf +++ b/examples/nlg/NLG.gf @@ -58,7 +58,7 @@ fun CompNP : ({np} : (Ind -> Prop) -> Prop) -> NP np -> Comp (\x -> np (\y -> eq x y)) ; - UsePN : (i : Ind) -> PN i -> NP (\f -> f i) ; + UsePN : ({i} : Ind) -> PN i -> NP (\f -> f i) ; DetCN : ({det} : (Ind -> Prop) -> (Ind -> Prop) -> Prop) -> ({cn} : Ind -> Prop) -> @@ -110,6 +110,6 @@ fun ({p} : Prop -> Prop) -> Pol p -> Cl cl -> S (p cl); - UttS : ({s} : Prop) -> S s -> Utt; + UttS : (s : Prop) -> S s -> Utt; } diff --git a/examples/nlg/NLGEng.gf b/examples/nlg/NLGEng.gf index f1bd64881..731e05a3d 100644 --- a/examples/nlg/NLGEng.gf +++ b/examples/nlg/NLGEng.gf @@ -1,5 +1,5 @@ --# -path=present -concrete NLGEng of NLG = LogicEng ** open (Eng=GrammarEng), ParadigmsEng, ResEng in { +concrete NLGEng of NLG = LogicCnc ** open (Eng=GrammarEng), ParadigmsEng, ResEng in { lincat Det = Eng.Det; -- cgit v1.2.3