Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bd5c3d824c3db63ffd9226c15941e6ad > files > 590

mozart-1.4.0-1mdv2010.0.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>13 A Client for the DICT Protocol</TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="index.html">- Up -</A></TD><TD><A href="bib.html#label20">Next &gt;&gt;</A></TD></TR></TABLE><DIV id="chapter.dict-client"><H1><A name="chapter.dict-client">13 A Client for the DICT Protocol</A></H1><H3 class="authors"><A href="http://www.ps.uni-sb.de/~kornstae/">Leif&nbsp;Kornstaedt</A></H3><P> </P><P class="linkmenu">[ <A href="applets/DictClient.oza">Start Applet</A>  | <A href="../install/node14.html#appendix.applets">How to enable Applets</A>  ]</P><P> </P><DIV class="apropos"><P class="margin">The Protocol</P><P> The Dictionary Server Protocol (DICT) is a TCP transaction based query/response protocol that allows a client to access dictionary definitions from a set of natural language dictionary databases. For further information see <A href="http://www.dict.org/">The DICT Development Group</A>. </P></DIV><DIV class="apropos"><P class="margin">The Application</P><P> This application implements an interactive graphical client for the DICT protocol. Enter a word in the top text field and click on ``Lookup'' to retrieve definitions for it, displayed in a separate window. Words highlighted in blue are links to other definitions. Activate ``Match'' and you are presented a list of close matches in a new window; clicking on a line in this window retrieves the corresponding definition. </P></DIV><DIV class="apropos"><P class="margin">Selecting Databases</P><P> The left list box allows to select the databases in which to look for definitions and/or matches: you always have the choice of ``all'' to look through all databases or ``first with matches'' to stop after the first in which lookup was successful. The ``update list'' button queries a complete list of the databases present on the server. You can then select a set of these for lookup: A simple click selects a single database; clicking while the <SPAN class="key">shift</SPAN> key is pressed selects a range; clicking while the <SPAN class="key">control</SPAN> key is pressed toggles an entry. </P></DIV><DIV class="apropos"><P class="margin">Selecting a Strategy</P><P> The right list box allows to select the strategy used by the ``Match'' operation. As for the databases, the ``update list'' presents you with a complete list of all strategies supported by the server. </P></DIV><DIV class="apropos"><P class="margin">Logging the Actions</P><P> The text window at the bottom displays a log of all actions, both those already performed and those still to be performed. The text line below it describes the currently performed action. </P></DIV><DIV class="unnumbered"><H2><A name="label17">The ``Server'' Menu</A></H2><P> </P><DL><DT></DT><TABLE><TR><TD><TABLE bgcolor="#cccccc" border="1" cellpadding="3" cellspacing="0" width="130"><TR><TD align="left" width="85%">Open ...</TD><TD align="right">C-o</TD></TR></TABLE></TD><TD></TD></TR></TABLE><DT> </DT><DD><P>Choose another server and/or port instead of the default. The default is port 2628 on server <CODE>dict.org</CODE>. </P></DD><DT></DT><TABLE><TR><TD><TABLE bgcolor="#cccccc" border="1" cellpadding="3" cellspacing="0" width="130"><TR><TD align="left" width="85%">Status</TD><TD align="right">C-s</TD></TR></TABLE></TD><TD></TD></TR></TABLE><DT> </DT><DD><P>Retrieve short status information from the server currently connected to and display it in the text line at the bottom of the window. </P></DD><DT></DT><TABLE><TR><TD><TABLE bgcolor="#cccccc" border="1" cellpadding="3" cellspacing="0" width="130"><TR><TD align="left">Information ...</TD></TR></TABLE></TD><TD></TD></TR></TABLE><DT> </DT><DD><P>Display server information written by the server's administrator. This could include information about databases or strategies, or administrative information. </P></DD><DT></DT><TABLE><TR><TD><TABLE bgcolor="#cccccc" border="1" cellpadding="3" cellspacing="0" width="130"><TR><TD align="left" width="85%">Close</TD><TD align="right">C-x</TD></TR></TABLE></TD><TD></TD></TR></TABLE><DT> </DT><DD><P>Close any currently open connection and exit the client. </P></DD></DL><P> </P></DIV><DIV class="unnumbered"><H2><A name="label18">The ``Database'' Menu</A></H2><P> </P><DL><DT></DT><TABLE><TR><TD><TABLE bgcolor="#cccccc" border="1" cellpadding="3" cellspacing="0" width="130"><TR><TD align="left">Information ...</TD></TR></TABLE></TD><TD></TD></TR></TABLE><DT> </DT><DD><P>Display the source, copyright, and licensing information about the currently selected databases. </P></DD></DL><P> </P></DIV><DIV class="unnumbered"><H2><A name="label19">Implementation</A></H2><P> Each of the files in this section is an individual functor. They are presented in a bottom-up fashion, starting with the component handling a network connection, building the display and control window on top of that, and ending with the application actually parsing the command line and instantiating the client. </P><HR><UL class="toc"><LI><A href="node37.html#code.dict-client.netdictionary">Network Connection: <CODE>NetDictionary.oz</CODE></A></LI></UL><UL class="toc"><LI><A href="node38.html#code.dict-client.tkdictionary">Graphical Front-End: <CODE>TkDictionary.oz</CODE></A></LI></UL><UL class="toc"><LI><A href="node39.html#code.dict-client.main">Command-Line Application: <CODE>Main.oz</CODE></A></LI></UL></DIV></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="index.html">- Up -</A></TD><TD><A href="bib.html#label20">Next &gt;&gt;</A></TD></TR></TABLE><HR><ADDRESS><SPAN class="version">Version 1.4.0 (20090610)</SPAN></ADDRESS></BODY></HTML>