Download the PHP package edgaras/strsim without Composer
On this page you can find all versions of the php package edgaras/strsim. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download edgaras/strsim
More information about edgaras/strsim
Files in edgaras/strsim
Download edgaras/strsim
More information about edgaras/strsim
Files in edgaras/strsim
Vendor edgaras
Package strsim
Short Description Collection of string similarity and distance algorithms in PHP including Levenshtein, Damerau-Levenshtein, Jaro-Winkler, and more
License MIT
Homepage https://github.com/Edgaras0x4E/StrSim
Package strsim
Short Description Collection of string similarity and distance algorithms in PHP including Levenshtein, Damerau-Levenshtein, Jaro-Winkler, and more
License MIT
Homepage https://github.com/Edgaras0x4E/StrSim
Please rate this library. Is it a good library?
Informations about the package strsim
StrSim
A collection of string similarity and distance algorithms implemented in PHP. This library provides standalone static methods for computing various similarity metrics, useful in natural language processing, fuzzy matching, spell checking, and bioinformatics.
Requirements
- PHP 8.3+
- Composer
Installation
-
Use the library via Composer:
- Include the Composer autoloader:
Supported Algorithms
Class | Method | Description |
---|---|---|
Levenshtein |
distance() |
Measures the number of insertions, deletions, or substitutions. |
DamerauLevenshtein |
distance() |
Levenshtein with transpositions included. |
Hamming |
distance() |
Counts differing positions (requires equal-length strings). |
Jaro |
distance() |
Measures similarity based on character matches and transpositions. |
JaroWinkler |
distance() |
Jaro with a prefix match boost for similar string starts. |
LCS |
length() |
Returns the length of the longest common subsequence. |
SmithWaterman |
score() |
Local alignment scoring for best-matching subsequences. |
NeedlemanWunsch |
score() |
Global alignment scoring for entire string similarity. |
Cosine |
similarity() |
Measures similarity via character frequency vectors. |
Cosine |
similarityFromVectors() |
Computes cosine similarity for numeric vector inputs. |
Jaccard |
index() |
Ratio of shared to total unique characters. |
MongeElkan |
similarity() |
Average best-word similarity using Jaro-Winkler internally. |
Usage
Useful links
All versions of strsim with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.3.0
The package edgaras/strsim contains the following files
Loading the files please wait ....