All Projects → xdrop → Fuzzywuzzy

xdrop / Fuzzywuzzy

Licence: gpl-2.0
Java fuzzy string matching implementation of the well known Python's fuzzywuzzy algorithm. Fuzzy search for Java

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Fuzzywuzzy

fuzzy-search
A collection of algorithms for fuzzy search like in Sublime Text.
Stars: ✭ 49 (-90.32%)
Mutual labels:  fuzzy-search, fuzzy-matching
Symspellpy
Python port of SymSpell
Stars: ✭ 420 (-17%)
Mutual labels:  fuzzy-search, fuzzy-matching
Symspell
SymSpell: 1 million times faster spelling correction & fuzzy search through Symmetric Delete spelling correction algorithm
Stars: ✭ 1,976 (+290.51%)
Mutual labels:  fuzzy-search, fuzzy-matching
Fuse Swift
A lightweight fuzzy-search library, with zero dependencies
Stars: ✭ 767 (+51.58%)
Mutual labels:  fuzzy-search, fuzzy-matching
fish-fzy
fzy inegration with fish. Search history, navigate directories and more. Blazingly fast.
Stars: ✭ 18 (-96.44%)
Mutual labels:  fuzzy-search, fuzzy-matching
Leaderf
An efficient fuzzy finder that helps to locate files, buffers, mrus, gtags, etc. on the fly for both vim and neovim.
Stars: ✭ 1,733 (+242.49%)
Mutual labels:  fuzzy-search, fuzzy-matching
Tntsearch
A fully featured full text search engine written in PHP
Stars: ✭ 2,693 (+432.21%)
Mutual labels:  fuzzy-search, fuzzy-matching
Faint
Extensible TUI fuzzy file file explorer
Stars: ✭ 82 (-83.79%)
Mutual labels:  fuzzy-search, fuzzy-matching
Yoyo-leaf
Yoyo-leaf is an awesome command-line fuzzy finder.
Stars: ✭ 49 (-90.32%)
Mutual labels:  fuzzy-search, fuzzy-matching
levenshtein.c
Levenshtein algorithm in C
Stars: ✭ 77 (-84.78%)
Mutual labels:  fuzzy-search, fuzzy-matching
Fuzzysearch
Find parts of long text or data, allowing for some changes/typos.
Stars: ✭ 157 (-68.97%)
Mutual labels:  fuzzy-search, fuzzy-matching
SymSpellCppPy
Fast SymSpell written in c++ and exposes to python via pybind11
Stars: ✭ 28 (-94.47%)
Mutual labels:  fuzzy-search, fuzzy-matching
Fuzzball.js
Easy to use and powerful fuzzy string matching, port of fuzzywuzzy.
Stars: ✭ 225 (-55.53%)
Mutual labels:  fuzzy-search, fuzzy-matching
bolt.nvim
⚡ Ultrafast multi-pane file manager for Neovim with fuzzy matching
Stars: ✭ 100 (-80.24%)
Mutual labels:  fuzzy-search, fuzzy-matching
Liquidmetal
💦🤘 A mimetic poly-alloy of the Quicksilver scoring algorithm, essentially LiquidMetal. </Schwarzenegger Voice>
Stars: ✭ 279 (-44.86%)
Mutual labels:  fuzzy-search, fuzzy-matching
FlashCards
Learning Blazor By Creating A Flash Cards Application
Stars: ✭ 17 (-96.64%)
Mutual labels:  fuzzy-search
Re Flex
The regex-centric, fast lexical analyzer generator for C++ with full Unicode support. Faster than Flex. Accepts Flex specifications. Generates reusable source code that is easy to understand. Introduces indent/dedent anchors, lazy quantifiers, functions for lex/syntax error reporting, and more. Seamlessly integrates with Bison and other parsers.
Stars: ✭ 274 (-45.85%)
Mutual labels:  fuzzy-matching
ProbQA
Probabilistic question-asking system: the program asks, the users answer. The minimal goal of the program is to identify what the user needs (a target), even if the user is not aware of the existence of such a thing/product/service.
Stars: ✭ 43 (-91.5%)
Mutual labels:  fuzzy-search
Closestmatch
Golang library for fuzzy matching within a set of strings 📃
Stars: ✭ 353 (-30.24%)
Mutual labels:  fuzzy-matching
fzf-folds.vim
Vim plugin that lets you fuzzy search for folds in a file
Stars: ✭ 15 (-97.04%)
Mutual labels:  fuzzy-search

JavaWuzzy

Build Status Download

FuzzyWuzzy Java Implementation

