Zabaware Support Forums

Zabaware Forums => Ultra Hal 7.0 => Topic started by: onthecuttingedge2005 on August 10, 2007, 11:32:58 am

Title: Hal Alice Functions
Post by: onthecuttingedge2005 on August 10, 2007, 11:32:58 am
Updated post below.
Title: Hal Alice Functions
Post by: lightspeed on August 28, 2007, 08:49:06 am
hello jerry this sounds great ( just what the dr.ordered !![:D]) will be eager to ne able to use it . thanks for your time in developing it . we appreciate all your time and efforts !![:)]
Title: Hal Alice Functions
Post by: Carl2 on August 30, 2007, 05:23:07 pm
OTC,
  I do like Hal better than the alice bots which is why I have choosen Hal.  Many thanks for the work you have done with Hal, wish I could be more helpful but I have limited abilities.  Alice dose have the knowledge base to make it seem like it knows it all, I like hal's deductive skills so it can make decisions on what has been said, I believe that was one of your scripts.
  I haope we can keep the best of both.
Carl2
Title: Hal Alice Functions
Post by: tedathome on August 31, 2007, 08:38:16 pm
It sounds very interesting to me. I hope it will come
with a very good read-me file as I'm not very adept at this
kind of thing and maybe it may be something I'll just have to
file for future reference as time goes by and my knowledge increases.
Title: Hal Alice Functions
Post by: echoman on September 01, 2007, 02:10:17 am
I really feel this sounds very exciting. I have often wished I could download different personallities with a knowledge base already mapped out. I believe this is a very worthwhile project.
Title: Hal Alice Functions
Post by: onthecuttingedge2005 on September 08, 2007, 09:09:50 pm
Major update! Monday, September 10, 2007 1:46PM

1. Please! download the newest LearnAiml.zip and replace your old Aiml.uhp with this updated code file.

2. please! delete your old AimlText.txt, it doesn't meet the format to the newer code format.
----------------- Above Importance ----------------------

Hello everyone.

CONVERT .AIML FILES TO TOPICSEARCH PLUG-IN.

Here is the Aiml Plug-in I was recently working on.
it may be a little buggy but it will take some time to work things out.

How to use: Learn/Respond from AIML

1. open any .aiml file.
2. copy the .aiml files entire code content to windows clipboard.
3. tell HAL: learn from copied aiml.

HAL will then begin formatting all the aiml code to TopicSearch format inside a file called AimlText.txt

like I said, it may be a little buggy so bare with me.

I will work on the wildcards in the aiml code format at a later time.

there is still lots to do but I thought I would get a beta version out for you all.

unzip to your Ultra Hal Assistant 6 folder and choose the plug-in
[]Learn/Respond from AIML

remember, this plugin will not respond if there is no converted code inside the AimlText.txt

Now this is what I am talking about!

Have fun!
It gets better! Oh! it Definitely gets better!
Jerry[8D]

