basic_chat.aiml 4.03 KB
Newer Older
yangpengflag committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
<aiml version="1.0.1" encoding="UTF-8">
    <category>
        <pattern>
            你 好
        </pattern>
        <template>
            <!--用随机答复,回答同一个问题-->
            <random>
                <li>你好啊</li>
                <li>好巧哦,你也在啊</li>
                <li>hi,很高兴见到你</li>
                <li>hello,man</li>
            </random>
        </template>
    </category>
<!--* 匹配所有问题-->
    <category>
        <pattern>你 好 *</pattern>
        <template>
            <srai>你 好</srai>
        </template>
    </category>

    <!--pattern中英文必须大写-->
    <category>
        <pattern>WHAT IS YOUR NAME</pattern>
        <template>
            HELLO,my name is 喜洋洋
        </template>
    </category>

<!--set关键字,存储*所接受的输入作为变量username的值以供别处使用,并显示在本次回答中-->
    <category>
        <pattern>你 好 我是 *</pattern>
        <template>
            你好啊,<set name="username"><star/></set>,很高兴认识你!
        </template>
    </category>

<!--get关键字,获取已经设置的变量username,将其所存储的值显示出来-->
    <category>
        <pattern>晚安啦</pattern>
        <template>
            Good Night!<get name="username"/>,跟你聊天很愉快,下次再聊,88!
        </template>
    </category>

<!--star index = "1" 将从上面对话中获取的值,显示在下面答复中;不会吹牛的大周不是一个好司机-->
    <category>
        <pattern>不会 * 的 * 不是 一个 好 *</pattern>
        <template>
            真的吗,不会<star index="1"/>的<star index="2"/> ,可能是一个好<star index="3"/>
        </template>
<!--真的吗,不会吹牛的大周,可能是一个好司机-->
    </category>

    <!--that关键字,以前一个回答“湘菜”作为一个基础,根据这个基础触发多种回答,只能触发一次-->
    <category>
        <pattern>你 喜欢 吃 什么 菜</pattern>
        <template>湘菜</template>
    </category>
    <category>
        <pattern>我也是,超喜欢吃!</pattern>
        <that>湘菜</that>
        <template>太棒了,我知道有家菜做得很好吃,有时间一起去吃吧</template>
    </category>
    <category>
        <pattern>我 喜欢 吃 川菜</pattern>
        <that>湘菜</that>
        <template>川菜啊,我也很喜欢吃,要约饭吗?</template>
    </category>

    <!--topic将一个话题作为触发点,以此为一个问答集合-->
    <category>
        <pattern>快 过年 了</pattern>
        <template>是的啊,马上就要<set name="topic">过年</set>了</template>
    </category>
    <topic name = "过年">
        <category>
            <pattern>车票 很难 买 啊</pattern>
            <template>是的啊,我都抢很多天了,一直没抢到票</template>
        </category>
        <category>
            <pattern>过年 去 哪 玩 啊</pattern>
            <template>过年我打算去马尔代夫过夏天去</template>
        </category>
    </topic>

    <!--不同于star index="1"这种将获取的*的值显示出来,think将不显示-->
    <category>
        <pattern>我 的 名字 是 *</pattern>
        <template>你好,欢迎来到王者峡谷!<think><set name="username1"><star/></set> </think></template>
    </category>
    <category>
        <pattern>好啦,我 要 走 了</pattern>
        <template>
            好的,<get name="username1"/>,下次来玩。
        </template>
    </category>

杨鹏 committed
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
    <category>
        <pattern>我 爱 *</pattern>
        <template>
            <think>
                <set name="hobit"><star/></set>
            </think>
            哇塞,你好
            <condition name="hobit">
                <li value="健身">帅啊,型男范儿!</li>
                <li value="读书">有内涵啊</li>
                <li value="打游戏">自由啊,羡慕你</li>
                <li>666啊</li>

            </condition>
        </template>


    </category>

yangpengflag committed
120 121 122 123 124




</aiml>