kennyyuen/shark-string-similarity

There is no license information available for the latest version (0.1.5) of this package.

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

pkg:composer/kennyyuen/shark-string-similarity

0.1.5 2025-01-29 02:00 UTC

This package is auto-updated.

Last update: 2025-10-29 03:27:30 UTC


README

The string-similarity is a PHP library designed to provide advanced string similarity comparison capabilities.

Installation

You can install the library via Composer:

composer require kennyyuen/shark-string-similarity

Usage

To use the string-similarity, include the autoload file generated by Composer:

<?php
require 'vendor/autoload.php';

use Shark\Extensions\StringSimilarity\StringSimilarity;
use Shark\Extensions\StringSimilarity\Algorithm;

$string1 = "Hello World";
$string2 = "Hello World!";

$similarity = StringSimilarity::eval(Algorithm::JaroWinkler, $string1, $string2);

// a similarity value between 0 and 1

Supported Algorithm

  • RatcliffObershelp
  • JaroWinkler
  • Jaro
  • Levenshtein
  • PHP Native (similar_text)

Contributing

Contributions are welcome! Please submit a pull request or open an issue to discuss your ideas.

License

This project is licensed under the MIT License.