here is the code. what you have to do is go to the ultrhal main folder and find a file called:
(whatever your current brain name is).uhp
mine is "Gretta44.uhp"
the default is "Hal6.uhp" or "Hal6upg.uhp"
it is the name of the brain that you have selected in the options screen.
edit that file and replace the section of it that has this text: 'PROCESS: SPLIT USER'S INPUT STRING INTO SEPERATE SENTENCES
'Encode abbreviations such as Mr. Mrs. and Ms.
InputString = Replace(InputString, "MR.", "Mr<PERIOD>", 1, -1, vbTextCompare)
InputString = Replace(InputString, "MRS.", "Mrs<PERIOD>", 1, -1, vbTextCompare)
InputString = Replace(InputString, "MS.", "Ms<PERIOD>", 1, -1, vbTextCompare)
InputString = Replace(InputString, "DR.", "Dr<PERIOD>", 1, -1, vbTextCompare)
InputString = Replace(InputString, "MS.", "Ms<PERIOD>", 1, -1, vbTextCompare)
InputString = Replace(InputString, "ST.", "St<PERIOD>", 1, -1, vbTextCompare)
InputString = Replace(InputString, "PROF.", "Prof<PERIOD>", 1, -1, vbTextCompare)
InputString = Replace(InputString, "GEN.", "Gen<PERIOD>", 1, -1, vbTextCompare)
InputString = Replace(InputString, "REP.", "Rep<PERIOD>", 1, -1, vbTextCompare)
InputString = Replace(InputString, "SEN.", "Sen<PERIOD>", 1, -1, vbTextCompare)
'Remove unnecessary punctuation
Do
RepeatLoop = False
If InStr(InputString, "..") Then InputString = Replace(InputString, "..", "."): RepeatLoop = True
If InStr(InputString, "??") Then InputString = Replace(InputString, "??", "?"): RepeatLoop = True
If InStr(InputString, "!!") Then InputString = Replace(InputString, "!!", "!"): RepeatLoop = True
If InStr(InputString, "!?") Then InputString = Replace(InputString, "!?", "?"): RepeatLoop = True
If InStr(InputString, "?!") Then InputString = Replace(InputString, "?!", "?"): RepeatLoop = True
If InStr(InputString, ",,") Then InputString = Replace(InputString, ",,", ","): RepeatLoop = True
Loop While RepeatLoop = True
'Detect and encode acronyms such as U.S.A.
InputString = Trim(InputString)
WordList = Split(InputString, " ")
For i = 0 To UBound(WordList)
If Len(WordList(i)) > 3 Then
If Right(WordList(i), 1) = "." And Mid(WordList(i), Len(WordList(i)) - 2, 1) = "." Then
InputString = Replace(InputString, WordList(i), Left(WordList(i), Len(WordList(i)) - 1) & "<PERIOD>")
End If
End If
Next
'Place split markers in string
InputString = Replace(InputString, ". ", ". <NEWSENT>")
InputString = Replace(InputString, "? ", "? <NEWSENT>")
InputString = Replace(InputString, "! ", "! <NEWSENT>")
'Decode acronyms and abbreviations
InputString = Replace(InputString, "<PERIOD>", ".", 1, -1, vbTextCompare)
'Split string into sentences
Sentences = Split(InputString, "<NEWSENT>")
with the text in this file:(i don't post it because the forum would mess with the syntax and change it)
Download Attachment: newstuff.txt5.62 KB
Note:you can always remove the section that i marked to go back to original. the rest of it is the same.