Zabaware Support Forums

Zabaware Forums => Ultra Hal Assistant File Sharing Area => Topic started by: onthecuttingedge2005 on September 27, 2003, 02:11:30 pm

Title: Hal the Politician
Post by: onthecuttingedge2005 on September 27, 2003, 02:11:30 pm
'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: (http://images/icon_paperclip.gif) POLITICS.brn ("http://www.zabaware.com/forum/uploaded/onthecuttingedge2005/200392714918_POLITICS.brn")
1.2 KB

Download Attachment: (http://images/icon_paperclip.gif) PoliticalTalk.brn ("http://www.zabaware.com/forum/uploaded/onthecuttingedge2005/200392802150_PoliticalTalk.brn")
495 Bytes