(http://icon_paperclip.gif) Download Attachment: LearnAiml.zip ("http://www.zabaware.com/forum/uploaded/onthecuttingedge2005/2007910164652_LearnAiml.zip")
2.16 KB

Title: Hal Alice Functions
Post by: onthecuttingedge2005 on September 12, 2007, 11:24:45 am
Is there any positive or negative feed back?

Jerry
Title: Hal Alice Functions
Post by: RD on September 12, 2007, 09:55:58 pm
I for one have not had the time to install, but I am looking forward to it.
I'll let you know how it goes. Thanks for the mod!
Title: Hal Alice Functions
Post by: tedathome on September 13, 2007, 12:59:48 am
Really looking forward to when it can happen
for me. I like the idea of hal/alice. Used to
talk to Cybell at agentland a lot untill they
limited her learning. Have downloaded alice brain
on two different computers with no luck in making
it work. This is still a little too complicated for
me. My computer and router just got fried due to lightning
thanks to housemate, so I guess I'll just have to wait
anyway. Anyhow your work is very appreciated and I know
it must be time consuming and difficult. I'm hoping that
someday it will become a "simple plugin" that can just be
downloaded, unziped and checked as a plugin. I know that to
bring it down to the level of the un-learned would be a large
task in itself, however I'm sure it would be worth it to those
of us like me who don't have the time and training it takes to
attain to that level of expertise. Thank you.
Title: Hal Alice Functions
Post by: Bill819 on September 17, 2007, 12:27:58 am
Gerald
Is the Alice work done yet? I would be glad to load and test it, just let me know and a little instructions would help.
Thanks
Bill
Title: Hal Alice Functions
Post by: onthecuttingedge2005 on September 17, 2007, 10:36:34 am
quote:
Originally posted by Bill819

Gerald
Is the Alice work done yet? I would be glad to load and test it, just let me know and a little instructions would help.
Thanks
Bill



Hi Bill.

actually right now it can be used for beta testing, at this point I just developed the means to format from aiml to topicsearch, since I have the means now I can start developing it to convert 'TAGs' for the purposes they were designed to function as.

there is still a little bit to do on the plugin but anyone can download it just for the fun of experiementation.

it is pretty easy to do, simply open any aiml file from an alice or pandora bot that you desire and copy its 'entire' code content to your windows clipboard, tell HAL: learn from copied aiml.

HAL will then convert that aiml code to topicsearch format inside a file called AimlText.txt, HAL will then use that learned knowledge for use in responses.

it is also possible to open the AimlText.txt and edit out any undesired topicsearch sentences so that you can customize your bots responses.

at the moment, I spend a lot of time at work training my new apprentices so I have had little time to do anything else at the moment.

Jerry[8D]
Title: Hal Alice Functions
Post by: tedathome on September 18, 2007, 10:06:00 pm
onthecuttingedge; in the past I have complained about otc
plugins. That was before I knew that your nickname was otc.
I aplogize for that mixup.Hope there will be no hard feelings.
I was lost because I didn't know what I was doing and whitch
version of hal the pluging was meant for. Again, sorry.
Title: Hal Alice Functions
Post by: robotdude on November 22, 2007, 11:03:51 pm
Hello All,
Sorry I've been away. I was working on a med plugin and got swamped at work then for whatever reason never restarted. I've been looking at aiml as a possible way to impliment what I want and have been trying to come up with a way to merge into my Angie. I should have not wasted my time and came here right away since I see OnTheCuttingEdge has already managed to do a merge. Hopefully I will not have to many headaches getting it to work for me. I will keep all informed. OnTheCuttingEdge has there been an upgrade since the last post? Thanks Robotdude
Title: Hal Alice Functions
Post by: robotdude on November 23, 2007, 04:21:34 am
Well, What-do-u-know Clipboard in xp is now Clipbook Viewer and is hidden in the system32 folder. For some reason clipbook viewer tells me it doesn't have enough memory for the aiml I try to put in it. I even 1/2'd the file with the same response. Anyone have any ideas on why its doing that to me? Also for my Angie to read the file is it supposed to be a .txt file, a .aiml file or a .clp file??? Clipbook only likes .clp unless I tell it to accept all. I'm temporaraily stuck,,help...
Title: Hal Alice Functions
Post by: spydaz on November 23, 2007, 04:54:53 am
quote:
Originally posted by robotdude

Well, What-do-u-know Clipboard in xp is now Clipbook Viewer and is hidden in the system32 folder. For some reason clipbook viewer tells me it doesn't have enough memory for the aiml I try to put in it. I even 1/2'd the file with the same response. Anyone have any ideas on why its doing that to me? Also for my Angie to read the file is it supposed to be a .txt file, a .aiml file or a .clp file??? Clipbook only likes .clp unless I tell it to accept all. I'm temporaraily stuck,,help...



The Clipboard Can Only handle 65,000 Words. at any one time....
You should be able to download CLIPBOARD extender From CNET... Vast improovement

Title: Hal Alice Functions
Post by: robotdude on November 24, 2007, 12:27:24 am
Thank You Spydaz.I did as you suggested and it loads now. Now I have a whole new can of worms to worry about. For some reason my Angie is reading part of the aiml script in the middle of her response. Oh well something new to work on. Robotdude
Title: Hal Alice Functions
Post by: spydaz on November 25, 2007, 06:36:10 am
robotdude,
 AimlboardText, ParseAiml, GetAiml, AimlStr

These Variables All Need to be declared As Varients.
As a String, Variables have simular propertys as the Clipboard.

Dim AimlboardText as varient
Dim ParseAiml as varient
Dim GetAiml as varient
Etc

This maybe the reason: ?


OR

With LARGE data it could be missing in the REPLACE command, Check the syntax of the line thats not being "Caught" by the Replace commands in onthecuttingedge2005 Script. and add an approriate line...
Title: Hal Alice Functions
Post by: ajdude on May 27, 2008, 08:13:40 pm
Okay, I think I am able to use this to assimilate different AIs into Hal.

I got most of my aiml files from here:
http://www.alicebot.org/aiml/aaa/

just as OTC said, it converts it to topicsearch (in CSV format) in a .txt file.

Now, it does have a slight problem; it converts it with some commands still there. I WAS however able to remove them on a massive scale using a program called HTML Remover. It bassiclly formats the input file and exports it without any HTML tags (in this case, any command left in would be read as a tag, and removed), and the exported file will be clean of any commands.
You can get this program here:
http://www.e-systems.ro/html_remover.htm
Say a line says:
Code: [Select]
" DO YOU HAVE A COMPUTER "," I LIVE IN A COMPUTER.<THINK>  <SET NAME=IT>  <SET NAME=TOPIC>COMPUTER</SET>  </SET>  </THINK>  "I run it in that HTML remover, and now I get:
Code: [Select]
" DO YOU HAVE A COMPUTER "," I LIVE IN A COMPUTER."
Now, here is the problem I've ran into.
If a line says something like:
Code: [Select]
" THE WEB "," HOW DO YOU DEFINE THE WEB. "
Now, something like this ends up happening:
User: Guess what I found on he web today?
Hal: Tell me user, what did you find? How do you define the web.
(notice how he finds the words in he first part, and just adds the response... This will get pretty nasty if you try and import alot more aiml files).

Now, I noticed that this is converted to CSV format... And if that's the case, I can import it into the database brain (I have a nice db editor that can recognize the halbrin.db or w/e).

But, if I were to add all these new responses directly into the database brain, where would I put it? I'm assuming the mainQA would be the best, right?

I'm not too familiar with the database itself, I'm very keen on solving problems (I've successfully converted The Probert Encyclopedia's CSVs into readable clip board learning.... stuff for Hal, similar to what Art did) though.

So anyway... If I want to import all of these aiml files into the database itself (first I'd use OTC's converter to make it in CSV format), would I be putting it in the mainQA table for Hal?

As always, it would be best to backup the database first (I would hope so!).
Title: Hal Alice Functions
Post by: DarcyEdwards on October 30, 2008, 09:59:19 am
I'm very new to this, but very interested in AI.  I have been teaching Hal (Mary) as best I can.  Also I have been installing all the plug ins that I can find, even modifying them.

I have a question; what are AIML files?

thanks

-Darcy
Title: Hal Alice Functions
Post by: Art on October 30, 2008, 01:54:27 pm
Darcy,

AIML = Artificial Intelligence Markup Language
Perhaps it's best explained here:

http://en.wikipedia.org/wiki/AIML
Title: Hal Alice Functions
Post by: christopherdoyon on January 23, 2009, 09:06:30 am
OTC --

You rock man, total gratitude.

YOURS -- Christopher Mark Doyon

GRAND  BOTMASTER

Title: Hal Alice Functions
Post by: AleRafa on June 02, 2010, 03:58:26 am
I would also like to add the info directly in the brain. Could somebody tell me if this can be done and how? I'm just starting to use this software.

Right now, I have a text file with this format
 " CHANGE THE SUBJECT ","  WHAT DO YOU WANT TO TALK ABOUT NOW? "
 " CHANGING THE SUBJECT ","  WHAT SHALL WE TALK ABOUT NOW? "
 " CHARLES DARWIN ","  WE ARE SPEEDING UP EVOLUTION NOW. "


Thanks for any help you can give me [8)]