Fuzzy string matching for java based on the FuzzyWuzzy Python algorithm. The algorithm uses Levenshtein distance to calculate similarity between strings.

I've personally needed to use this but all of the other Java implementations out there either had a crazy amount of dependencies, or simply did not output the correct results as the python one, so I've decided to properly re-implement this in Java. Enjoy!

  • No dependencies!
  • Includes implementation of the super-fast python-Levenshtein in Java!
  • Simple to use!
  • Lightweight!
  • Credits to the great folks at seatgeek for coming up with the algorithm (More here)

Installation

Maven Central

<dependency>
    <groupId>me.xdrop</groupId>
    <artifactId>fuzzywuzzy</artifactId>
    <version>1.3.1</version>
</dependency>

Gradle

repositories {
    jcenter()
}

dependencies {
    implementation 'me.xdrop:fuzzywuzzy:1.3.1'
}

Jar release

Download the latest release here and add to your classpath

Usage

Simple Ratio

FuzzySearch.ratio("mysmilarstring","myawfullysimilarstirng")
72

FuzzySearch.ratio("mysmilarstring","mysimilarstring")
97

Partial Ratio

FuzzySearch.partialRatio("similar", "somewhresimlrbetweenthisstring")
71

Token Sort Ratio

FuzzySearch.tokenSortPartialRatio("order words out of","  words out of order")
100
FuzzySearch.tokenSortRatio("order words out of","  words out of order")
100

Token Set Ratio

FuzzySearch.tokenSetRatio("fuzzy was a bear", "fuzzy fuzzy fuzzy bear")
100
FuzzySearch.tokenSetPartialRatio("fuzzy was a bear", "fuzzy fuzzy fuzzy bear")
100

Weighted Ratio

FuzzySearch.weightedRatio("The quick brown fox jimps ofver the small lazy dog", "the quick brown fox jumps over the small lazy dog")
97

Extract

// groovy

FuzzySearch.extractOne("cowboys", ["Atlanta Falcons", "New York Jets", "New York Giants", "Dallas Cowboys"])
(string: Dallas Cowboys, score: 90, index: 3)
FuzzySearch.extractTop("goolge", ["google", "bing", "facebook", "linkedin", "twitter", "googleplus", "bingnews", "plexoogl"], 3)
[(string: google, score: 83, index: 0), (string: googleplus, score: 63, index:5), (string: plexoogl, score: 43, index: 7)]
FuzzySearch.extractAll("goolge", ["google", "bing", "facebook", "linkedin", "twitter", "googleplus", "bingnews", "plexoogl"]);
[(string: google, score: 83, index: 0), (string: bing, score: 20, index: 1), (string: facebook, score: 29, index: 2), (string: linkedin, score: 29, index: 3), (string: twitter, score: 15, index: 4), (string: googleplus, score: 63, index: 5), (string: bingnews, score: 29, index: 6), (string: plexoogl, score: 43, index: 7)]
// score cutoff
FuzzySearch.extractAll("goolge", ["google", "bing", "facebook", "linkedin", "twitter", "googleplus", "bingnews", "plexoogl"], 40) 
[(string: google, score: 83, index: 0), (string: googleplus, score: 63, index: 5), (string: plexoogl, score: 43, index: 7)]
FuzzySearch.extractSorted("goolge", ["google", "bing", "facebook", "linkedin", "twitter", "googleplus", "bingnews", "plexoogl"]);
[(string: google, score: 83, index: 0), (string: googleplus, score: 63, index: 5), (string: plexoogl, score: 43, index: 7), (string: facebook, score: 29, index: 2), (string: linkedin, score: 29, index: 3), (string: bingnews, score: 29, index: 6), (string: bing, score: 20, index: 1), (string: twitter, score: 15, index: 4)]
// score cutoff
FuzzySearch.extractSorted("goolge", ["google", "bing", "facebook", "linkedin", "twitter", "googleplus", "bingnews", "plexoogl"], 3);
[(string: google, score: 83, index: 0), (string: googleplus, score: 63, index: 5), (string: plexoogl, score: 43, index: 7)]

Extract using any object

extractOne and related methods can receive Collection<T> and produce BoundExtractedResult<T>

List<Foo> foo = ...;
BoundExtractedResult<Foo> match = FuzzySearch.extractOne("cowboys", foo, x -> x.toString());
Foo matchFoo = match.getReferent();

Credits

  • seatgeek
  • Adam Cohen
  • David Necas (python-Levenshtein)
  • Mikko Ohtamaa (python-Levenshtein)
  • Antti Haapala (python-Levenshtein)
  • Tobias Burdow (burdoto)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].