用于创建自然语言软件代理的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第三方库


热门话题
eclipse java btc交易应用程序编译时错误(HTTP组件)   java客户端状态保存,我能看到发送到客户端的状态数据吗?   spring中的java内部字段注入工作以及为什么不建议使用它   在iReports、Jasper和JavaBean数据源中使用表功能   如何在Java树中查找节点   用于日志分析的java模式匹配   java如何在Spring中处理json列表?   java SQL注入和可能的攻击   java如果我将实体转换为DTO,那么转换代码应该存在于何处?   java素数方法不起作用   通过NFC启动java Android Q隐私更改活动   java在Spring引导时为Spring AMQP和RabbitMQ动态设置主机   swing Java Paste From Clipboard不适用于Linux上的所有应用程序   java从不同对象访问对象的内部类   java Ektorp CouchDB测试连接   十进制前8位、十进制后2位和整个字符串的java正则表达式不应计算为零   在Java中以长格式存储两个整数之和   ConfigurationProperties中嵌套属性的java验证