I have a fix for Hal giving long subject lists during conversation - when using GrettaArray plugin.
I have made an update to the first post with this info:
Open your current Main-Brain ".uhp" file with notepad and "save as" (whateverthebrainname).bak
This will make a backup of your brain file. (good to have)
Then replace this section of the file:
'PROCESS: CONSTRUCT A RESPONSE TO A SUBJECT
'Here we help Hal make some "smalltalk" using keywords preserved on CurrentSubject,
'plus recognition of other keywords. If Hal finds any of the listed keywords anywhere in
'the user's sentence, those keywords override and replace whatever was in CurrentSubject.
'Hal uses the CurrentSubject keyword(s) or any of the keywords in the smalltalk.brn file,
'if found in the user's sentence, to make a little smalltalk. You can easily add more
'keywords for Hal to recognize and make smalltalk.
GetResponse = HalBrain.HalFormat(GetResponse)
If Len(GetResponse) < 4 And Rnd * 100 < 50 Then
SmalltalkSearch = Trim(HalBrain.TopicSearch(UserSentence, "smallTalk"))
If SmalltalkSearch <> "" Then
SmallTalk = SmalltalkSearch
ElseIf Len(CurrentSubject) > 3 Then
SmallTalk = Trim(CurrentSubject)
'try making word plural by adding "s" and seeing if it exists
If WN.LookupWord(SmallTalk & "s") = True Then
SmallTalk = SmallTalk & "s"
ElseIf WN.LookupWord(SmallTalk & "es") = True Then
SmallTalk = SmallTalk & "es"
End If
End If
If Len(SmallTalk) > 3 Then
ResponseCount = ResponseCount + 1
Redim Preserve ResponseList(ResponseCount)
ResponseList(ResponseCount) = Replace(HalBrain.ChooseSentenceFromFile("smallTalkSent"), "<SmallTalk>", SmallTalk, 1, -1, 1)
HalBrain.AddDebug TempParent, "SmallTalk: " & ResponseList(ResponseCount)
End If
End If
With this:
'PROCESS: CONSTRUCT A RESPONSE TO A SUBJECT
'Here we help Hal make some "smalltalk" using keywords preserved on CurrentSubject,
'plus recognition of other keywords. If Hal finds any of the listed keywords anywhere in
'the user's sentence, those keywords override and replace whatever was in CurrentSubject.
'Hal uses the CurrentSubject keyword(s) or any of the keywords in the smalltalk.brn file,
'if found in the user's sentence, to make a little smalltalk. You can easily add more
'keywords for Hal to recognize and make smalltalk.
GetResponse = HalBrain.HalFormat(GetResponse)
If Len(GetResponse) < 4 And Rnd * 100 < 50 Then
SmalltalkSearch = Trim(HalBrain.TopicSearch(UserSentence, "smallTalk"))
If SmalltalkSearch <> "" Then
SmallTalk = SmalltalkSearch
ElseIf Len(CurrentSubject) > 3 Then
SmallTalk = WN.FindFirstNoun(CurrentSubject, False)
If SmallTalk = "" Then SmallTalk = WN.FindFirstNoun(CurrentSubject, True)
'try making word plural by adding "s" and seeing if it exists
If WN.LookupWord(SmallTalk & "s") = True Then
SmallTalk = SmallTalk & "s"
ElseIf WN.LookupWord(SmallTalk & "es") = True Then
SmallTalk = SmallTalk & "es"
End If
End If
If Len(SmallTalk) > 3 Then
ResponseCount = ResponseCount + 1
Redim Preserve ResponseList(ResponseCount)
ResponseList(ResponseCount) = Replace(HalBrain.ChooseSentenceFromFile("smallTalkSent"), "<SmallTalk>", SmallTalk, 1, -1, 1)
HalBrain.AddDebug TempParent, "SmallTalk: " & ResponseList(ResponseCount)
End If
End If