Zabaware Forums > Ultra Hal Assistant File Sharing Area

Hal the Politician

(1/1)

onthecuttingedge2005:
'UPDATED 9-27-03
'Here we give Hal the ability to
'learn and talk about Politics.
'download the detection file Politics.brn
'to your Hals default folder, the PoliticalTalk.brn
'will automatically be created when a political
'discussion is detected.

If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "Politics.brn") = "TRUE" Then
AnswerSent = "" & Trim(OriginalSentence)
HalBrain.AppendFile WorkingDir & "PoliticalTalk" & ".brn", AnswerSent
End If
   
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "Politics.brn") = "TRUE" Then
Politician = HalBrain.ChooseSentenceFromFile(WorkingDir & "PoliticalTalk.brn")
      GetResponse = Politician & vbCrLf
      DebugInfo = DebugInfo & "The user is talking about Politics: " & Politician & vbCrLf
      Else
      DebugInfo = DebugInfo & "Hal has found nothing about Politics: " & Politician & vbCrLf
   End If

'Best of wishes and new discoveries.
'Jerry.



Download Attachment: POLITICS.brn
1.2 KB

Download Attachment: PoliticalTalk.brn
495 Bytes

Navigation

[0] Message Index

Go to full version