https://github.com/solo-studios/kt-fuzzy
A zero-dependency Kotlin Multiplatform library for fuzzy string matching
https://github.com/solo-studios/kt-fuzzy
distance distance-measures fuzzy-matching fuzzy-search fuzzy-string fuzzy-string-matching fuzzywuzzy kotlin kotlin-library kotlin-multiplatform kotlin-multiplatform-library kt levenshtein levenshtein-distance multiplatform similarity similarity-measures
Last synced: 3 months ago
JSON representation
A zero-dependency Kotlin Multiplatform library for fuzzy string matching
- Host: GitHub
- URL: https://github.com/solo-studios/kt-fuzzy
- Owner: solo-studios
- License: mit
- Created: 2021-10-23T00:11:32.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-09-30T02:03:54.000Z (7 months ago)
- Last Synced: 2025-09-30T04:06:36.652Z (7 months ago)
- Topics: distance, distance-measures, fuzzy-matching, fuzzy-search, fuzzy-string, fuzzy-string-matching, fuzzywuzzy, kotlin, kotlin-library, kotlin-multiplatform, kotlin-multiplatform-library, kt, levenshtein, levenshtein-distance, multiplatform, similarity, similarity-measures
- Language: Kotlin
- Homepage:
- Size: 1.32 MB
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kotlin Fuzzy
[](LICENSE)
[](https://search.maven.org/search?q=g:ca.solo-studios%20a:kt-fuzzy)
[](https://kotlinlang.org/)
[](https://discord.solo-studios.ca)
A zero-dependency multiplatform library for fuzzy string matching in Kotlin which is *roughly* equivalent to the Python
package [thefuzz](https://github.com/seatgeek/thefuzz/) (Previously "fuzzywuzzy") without the GPL license.
## Kotlin Fuzzy String Matching
Kotlin Fuzzy, or kt-fuzzy was created because the only other options for Java/Kotlin fuzzy string matching libraries
were under the GPL. This meant, they couldn't be used in non-GPL projects. So, I created this library to remedy that.
This library was *inspired* by libraries
like [javawuzzy](https://github.com/xdrop/fuzzywuzzy), [fuzzywuzzy-kotlin](https://github.com/willowtreeapps/fuzzywuzzy-kotlin),
and [thefuzz](https://github.com/seatgeek/thefuzz) but does not use any code from them, allowing it to exist
*without* the GPL license.
This library was designed with the goal of mimicking their functionality, without directly using any code from those
repositories.
There are two modules that can be used:
- The Primary module: Kotlin Fuzzy
- The Secondary module: [Kotlin String Similarity](kt-string-similarity/README.md)
### Kotlin String Similarity
The secondary module, Kotlin String Similarity implements various string similarity and distance measures. It contains
over a dozen such algorithms, including Levenshtein distance (and siblings), Jaro-Winkler, Longest Common Subsequence,
cosine similarity, and many others.
It primarily a *direct port* of [Java String Similarity](https://github.com/tdebatty/java-string-similarity) by
tdebatty.
If you want to depend *only* on this module, you do not need to add a dependency on Kotlin Fuzzy to do so.
Read the [Kotlin String Similarity README](kt-string-similarity/README.md) for more info.
## Features
- [x] No dependencies
- [x] Simple to use
- [x] Performance friendly
## Including
You can include Kotlin Fuzzy in your project by adding the following, depending on your platform:
### Maven
```xml
ca.solo-studios
kt-fuzzy
VERSION
```
### Gradle Groovy
```groovy
implementation 'ca.solo-studios:kt-fuzzy:VERSION'
```
### Gradle Kotlin
```kotlin
implementation("ca.solo-studios:kt-fuzzy:VERSION")
```