diff options
Diffstat (limited to 'examples/dialogue/README.html')
| -rw-r--r-- | examples/dialogue/README.html | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/examples/dialogue/README.html b/examples/dialogue/README.html new file mode 100644 index 000000000..a273e28b9 --- /dev/null +++ b/examples/dialogue/README.html @@ -0,0 +1,124 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<HTML> +<HEAD> +<META NAME="generator" CONTENT="http://txt2tags.sf.net"> +<TITLE>Dialogue system grammars using GF resource.</TITLE> +</HEAD><BODY BGCOLOR="white" TEXT="black"> +<P ALIGN="center"><CENTER><H1>Dialogue system grammars using GF resource.</H1> +<FONT SIZE="4"> +AR 16/5/2006 +</FONT></CENTER> + +<H2>Functionality and purpose</H2> +<P> +Dialogue system abstract syntax + concrete syntaxes for +different languages. One of them is Prolog (with some resemblance to +dialogue moves in GoDiS). +</P> +<P> +The purpose is to show how new systems can be built for new domains just +by specifying just two things: +</P> +<UL> +<LI>a domain ontology in abstract syntax +<LI>a domain terminologies in concrete syntaxes +</UL> + +<P> +This is based on two library elements +</P> +<UL> +<LI>base dialogue grammars +<LI>resource grammar libraries +</UL> + +<P> +In general, the only kind of elements that need to be added are +constants (0-place fun's) of the following categories from Dialogue.gf. +</P> +<PRE> + Kind ; -- e.g. Room + Object Kind ; -- e.g. Kitchen + Oper0 ; -- e.g. Stop + Oper1 Kind ; -- e.g. Play + Oper2 Kind Kind ; -- e.g. Add + Move ; -- e.g. MorningMode +</PRE> +<P></P> +<H2>Files in this directory</H2> +<P> +Files (for X = Eng, Fin, Fre, Prolog, Swe): +</P> +<P> +Files provided as library to build on: +</P> +<PRE> + Dialogue.gf -- base dialogue grammar + DialogueX.gf -- implementation instance + DialogueI.gf -- implementation functor + + ResProlog.gf -- help constructs for Prolog terms + + Weekday.gf -- untility grammar with weekdays + WeekdayX.gf + + AuxDialogue.gf-- interface of auxiliary resource-defined opers + AuxX.gf -- instances for different languages +</PRE> +<P> +Files implementing two examples. +</P> +<PRE> + Agenda.gf -- application grammar for agenda + AgendaX.gf + + Lights.gf -- application grammar for lights + Lights.gf +</PRE> +<P></P> +<H2>Files needed to build a new application</H2> +<P> +To build a new application for domain Dom, you thus need +</P> +<PRE> + Dom.gf -- introduce fun's in Kind, Object, Oper0, Oper1, Oper2 + DomX.gf -- concrete syntax of the new fun's for language X +</PRE> +<P></P> +<H2>Some tests</H2> +<P> +You first need to do, with the latest resource grammar version, +</P> +<UL> +<LI><CODE>make present</CODE> in <CODE>lib/resource-1.0</CODE> +<P></P> +To test an application in GF, do e.g. +<LI><CODE>make lights</CODE> to make a package with all the Lights grammars +<LI><CODE>make engcorpus</CODE> to generate an English corpus +<LI><CODE>make swecorpus</CODE> to generate a Swedish corpus +</UL> + +<P> +Here are some other commands: +</P> +<UL> +<LI><CODE>i LightsEng.gf</CODE> in current dir, to load a grammar +<LI><CODE>gr | l -all</CODE> to random-generate +<LI><CODE>gt -depth=4 | pt -transform=typecheck | l -all</CODE> to generate a corpus +<LI><CODE>p "switch off all lights in the kitchen"</CODE> to parse +<LI><CODE>i LightsProlog.gf</CODE> to load the Prolog version +<LI><CODE>pg -printer=gsl -startcat=Move</CODE> to print a Nuance grammar +<LI><CODE>p -lang=LightsEng "switch off all lights" | pt -transform=solve | l -lang=LightsProlog</CODE> +to translate from English to Prolog +<LI><CODE>si -tr -lang=LightsEng | p -cat=Move -lang=LightsEng | pt -transform=solve | l -lang=LightsProlog</CODE> +to translate English speech into Prolog +</UL> + +<P> +The last one is the coolest - but you may need to enable the <CODE>speech_input</CODE> command by installing ATK +and recompiling GF. +</P> + +<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) --> +<!-- cmdline: txt2tags -thtml README.txt --> +</BODY></HTML> |
