commonMain.net.ormr.fuzzywuzzy.Applicable.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fuzzy-wuzzy-jvm Show documentation
Show all versions of fuzzy-wuzzy-jvm Show documentation
Kotlin port of the FuzzyWuzzy library
The newest version!
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)