/**
 * This function takes a dictionary of legal cases and a query string as arguments.
 * It searches through the dictionary and returns a list of relevant cases that contain
 * the query string in either the case name or the case description.
 */
fun findRelevantCases(casesDict: Map<String, String>, query: String): List<String> {

    val relevantCases = mutableListOf<String>()  // initialize an empty list to store relevant cases

    for ((caseName, caseDescription) in casesDict) {
        if (query.toLowerCase() in caseName.toLowerCase() || query.toLowerCase() in caseDescription.toLowerCase()) {
            relevantCases.add(caseName)  // add the case name to the list of relevant cases
        }
    }

    return relevantCases
}
/**
 * This function takes a dictionary of legal cases and a query string as arguments.
 * It searches through the dictionary and returns a list of relevant cases that contain
 * the query string in either the case name or the case description.
 */
fun findRelevantCases(casesDict: Map<String, String>, query: String): List<String> {
/**
 * This function takes a dictionary of legal cases and a query string as arguments.
 * It searches through the dictionary and returns a list of relevant cases that contain
 * the query string in either the case name or the case description.
 */
fun findRelevantCases(casesDict: Map<String, String>, query: String): List<String> {

    val relevantCases = mutableListOf<String>()  // initialize an empty list to store relevant cases

    for ((caseName, caseDescription) in casesDict) {
        if (query.toLowerCase() in caseName.toLowerCase() || query.toLowerCase() in caseDescription.toLowerCase()) {
            relevantCases.add(caseName)  // add the case name to the list of relevant cases
        }
    }

    return relevantCases
}