用于创建自然语言软件代理的xml方言

AgentML的Python项目详细描述


Build StatusCoverage StatusCodacy Badge

简而言之,agentml是一种用于创建自然语言的xml方言 软件代理。这是一个受 AIMLRiveScript

用法

为了提供一个简单的例子来说明它是如何工作的,这里有一个演示aml 允许您向“代理”自我介绍的文件

<agentmlversion="0.2"xmlns=""><!-- Hello! --><trigger><pattern>(hello|hi|hiya|good evening|good morning)</pattern><!-- Do we know this person already? --><condition><ifname="first_name"><responsepriority="2"><limitunit="minutes">3</limit><template><random><item>Hi <varname="first_name"/>!</item><item>Hello, <varname="first_name"/>!</item><item>Hello <varname="first_name"/>.</item><item><starformat="capitalize"/><varname="first_name"/>.</item></random></template></response><!-- We just said hello to them! --><templatepriority="1">Hello yet again, <varname="first_name"/>.</template></if></condition><!-- If not, let's ask them their name! --><response><topic>whats your name</topic><template><random><item>Hi! What is your name?</item><item>Hello! What's your name?</item><item>Hiya! Who are you?</item><item><starformat="capitalize"/>! Who is this?</item></random></template></response></trigger><!-- Response to us asking them their name --><topicname="whats your name"><!-- First name only --><trigger><pattern>[my|the] [name is] (_)</pattern><response><varname="first_name"><starformat="title"/></var><topic/><template>Hello, <starformat="title"/>, it's nice to meet you!</template></response></trigger><!-- First and last name (optional) --><triggerpriority="1"><pattern>[my|the] [name is] (_) (_)</pattern><response><varname="last_name"><starindex="2"format="title"/></var><redirect>my name is <star/></redirect></response></trigger></topic></agentml>

下面是上面的实际标记,

[#] Hello!
Hello! Who is this?

[#] My name is Makoto Fujimoto.
Hello, Makoto, it's nice to meet you!

[#] Hi!
Hello Makoto.

[#] Hello!
Hello yet again, Makoto.

在我们的第一条消息中,我们向软件代理介绍自己。 Agentml发现它还不知道我们是谁并问我们 name,然后保存我们的响应数据以供以后使用。当我们打招呼的时候 再一次,软件代理正常地向我们打招呼。

您还可以看到,如果我们重复我们自己,软件代理 我能意识到我们有点无聊,并向我们打了个招呼 更恼火的语气。这是通过限制响应来实现的,并且 是agentml提供的允许您创建 更深入的互动软件代理和聊天机器人。

由于agentml目前仍然是alpha软件,其功能可能 在任何给定的时间进行更改,都没有使用它的完整文档 可用。但是,您可以查看当前的Working Draft 有关软件的更多技术概述。

许可证

The MIT License (MIT)

Copyright (c) 2015 Makoto Fujimoto

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

帮助支持代理商的发展!

如果你想帮助代理商进一步发展,请考虑 保证你对帕特伦的支持!https://www.patreon.com/FujiMakoto

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java中的json IoT模块GET请求   在Java8中,如何使用lambda表达式中的条件?   Java 7中的io,如何通过一个实际示例演示文件之间的差异。存在和文件。不存在?   在Android Studio中使用Java从url获取JSON?   返回k个最小元素的java数组   java如何让我的安卓应用通过facebook登录并获得foursquare等好友列表   java如何在布局中以编程方式生成文本视图   在java中更改系统日期和时间的datetime代码段   java Hibernate和SQLite3,一对多关系映射   java Observable转换成kotlin问题   java在单独的线程中将VBO发送到GPU   属性文件中值的spring Java验证程序注释   java Spring启动:找不到javassist   java SimpleDataFormat时间解析   无法在linux上为Java程序正确设置PATH变量   将文件上载到FTP服务器时发生java异常   基于java TestNG的Selenium测试不能并行运行   java DAO类实例与DAO EJB   tomcat6部署*。使用Java Web Start(JNLP)的war应用程序