Únete a Bot Libre de Socios y Afiliados programa y el apoyo de nuestra libre plataforma abierta
Bot Libre Forum

Website update - AIML 2.0, Self 2.0, scaling

por admin publicado Jul 22 2015, 14:43

The website was updated today. The update included more support for AIML 2.0 features, and some scalability fixes that will hopefully fix the memory issues we have been having for the last couple weeks. The update also included some other minor fixes and enhancements.

AIML 2.0

Our AIML 2.0 support is now almost complete,

Support for several new tags was added.

Pattern side <set>

Pattern side <set> tag. This allows for pattern to be defined on predefined sets. If the word in place of <set> is part of the predefined set, then the pattern will be evaluated with the word becoming the <star/> variable in the template.

This lets you define patterns for wildcard types, such as names, colors, numbers, things, descriptions, actions, etc.

i.e.

<pattern>are you <set>name</set></pattern>

<template>No my name is <bot name="name"/>.</template>

Note that in BOT libre, there are no set files. Instead sets use the bot's knowledge base and the #meaning and #instantiation relationships. So, if the word is an #instantiation of #name it will be part of the set.

Pattern side <bot> and <get>

You can now use the <bot> and <get> tags in a pattern. This lets you define more dynamic patterns.

i.e.

<pattern>are you <bot name="name"/></pattern>

<template>Yes, that is my name.</template>

<map>

The <map> tag can be used in a template to map one value to another.

i.e.

<pattern>what comes after <set>number</set></pattern>

<template><map name="next"><star/></map> comes after <star/></template>

Note that in BOT libre, there are no map files. Instead maps use the bot's knowledge base and lookup relationships between the objects. Ever word has a meaning, which is an object, that can have relationships to any other object. BOT libre also extends the map tag with a value that allows relationships to be set as well. Previously you could only access the knowledge base in Self, but map lets you access it to some degree in AIML.

i.e.

<pattern>* is a color</pattern>

<template>I understand, <star/> is a color.<think><map name="meaning"><value><star/></value><star/></map><map name="instantiation" value="color"><map name="meaning"><star/></map></map></think></template>

<sraix>

SRAIX allows a remote call to be made to another bot or a service. SRAIX will forward the question text to the remote service and return the response. SRAIX can take either a bot, botid, or service. If none is given the Pannous service is used by default. The bot name or botid will send the request to the BOT libre server, a server can also be given to call another server that supports the AIML SRAIX API defined by Program AB (which BOT libre now supports).

BOT libre currently supports the following services,

pannous - http://pannous.com (send request to Pannous web API)
freebase - https://www.freebase.com (lookup word or phrase using Google's Freebase web API)
wikidata - https://www.wikidata.org (lookup word or phrase using Wikipedia's Wikidata web API)
wiktionary - https://en.wiktionary.org (define word using Wikimedia's Wiktionary online dictionary)
i.e.

<pattern>what is *</pattern>

<template><sraix service="freebase"><star/></sraix></template>

or,

<pattern>what does brain bot think of *</pattern>

<template>He thinks, <sraix bot="Brain Bot"><star/></sraix></template>

You can also pass an API key using the apikey attribute, which some services may require.

You can also pass a hint attribute, that is used by some services such as Wikidata.

i.e.

<pattern>what country is * in</pattern>

<template><star/> is in <sraix service="wikidata" hint="country"><star/></sraix></template>

AIML Web API

In addition to its own web API, BOT libre now also supports the web API defined by the AIML 2.0 reference implementation Program AB. This let you call BOT libre bots from any AIML 2.0 supporting implementation. It also lets your BOT libre bot call any AIML 2.0 supporting implementation.


Self 2.0

All of the new AIML operations are also supported in Self.

Self now defines REQUEST which lets you call a remote service. You can also use SRAIX as a synonym for REQUEST
i.e.

pattern "what is *" template (request (star, {service : #freebase}));

 

You can now use any Self code inside a pattern.

i.e.

pattern "my name is {#self.name}" template "Wow, that is my name too!";
or,

pattern "my name is {name}" template "Pleased to meet you {name}";

or,

pattern "I am {^name}" template "Pleased to meet you {name}";

(where ^ means define a variable of the type #name)

 


Id: 1074131
Etiquetas: website update, aiml, self, programming, scripting, patterns, formulas, performance
Publicado: Jul 22 2015, 14:43
Actualizado: Feb 23 2016, 14:49
Respuestas: 0
Vistas: 2463, hoy: 1, la semana: 11, mes: 17
Estoy seguro de que
Bandera post ofensivos, o en violación de las reglas del sitio