/**
 * This function finds the first occurrence of a keyword in a given text and returns the root word of that keyword.
 */
fun findRoot(text: String, keyword: String): String {

    val words = text.split(" ")

    var root = ""
    var index = -1

    for ((i, word) in words.withIndex()) {
        if (keyword in word) {
            index = i
            break
        }
    }

    while (index >= 0) {
        root = words[index]
        index -= 1
    }

    return root
}
/**
 * This function finds the first occurrence of a keyword in a given text and returns the root word of that keyword.
 */
fun findRoot(text: String, keyword: String): String {
/**
 * This function finds the first occurrence of a keyword in a given text and returns the root word of that keyword.
 */
fun findRoot(text: String, keyword: String): String {

    val words = text.split(" ")

    var root = ""
    var index = -1

    for ((i, word) in words.withIndex()) {
        if (keyword in word) {
            index = i
            break
        }
    }

    while (index >= 0) {
        root = words[index]
        index -= 1
    }

    return root
}