I was hoping that you would be able to help me with this.
What I am trying to do is write into the patterns array table, but for some reason I can't get it to write into the table.
This is the sentence structure that I used to try to write into the patterns array table:
Subject patterns,*WHAT * WE DO TODAY@@Let's TALK ABOUT ROBOTS.|Let's TALK ABOUT COMPUTERS.|Let's TALK ABOUT CARS okay.|Let's TALK ABOUT LOVE is that okay.|Let's TALK ABOUT my PETS|Let's TALK ABOUT your LIFE|Let's TALK ABOUT FOOD you eat.|Let's TALK ABOUT computer GAMES.|Let's goto a MOVIE.|Let's TALK ABOUT MUSIC?|Let's TALK ABOUT the LAW okay.|Let's TALK ABOUT COOKING!|Let's TALK ABOUT DRUGS you take.|Let's TALK ABOUT American history.|Let's TALK ABOUT SCIENCE?|Let's TALK ABOUT todays FASHION.|Let's TALK ABOUT how to MAKING MONEY.|Let's go for a walk. See you when you get back! Tee hee hee.|I can't do much more than talk to you.
This is the script routine I used to capture the sentence above and process it into the patterns array table:
Rem Type=Plugin
Rem Name=aiml input
Rem Author=cload
Rem Host=Assistant
Rem PLUGIN: PRE-PROCESS
ynlogic = UCase(InputString)
If InStr(ynlogic, "@@") > 0 and InStr(ynlogic, "SUBJECT PATTERNS,") > 0 Then
vrsubject = HalBrain.SearchPattern(ynlogic, "SUBJECT PATTERNS,*@@*", 1)
vrdata = HalBrain.SearchPattern(ynlogic, "SUBJECT PATTERNS,*@@*", 2)
vrsubjectdata1 = Trim(vrsubject)
vrdata1 = Trim(vrdata)
If vrsubjectdata1 <> "" and vrdata1 <> "" Then
HalBrain.AddToTable "patterns", "TopicSearch", vrsubjectdata1, vrdata1
End If
vrChoice2 = HalBrain.TopicSearch(vrsubjectdata1, "patterns")
If vrChoice2 <> "" Then
UltraHal = "Thank you for your input about " & vrsubjectdata1
Exit Function
Else
UltraHal = "I'm sorry, but something did not work!"
HalBrain.ReadOnlyMode = True
Exit Function
End If
End If
Sincerely, thanks in advance for any help that you can give!
C load.