Implementation of various string similarity and distance algorithms: Levenshtein, Jaro-winkler, n-Gram, Q-Gram, Jaccard index, Longest Common Subsequence edit distance, cosine similarity. A library implementing different string similarity and distance measures. A dozen of algorithms (including Levenshtein edit distance and sibblings, Jaro-Winkler, Longest Common Subsequence, cosine similarity etc.) are currently implemented. The main characteristics of each implemented algorithm are presented below. The "cost" column gives an estimation of the computational cost to compute the similarity between two strings of length m and n respectively. If the alphabet is finite, it is possible to use the method of four russians (Arlazarov et al. "On economic construction of the transitive closure of a directed graph", 1970) to speedup computation. This was published by Masek in 1980 ("A Faster Algorithm Computing String Edit Distances").

Features

  • A few algorithms work by converting strings into sets of n-grams
  • The Levenshtein distance between two words is the minimum number of single-character edits
  • This distance is computed as levenshtein distance divided by the length of the longest string
  • Damerau-Levenshtein distance with transposition
  • Optimal String Alignment variant of Damerau–Levenshtein
  • Jaro-Winkler computes the similarity between 2 strings

Project Samples

Project Activity

See All Activity >

Categories

Algorithms

License

MIT License

Follow java-string-similarity

java-string-similarity Web Site

Other Useful Business Software
AI-generated apps that pass security review Icon
AI-generated apps that pass security review

Stop waiting on engineering. Build production-ready internal tools with AI—on your company data, in your cloud.

Retool lets you generate dashboards, admin panels, and workflows directly on your data. Type something like “Build me a revenue dashboard on my Stripe data” and get a working app with security, permissions, and compliance built in from day one. Whether on our cloud or self-hosted, create the internal software your team needs without compromising enterprise standards or control.
Try Retool free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of java-string-similarity!

Additional Project Details

Programming Language

Java

Related Categories

Java Algorithms

Registered

2022-02-24