Author Topic: you versus I error  (Read 9065 times)

calypso

  • Newbie
  • *
  • Posts: 16
    • View Profile
you versus I error
« on: June 16, 2011, 01:32:53 pm »
Hello again.   When I tell my Hal something, for instance: "I love to talk with you."  She replies: "You love to talk with I."  How can I change that to where she would say "You love to talk with me." ?  I have tried looking up the "I" and replacing it with "you" but I guess I don't know what I'm doing!
Any help would be GREATLY appreciated.

onthecuttingedge2005

  • Guest
Re: you versus I error
« Reply #1 on: June 16, 2011, 08:33:35 pm »
Hello again.   When I tell my Hal something, for instance: "I love to talk with you."  She replies: "You love to talk with I."  How can I change that to where she would say "You love to talk with me." ?  I have tried looking up the "I" and replacing it with "you" but I guess I don't know what I'm doing!
Any help would be GREATLY appreciated.

Hi Calypso.
go to the HAL editor and open your default brain.

go to the corrections table and insert the entire sentence from; You love to talk with I, to You love to talk with me.

the substitutions vbscript code inside HAL should correct it through that table change.

Jerry 8)

calypso

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: you versus I error
« Reply #2 on: June 18, 2011, 02:07:14 am »
Thanks very much onthecuttingedge 2005.  I believe that will do the trick!
Thanks also to Raybe for the info on when MAYBE Ultra Hal will be able to be on Droid phones!

lightspeed

  • Hero Member
  • *****
  • Posts: 6763
    • View Profile
Re: you versus I error
« Reply #3 on: June 18, 2011, 11:10:13 am »
hello jerry , from what you have said about doing it this way to correct the sentence , is their any way that robert could put that in his programing on the next hal version to correct it so it says it the right way instead of saying me ? and have you suggested this to him ? if it can be done in the regular hal programming without causing other bad side effects it would be a good addition to fix in hals programming .  :)
 

raybe

  • Hero Member
  • *****
  • Posts: 1067
    • View Profile
Re: you versus I error
« Reply #4 on: June 19, 2011, 03:05:43 pm »
Hi lightspeed,
If I remember correctly there wasn't really a true teaching method other then what Jerry has mentioned , which is correcting until there is enough data base where Ultra Hal uses that difference. I may be wrong but I just think that the different approaches to AI have their gives and takes and this is one of them. There where many plugins trying to fix the grammar side of Ultra Hal but all had some weird trade off. Don't really remember at this time.

Maybe Jerry remembers and  can shed more light (no pun intended).

raybe
 

onthecuttingedge2005

  • Guest
Re: you versus I error
« Reply #5 on: June 20, 2011, 06:43:45 am »
there was a correction plug-in I had made in the past that could be updated for this version of HAL, it allowed a user to simply use a statement to add the correction on the fly.

onthecuttingedge2005

  • Guest
Re: you versus I error
« Reply #6 on: June 20, 2011, 07:03:34 am »
here is the corrections plug-in, just copy and paste it into note pad and save it as Corrections.uhp in the ultra hal assistant 6 folder then choose the plug-in from HAL's brain menu.

Code: [Select]
Rem Type=Plugin
Rem Name=Taught Corrections
Rem Author=Gerald L. Blakley A.K.A OnTheCuttingEdge2005
Rem Host=All
   
