diff options
Diffstat (limited to 'fuzzel/index.html')
| -rw-r--r-- | fuzzel/index.html | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/fuzzel/index.html b/fuzzel/index.html new file mode 100644 index 0000000..bd42c47 --- /dev/null +++ b/fuzzel/index.html @@ -0,0 +1,100 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> + <meta name="description" content=""> + <meta name="author" content=""> + + <title>Fuzzel</title> + + <!-- Bootstrap core CSS --> + <link href="../css/bootstrap.min.css" rel="stylesheet"> + + <!-- Custom styles for this template --> + <link href="jumbotron-narrow.css" rel="stylesheet"> + + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> + <![endif]--> + </head> + + <body> + + <div class="container"> + <div class="header clearfix"> + <h3 class="text-muted">Fuzzel</h3> + </div> + + <div class="jumbotron"> + <h1>Fuzzel</h1> + <p class="lead">Fuzzy String Matching for Lua</p> + <p><a class="btn btn-lg btn-info" href="https://cogarr.net/source/cgit.cgi/fuzzel" role="button">Download</a></p> + </div> + + <div class="row marketing"> + <h4>What is it?</h4> + <p>One bored afternoon, I dusted off my old notes from an algorithm class I took, and tried my hand at some dynamic programming. Fuzzel is the result of that.<br/> + Fuzzel uses <a href="https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance"> Damerau-Levenshtein Distance</a> to do fuzzy string matching. It also includes pure Levenshtien distance, and <a href="https://en.wikipedia.org/wiki/Hamming_distance">Hamming Distance</a> for shits and giggles. + <h4>How do I use it?</h4> + <p>Simply include it in your file. Note that the source also comes with fuzzel_min.lua, this is a minified version of fuzzel that works exactly the same. If you need clients to download this code often, or don't have much bandwith, consider useing the minified version. + <h4>Docs or something I guess</h4> + <p>In addition to these methods, there are shortened versions of these methods at the bottom, for example: + <pre>fuzzel.dld</pre> is the same as <pre>fuzzel.DamerauLevenshtienDistance</pre> + <br/> + <code>fuzzel.LevenshtienDistance_extended(string_first, string_second, number_addcost, number_substituecost, number_deletecost)</code><br/> + Calculates the Levenshtien Distance between two strings, useing the costs given. "Real" Levenshtien Distance uses values 1,1,1 for costs. + <code>returns number_distance</code> + <br/><br/> + <code>fuzzel.LevenshtienDistance(string_first, strings_second)</code><br/> + Calculates the "real" Levenshtien Distance + <code>returns number_distance</code> + <br/><br/> + <code>fuzzel.LevensteinRatio(string_first, string_second)</code><br/> + The Levenshtien Ratio divided by the first string's length. Useing a ratio is a decent way to determin if a spelling is "close enough" + <code>returns number_distance</code> + <br/><br/> + <code>fuzzel.DamerauLevenshtienDistance_extended(string_first, string_second, number_addcost, number_substituecost, number_deletecost, number_transpositioncost)</code><br/> + Damerau-Levenshtien Distance is almost exactly like Levenshtien Distance, with the caveat that two letters next to each other, with swapped positions only counts as "one" cost (in "real" Damerau-Levenshtien Distance) + <code>returns number</code> + <br/><br/> + <code>fuzzel.DamerauLevenshtienDistance(stirng_first, strings_second)</code><br/> + Calculates the "real" Damerau-Levenshtien Distance + <code>returns number</code> + <br/><br/> + <code>fuzzel.DamerauLevenshtienRatio(string_first, string_second)</code><br/> + The Damerau-Levenshtien Distance divided by the first string's length + <code>returns number</code> + <br/><br/> + <code>fuzzel.HammingDistance(string_first, string_second)</code><br/> + Purely the number of substitutions needed to change one string into another. Note that both strings must be the same length. + <code>returns number</code> + <br/><br/> + <code>fuzzel.HammingRatio(string_first, string_second)</code><br/> + The hamming distance divided by the length of the first string + <code>returns number</code> + <br/><br/> + <code>fuzzel.FuzzySearchDistance(string_needle, vararg_in)</code><br/> + in may be either a table, or a list of arguments. fuzzel.FuzzySearchDistance will find the string that most closely resembles needle, based on Damerau-Levenshtien Distance + <code>returns string_closest, number_distance</code> + <br/><br/> + <code>fuzzel.FuzzySearchRatio(string_needle, vararg_in)</code><br/> + in may be either a table, or a list of arguments. Same as above, except it returns the string with the closest Damerau-Levenshtien ratio. + <code>returns string_closest, nubmer_ratio</code> + <h4>Liscense</h4> + This code is public domain, feel free to use it any of your proejcts and redistribute it however you like. If you're useing the minified version it would be nice (though not required) to leave the link at the top of the file, so people that want to find the original, can. + <br/> + </div> + + <footer class="footer"> + <p>Contact the admin at <a href="mailto:apickx@cogarr.org">Apickx@cogarr.org</a></p> + </footer> + + </div> <!-- /container --> + + </body> +</html> |