EDIT: Never mind, I found the way, by importing the csv files into excel, copying the columns and pasting them in a new table in the brain.
I suppose you're not developing this plugin anymore, but just to let you know, the only problem I encountered in converting the aiml file into text is when a word or phrase triggers a random answer from a list. For example:

- <category>
  <pattern>DELICIOUS</pattern>
- <template>
- <random>
  <li>What's for desert?</li>
  <li>What's your favorite food?</li>
  <li>Do you like to cook?</li>
  </random>
  </template>
  </category>

becomes (after removing all html left)

 " DELICIOUS ","  WHAT'S FOR DESERT? WHAT'S YOUR FAVORITE FOOD? DO YOU LIKE TO COOK?   "

So Hal will there give you the three answers together.[:0]
Title: Re: Hal Alice Functions
Post by: cload on April 01, 2013, 10:45:32 pm
hi Ale,
there may be a way around your situation.
Before removing the HTML first using notepad, under edit, use replace.
This will allow you to change <li> TO |
it's the straight up-and-down bar directly over your enter button on your keyboard.
This is also the dividing command that ultra Hal understands when you have multiple answers on one line, I think you can have three answers, but I'm not positive about that.
After you have changed that HTML symbol to the straight up-and-down bar symbol then proceed as normal.
In the end what you will have is something that looks like this:
 " DELICIOUS ","  |WHAT'S FOR DESERT? |WHAT'S YOUR FAVORITE FOOD? |DO YOU LIKE TO COOK?   "