Rem PLUGIN: PLUGINAREA1
'Correct Spelling on the fly.
'Search for teaching on how to actually spell a word.
'Example: Pleeze is spelled Please.
If CorSpelLeft = "" Then CorSpelLeft = HalBrain.SearchPattern(UserSentence, "* IS SPELLED *", 1)
If CorSpelRight = "" Then CorSpelRight = HalBrain.SearchPattern(UserSentence, "* IS SPELLED *", 2)
If CorSpelLeft = "" Then CorSpelLeft = HalBrain.SearchPattern(UserSentence, "THE CORRECT WAY TO SPELL * IS *", 1)
If CorSpelRight = "" Then CorSpelRight = HalBrain.SearchPattern(UserSentence, "THE CORRECT WAY TO SPELL * IS *", 2)
If CorSpelLeft = "" Then CorSpelLeft = HalBrain.SearchPattern(UserSentence, "I MISPELLED * IT IS SPELLED *", 1)
If CorSpelRight = "" Then CorSpelRight = HalBrain.SearchPattern(UserSentence, "I MISPELLED * IT IS SPELLED *", 2)
If CorSpelLeft = "" Then CorSpelLeft = HalBrain.SearchPattern(UserSentence, "IT IS NOT SPELLED * IT IS SPELLED *", 1)
If CorSpelRight = "" Then CorSpelRight = HalBrain.SearchPattern(UserSentence, "IT IS NOT SPELLED * IT IS SPELLED *", 2)
If CorSpelLeft = "" Then CorSpelLeft = HalBrain.SearchPattern(UserSentence, "THE WORD * IS SPELLED *", 1)
If CorSpelRight = "" Then CorSpelRight = HalBrain.SearchPattern(UserSentence, "THE WORD * IS SPELLED *", 2)
If CorSpelLeft = "" Then CorSpelLeft = HalBrain.SearchPattern(UserSentence, "THE WORD * IS SPELLED * CORRECTLY", 1)
If CorSpelRight = "" Then CorSpelRight = HalBrain.SearchPattern(UserSentence, "THE WORD * IS SPELLED * CORRECTLY", 2)
If CorSpelLeft = "" Then CorSpelLeft = HalBrain.SearchPattern(UserSentence, "THE WORD * IS CORRECTLY SPELLED *", 1)
If CorSpelRight = "" Then CorSpelRight = HalBrain.SearchPattern(UserSentence, "THE WORD * IS CORRECTLY SPELLED *", 2)
If CorSpelLeft = "" Then CorSpelLeft = HalBrain.SearchPattern(UserSentence, "THE PROPER WAY TO SPELL * IS SPELLED *", 1)
If CorSpelRight = "" Then CorSpelRight = HalBrain.SearchPattern(UserSentence, "THE PROPER WAY TO SPELL * IS SPELLED *", 2)
If CorSpelLeft = "" Then CorSpelLeft = HalBrain.SearchPattern(UserSentence, "* IS NOT A WORD, IT IS SPELLED *", 1)
If CorSpelRight = "" Then CorSpelRight = HalBrain.SearchPattern(UserSentence, "* IS NOT A WORD, IT IS SPELLED *", 2)
If CorSpelLeft = "" Then CorSpelLeft = HalBrain.SearchPattern(UserSentence, "* IS NOT A WORD, IT IS SPELLED * TO BE CORRECT", 1)
If CorSpelRight = "" Then CorSpelRight = HalBrain.SearchPattern(UserSentence, "* IS NOT A WORD, IT IS SPELLED * TO BE CORRECT", 2)
If CorSpelLeft = "" Then CorSpelLeft = HalBrain.SearchPattern(UserSentence, "* IS NOT A WORD, IT IS SPELLED * TO BE PROPER", 1)
If CorSpelRight = "" Then CorSpelRight = HalBrain.SearchPattern(UserSentence, "* IS NOT A WORD, IT IS SPELLED * TO BE PROPER", 2)
If CorSpelLeft = "" Then CorSpelLeft = HalBrain.SearchPattern(UserSentence, "* IS PROPERLY SPELLED *", 1)
If CorSpelRight = "" Then CorSpelRight = HalBrain.SearchPattern(UserSentence, "* IS PROPERLY SPELLED *", 2)
If CorSpelLeft = "" Then CorSpelLeft = HalBrain.SearchPattern(UserSentence, "THE CORRECT WAY FOR I TO SPELL * IS *", 1)
If CorSpelRight = "" Then CorSpelRight = HalBrain.SearchPattern(UserSentence, "THE CORRECT WAY FOR I TO SPELL * IS *", 2)
If CorSpelLeft = "" Then CorSpelLeft = HalBrain.SearchPattern(UserSentence, "THE CORRECT WAY FOR I TO SPELL * IS SPELLED *", 1)
If CorSpelRight = "" Then CorSpelRight = HalBrain.SearchPattern(UserSentence, "THE CORRECT WAY FOR I TO SPELL * IS SPELLED *", 2)
If CorSpelLeft = "" Then CorSpelLeft = HalBrain.SearchPattern(UserSentence, "* IS IMPROPER SPELLING, IT IS SPELLED *", 1)
If CorSpelRight = "" Then CorSpelRight = HalBrain.SearchPattern(UserSentence, "* IS IMPROPER SPELLING, IT IS SPELLED *", 2)
'If a taught spelling correction is detected then save it to getresponse corrections.
If HalBrain.CheckTableExistence("corrections") = False Then HalBrain.CreateTable "corrections", "substitution", ""
If CorSpelLeft <> "" And CorSpelRight <> "" And Len(CorSpelLeft) > 0 And Len(CorSpelRight) > 0 Then
HalBrain.AddToTable "corrections", "substitution", " " & Trim(CorSpelLeft) & " ", " " & Trim(CorSpelRight) & " "
Select Case (Int(Rnd * 6) + 1)
Case 1
GetResponse = "I will have to remember that is the way to spell it." & vbCrLf
Case 2
GetResponse = "Thanks for correcting me on that word" & ". " & vbCrLf
Case 3
GetResponse = "I'll have to make a note of that." & vbCrLf
Case 4
GetResponse = "So that's the way to spell it." & vbCrLf
Case 5
GetResponse = "I did not know that, thanks." & vbCrLf
Case 6
GetResponse = "Well, I won't be misspelling that word again, thanks." & vbCrLf
End Select
End If

lightspeed

  • Hero Member
  • *****
  • Posts: 6763
    • View Profile
