Author Topic: Remember specific data plugin  (Read 5719 times)

Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Remember specific data plugin
« on: March 03, 2007, 08:12:44 pm »
This will remember a single piece of data by writing a table with the name of the type of data (for instance, "Zipcode" or "Zabaware Password") prefixed with the username ("_Bob_Zipcode"). For now, you have to use two specific sentences, "Please remember that my Zipcode is _____" and "Recall and display my Zipcode".

Improvements will include a more natural request ability, and a way to replace old data with new data, for instance if you move and want to put in a new Zipcode. For now, you have to make a new name for it, like "New Zipcode" will give you a table called "_Bob_New_Zipcode".

You can do things like "Please remember that my November Login Password is ********" as long as its name is four words or less with no puncutation.

The real reason for this plugin is that the two functions are reusable in other plugins as a way to insert data that the plugin will need later, like the Zipcode for the weather plugin.

As usual, copy, paste, save as "LoadData.uhp" or something. Credit to OnTheCuttingEdge (Jerry) for inspiration, advice and some lines of code I hijacked.

Load Data Plugin
« Last Edit: March 04, 2007, 09:06:46 pm by Bill DeWitt »


PaleRider

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Remember specific data plugin
« Reply #1 on: March 03, 2007, 10:23:09 pm »
Thank you Bill it works ok for me, I had to say what is my postal
code and it replyed right.[:D]
Never Drive Faster Than Your Guardian Angel Can Fly.

Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Remember specific data plugin
« Reply #2 on: March 03, 2007, 10:44:12 pm »
Thanks for the feedback!

But, for now at least, "Recall and display my Postal code" should be more certain. Hal's natural functions will usually give you the right answer, but the hard coded phrase should always give you the right answer.

I had just given up on the natural language improvement for the night. Things were getting fuzzy...

Heh, it works with more phrases now (about 4800 possible combinations of keywords), but makes tables with names like "_keep_in_mind_that_my_password" - clearly a SearchPattern() problem, but also a "too little sleep lately" problem.

I really should concentrate on using these functions to finalize the weather plugin... perhaps tomorrow...
« Last Edit: March 03, 2007, 10:51:35 pm by Bill DeWitt »


PaleRider

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Remember specific data plugin
« Reply #3 on: March 04, 2007, 07:59:48 am »
Yes recall and display or what is Pauls postal code are working
perfect for me Thanks Bill and thank you for being there your
great as i need a plugin for a price list database i am working on.[:D]
Never Drive Faster Than Your Guardian Angel Can Fly.

Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Remember specific data plugin
« Reply #4 on: March 04, 2007, 08:13:26 pm »
I have uploaded a revised plugin to :

Load Data Plugin

This will remember a single piece of data by writing a table with the name of the type of data (for instance, "Zipcode" or "Zabaware Password") prefixed with the username ("_Bob_Zipcode"). There is a more natural request ability now, but there are still some requirements. In order to keep it from conflicting with Hal's native functions, I had to place restrictions on what you can say. I welcome ideas about how to get around this.  

1) You must say the name of the type of data first, and the actual data second

2) You must say "is" between the data name and the actual data, "my code is 54637"

3) You must not say anything after the data. For recall you must not say anything after the data name "Please recall my code"

Other than that you can say a wide variety of things and get a result, plus, if you want you can add your favorite phrases as long as you use the pattern I established.

For instance, you can say:
Please remember my code is 1234
Could you put in your memory banks that my code is 1234
Will you keep in mind that our code is 1234
&Etc.
But not "Remember my code is 1234 please"

To recall the data you can say:
I would like you to display my Code
Would you recall my code
Can you display our code
&Etc.

Read the script to see what else you can say.

I should point out that Hal can naturally remember things like this, if you say "My code is 1234" it will probably remember it. Later if you ask "What is my code" it might respond correctly. The more often you say it and in the more varied ways you say it, the more likely it will respond as expected.

This plugin is for when you absolutely have to have the data in a form that will certainly be recalled every time even if you only told Hal the data once. It is also intended to be used for unusual types of data, like passwords that change every month or whatever.

And of course, the real reason is that the two functions are something I can reuse in my other plugins to enter specific data that those plugins need like latitude for length of daylight or zipcode for weather. The finalized functions will allow me to quickly insert a chunk of code that will parse out the needed data without me having to rewrite the whole thing each time.
« Last Edit: March 04, 2007, 09:40:51 pm by Bill DeWitt »


onthecuttingedge2005

  • Guest
Remember specific data plugin
« Reply #5 on: March 05, 2007, 09:34:48 am »
Hi Bill.

If you setup your responses like this:

GetResponse = GetResponse & " " & LoadData(OriginalSentence)

GetResponse = GetResponse & " " & FindData(OriginalSentence)

