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

commonMain.com.dshatz.fuzzykat.Ration.kt Maven / Gradle / Ivy

The newest version!
package com.dshatz.fuzzykat

import com.dshatz.fuzzykat.diffutils.Applicable

/**
 * Interface for the different ratios
 */
interface Ratio : Applicable {

    /**
     * Applies the ratio between the two strings
     *
     * @param s1 Input string
     * @param s2 Input string
     * @return Integer representing ratio of similarity
     */
    override fun apply(s1: String, s2: String): Int

    /**
     * Applies the ratio between the two strings
     *
     * @param s1 Input string
     * @param s2 Input string
     * @param sp String processor to pre-process strings before calculating the ratio
     * @return Integer representing ratio of similarity
     */
    fun apply(s1: String, s2: String, sp: ToStringFunction): Int

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy