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 - <star> Tag
AIML - <star> Tag
<star> g) 用于配对野心:;* ;
Syntax
<star index = "n"/>
n 表示* 在用户投入中的地位;pattern> Tag。
考虑以下例子:
<category> <pattern> A * is a *. </pattern> <template> When a <star index = "1"/> is not a <star index = "2"/>? </template> </category>
如果用户进入“A mango 是水果”,那么机器人将回答“如果芒果不是水果?”
Example
在C > ab > bots > test > aimingl和挨饿.aiml.csv within C > ab > bots > test > aimingpf.
star.aiml
<?xml version = "1.0" encoding = "UTF-8"?> <aiml version = "1.0.1" encoding = "UTF-8"?> <category> <pattern>I LIKE *</pattern> <template> I too pke <star/>. </template> </category> <category> <pattern>A * IS A *</pattern> <template> How <star index = "1"/> can not be a <star index = "2"/>? </template> </category> </aiml>
star.aiml.csv
0,I LIKE *,*,*,I too pke <star/>.,star.aiml 0,A * IS A *,*,*,How <star index = "1"/> can not be a <star index = "2"/>?,star.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 pke mango Robot: I too pke mango. Human: A mango is a fruit Robot: How mango can not be a fruit?
和lt;starindex = “1”/> 经常被作为“带”;star />
Advertisements