All Projects → DanHarltey → Fastenshtein

DanHarltey / Fastenshtein

Licence: mit
The fastest .Net Levenshtein around

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Fastenshtein

levenshtein.c
Levenshtein algorithm in C
Stars: ✭ 77 (-33.04%)
Mutual labels:  fuzzy-matching, levenshtein
Symspell
SymSpell: 1 million times faster spelling correction & fuzzy search through Symmetric Delete spelling correction algorithm
Stars: ✭ 1,976 (+1618.26%)
Mutual labels:  fuzzy-matching, levenshtein
Symspellpy
Python port of SymSpell
Stars: ✭ 420 (+265.22%)
Mutual labels:  fuzzy-matching, levenshtein
Fuzzball.js
Easy to use and powerful fuzzy string matching, port of fuzzywuzzy.
Stars: ✭ 225 (+95.65%)
Mutual labels:  fuzzy-matching, levenshtein
stringdistance
A fuzzy matching string distance library for Scala and Java that includes Levenshtein distance, Jaro distance, Jaro-Winkler distance, Dice coefficient, N-Gram similarity, Cosine similarity, Jaccard similarity, Longest common subsequence, Hamming distance, and more..
Stars: ✭ 60 (-47.83%)
Mutual labels:  fuzzy-matching, levenshtein
Closestmatch
Golang library for fuzzy matching within a set of strings 📃
Stars: ✭ 353 (+206.96%)
Mutual labels:  fuzzy-matching, levenshtein
Abydos
Abydos NLP/IR library for Python
Stars: ✭ 91 (-20.87%)
Mutual labels:  fuzzy-matching, levenshtein
Aspnetcoreactivedirectorystarterkit
Starter kit to quickly create ASP.NET Core with On-Premises Active Directory Authentication.
Stars: ✭ 71 (-38.26%)
Mutual labels:  sql-server
Sharebook Backend
Projeto backend de código livre para o app Sharebook.
Stars: ✭ 91 (-20.87%)
Mutual labels:  sql-server
Str metrics
Ruby gem (native extension in Rust) providing implementations of various string metrics
Stars: ✭ 68 (-40.87%)
Mutual labels:  levenshtein
Syncchanges
Synchronize/Replicate database changes using SQL Server Change Tracking
Stars: ✭ 66 (-42.61%)
Mutual labels:  sql-server
Rsqlserver
SQL Server DBI for R, based on the jTDS driver
Stars: ✭ 76 (-33.91%)
Mutual labels:  sql-server
Refinr
Cluster and merge similar char values: an R implementation of Open Refine clustering algorithms
Stars: ✭ 91 (-20.87%)
Mutual labels:  fuzzy-matching
Aceql Http
AceQL HTTP is a framework of REST like http APIs that allow to access to remote SQL databases over http from any device that supports http.
Stars: ✭ 68 (-40.87%)
Mutual labels:  sql-server
Jellyfish
🎐 a python library for doing approximate and phonetic matching of strings.
Stars: ✭ 1,571 (+1266.09%)
Mutual labels:  levenshtein
Sqlserver Kit
Useful links, scripts, tools and best practice for Microsoft SQL Server Database
Stars: ✭ 1,148 (+898.26%)
Mutual labels:  sql-server
Xgenecloud
XgeneCloud is now https://github.com/nocodb/nocodb
Stars: ✭ 1,629 (+1316.52%)
Mutual labels:  sql-server
Minisqlquery
Minimalist SQL Query tool for any .NET DB Provider - SQL, SQLite, SQL CE, Oracle, Access...
Stars: ✭ 103 (-10.43%)
Mutual labels:  sql-server
Dbwebapi
(Migrated from CodePlex) DbWebApi is a .Net library that implement an entirely generic Web API (RESTful) for HTTP clients to call database (Oracle & SQL Server) stored procedures or functions in a managed way out-of-the-box without any configuration or coding.
Stars: ✭ 84 (-26.96%)
Mutual labels:  sql-server
Eval Sql.net
SQL Eval Function | Dynamically Evaluate Expression in SQL Server using C# Syntax
Stars: ✭ 84 (-26.96%)
Mutual labels:  sql-server

Fastenshtein

NuGet GitHub action build AppVeyor Build License Unit test coverage

One of the fastest .Net Levenshtein projects around.

Fastenshtein is an optimized and fully unit tested Levenshtein implementation. It is optimized for speed and memory usage.

From the included brenchmarking tests comparing random words of 3 to 20 random chars to other Nuget Levenshtein implementations.

Method Mean StdDev Scaled Scaled-StdDev Gen 0 Allocated
Fastenshtein 16.2006 ms 0.0069 ms 1.00 0.00 - 20.48 kB
FastenshteinStatic 17.2029 ms 0.0234 ms 1.06 0.00 - 2.81 MB
StringSimilarity 24.1955 ms 0.0280 ms 1.49 0.00 329.1667 5.87 MB
NinjaNye 35.9226 ms 0.0152 ms 2.22 0.00 6337.5000 44.21 MB
TNXStringManipulation 45.4600 ms 0.0065 ms 2.81 0.00 3329.1667 24.63 MB
MinimumEditDistance 207.9967 ms 0.0893 ms 12.84 0.01 3404.1667 25.59 MB

Usage

int levenshteinDistance = Fastenshtein.Levenshtein.Distance("value1", "value2");

Alternative method for comparing one item against many (quicker due to less memory allocation, not thread safe)

Fastenshtein.Levenshtein lev = new Fastenshtein.Levenshtein("value1");
foreach (var item in new []{ "value2", "value3", "value4"})
{
	int levenshteinDistance = lev.DistanceFrom(item);
}

How to include Fastenshtein in Microsoft SQL Server (SQLCLR)

We will create Fastenshtein as a CLR Scalar-Valued Function within SQL Server. This will allow the fast Levenshtein implementationto be used within SQL Server.

  1. To enable CLR integration for the server:
sp_configure 'clr enabled', 1
RECONFIGURE
  1. Beginning with SQL Server 2017 (14.x). Either configure CLR strict security or run the below to disable it.
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;

EXEC sp_configure 'clr strict security', 0;
RECONFIGURE;
  1. Place the Fastenshtein.dll on the same computer as the SQL Server instance in a directory that the SQL Server instance has access to. You must use the .Net framework version 4.5.2 of Fastenshtein. To create the assembly (dll) either:
  • Compile the project “Fastenshtein” in Release config in Visual Studio.

OR

  • Download the pre-compiled dll from nuget unzip the package and use the dll in \lib\net452 folder.
  1. Create the assembly
CREATE ASSEMBLY FastenshteinAssembly FROM 'C:\Fastenshtein.dll' WITH PERMISSION_SET = SAFE
  1. Then create the function
CREATE FUNCTION [Levenshtein](@value1 [nvarchar](MAX), @value2 [nvarchar](MAX))
RETURNS [int]
AS 
EXTERNAL NAME [FastenshteinAssembly].[Fastenshtein.Levenshtein].[Distance]
GO
  1. It is now ready to be used:
-- Usage
DECLARE @retVal as integer
select @retVal = [dbo].[Levenshtein]('Test','test')
Select @retVal
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].