// Processes user input to become more readable by eliza
Processes user input to become more readable by eliza
// Processes user input to become more readable by eliza
func preprocess(input string) string {
    input = strings.TrimRight(input, "\n.!")
    input = strings.ToLower(input)
    formattedInput := strings.Split(input, " ")
	for i, word := range formattedInput {
		formattedInput[i] = strings.ToLower(strings.Trim(word, ".! \n"))
    }
    formattedInput = PostProcess(formattedInput)
    input = strings.Join(formattedInput," ")
    return input
}
func preprocess ( input string ) string { input = strings . TrimRight ( input , " \n " ) input = strings . ToLower ( input ) formattedInput := strings . Split ( input , " " ) for i , word := range formattedInput { formattedInput [ i ] = strings . ToLower ( strings . Trim ( word , " \n " ) ) } formattedInput = PostProcess ( formattedInput ) input = strings . Join ( formattedInput , " " ) return input }
Processes user input to become more readable by eliza
Processes user input to become more readable by eliza