Awesome
What is it
- This is Kotlin port of Joshaven Potter's string_score. String Scoring Algorithm 0.1.22
- Add an extension in Kotlin String class
Installation Notes
This code was developed using:
- Gradle 3.1
- Kotlin: 1.0.5
- Kotlintest 1.3.5
Examples
Add the source code into your project.
"Derideo Te".score("dt") //=> 0.63
"Derideo Te".score("DT") //=> 0.69
"Derideo Te".score("derideo") //=> 0.8178571428571427
"Derideo Te".score("Derideo") //=> 0 0.83
Tests and Benchmark
My tests & Benchmark are ported from Shingo Omura's java version.
$> gradle test