Author Topic: Hal talks about the animal kingdom .brn  (Read 4005 times)

onthecuttingedge2005

  • Guest
Hal talks about the animal kingdom .brn
« 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: AnimalDetect.brn
3.85 KB

Download Attachment: ANIMALS.brn
485 Bytes
« Last Edit: September 24, 2003, 11:24:51 pm by onthecuttingedge2005 »