dupa

Author Topic: Hal the Politician  (Read 3694 times)

onthecuttingedge2005

  • Guest
Hal the Politician
« 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: POLITICS.brn
1.2 KB

Download Attachment: PoliticalTalk.brn
495 Bytes
« Last Edit: September 28, 2003, 12:33:19 am by onthecuttingedge2005 »