AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Bot Libre now supports AIML 2.0
 
 

Bot Libre released its AIML 2.0 support.

Here is an article on the new features, it is probably useful for anyone interested in learn the new AIML 2.0 feature set.

http://www.botlibre.com/forum-post?id=1156738

AIML 2 has some pretty cool features, my favorite is SRAIX, that lets your bot talk to other bots (bots talking to bots, oh my).  Bot Libre supports SRAIX as well as the chat-xml web API that Program AB uses, so any Program AB bot should be able to talk to any Bot Libre bot, and vice versa.

For a live demo, talk to our AIML2 demo bot.

http://aimlbot.botlibre.com/

 

 
  [ # 1 ]

Good day, James!

Could you please explain, how to develop relations between knowledge base’s objects in Self (using Self scripts on Bot Libre)? I mean something like <map> in AIML 2.0.

Should I use operators like set/associate inside one of states? Is there any possibility to create something like a little dictionary (based on mapping) outside the state machine?

Thank you in advance!

 

 
  [ # 2 ]

Every object in Self is persistent, and can have any relationship to any other object, so it is very easy to create knowledge, and use the knowledge to parse language.

Self has two parts, states and functions.  States are used to parse language (or any input), and functions are used to create and modify knowledge objects, or perform tasks.  Anything you modify in a function will be stored persistently in the bot’s knowledge base.

You could create a set in Self like,

associate #greetings to #set by #instantiation;
append "Hello" to #element of #greetings;
append "Hi" to #element of #greetings;
append "Hey" to #element of #greetings; 

The “#” can be used to create a persistent global variable.

Then you could check if a word is in the set like,

if (is :word related to #greetings by #element) then ... 

But normally you would do things in a more object oriented fashion.  If you want to check if “hello” is a #greeting, then just check its type.  That is how our AIML 2 set and map support works.

associate "hello" to #greeting by #instantiation;

if (is :word related to #greetings by #instantiation) then ... 

From a State you would normally use a case to check something’s type using a variable.

:greeting {
  set 
#instantiation to #greeting;
}

case :greeting goto State:greet 

See,
https://www.botlibre.com/forum-post?id=699077

Bot Libre also supports AIML 2, so if you want to translate any AIML to Self, just enter the AIML in a new script from the Scripts page, and the click on the Decompile button to get the Self code.

 

 

 
  [ # 3 ]

Thank you, James!

As far as I’ve understood, the AIML standard does not specify where or how the sets and maps are defined.

There is an example on Bot Libre how to do it inside a category with pattern “load animals”:

<category>
    <
pattern>load animals</pattern>
    <
template>
        <
think>
            <
map name="meaning" value="dog">dog</map><map name="instantiation" value="animal"><map name="meaning">dog</map></map>
            <
map name="meaning" value="dog">doggy</map>
            <
map name="meaning" value="cat">cat</map><map name="instantiation" value="animal"><map name="meaning">cat</map></map>
        </
think>
    </
template>
</
category

Is it possible to define maps once, at the start of the conversation (before client says “load animals” or something else)?

Or does a botmaster have to speak to his bot “load animals” before any clients start their conversations (and then the bot will use the defined maps in all the future dialogs)?

 

 
  [ # 4 ]

Everything is Bot Libre is always persistent.  So you would only need to call “load animals” once, ever, and the data would be loaded for all future conversations.

In this example you would just call the “load animals” once when training the bot, then probably delete the script, as now the bot has the knowledge.

Defining knowledge in AIML is not really that nice though, better to use a “response list” and the “script” tag to make an import script.  We are also working on a raw XML knowledge import/export format.

Here is a response list examples to loads some data using Self scripts,
https://www.botlibre.com/script?id=11781705

You can also import data from Freebase, or Wikidata, either dynamically from Self using Call or Service, or using SRAIX in AIML, or statically from your bot’s Adim Console’s “Web” page.

For example to import all animals from Freebase enter the following Freebase URL in the Web import, from the Adim Console,
http://www.freebase.com/biology/animal

This may take a while, but the bot will now know everything about every animal defined in Freebase.

I created an example bot that did this, you can talk to it here,
http://animals.botlibre.com/

You can ask it things like,

“what is a horse?”
-> The horse is one of two extant subspecies of Equus ferus.

“is a snake an animal?”
-> You are correct, the snake is an animal.

“what is snake’s scientific name?”
-> To my knowledge snake’s scientific name is Serpentes.

“what is snake’s higher classification”
-> I known that snake’s higher classification is Ophidia.

Unfortunately Freebase has more technical info, than common sense info, like “is a snake smooth?” “does a snake have scales?” it would not know, as Freebase does not have this info.  But you can import such knowledge, or teach the bot using language i.e. “snake is smooth”.


 

 
  [ # 5 ]

Thank you very much!
Import data from Freebase or Wikidata is a great opportunity. It’s helpful only for English speaking bots, isn’t it?
(I’m trying to develop Russian speaking bots.)

 

 
  [ # 6 ]

Knowledge is language independent for the most part.  However the import does import the names and descriptions in English.  Freebase and Wikidata do provide multi-lingual support, so it should be possible to get the data in other languages, I will look into it.

 

 
  login or register to react