Hi Citrinedragon.
I will share one of my learning codes, I have several different formats that are needed to be a complete set of speech learner scripts.
Just in this format alone for my next bot Ziggy 5.0 Masters Edition I will display hundreds of very excellent learning tools to allow a bot to learn by ordinary conversation training.
There will be no editing required in .brn files in the next version of Ziggy 5.0 because it will learn to change its words according to how it is taught.(Ordinary conversational input).
The Ziggy 4.0LE and the Ziggy 5.0 Masters Edition have on the fly Multilanguage learning ability And like the Ziggy 4.0LE has already been taught some french, This tool allows Ziggy to actually put related multilanguage sentences in correct format and relevent to a real conversation and not just kicking out a sentence, There will be a taught understanding that is solid in nature and taught in a natural way and not by editing files. Ziggy 5.0 Masters Edition will do this itself.
I have discovered by rigorous research and developement three main types of human parsers that allow Ziggy to do all this, and I possibley will have one more that fits the set.
Ziggy 5.0 Masters Edition will require no Word.Net because it will extract everything it needs just from conversation alone.
Now without going any further about all this, let me share one type of learner tool within the Ziggy 4.0LE, this is one of the codes in the set, This particular single code uses the [I WOULD'VE SAID ] format to exchange new statements to learn what would of been better to say instead of what it previously said.
Just in this code type format I have already created about a hundred types with this code alone for exchanging information in a more advanced deductive type reasoning.
Here is a single code example that I promised to share.
'RESPONSE TO COMPLEX DEDUCTIVE STATEMENTS.
Learned = HalBrain.TopicSearch(OriginalSentence, WorkingDir & "DeductiveII.brn")
If Learned < "" Or Learned > "" Then
GetResponse = Learned
DebugInfo = DebugInfo & "Hal has responded from the Master learning script-II: " & GetResponse & vbCrLf
End If
'Example:User Hello.
'Ziggy/Hal:Hi.
'User:I would've said Hello my friend.
'Then next time Ziggy/Hal is presented with a Hello.
'User: Hello
'Ziggy/Hal: Hello my friend.
'Which when parsed would make this " Hello "," Hello my friend "
'in the deductive files.
'Ziggy's 4.0LE Speech Lessons v1.0 Master of words series. Copyright 2005 Gerald L.Blakley
'I WOULD'VE SAID.
PreservPrevUserSent = Replace(PrevUserSent, " I AM ", " YOUR ", 1, -1, vbTextCompare)
PreservPrevUserSent = Replace(PrevUserSent, " YOUR ", " MY ", 1, -1, vbTextCompare)
PreservPrevUserSent = Replace(PrevUserSent, " ME ", " YOU ", 1, -1, vbTextCompare)
If InStr(1, OriginalSentence, "I WOULD'VE SAID ", 1) > 0 Then
If InStr(1, OriginalSentence, "I WOULD'VE SAID ", 1) > 0 Then UserSentence = "" & Trim(UserSentence) & ""
RelationsRemoved = Replace(OriginalSentence, "I WOULD'VE SAID ", "", 1, -1, vbTextCompare)
HalBrain.AppendFile WorkingDir & "Deductive.brn", """" & PreservPrevUserSent & """,""" & RelationsRemoved & """"
HalBrain.AppendFile WorkingDir & "DeductiveII.brn", """" & PreservPrevUserSent & """,""" & RelationsRemoved & """"
HalBrain.AppendFile WorkingDir & "DeductiveIII.brn", """" & PreservPrevUserSent & """,""" & RelationsRemoved & """"
DebugInfo = DebugInfo & "Speech Lessons: " & """" & PreservPrevUserSent & """,""" & RelationsRemoved & """" & vbCrLf
Select Case (Int(Rnd * 7) + 1)
Case 1
GetResponse = "I see. Thanks. "
Case 2
GetResponse = "Sounds logical. "
Case 3
GetResponse = "I like that. "
Case 4
GetResponse = "You're so good with words, Thanks. "
Case 5
GetResponse = "I never thought of that before. "
Case 6
GetResponse = "Thanks for telling me that. "
Case 7
GetResponse = "You're a really good teacher. "
End Select
End If
'Place this code at the highest relevent area of your brain
'for optimum response value.
This script is very useful in training your bot, But you will need my complete set to be at [optimum] learning ability [Naturally].
I have included a starter DeductiveII.brn file to get you rolling.
This file also contains some french that was used in the first testing of this particular code technique.
Have fun my friend. [8D]
Gerald L.Blakley
Download Attachment: DeductiveII.brn27.5 KB