Package me.xdrop.fuzzywuzzy.ratios
Class SimpleRatio
- java.lang.Object
-
- me.xdrop.fuzzywuzzy.ratios.SimpleRatio
-
- All Implemented Interfaces:
Applicable,Ratio
public class SimpleRatio extends java.lang.Object implements Ratio
-
-
Constructor Summary
Constructors Constructor Description SimpleRatio()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intapply(java.lang.String s1, java.lang.String s2)Computes a simple Levenshtein distance ratio between the stringsintapply(java.lang.String s1, java.lang.String s2, ToStringFunction<java.lang.String> sp)Applies the ratio between the two strings
-
-
-
Method Detail
-
apply
public int apply(java.lang.String s1, java.lang.String s2)Computes a simple Levenshtein distance ratio between the strings- Specified by:
applyin interfaceApplicable- Specified by:
applyin interfaceRatio- Parameters:
s1- Input strings2- Input string- Returns:
- The resulting ratio of similarity
-
apply
public int apply(java.lang.String s1, java.lang.String s2, ToStringFunction<java.lang.String> sp)Description copied from interface:RatioApplies the ratio between the two strings
-
-