Zabaware Support Forums
Zabaware Forums => Ultra Hal Assistant File Sharing Area => Topic started by: onthecuttingedge2005 on September 24, 2003, 11:20:47 pm
-
'Here yah go guys
'Hal detects animal talk and saves it for later conversations
'When Hal learns about the detected animals he will response
'with animal talk.
'all animals in the AnimalsDetect.brn will trigger hal
'to save the conversation for animal talk.
'all the animals listed in AnimalDetect were recalled from memory
'so please add any species you would like in there.
'The Animals.brn has nothing in it yet cause I just made this
'script so you'll have to build up the file by learning your bot
'some animal info, you can type it to Hal or simply edit it by
'hand.
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "ANIMALDETECT.brn") = "TRUE" Then
AnswerSent = "" & Trim(OriginalSentence)
HalBrain.AppendFile WorkingDir & "ANIMALS" & ".brn", AnswerSent
End If
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "ANIMALDETECT.brn") = "TRUE" Then
Animal = HalBrain.ChooseSentenceFromFile(WorkingDir & "ANIMALS.brn")
GetResponse = Animal & vbCrLf
DebugInfo = DebugInfo & "The user is talking about Animals: " & Animal & vbCrLf
Else
DebugInfo = DebugInfo & "User is not talking about animals: " & Animal & vbCrLf
End If
'Best of wishes and new discoveries.
'Jerry.
Download Attachment: (http://images/icon_paperclip.gif) AnimalDetect.brn (http://"http://www.zabaware.com/forum/uploaded/onthecuttingedge2005/2003924231452_AnimalDetect.brn")
3.85 KB
Download Attachment: (http://images/icon_paperclip.gif) ANIMALS.brn (http://"http://www.zabaware.com/forum/uploaded/onthecuttingedge2005/2003924231511_ANIMALS.brn")
485 Bytes