All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.net.ormr.fuzzywuzzy.Applicable.kt Maven / Gradle / Ivy

package net.ormr.fuzzywuzzy

/**
 * A ratio/algorithm that can be applied
 */
public interface Applicable {
    /**
     * Apply the ratio/algorithm to the input strings.
     *
     * @param [s1] input string
     * @param [s2] input string
     *
     * @return the score of similarity
     */
    public fun apply(s1: String, s2: String): Int
}

public operator fun Applicable.invoke(s1: String, s2: String): Int = apply(s1, s2)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy