hi snowman,
your 1st example is the one I will be going with because the responsibility of the order going from the biggest to the smallest becomes the responsibility of the programer.
But your 2nd example would be useful if there was a way to incorporate a learning pattern such as:
incorporating the yes no detect array list or:
setting up a routine to teach ultra Hal information that the user may inform ultra Hal such as:
building an array table to maintain information that comes from the user such as:
cool means yes.
If you would please means yes.
If you don't mind means yes.
This way the user would have the ability to teach ultra Hal different ways of understanding yes.
This information would be stored in a special table array and that array could be one built by the free will plug-in or just merely added to the yes no detect array table.
Then those words could be added to the routine to detect whether or not they are in the sentence.
I have no clue how to accomplish this! But if this could be accomplished, do you recognize the doorway that would be open to ultra Hal in all aspects of his learning ability.
I'm sure this is one of those things that it would take a master programmer in order to incorporate.
But for now, these are the things that I have come up with, I do have a few questions about how I have set up the script, but if there are no problems with the script, this will be the one I will be using.
Rem PLUGIN: PRE-PROCESS
' this sets up the yes/no data parameters.
'------------------
Dim Searchynlogic
ynlogic1 = ""
ynlogic2 = ""
ynlogic3 = ""
ynlogic = UCase(InputString)
ynPrevsent = UCase(Prevsent)
'this is used for a redirect.
'ynlogic = "Correct, I love you."
If Searchynlogic(ynlogic, Array("YES INDEED","CORRECT","AFFIRMATIVE","POSITIVE","YEP")) = true Then
If InStr(ynlogic, "YES") > 0 Then
If Len(Trim(HalBrain.AlphaNumericalOnly(ynlogic))) < 4 Then 'I think this will resolve the problem with [,.?!] or spaces, without changing the sentence structure of (ynlogic).
End If
End If
End If
'(ynlogic = "YES, I love you.")
Function Searchynlogic(ByRef compare, arrayToSearch)
compare = " " & compare & " "
Searchynlogic = False
For Each word In arrayToSearch
word = " " & word
If InStr(StringToSearch,word & " ") > 0 OR InStr(StringToSearch,word & ", ") > 0 OR InStr(StringToSearch,word & ". ") > 0 OR InStr(StringToSearch,word & "! ") > 0 Then
compare = Replace(compare, word, "YES", 1, -1, vbTextCompare)
Searchynlogic = True
Exit Function '[[[[[[[[ Or is it is supposed to be (Exit For)? ]]]]]]]
End If
Next
End Function
sincerely, thank you very much for all of your help!
C load.