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 - <set>, <get> Tags
AIML - <set>, <get> Tags
<set>和;get> 标签被用于与《反洗钱法》中的变量合作。 变量可以是预先界定的变量,也可以是方案制定者生成的变量。
Syntax
tag、set和gt;tag被用于在变数中设定价值。
<set name = "variable-name"> variable-value </set>
tag、植被和特;tag被用于从变数中获得价值。
<get name = "variable-name"></get>
例如,审议以下谈话。
Human: I am Mahesh Robot: Hello Mahesh! Human: Good Night Robot: Good Night Mahesh! Thanks for the conversation!
Example
在C > ab > bots > test >getl和 setget.aiml.csv within C > ab > bots > test > aimingpf .
setget.aiml
<?xml version = "1.0" encoding = "UTF-8"?> <aiml version = "1.0.1" encoding = "UTF-8"?> <category> <pattern>I am *</pattern> <template> Hello <set name = "username"> <star/>! </set> </template> </category> <category> <pattern>Good Night</pattern> <template> Hi <get name = "username"/> Thanks for the conversation! </template> </category> </aiml>
setget.aiml.csv
0,I am *,*,*, Hello <set name = "username"> <star/>! </set>,setget.aiml 0,Good Night,*,*, Hi <get name = "username"/> Thanks for the conversation!,setget.aiml
Execute the Program
立即开放指挥。 Go to C > ab >和打下以下指挥系统:
java -cp pb/Ab.jar Main bot = test action = chat trace = false
Verify the Result
你将看到以下产出:
Human: I am Mahesh Robot: Hello Mahesh! Human: Good Night Robot: Good Night Mahesh! Thanks for the conversation!Advertisements