How to implement my algorithm text correction for the replacement of words in the text?
问题 Brief Help me to create a new function or change the function correct() so that the result works in a case-insensitive manner for the input text. Example Usage Example usage for the correct() method: $text = "Точик ТОЧИК точик ТоЧиК тоЧИК"; $text = correct($text, $base_words); echo "$text"; Expected Result Input: Точик ТОЧИК точик ТоЧиК тоЧИК Output: Тоҷик ТОҶИК тоҷик ТоҶиК тоҶИК Code Here are all the arrays and functions below so you can easily copy them: $default_words = array ( 'бур',