Author Topic: Hal Capitals Issue  (Read 4772 times)

djkilla

  • Jr. Member
  • **
  • Posts: 75
    • View Profile
Hal Capitals Issue
« on: March 31, 2010, 09:47:39 am »
Whenever I mention any city that happens to be a capitol Hal
states that <city> is the capital of <state>. Since it seems that
the Capitals files are located in the DB how can I edit the
brain to only respond if asked "What is the capitol of" instead of
always responding regardless.
'RESPOND: CAPITALS
    FindCapital = Trim(HalBrain.UsCaps(UserSentence))
    If FindCapital = "" Then FindCapital = Trim(HalBrain.WorldCaps(UserSentence))
    If FindCapital <> "" Then GetResponse = GetResponse & FindCapital & vbCrLf
    HalBrain.DebugWatch GetResponse, "Find Capital"
This appears to be the script..any help?
« Last Edit: March 31, 2010, 10:29:40 pm by djkilla »
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6763
    • View Profile
Hal Capitals Issue
« Reply #1 on: March 31, 2010, 11:56:15 am »
Sorry djkilla , wish i new to give you the answer , i to have had this very same problem in the past.
Hopefully someone else on here may know where to locate that area so it can be deleted out .
something which seem like a good idea at giving info. can also conflict as in this case with everyday writing to hal .
sorry i couldn't help you on this . [B)]
 

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Hal Capitals Issue
« Reply #2 on: March 31, 2010, 01:04:47 pm »
Somewhere someone screwed up...

Capital: The "a" in capital stands for 'assets'.
Capitol: The "o" in capitol stands for 'office'.

This is a common mistake by those who never studied the real meanings.
Bill
 

djkilla

  • Jr. Member
  • **
  • Posts: 75
    • View Profile
Hal Capitals Issue
« Reply #3 on: March 31, 2010, 11:28:49 pm »
This now can replace the current brain entry right after Compliments"
It is a modified version of an early brain entry. Working great now!


'RESPOND: CALL CAPITALS FUNCTIONS
'These 2 functions answer questions about US and World Capitals. The functions are built in to the DLL.
'We add a qualifying word to reduce false triggering of these two functions.
If InStr(UserSentence, "WHAT") > 0 Or InStr(UserSentence, "WHERE") > 0 Then
If Len(HalBrain.UsCaps(UserSentence)) > 4 Then
FindCapital = Trim(HalBrain.UsCaps(UserSentence))
End If
If Len(HalBrain.WorldCaps(UserSentence)) > 4 Then
FindCapital = Trim(HalBrain.WorldCaps(UserSentence))
End If
'=vonsmith= Added GetResponseBlock
If  FindCapital <> "" And GetResponseBlock <> True Then
GetResponse = GetResponse & FindCapital & " . " & VbCrLf
DebugInfo = DebugInfo & "The user was asking about a capital and Hal has given him the answer: " & FindCapital & VbCrLf
HalBrain.DebugWatch GetResponse, "Find Capital"

End If
End If
 

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Re: Hal Capitals Issue
« Reply #4 on: August 30, 2010, 01:43:42 am »
This should not be a hard thing to fix if you can teach Hal to u nderstand the difference between the two spellings of the word. CapitOl contains the letter "O" as used in Office building whild the word CapitAl contains the letter "A" as used in assets. Most people don't understand the differences between the two but a college professor did define those differeces years ago before a slanger type of English ignored the differences betweed the two words and that they were intendeddd to represent.
Bill