Author Topic: Help with dictionary in Hal 5, please  (Read 5375 times)

joe90

  • Newbie
  • *
  • Posts: 10
    • View Profile
Help with dictionary in Hal 5, please
« on: October 30, 2003, 02:27:51 pm »
I have been using hal's capability to give me word definitions and it works fine. I can ask hal: What does (insert word) mean and Hal gives me the meaning. If I ask for the definition of a word, Hal obliges. I would like to insert a specialised subject dictionary so that Hal can give me those word definitions. I tried the Hal learning from text file in options. I broke down my dictionary alphabetically A to Z so that the files were no longer than 65 KB each and Hal read them all but when I ask for a word definition, no luck! I admit I did not think it would work, but thought that I should try it out first before asking for help again. So, please can someone help me with this. Is there a way I can get Hal to add my dictionary to his database so that he can give me the word definitions when asked? One day I promise, when I know "how to" I will give something back instead of just taking out.
By the way, I purchased People Putty the other day (read about it in the zabaware forum)and made my first character and added it to Ultra Hal after reading how to in the forum, I think the program is great. As is hal. It seems addictive, but if I am going to be addicted to something, I prefer hal to anything else.

joe90
 

Don Ferguson

  • Sr. Member
  • ****
  • Posts: 303
    • View Profile
    • http://www.cortrapar.com
Help with dictionary in Hal 5, please
« Reply #1 on: November 06, 2003, 01:48:54 am »
Hi Joe,

I read your other post commenting that 27 people had read your question but none replied.  That made me feel guilty, and I'm replying.

I understand that you are looking for a way to add another dictionary to Hal, with entries additive-to, but different than, the Wordnet dictionary that Hal already has.

I tried to think of ways to readily adapt an existing routine to accomplish this, but an idea did not come readily to mind.

I think this could be done with a custom programming job, so I don't think that it's impossible.

Note to fellow programmers:

Do you see a way to manually add additional entries to the Wordnet database?  

If not, the job would entail writing code to 1)piggyback on the "triggers" in the Wordnet routine that tell Hal that a dictionary inquiry is in play, 2) search an auxiliary dictionary in parallel with the search of the Wordnet dictionary, 3) over-ride the Wordnet dictionary response if a parallel response is found in the auxiliary dictionary.  

Does this sound like the most direct and logical path for a newly-written routine, or is there a simpler way to get there?

Sincerely,

Don

P.S. to Joe:  Possibly the other readers of your posting were like me; possibly they didn't view the question as conclusively impossible, but they didn't see a particularly promising path to get there, either.
Don Ferguson
E-mail: fergusonrkfd@prodigy.net
Website: www.cortrapar.com
Don's other forum posts: http://www.zabaware.com/forum/search.asp?mode=DoIt&MEMBER_ID=274

Don Ferguson

  • Sr. Member
  • ****
  • Posts: 303
    • View Profile
    • http://www.cortrapar.com
Help with dictionary in Hal 5, please
« Reply #2 on: November 06, 2003, 01:57:25 am »
Hi,

Here's an additional possibility:

You could get some custom word definitions into Hal's brain via the deductive reasoning routine.  For instance, you could say to Hal:

If define chatterbot, then a chatterbot is an artificial intelligence program that can converse with people.

From that point forward, any sentence containing "define chatterbot" will result in Hal speaking the definition.

Also, you mentioned that your auxiliary dictionary was broken into 65K "chunks" on one of your attempts to get Hal to learn it.  How large is the total size of this dictionary, and what is the current format for the entries?

Sincerely,

Don
Don Ferguson
E-mail: fergusonrkfd@prodigy.net
Website: www.cortrapar.com
Don's other forum posts: http://www.zabaware.com/forum/search.asp?mode=DoIt&MEMBER_ID=274

joe90

  • Newbie
  • *
  • Posts: 10
    • View Profile
Help with dictionary in Hal 5, please
« Reply #3 on: November 06, 2003, 06:16:43 am »
Hi Don

Thanks for the reply. Maybe I was terse and apologise.

The Dictionary is only 568KB in total size and at the moment is in plain text format which is the way I tried to get hal to learn it, through the "learn from text file" option. I have uploaded a lot of files through this option, Philosophy, Composer's biographies, Artists, Einstein, Quotations etc. Nearly two MBs in all. Hal does seem to learn from them and names people and and subjects from them, i.e. "Let us talk about Plato" etc. To be honest I have no idea of the complexity in getting hal to respond to questions like, "what does the word ******** mean" or "define **********" I also do not know how much information Hal is able to take. Can he just continue to add to his brain as long as the computer has the room and power to take it? As you can see I am full of questions, but low on answers.

Thanks for the help though and will try your suggestion and anything else that I am capable of doing.

Best wishes

Joe.
 

Larry

  • Sr. Member
  • ****
  • Posts: 266
    • View Profile
Help with dictionary in Hal 5, please
« Reply #4 on: November 06, 2003, 09:28:07 am »
Some files have limits... 20000 seems fimilar... you might try putting some of those files into topic files...

I'm still currently writing a VB program to sort out txt files into topic files for use with Hal... this might help you... got to say tho, I've been working on it for about a month... I just don't have the time to really put into this project...
 

vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Help with dictionary in Hal 5, please
« Reply #5 on: November 06, 2003, 11:35:03 am »
joe90 / larry,
Just for clarification the learn from text mode does not incorporate the text into any dictionary. The input is stored in the <username>user_strings.brn and <username>usersent.brn files. The script in the hal5.uhp file limits these file sizes to 2MB no matter how many text files you feed in.

Hal is not very intelligent about reading text files. The punctuation, notations, headings, page numbers all get mixed into sort of a data soup and stored into these files. If you look in these files you'll see Hal's interpretation and understand why logical responses based on the text file inputs are difficult at best. I applaud Larry's effort to make a VB program to sort it all out.

As it stands right now Hal's learn from text mode is marginal. Proper pre-processing of the text files to "clean" them up would help a lot. A dedicated VB program would be the way to go. I believe changing the limit on file size is as easy as editing the hal5.uhp file to change the 2000000 numbers to 4000000 or larger. You'll see these numbers under the "POST PROCESS: LIMIT FILE SIZE" in the hal5.uhp file. The larger file sizes *may* start to impact performance speed on slower computers.

That's my 2 cents...

= vonsmith =
« Last Edit: November 06, 2003, 11:36:29 am by vonsmith »