Artificial intelligence 创建用于聊天机器人提问的AIML

Artificial intelligence 创建用于聊天机器人提问的AIML,artificial-intelligence,chatbot,aiml,Artificial Intelligence,Chatbot,Aiml,我正在为Program-O聊天机器人创建AIML文件,但遇到了一个问题。 我想做的是依次问一个又一个问题。此外,问题的顺序应该是随机的。这是一项针对学生的满意度评估测试,我正在尝试使用聊天机器人代替传统方法进行开发 这就是我心目中的AIML格式 sample.aiml <category> <pattern>HELLO<bot/></pattern> <template> <random>

我正在为Program-O聊天机器人创建AIML文件,但遇到了一个问题。

我想做的是依次问一个又一个问题。此外,问题的顺序应该是随机的。这是一项针对学生的满意度评估测试,我正在尝试使用聊天机器人代替传统方法进行开发

这就是我心目中的AIML格式

sample.aiml

<category>
    <pattern>HELLO<bot/></pattern>
    <template>
        <random>
            <li><warm/>Hello there. Do you want to talk about your campus life?</li>
            <li><happy/>Hi. Do you want to talk about your campus life?</li>
            <li><happy/>Goodday. Do you want to talk about your campus life?</li>
        </random>
    </template>
</category>
<category>
    <pattern>*</pattern>
    <that>HELLO THERE. DO YOU WANT TO TALK ABOUT CAMPUS LIFE</that>
    <template>
        <random>
            <li>How were the classes?</li>
            <li>Does the teacher give a clear answer?</li>
            <li>Was the teacher come on time?</li>
        </random>
    </template>
</category>
<category>
    <pattern>*</pattern>
    <that>HOW WERE THE CLASSES</that>
    <template>
        <random>
            <li>Does the teacher give the full and clear explanation?</li>
            <li>What about the material used in the classes?</li>
            <li>What do you think about the courses content?</li>
        </random>
    </template>
</category>

你好
  • 你好。你想谈谈你的校园生活吗
  • 嗨。你想谈谈你的校园生活吗
  • 再见。你想谈谈你的校园生活吗
  • * 你好。你想谈谈校园生活吗
  • 上课怎么样
  • 老师回答得清楚吗
  • 老师准时来了吗
  • * 上课怎么样
  • 老师是否给出了完整清晰的解释
  • 课堂上使用的材料是什么
  • 你觉得课程内容怎么样
  • 问题是*(星号)通配符不能很好地使用该谓词。
    有没有其他方法来构造满足我要求的AIML?

    使用下划线通配符。在AIML中,有两个通配符-*和_。下划线通配符的优先级高于星号

    string text = System.IO.File.ReadAllText(txt_filename.Text.ToString()).ToString();
    
            int length = (Int32)text.Length;
            txt_gbox.Text = length.ToString();
    
            LexicalAnalysis analyzer = new LexicalAnalysis();
    
            while (text !=)
            {
                text = text.Trim(' ', '\t');
                string token = analyzer.GetNextLexicalAtom(ref text);
                txt_gbox.Text = token;
            }
    

    我想在richtextbox中显示这些标记,它是txt\U gbox,但在循环程序停止时打开

    “工作不好”是什么意思?您的问题到底是什么?现在,在aiml ver=2.0中,有额外的通配符来帮助您解决这个问题。其中一个是^。也许将来有人提出这个问题值得一看。