'If the user asks hal what the topic is
'he will respond every time to topics
'in the topictalk.brn the whatsthetopic.brn
'is the detection file. if you want different
'topics then just add to the topictalk.brn
'just try to keep the same format for better
'response, this script works everytime so far.
'put this script in your default hal brain and
'download the .brn files to your hals default folder.
'example: If the user says to hal, PICK A TOPIC
'then Hal would say one of the many topics in the file
'and say something like: -The Topic is- Science or some other
'topic keyword in the topictalk.brn
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "WHATSTHETOPIC.BRN") = "TRUE" Then
FREETALK = HalBrain.ChooseSentenceFromFile(WorkingDir & "TOPICTALK.BRN")
GetResponse = "Ok,The topic is - " & FREETALK
End If
'Best of wishes and grand new discoveries.
'Jerry.
Download Attachment:
WHATSTHETOPIC.BRN2.4 KB
Download Attachment:
TOPICTALK.BRN1.74 KB