2017 © Pedro Peláez
 

library fast-fuzzy-search

Fast fuzzy search in an array of strings for the most similiar ones

image

mihanentalpo/fast-fuzzy-search

Fast fuzzy search in an array of strings for the most similiar ones

  • Sunday, August 20, 2017
  • by MihanEntalpo
  • Repository
  • 3 Watchers
  • 6 Stars
  • 348 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 13 Versions
  • 8 % Grown

The README.md

FastFuzzySearch aimed to search an array of words for the most similiar to the specified one, (*1)

The used algorythm is much faster than using levenstein distance, or similiar_text functions., (*2)

Usage:, (*3)


require_once("./FastFuzzySearch.php"); //Get words array: (it's english names, starting from A,B,C) $words = array( 'Abbott', 'Abe', 'Addison', 'Adrian', 'Aiken', 'Ainsley', 'Al', 'Alan', 'Alaric', 'Alban', 'Albert', 'Albion', 'Aldrich', 'Alec', 'Alex', 'Alexander', 'Alexis', 'Alf', 'Alfie', 'Alfred', 'Alger', 'Algernon', 'Alick', 'Allan', 'Allen', 'Alton', 'Alvin', 'Ambrose', 'Andrew', 'Andy', 'Anthony', 'Archer', 'Armstrong', 'Arnold', 'Ashley', 'Aston', 'Atwater', 'Aubrey', 'Austin', 'Avery', 'Bailey', 'Baldwin', 'Barclay', 'Barrett', 'Bartholomew', 'Barton', 'Basil', 'Baxter', 'Baz', 'Benedict', 'Benjamin', 'Bennett', 'Benson', 'Bentley', 'Berkley', 'Bernard', 'Bert', 'Bill', 'Blake', 'Bob', 'Bobby', 'Bond', 'Brad', 'Bradley', 'Brent', 'Bret', 'Brewster', 'Brian', 'Brigham', 'Brooke', 'Bruce', 'Bruno', 'Bryant', 'Buck', 'Bud', 'Burgess', 'Burton', 'Byron', 'Cade', 'Caesar', 'Caldwell', 'Calvert', 'Calvin', 'Carl', 'Carlton', 'Carter', 'Carver', 'Cary', 'Casey', 'Cassian', 'Cecil', 'Cedric', 'Chad', 'Chandler', 'Chapman', 'Charles', 'Charlie', 'Charlton', 'Chase', 'Chester', 'Chris', 'Christian', 'Christopher', 'Chuck', 'Clarence', 'Claude', 'Clay', 'Clayton', 'Clement', 'Cliff', 'Clifford', 'Clifton', 'Clive', 'Clyde', 'Cole', 'Coleman', 'Colin', 'Conrad', 'Constant', 'Conway', 'Corwin', 'Courtney', 'Craig', 'Crispin', 'Crosby', 'Curtis', 'Cuthbert', 'Cyril' ); //Create FastFuzzySearch object: $ffs = new FastFuzzySearch($words); //Lets pretend, this is user's input: $input = "charter"; //Lets get three most similiar english names: $results = $ffs->find($input, 3); //End output it: print_r($results);

Results would be:, (*4)

Array
(
    [0] => Array
        (
            [word] => carter
            [percent] => 0.75
        )

    [1] => Array
        (
            [word] => chad
            [percent] => 0.33333333333333
        )

    [2] => Array
        (
            [word] => charlie
            [percent] => 0.26666666666667
        )

)

The Versions

20/08 2017

v0.2.4

0.2.4.0

Fast fuzzy search in an array of strings for the most similiar ones

  Sources   Download

MIT

The Requires

  • php ^5.3.5 || ^7.0

 

search compare fuzzy

20/08 2017

dev-master

9999999-dev

Fast fuzzy search in an array of strings for the most similiar ones

  Sources   Download

MIT

The Requires

  • php ^5.3.5 || ^7.0

 

search compare fuzzy

01/07 2017

v0.2.3

0.2.3.0

Fast fuzzy search in an array of strings for the most similiar ones

  Sources   Download

MIT

The Requires

  • php ^5.3.5 || ^7.0

 

search compare fuzzy

25/06 2017

v0.2.2

0.2.2.0

Fast fuzzy search in an array of strings for the most similiar ones

  Sources   Download

MIT

The Requires

  • php ^5.3.5 || ^7.0

 

search compare fuzzy

21/01 2017

v0.2.1

0.2.1.0

Fast fuzzy search in an array of strings for the most similiar ones

  Sources   Download

MIT

The Requires

  • php ^5.3.5 || ^7.0

 

search compare fuzzy

18/10 2016

v0.2.0

0.2.0.0

Fast fuzzy search in an array of strings for the most similiar ones

  Sources   Download

MIT

The Requires

  • php ^5.3.5 || ^7.0

 

search compare fuzzy

18/10 2016

v0.1.9

0.1.9.0

Fast fuzzy search in an array of strings for the most similiar ones

  Sources   Download

MIT

The Requires

  • php ^5.3.5 || ^7.0

 

search compare fuzzy

18/10 2016

v0.1.6

0.1.6.0

Fast fuzzy search in an array of strings for the most similiar ones

  Sources   Download

MIT

The Requires

  • php ^5.3.5 || ^7.0

 

search compare fuzzy

18/10 2016

v0.1.5

0.1.5.0

Fast fuzzy search in an array of strings for the most similiar ones

  Sources   Download

MIT

The Requires

  • php ^5.3.5 || ^7.0

 

search compare fuzzy

18/10 2016

v0.1.3

0.1.3.0

Fast fuzzy search in an array of strings for the most similiar ones

  Sources   Download

MIT

The Requires

  • php ^5.3.5 || ^7.0

 

search compare fuzzy

18/10 2016

v0.1.2

0.1.2.0

Fast fuzzy search in an array of strings for the most similiar ones

  Sources   Download

MIT

The Requires

  • php ^5.3.5 || ^7.0

 

search compare fuzzy

17/10 2016

v0.1.1

0.1.1.0

Fast fuzzy search in an array of strings for the most similiar ones

  Sources   Download

MIT

The Requires

  • php ^5.3.5 || ^7.0

 

search compare fuzzy

17/10 2016

v0.1.0

0.1.0.0

Fast fuzzy search in an array of strings for the most similiar ones

  Sources   Download

The Requires

  • php ^5.3.5 || ^7.0

 

search compare fuzzy