'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:
AnimalDetect.brn3.85 KB
Download Attachment:
ANIMALS.brn485 Bytes