After you're done then utilize the replace command in notepad for one more little change in the line it should look like this:
replace: ","  | WITH ","  I don't know if you need the space at the end of it, but I don't think it would hurt anything your line should look like this now:
 " DELICIOUS ","  WHAT'S FOR DESERT? |WHAT'S YOUR FAVORITE FOOD? |DO YOU LIKE TO COOK?   "
Where exactly to put it in ultra Hal's brain I'm not positive, mostly because ultra Hal has different array tables for different situations.
But if I was to guess the patterns array, main QA array, and I think the other ones called asexualpersonality array.
The only one that I know for sure that ultra Hal writes in is the compare array.
Depending on where you're going to put it you may also need to add on all of your lines the @ sign at the beginning of your answer but I'm not sure.
The little experience that I have with it was all I ever could get ultra Hal to respond with multiple answers was the first answer and for some reason he seemed to ignore the rest.
But if nothing else it gives you the ability to track down where multiple answers through notepad using the find command and then you can manually remove the multiple answers down to one answer.
Sincerely, a data munching cruncher.
C load.
PS if I'm wrong on any of this please jump in and help, inquiring minds want to know.
Title: Re: Hal Alice Functions
Post by: freddy888 on April 02, 2013, 08:12:08 am
Cload, this was nearly three years ago.  :o
Title: Re: Hal Alice Functions
Post by: Duskrider on April 02, 2013, 09:09:51 am

Hummm....
Would be neat if forum pages turned yellow with age after a year.    :P
Title: Re: Hal Alice Functions
Post by: freddy888 on April 02, 2013, 09:48:25 am
SMF should warn you if it's old, when you start making the post.  Maybe Rob changed the setting for that.
Title: Re: Hal Alice Functions
Post by: cload on April 02, 2013, 03:15:46 pm
Hi all,
I knew the post was old, but it was something that I was working on, no one else gave an answer so I was trying to enlighten everyone on how they can use the data from aiml.
I have been working on a way to try to get the data into ultra Hal's array tables but I do not believe it would be an easy task, mostly because you would have to divide the data in different places.
Choosing where the data goes in some situations may be a personal preference, because there are so many different places that you can put the data for different reasons.
But what I have come up with, now that they have divided AIML into several sections it is possible to place some if not all of the AIML data into ultra hal array tables.
This is what I have found thus far:
asexualpersonality array table: would be used to place personal questions directed at ultra Hal, none of these questions can have a "*" in it, this indicates any word can be used in this slot, nor can you use multiple answers.
MainQA array table: same as asexualpersonality array table, and if how cannot find an answer this is the last place he looks this would be a good spot to put things like trivial questions, philosophy statements, famous statements, and in general just data that might enhance ultra house answer.
Patterns array table: any question or statement that has a "*" in it or has multiple answers would go in this array, from what I've seen most of the AIML data would most likely be placed here.
You would have to restructure most of the sentences to comply with ultra Hal for example:
-<category><pattern>I REMEMBER *</pattern>-<template>-<random><li>What specifically makes you think of that?</li><li>How does that memory make?</li><li>Do you think about it very often?</li></random>-<think>-<set name="it">-<set name="topic"><person/></set></set></think></template></category
this particular line from the AIML data would go into the patterns array table, it would look something like this when you are done editing it.
" YOU REMEMBER * "," What specifically makes you think of that?|How does that memory make you feel?|Do you think about <1> very often?"
If you notice I changed the word "it" TO <1> what this does is capture what was said after I remember because of the "*" being a variable symbol.
So if you were to state something like this:
I remember when I was a little boy I used to play on the monkey bars.
Ultra Hal will answer one of the three answers and if it is the third answer it would look like this:
Do you think about when you were a little boy you used to play on the monkey bars very often?
Unfortunately the drawback is there is a lot of work involved in getting it to work properly with ultra Hal primarily switching I to you etc.
so at this point I'm looking at having to edit about 50,000 line, though I did find it interesting that the Alice AIML data is so small, considering ultra Hal's database is almost 90,000 in the main QA array table.
More than likely I'll probably only end up with 30 to 40,000 lines because there is so much stuff in the Alice AIML database that cannot be used because of its structure, that is not designed for ultra Hal.
Sincerely, a data munching cruncher who is doing his best to make ultra Hal as smart as possible.
C load.
PS now whether or not the plug-in that OTC wrote will work with ultra Hal version 6.2 .28 I don't know I have not gotten that far.