letjaroWinklerMI (t1:string) (t2:string) =// Optimizations for easy to calculate casesift1.Length=0||t2.Length=0then0.0elift1=t2then1.0else// Even more weight for the first charletscore=jaroWinklert1t2letp=0.2//percentage of score from new metricletb=ift1.[0] =t2.[0] then1.0else0.0
((1.0-p) *score) + (p*b)
letscoreNamePairs (t1:string) (t2:string) =//Raise jaro to a power in order to over-weight better matches jaroWinklerMIt1t2**2.0
val jaroWinklerMI : t1:string -> t2:string -> float
Full name: Script.jaroWinklerMI
val t1 : string
Multiple items val string : value:'T -> string
Full name: Microsoft.FSharp.Core.Operators.string
-------------------- type string = System.String
Full name: Microsoft.FSharp.Core.string
val t2 : string
property System.String.Length: int
val score : float
val p : float
val b : float
val scoreNamePairs : t1:string -> t2:string -> float