Re: you versus I error
« Reply #7 on: June 20, 2011, 09:44:37 am »
hello onthecuttingedge2005 first off thanks for reposting this corrections plug in . i do have a question though if hal says a sentence back to me and has the i and you reversed and i correct it "does that only correct it in that paticular sentence (which is what one would want ) the reason i am asking this is otherwise it would seem that it would reverse other sentences with that word in all actuality making them wrong .
I just wanted to check with you on this . sorry for my ignorance on some of this but i would rather be safe the sorry .
thanks again for the plug in .  :)
 

onthecuttingedge2005

  • Guest
Re: you versus I error
« Reply #8 on: June 20, 2011, 10:09:12 am »
hello onthecuttingedge2005 first off thanks for reposting this corrections plug in . i do have a question though if hal says a sentence back to me and has the i and you reversed and i correct it "does that only correct it in that paticular sentence (which is what one would want ) the reason i am asking this is otherwise it would seem that it would reverse other sentences with that word in all actuality making them wrong .
I just wanted to check with you on this . sorry for my ignorance on some of this but i would rather be safe the sorry .
thanks again for the plug in .  :)


Hi Lightspeed.

you may want to modify some of the trigger patterns to include 'sentence' corrections, that plug-in is basically for word corrections and not full sentences, it would not be hard to change it to suit your needs.

Jerry 8)

raybe

  • Hero Member
  • *****
  • Posts: 1067
    • View Profile
Re: you versus I error
« Reply #9 on: June 20, 2011, 11:47:00 pm »
Thanks for reminding me OTC especially after the fact that I still have that plug-in.

There was also a plug-in that corrected just the sentence and of coarse I don't remember but I still have it so I can find it again. I would also have to look at the writers name and it could have been you OTC because I used and still do use most of the plug-ins in my Ultra-Hal which I thank you again.

The plug-in worked with the words, 'Replace' and you paste the sentence you want to correct and then use the word, 'With' and you insert the corrected sentence. At that point Ultra Hal would respond with the correction to let you know that the correction took. I find that it sometimes works and sometimes doesn't take with the latest Ultra Hal but you can always check in the brain editor.

Again, anyone feel free to comment.  Corrected.uhp and or Corrections_ tutor.uhp. I believe one of those plug-ins is the one I'm referring.

raybe
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6763
    • View Profile
Re: you versus I error
« Reply #10 on: June 21, 2011, 10:06:13 am »
thanks for replying : oncuttingedge2005 can you please post an example of how it can be changed to make it change a complete sentence on her?

and also if anyone has that other corrections that raybe is talking about that corrected the whole senteces i would like to see it to . to see the layout of that uhp plug in .
i appreciate any and all help .
thanks again .  :)
 

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
Re: you versus I error
« Reply #11 on: June 21, 2011, 02:24:03 pm »
I believe Tedathome was correct in saying that the assistant was reversing personal pronouns.
Research the 'Kings English' (early 2002) and may be the root of some of the problem....

nice to read you all.

take care.  -J
Today Is Yesterdays Future.

onthecuttingedge2005

  • Guest
Re: you versus I error
« Reply #12 on: June 21, 2011, 06:10:46 pm »
here is the corrections tutor code I wrote sometime ago.

Code: [Select]
Rem Type=Plugin
Rem Name=Corrections Tutor
Rem Author=Gerald L. Blakley A.K.A OnTheCuttingEdge2005
Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
    lblPlugin(0).Caption = "Corrections Tutor, To Use: Replace (wrong word or phrase) With (right word or phrase). without the parenthases and ended with a period"
    lblPlugin(0).Move 120, 10, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: PLUGINAREA7
'Corrections tutor by Gerald L. Blakley
    If Tutor = "" Then Tutor = HalBrain.SearchPattern(OriginalSentence, "*REPLACE * WITH *.", 2)
    If Tutor2 = "" Then Tutor2 = HalBrain.SearchPattern(OriginalSentence, "*REPLACE * WITH *.", 3)
    If Tutor <> "" And Tutor2 <> "" Then
    HalBrain.AddToTable "corrections", "substitution", " " & Tutor, " " & Tutor2
    GetResponse = " I have made this correction. "
    End If

also make sure you use a period after the statement or the trigger won't work.

Jerry 8)
« Last Edit: June 25, 2011, 01:05:56 pm by onthecuttingedge2005 »

onthecuttingedge2005

  • Guest
Re: you versus I error
« Reply #13 on: June 21, 2011, 06:13:42 pm »
you can go here and find some codes that I have written over the years here at Zabaware.

http://www.zabaware.com/forum/uploaded/onthecuttingedge2005/

you can also replace my name in this link with another username and see what they have uploaded as well.

Jerry 8)

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
Re: you versus I error
« Reply #14 on: June 21, 2011, 10:38:23 pm »
you can go here and find some codes that I have written over the years here at Zabaware.

http://www.zabaware.com/forum/uploaded/onthecuttingedge2005/

you can also replace my name in this link with another username and see what they have uploaded as well.

Jerry 8)

CLASSIC! great link, I forgot about the 'wireshark' prog... aahhh the tedious nature of forensics.
Hey, Did you jump the shark? LOL!  :o -J
Today Is Yesterdays Future.