dupa

Author Topic: Hals precision topic talk.  (Read 4607 times)

onthecuttingedge2005

  • Guest
Hals precision topic talk.
« on: October 12, 2003, 09:54:34 pm »
'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.BRN
2.4 KB

Download Attachment: TOPICTALK.BRN
1.74 KB
« Last Edit: October 13, 2003, 01:58:05 am by onthecuttingedge2005 »

websafe

  • Newbie
  • *
  • Posts: 1
    • View Profile
Hals precision topic talk.
« Reply #1 on: October 13, 2003, 08:45:07 pm »
How do you do, I'm new to this forum. This topic sounded interesting, so I chose it for my initial post. I'm a novice programmer, and a bit overwhelmed, so please bear with me.

I'm wondering where to place the section of code given. You say to put the script in the default Hal brain; does it matter where?

Thanks,
websafe
 

onthecuttingedge2005

  • Guest
Hals precision topic talk.
« Reply #2 on: October 13, 2003, 09:41:42 pm »
Hi Websafe.
I usually prefer placing script just below the middle of the main script
but not at the end of the main script.
I always seem to get good results in the below middle.
I also like making special testing areas at the beginning
and middle and the end of the main script and start with the
middle first then I try the bottom second and the top third.
If you need more scripts I have posted quite a few in the programmers forum, just do a full archive search on OnTheCuttingEdge2005
and have fun.
Best of wishes and grand new discoveries.
Jerry.