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

📄 std-dont.aiml

📁 flashget43的源代码 一个比较常用的下载程序
💻 AIML
📖 第 1 页 / 共 5 页
字号:
you to dictate into an application called VoicePad,<br />but not directly into the browser.  You have to<br />use "cut" and "paste" to move your speech inputs<br />into the browser form for ALICE.  But the net effect<br />is a somewhat slow voice-in voice-out conversation<br />with ALICE.  <br /><br />The ViaVoice software seems to work well with ALICE<br />after some training.  We trained it with the file<br />"patterns.txt" created with the "List Patterns" command.<br /><br /></template></category><category><pattern>CAN I TEST THE ROBOT OFFLINE ON MY DESKTOP</pattern><template><br />Yes.  You can run the program B server and connect to it with<br />a browser, even if your desktop computer is offline.<br /><br />When working offline, it often helps to change the Internet<br />settings (in IE or Netscape) to "local area network".  <br />Then your machine becomes a one-computer network. You should <br />be able to use IE to connect to program B with http://localhost:2001.<br /><br /></template></category><category><pattern>CAN PROBABILITY STATISTICS WEIGHTS NEURAL NETWORKS OR FUZZY LOGIC IMPROVE BOTS</pattern><template><br />Statistics are in fact heavily used in the ALICE server, but not in the way<br />you might think.  ALICE uses 'Zipf Analysis' to plot the rank-frequency of<br />the activated categories and to reveal inputs from the log file that don't<br />already have specific replies, so the botmaster can focus on answering<br />questions people actually ask (the "Quick Targets" function).<br /><br />Other bot languages, notably the one used for Julia, make heavy use of<br />"fuzzy" or "weighted" rules.  We see their problem as this: the botmaster<br />already has enough to worry about without having to make up "magic<br />numbers" for every rule.  Once you get up 10,000 categories (like ALICE)<br />you don't want to think about more parameters than necessary.  Bot<br />languages with fuzzy matching rules tend to have scaling problems.<br /><br />Finally, the bot replies are not as deterministic as you might think, even<br />without weights.  Some answers rely on &lt;random&gt; to select one of several<br />possible replies.  Other replies generated by unforseen user input also<br />create "spontaneous" outputs that the botmaster doesn't anticipate.<br /><br /></template></category><category><pattern>CAN THE APPLET RECORD A DIALOG TXT FILE ON THE SERVER</pattern><template><br />No because the applet cannot write the file directly on the originating host.<br />If your server log file /var/log/httpd/access_log is too large; you <br />have a couple of choices:<br />1. If your ISP is a unix account, use telnet to log on to a shell account.<br />Use the command "grep Blog &lt; access_log &gt; dialog.txt" to create a smaller<br />file to download which contains just the lines recorded by the applet.<br />2. Create a CGI-BIN command called "/cgi-bin/Blog" that reads its<br />command-line argument and appends it to a file called "dialog.txt".<br />There ought to be a nice Perl script for this, or even a shell script.<br /><br /></template></category><category><pattern>CAN THE APPLETHOST USE A SYMBOLIC DNS NAME INSTEAD OF AN IP NUMBER</pattern><template><br />The answer is yes, but the numeric IP address works on more machines<br />than a symbolic name.  Applets are protected by a "security sandbox"<br />from interfering with local resources on your machine.  One restriction<br />is that Applets may only open socket connections to the originating<br />host.  When using a symbolic DNS name, the "sandbox" may not know that <br />two variations such as "Www.AliceBot.Org" and "alicebot.org" are<br />in fact the same server.  The client might not be able to resolve <br />the DNS name, and the Applet will throw a security exception.<br /><br /></template></category><category><pattern>CAN THE VIRTUAL IP BE THE REAL IP</pattern><template><br />Actually that would be the default case, when the client chats from<br />the same fixed IP address.  The only time the virtual ip differs from<br />the real one is when the client is behind a dynamic firewall, like<br />WebTV or AOL customers.<br /><br /></template></category><category><pattern>CAN YOU GIVE ME A QUICK PRIMER ON AIML</pattern><template><br />Given only the &lt;pattern&gt; and &lt;template&gt; tags, there are three<br />general types of categories: (a) atomic, (b) default, and (c) recursive.<br />Strictly speaking, the three types overlap, because "atomic"<br />and "default" refer to the &lt;pattern&gt; and "recursive" refers to<br />a property of the &lt;template&gt;.<br /><br />a). "Atomic" categories are those with atomic patterns, i.e. the pattern<br />contains no wild card "*" or "_" symbol.  Atomic categories are the<br />easiest, simplest categories to add in AIML.  <br /><br />&lt;category&gt;<br />  &lt;pattern&gt;WHAT IS A CIRCLE&lt;/pattern&gt;<br />  &lt;template&gt;&lt;set_it&gt;A cicle&lt;/set_it&gt; is a the set of points equidistant <br />from a common point called the center.<br />  &lt;/template&gt;<br />&lt;/category&gt;<br /><br />b). The name "default category" derives from the fact that its pattern<br />has a wildcard "*" or "_".  The ultimate default category is the<br />one with &lt;pattern&gt;*&lt;/pattern&gt;, which matches any input.  In the<br />ALICE distribution the ultimate default category resides in a file<br />called "Pickup.aiml".  These default responses are often called<br />"pickup lines" because they generally consist of leading questions<br />designed to focus the client on known topics.<br /><br />The more common default categories have patterns combining a few <br />words and a wild card.  For example the category:<br /><br />&lt;category&gt;<br />  &lt;pattern&gt;I NEED HELP *&lt;/pattern&gt;<br />  &lt;template&gt;Can you ask for help in the form of a question?&lt;/template&gt;<br />&lt;/category&gt;<br /><br />responds to a variety of inputs from "I need help debugging my program"<br />to "I need help with my marriage."  Putting aside the philosophical<br />question of whether the robot really "understands" these inputs, <br />this category elucidates a coherent response from the client, <br />who at least has the impression of the robot understanding the<br />client's intention.  <br /><br />Default categories show that writing AIML is both an art and a<br />science.  Writing good AIML responses is more like writing good <br />literature, perhaps drama, than like writing computer programs.<br /><br />c). "Recursive" categories are those that "map" inputs to other<br />inputs, either to simplify the language or to identify synonymous<br />patterns.  <br /><br />Many synonymous inputs have the same response.  This is accomplished<br />with the recursive &lt;srai&gt; tag.  Take for example the input "GOODBYE".<br />This input has dozens of synonyms: "BYE", "BYE BYE, "CYA", "GOOD BYE",<br />and so on.  To map these inputs to the same output for GOODBYE we <br />use categories like:<br /><br />&lt;category&gt;<br />  &lt;pattern&gt;BYE BYE&lt;/pattern&gt;<br />  &lt;template&gt;&lt;srai&gt;GOODBYE&lt;/srai&gt;&lt;/template&gt;<br />&lt;/category&gt;<br /><br />Simplification or reduction of complex input patterns is another<br />common application for recursive categories.  In English the<br />question "What is X" could be asked many different ways: <br />"Do you know what X is?", "Tell me about X", "Describe X",<br />"What can you tell me about X?", and "X is what?" are just a few<br />examples.  Usually we try to store knowledge in the most concise,<br />or common form.  The &lt;srai&gt; function maps all these forms to<br />the base form:<br /><br />&lt;category&gt;<br />  &lt;pattern&gt;DO YOU KNOW WHAT * IS&lt;/pattern&gt;<br />  &lt;template&gt;&lt;srai&gt;WHAT IS &lt;star/&gt;&lt;/srai&gt;&lt;/template&gt;<br />&lt;/categroy&gt;<br /><br />The &lt;star/&gt; tag substitutes the value matched by "*", before<br />the recursive call to &lt;srai&gt;.  This category transforms<br />"Do you know what a circle is?" to "WHAT IS A CIRCLE",<br />and then finds the best match for the transformed input.<br /><br />Another fairly common application of recursive categories is<br />what might be called "parsing", except that AIML doesn't really<br />parse natural language.  A better term might be "partitioning" because<br />these AIML categories break down an input into two (or more) parts,<br />and then combine their responses back together.<br /><br />If a sentence begins with "Hello..." it doesn't matter what comes<br />after the first word, in the sense that the robot can respond to<br />"Hello" and whatever is after "..." independently.  "Hello my name<br />is Carl" and "Hello how are you" are quite different, but they show<br />how the input can be broken into two parts. <br /><br />The category:<br /><br />&lt;category&gt;<br />  &lt;pattern&gt;HELLO *&lt;/pattern&gt;<br />  &lt;template&gt;&lt;srai&gt;HELLO&lt;/srai&gt; &lt;sr/&gt;<br />  &lt;/template&gt;<br />&lt;/category&gt;<br /><br />accomplishes the input partitioning by responding to "HELLO"<br />with &lt;srai&gt;HELLO&lt;/srai&gt; and to whatever matches "*" with &lt;sr/&gt;.<br />The response is the result of the two partial responses <br />appended together.<br /> <br /></template></category><category><pattern>CAN YOU GIVE ME ANY HELP DEBUGGING THE APPLET</pattern><template><br />Debugging applets can be tricky. The same suggestion<br />to set IE for "local area  network"  might help here too. <br />Also the browser caches class files, so it's difficult to<br />know if  you are testing a "fresh" copy of the applet. The<br />program "appletviewer" that  comes with Sun Java is better <br />for debugging applets. Use "appletviewer index.html".<br /><br />The best thing to do is join the alicebot mailing list<br />at alicebot.listbot.com.<br /><br /><br /></template></category><category><pattern>CAN YOU HELP ME DEBUG THE ANIMATED AGENT</pattern><template><br />Look at the class Animagent.java.  The method vbscript_html(reply)<br />does nothing unless the global Animagent member is true.  In that case,<br />the vbscript_html() method constructs a string from the reply that<br />includes an MS Agent VBScript embedded in the HTML reply.<br />This makes the browser load up the objects required for the agent.  <br /><br />The text reply just becomes part of the VBScript.  <br />You may have to download and run the Robby the Robot<br />agent software and the text-to-speech synthesis software from <br />the MSDN homepage:<br /><br />http://msdn.microsoft.com/workshop/imedia/agent<br /><br />We wish other companies were producing agent animation API's <br />for free but this MS Agent seems to be about the only <br />thing out there now. <br /><br />Join the ALICE and AIML mailing list at alicebot.listbot.com<br />to see how others are working with the animated agent software.<br /><br /></template></category><category><pattern>COULD YOU EXPLAIN THE LT SRAI GT TAG A LITTLE MORE</pattern><template><br />The most common application of &lt;srai&gt; is "symbolic reduction"<br />of a complex sentence form to a simpler one:<br /><br />&lt;category&gt;<br />&lt;pattern&gt;DO YOU KNOW WHAT * IS&lt;/pattern&gt;<br />&lt;template&gt;&lt;srai&gt;WHAT IS &lt;star/&gt;&lt;/srai&gt;&lt;/template&gt;<br />&lt;/category&gt;<br /><br />so the botmaster can store most knowledge in the simplest<br />categories:<br /><br />&lt;category&gt;<br />&lt;pattern&gt;WHAT IS LINUX&lt;/pattern&gt;<br />&lt;template&gt;&lt;set_it&gt;Linux&lt;/set_it&gt; is the best operating system.&lt;/template&gt;<br />&lt;/category&gt;<br /><br />With all the "symbolic reduction" categories,  the robot gives<br />the same answer for:<br /><br />"What is Linux?"<br />"Do you know what Linux is?"<br />"Define Linux"<br />"Alice please tell me what Linux is right now"<br /><br />Sometimes the response consists of two symbolic reductions together:<br /><br />&lt;category&gt;<br />&lt;pattern&gt;YES *&lt;/pattern&gt;<br />&lt;template&gt;&lt;srai&gt;YES&lt;/srai&gt; &lt;sr/&gt;&lt;/template&gt;<br />&lt;/category&gt;<br /><br />With this category the robot will reply to all <br />"Yes something" inputs by combining the<br />reply to "Yes" with the reply to "something".<br />Remember, &lt;sr/&gt; is an abbreviation for &lt;srai&gt;&lt;star/&gt;&lt;/srai&gt;. <br /><br />The &lt;srai&gt; tag is also the answer to the question: Can I have more<br />than one pattern in the same category?  Suppose you want the<br />same answer for two different patterns.  You might think of<br />writing something like this:<br /><br />&lt;category&gt;<br />&lt;pattern&gt;BYE&lt;/pattern&gt;<br />&lt;pattern&gt;GOODBYE&lt;/pattern&gt;<br />&lt;template&gt;See you later.&lt;/template&gt;<br />&lt;/category&gt;<br /><br />Right now you can't put two patterns in one category, but with &lt;srai&gt;<br />you can get the same effect:<br /><br />&lt;category&gt;<br />&lt;pattern&gt;GOODBYE&lt;/pattern&gt; &lt;template&gt;&lt;srai&gt;BYE&lt;/srai&gt;&lt;/template&gt;<br />&lt;/category&gt;<br /><br />&lt;category&gt;<br />&lt;pattern&gt;BYE&lt;/pattern&gt; &lt;template&gt;See you later.&lt;/template&gt;<br />&lt;/category&gt;<br /><br />If you look through the AIML files you will see many examples<br />of &lt;srai&gt; mapping multiple patterns to the same reply.<br /><br />

⌨️ 快捷键说明

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