then the load data plug shouldn't conflict with any other of HAL's routines but would allow the other routines to run along side of the data plug's response.

Jerry[8D]

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
Remember specific data plugin
« Reply #6 on: March 05, 2007, 12:41:01 pm »
Thanks.

How about all info responses at once??

[8D]
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

PaleRider

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Remember specific data plugin
« Reply #7 on: March 05, 2007, 03:20:13 pm »
Thank you , I got it in hal already. If you do more changes I'll update it.
as I do not program, just wait for heros like you and Jerry to make them Thanks bill DeWitt.
Never Drive Faster Than Your Guardian Angel Can Fly.

Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Remember specific data plugin
« Reply #8 on: March 05, 2007, 03:41:20 pm »
quote:
Originally posted by markofkane
How about all info responses at once??


The new version of Hal (6.1) should allow for a "would you like to know more" type continuation of responses so I planned to wait for that.

But something else I am working on, a Shopping list, could be similar to what you are saying.

I need my Hal to take everything I say goes on "the shopping list" and save it as I randomly add it during the week, then be ready at a moment's notice to have it print out in a regular order. I did a little work on it the other day and I think I can get somewhere with it soon. It will use the data functions in a slightly different way.

Good fun. So many projects, not even counting the ones on hold.
« Last Edit: March 05, 2007, 04:30:43 pm by Bill DeWitt »


danbaltzell

  • Full Member
  • ***
  • Posts: 212
    • View Profile
    • http://geocities.com/danbaltzell/ai
Remember specific data plugin
« Reply #9 on: March 05, 2007, 07:40:38 pm »
I changed it a bit to just "remember" and "what is".  But I think this may be the most useful plugin I will use, so elegantly simple, sometimes those are the most ingenious.
 

Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Remember specific data plugin
« Reply #10 on: March 05, 2007, 08:10:20 pm »
quote:
Originally posted by danbaltzell

I changed it a bit to just "remember" and "what is".  


Yeah, that's what I really wanted to do, but I found just too many times that I used similar things in sentences that had nothing to do with remembering a datum and then telling me "what is" that datum.

Like "I remember when my sister went to the lake with me" or "What is the use of a belly button?"

The recall could be keyed mostly on the DataName, but I was hoping later to have a more fuzzy logic way to recall the data (like, "Did I have a more recent password for Excel than 1234?"), and that would mess that up.

quote:
But I think this may be the most useful plugin I will use, so elegantly simple, sometimes those are the most ingenious.


Thank you, and I agree, the plugins I seem to use the most are often the small simple ones, I use the weather several times a day. Also, I like making them because I can be done before my attention wanders. I still haven't finished my big TreknoBabble project.

But some of mine are, like this one, implemetations of fragments of a larger (secret) project I have in the works that will create a Hal that could...Wait... I've said too much.

I think the traditional thing now is to say "Mhuwahaha..." while vanishing in a puff of smoke.


Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Remember specific data plugin
« Reply #11 on: March 05, 2007, 11:34:48 pm »
!!!Warning!!!


I have to warn folks that storing passwords in Hal using this plugin will cause your password to be insecure. Every phrase in Hal's memory can be called up during casual conversation, even without specifically asking for the information.

For instance, if you have a "March Excel Password" and someone asks if a new version of Excel will be installed in March, it might give out your password.

I'm working on it.

You can still use it for other stuff, just be aware of the limitations.


Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Remember specific data plugin
« Reply #12 on: March 06, 2007, 03:29:22 pm »
If someone knows a simple encryption to implement in Halscript/vbs, I should be able to change this to a straight password keeper.

Your password might still show up in conversation, but it would be scrambled.
« Last Edit: March 06, 2007, 03:30:07 pm by Bill DeWitt »


Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Remember specific data plugin
« Reply #13 on: March 08, 2007, 05:50:16 pm »
Bill DeWitt,
  I often discuss grocery shopping with Hal in the morning to plan my day, so naturaly I like your plug in.  What I would like is for the old data to be erased and replaced with todays shopping list. I'd also like this the temp file to be erased and reused during a session with Hal. Since I haven't downloaded the file and looked at it I'm just guessing about it.
  Also I visited your site again, it looks great and you seem to be doing a great job on a large project.
Carl2
 

Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Remember specific data plugin
« Reply #14 on: March 08, 2007, 08:25:13 pm »
Hi Carl,

   Last time I tried to delete and replace a table entry using the SQLite commands in Hal I was not successful. I've learned a lot since then, so maybe I should give it another try. But as it stands, this plugin creates a single entry (for instance "802") per each table (Areacode) and that's there until you remove it manually. There's no temp file, it's in the Main database.

  I hope to fix this, but it will take some experimentation.