diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2011-08-30 14:58:16 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2011-08-30 14:58:16 +0000 |
| commit | c70df9200c3244f45f75dcaefa650a82ddab55cc (patch) | |
| tree | d692efe7aa9a98bfbb4d947aef416ebb11cf5076 /examples/nlg/LogicEng.gf | |
| parent | 4215fc31bf9bfc949599697a014dc13a112ed47c (diff) | |
added example for NLG from logical formula. See examples/nlg
Diffstat (limited to 'examples/nlg/LogicEng.gf')
| -rw-r--r-- | examples/nlg/LogicEng.gf | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/nlg/LogicEng.gf b/examples/nlg/LogicEng.gf new file mode 100644 index 000000000..b1ff655eb --- /dev/null +++ b/examples/nlg/LogicEng.gf @@ -0,0 +1,23 @@ +--# -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}; + +} |
