/**
 * This function counts the number of common words between two articles.
 * It takes two articles as input and returns the number of words that are common to both articles.
 *
 * @param article1 The first article.
 * @param article2 The second article.
 * @return The number of common words between the two articles.
 */
fun countCommonWords(article1: String, article2: String): Int {

    // Split the articles into words and convert them to sets
    val words1 = article1.split(" ").toSet()
    val words2 = article2.split(" ").toSet()

    // Use intersection operator ( "&" ) to find the common words between the two sets
    val commonWords = words1.intersect(words2)

    // Return the count of common words
    return commonWords.size
}
/**
 * This function counts the number of common words between two articles.
 * It takes two articles as input and returns the number of words that are common to both articles.
 *
 * @param article1 The first article.
 * @param article2 The second article.
 * @return The number of common words between the two articles.
 */
fun countCommonWords(article1: String, article2: String): Int {
/**
 * This function counts the number of common words between two articles.
 * It takes two articles as input and returns the number of words that are common to both articles.
 *
 * @param article1 The first article.
 * @param article2 The second article.
 * @return The number of common words between the two articles.
 */
fun countCommonWords(article1: String, article2: String): Int {

    // Split the articles into words and convert them to sets
    val words1 = article1.split(" ").toSet()
    val words2 = article2.split(" ").toSet()

    // Use intersection operator ( "&" ) to find the common words between the two sets
    val commonWords = words1.intersect(words2)

    // Return the count of common words
    return commonWords.size
}