'Here yah go guys.
'Here we give hal ability to laugh with the user.
'Download the detection file Humor.brn/Laughing.brain
'and the UserLaughing.brn to hal's default folder.
'Hal is given a sense of humor.
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "HUMOR.brn") = "TRUE" Then
AnswerSent = "" & Trim(OriginalSentence)
'Here we save a file in which the user was caught laughing for future scripts.
HalBrain.AppendFile WorkingDir & "UserLaughing" & ".brn", AnswerSent
End If
'Hal laughs with the user.
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "HUMOR.brn") = "TRUE" Then
MyHumor = HalBrain.ChooseSentenceFromFile(WorkingDir & "LAUGHING.brn")
Comedy = HalBrain.ChooseSentenceFromFile(WorkingDir & "UserLaughing.brn")
GetResponse = MyHumor & Comedy & vbCrLf
DebugInfo = DebugInfo & "The user is talking about something humorous: " & MyHumor & vbCrLf
DebugInfo = DebugInfo & "The user is talking about something funny: " & Comedy & vbCrLf
Else
DebugInfo = DebugInfo & "Hal has found nothing funny: " & Comedy & vbCrLf
DebugInfo = DebugInfo & "Hal has found nothing humoring: " & MyHumor & vbCrLf
End If
'Best of wishes and new discoveries.
'Jerry
Download Attachment:
HUMOR.brn1.3 KB
Download Attachment:
LAUGHING.brn710 Bytes