{"id":13606277,"url":"https://github.com/rmm5t/liquidmetal","last_synced_at":"2025-04-07T13:08:49.159Z","repository":{"id":496080,"uuid":"122759","full_name":"rmm5t/liquidmetal","owner":"rmm5t","description":":sweat_drops::metal: A mimetic poly-alloy of the Quicksilver scoring algorithm, essentially LiquidMetal. \u003c/Schwarzenegger Voice\u003e","archived":false,"fork":false,"pushed_at":"2020-06-17T02:10:02.000Z","size":46,"stargazers_count":295,"open_issues_count":1,"forks_count":24,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-05T10:47:16.814Z","etag":null,"topics":["fuzzy-matching","fuzzy-search","javascript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rmm5t.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-02-06T00:16:49.000Z","updated_at":"2025-01-10T10:35:17.000Z","dependencies_parsed_at":"2022-07-04T20:01:04.670Z","dependency_job_id":null,"html_url":"https://github.com/rmm5t/liquidmetal","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmm5t%2Fliquidmetal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmm5t%2Fliquidmetal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmm5t%2Fliquidmetal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmm5t%2Fliquidmetal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rmm5t","download_url":"https://codeload.github.com/rmm5t/liquidmetal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657281,"owners_count":20974345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fuzzy-matching","fuzzy-search","javascript"],"created_at":"2024-08-01T19:01:07.735Z","updated_at":"2025-04-07T13:08:49.122Z","avatar_url":"https://github.com/rmm5t.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Text Search"],"sub_categories":["Fuzzy search"],"readme":"# LiquidMetal\n\n[A mimetic poly-alloy](https://youtu.be/Fa4Jq7gJvZ0) of the Quicksilver\nscoring algorithm, essentially LiquidMetal. `\u003c/Schwarzenegger Voice\u003e`\n\nFlex matching short abbreviations against longer strings is a boon in\nproductivity for typists.  Applications like\n[Quicksilver](http://www.qsapp.com/), [Alfred](http://www.alfredapp.com/),\n[LaunchBar](http://www.obdev.at/products/launchbar/index.html), and\n[Launchy](http://www.launchy.net/) have made this method of keyboard entry a\npopular one.  It's time to bring this same functionality to web controls.\nLiquidMetal makes scoring long strings against abbreviations easy.\n\n## Usage\n\nInclude the library:\n\n    \u003cscript src=\"liquidmetal.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n\nScore any string against an abbreviation:\n\n    LiquidMetal.score(\"FooBar\",  \"foo\")   //=\u003e 0.950\n    LiquidMetal.score(\"FooBar\",  \"fb\")    //=\u003e 0.917\n    LiquidMetal.score(\"Foo Bar\", \"fb\")    //=\u003e 0.929\n    LiquidMetal.score(\"Foo Bar\", \"baz\")   //=\u003e 0.0\n    LiquidMetal.score(\"Foo Bar\", \"\")      //=\u003e 0.8\n\nAll scores fall between a range of 0.0 (no match) to 1.0 (perfect match).\n\n## Inspired By\n\n* [Quicksilver](http://code.google.com/p/blacktree-alchemy/) and its [scoreForAbbreviation algorithm](http://code.google.com/p/blacktree-alchemy/source/browse/trunk/Crucible/Code/NSString_BLTRExtensions.m#61) by Alcor\n* [Quicksilver.js](http://rails-oceania.googlecode.com/svn/lachiecox/qs_score/trunk/qs_score.js) by [Lachie Cox](http://smartbomb.com.au/2008/02/11/quicksilver-javascript)\n\n## Why?\n\n* To satisfy my own requirements for the\n  [jquery.flexselect](http://rmm5t.github.io/jquery-flexselect) plugin\n* The Quicksilver algorithm doesn't give proper weight to abbreviations that\n  match the first character of the scored string.\n* The Quicksilver algorithm is extremely slow for certain length\n  string/abbreviation combinations because of its use of recursion.  While\n  slightly slower for shorter length string/abbreviation combinations,\n  LiquidMetal outperforms the Quicksilver algorithm by orders of magnitude under\n  other conditions.\n* The javascript version of the Quicksilver algorithm (Quicksilver.js) is case\n  sensitive and doesn't give added weight to camel case strings; whereas,\n  LiquidMetal is case insensitive and does give added weight to uppercase\n  letters in camel case strings.\n\n## Todo\n\n* More tests\n* Consider tweaking the scores for \"trailing\" characters\n* Improve implementation of highest score matching (LiquidMetal\n  currently returns the highest scoring match for an abbreviation,\n  but is inefficient)\n* See if it's possible to tune the performance further\n\n## Author\n\n[Ryan McGeary](http://ryan.mcgeary.org) ([@rmm5t](http://twitter.com/rmm5t))\n\n## License\n\n[MIT License](https://rmm5t.mit-license.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmm5t%2Fliquidmetal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frmm5t%2Fliquidmetal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmm5t%2Fliquidmetal/lists"}