AIML Tutorial
AIML Useful Resources
Selected Reading
- AIML - <condition> Tag
- AIML - <think> Tag
- AIML - <topic> Tag
- AIML - <that> Tag
- AIML - <set>, <get> Tags
- AIML - <random> Tag
- AIML - <srai> Tag
- AIML - <star> Tag
- AIML - Basic Tags
- AIML - First Application
- AIML - Environment Setup
- AIML - Introduction
- AIML - Home
AIML Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
AIML - <think> Tag
AIML - <think> Tag
<think> 在《反洗钱法》中,Tag用于储存一个变量,而不通知用户。
Syntax
储存价值使用和提炼;th;
<think> <set name = "variable-name"> variable-value </set> </think>
例如,审议以下谈话。
Human: My name is Mahesh Robot: Hello! Human: Byeee Robot: Hi Mahesh Thanks for the conversation!
Example
在C > ab > bots > test > aimingl和在C > ab > bots > test > aimingpf.
think.aiml
<?xml version = "1.0" encoding = "UTF-8"?> <aiml version = "1.0.1" encoding = "UTF-8"?> <category> <pattern>My name is *</pattern> <template> Hello!<think><set name = "username"> <star/></set></think> </template> </category> <category> <pattern>Byeee</pattern> <template> Hi <get name = "username"/> Thanks for the conversation! </template> </category> </aiml>
think.aiml.csv
0,My name is *,*,*, Hello! <think><set name = "username"> <star/></set></think>,think.aiml 0,Byeee,*,*, Hi <get name = "username"/> Thanks for the conversation!,think.aiml
Execute the Program
立即开放指挥。 Go to C > ab >和打下以下指挥系统:
java -cp pb/Ab.jar Main bot = test action = chat trace = false
Verify the Result
你将看到以下产出:
Human: My name is Mahesh Robot: Hello! Human: Byeee Robot: Hi Mahesh Thanks for the conversation!Advertisements