⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 megahal_interfaces.3

📁 megahal is the conversation simulators conversing with a user in natural language. The program will
💻 3
字号:
.\" Copyright 2000, 2001, 2002 David N. Welton <davidw@dedasys.com>.\" $Id: megahal_interfaces.3,v 1.3 2003/08/26 12:49:16 lfousse Exp $.TH MEGAHAL INTERFACES 3  "April 12, 1993" "" "Linux Programmer's Manual".SH NAMEmegahal interfaces - C, Python and Tcl interfaces to Megahal.SH SYNOPSIS.nf.B #include <megahal.h>.sp.B void megahal_setnoprompt(void);.sp.B void megahal_setnowrap(void);.sp.B void megahal_setnobanner(void);.sp.BI "void megahal_seterrorfile(char *"filename );.sp.BI "void megahal_setstatusfile(char *"filename );.sp.B void megahal_initialize(void);.sp.BI "char *megahal_initial_greeting(void" );.sp.BI "int megahal_command(char *"input );.sp.BI "char *megahal_do_reply(char *"input ", int" log );.sp.BI "void megahal_output(char *"output );.sp.BI "char *megahal_input(char *"prompt );.sp.B void megahal_cleanup(void);.sp.SH DESCRIPTION.p.B Initialization.brMegahal is initialized with the \fBmegahal_initialize()\fP function.\fBmegahal_setnoprompt\fP eliminates the prompt from interactivesessions.  \fBmegahal_setnowrap()\fP stops output from being wrapped.\fBmegahal_setnobanner()\fP prevents megahal from printing out theinitial 'banner'..B Files.br\fBmegahal_seterrorfile\fP and \fBmegahal_setstatusfile\fP set whichfiles megahal will use for error and status reporting, respectively..B User interaction.br\fBmegahal_initial_greeting\fP returns an initial greeting for theuser, such as "hello", "ciao", etc...  \fBmegahal_command\fP checksits input for a Megahal command (like QUIT), and acts upon it, iffound.  If it finds nothing, it returns 0.  \fBmegahal_do_reply\fP isthe core of megahal.  It takes a string as input, and calculates areply, which it returns.  \fBmeghal_output\fP is for outputting textto stdout, such as megahal's replies.  Input may be obtained with\fBmegahal_input\fP, which takes a prompt string as an argument, andreturns a string input by the user..B Example.br\fBmain.c\fP in the source distribution is a good example of how touse Megahal's C API..SH "TCL INTERFACE".BI "load"\ libmh_tcl.so.brLoad the Tcl interface shared object into the Tcl interpreter..B mh_init.brInitialize megahal brain..BI "mh_doreply"\ text.brTakes some text as input and returns a megahal reply..B mh_cleanup.brSave megahal brain to disk.  You will lose your changes if this doesnot occur..SH "PYTHON INTERFACE".BI "import"\ mh_python.brImport the Megahal Python interface into the Python interpreter..B mh_python.initbrain().brInitialize megahal brain..BI "mh_python.doreply(" text ).brTakes some text as input and returns a megahal reply..BI "mh_python.learn(" text ).brTakes some text as input and updates the model without generating a reply..B mh_python.cleanup().brSave megahal brain to disk.  You will lose your changes if this doesnot occur..SH "REFERENCES"More information can be found about megahal athttp://megahal.sourceforge.netJason Hutchens, the original author of Megahal can be found at:http://www.amristar.com.au/~hutch/.SH BUGSThe C library is not yet ready..SH "AUTHOR"Man page written by David N. Welton <davidw@dedasys.com>, modified byLaurent Fousse <laurent@komite.net>.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -