All Projects → xrash → Smetrics

xrash / Smetrics

Licence: mit
String metrics library written in Go.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Smetrics

Java String Similarity
Implementation of various string similarity and distance algorithms: Levenshtein, Jaro-winkler, n-Gram, Q-Gram, Jaccard index, Longest Common Subsequence edit distance, cosine similarity ...
Stars: ✭ 2,403 (+1257.63%)
Mutual labels:  algorithm, distance
Textdistance
Compute distance between sequences. 30+ algorithms, pure python implementation, common interface, optional external libs usage.
Stars: ✭ 2,575 (+1354.8%)
Mutual labels:  algorithm, distance
Algorithm
The repository algorithms implemented on the Go
Stars: ✭ 163 (-7.91%)
Mutual labels:  algorithm
Leetcode Notes
LeetCode 算法解答
Stars: ✭ 172 (-2.82%)
Mutual labels:  algorithm
Haversine
Calculate the distance bewteen 2 points on Earth
Stars: ✭ 166 (-6.21%)
Mutual labels:  distance
Fe Interview
宇宙最强的前端面试指南 (https://lucifer.ren/fe-interview)
Stars: ✭ 2,284 (+1190.4%)
Mutual labels:  algorithm
Idworker
idworker 是一个基于zookeeper和snowflake算法的分布式ID生成工具,通过zookeeper自动注册机器(最多1024台),无需手动指定workerId和datacenterId
Stars: ✭ 171 (-3.39%)
Mutual labels:  algorithm
Paper checking system
基于C#和C++开发的文本查重/论文查重系统,一亿字次级论文库秒级查重。关联:查重算法、数据去重、文档查重、文本去重、标书查重、辅助防串标
Stars: ✭ 160 (-9.6%)
Mutual labels:  algorithm
Leetcode Spider
用 node.js 爬你自己的 leetcode 解题源码
Stars: ✭ 176 (-0.56%)
Mutual labels:  algorithm
Leetcode Js
用 JS 刷 LeetCode
Stars: ✭ 165 (-6.78%)
Mutual labels:  algorithm
Leetcode Solutions
🏋️ Python / Modern C++ Solutions of All 2111 LeetCode Problems (Weekly Update)
Stars: ✭ 2,787 (+1474.58%)
Mutual labels:  algorithm
Nashpy
A library for the computation of Nash equilibria in two player games
Stars: ✭ 164 (-7.34%)
Mutual labels:  algorithm
Moving Least Squares
Implementation of three algorithms of image deformation using moving least squares. http://dl.acm.org/citation.cfm?doid=1179352.1141920
Stars: ✭ 169 (-4.52%)
Mutual labels:  algorithm
Go Jump Consistent Hash
⚡️ Fast, minimal memory, consistent hash algorithm
Stars: ✭ 163 (-7.91%)
Mutual labels:  algorithm
Paperbroker
An open source simulated options brokerage and UI for paper trading, algorithmic interfaces and backtesting.
Stars: ✭ 173 (-2.26%)
Mutual labels:  algorithm
Internet Recruiting Algorithm Problems
《程序员代码面试指南》、公司招聘笔试题、《剑指Offer》、算法、数据结构
Stars: ✭ 163 (-7.91%)
Mutual labels:  algorithm
Boostaroota
A fast xgboost feature selection algorithm
Stars: ✭ 165 (-6.78%)
Mutual labels:  algorithm
Ahocorasickphp
Aho-Corasick multi-keyword string searching library in PHP.
Stars: ✭ 169 (-4.52%)
Mutual labels:  algorithm
Greinerhormann
Greiner-Hormann polygon clipping algorithm. Does AND, OR, XOR. Plays nicely with Leaflet. Handles non-convex polygons and multiple clipping areas. ~3kb footprint, no dependencies
Stars: ✭ 176 (-0.56%)
Mutual labels:  algorithm
Cheap Ruler Go
📏 cheapruler in Go: fast geodesic measurements
Stars: ✭ 176 (-0.56%)
Mutual labels:  distance

Build Status

smetrics

smetrics is "string metrics".

Package smetrics provides a bunch of algorithms for calculating the distance between strings.

There are implementations for calculating the popular Levenshtein distance (aka Edit Distance or Wagner-Fischer), as well as the Jaro distance, the Jaro-Winkler distance, and more.

How to import

import "github.com/xrash/smetrics"

Documentation

Go to https://pkg.go.dev/github.com/xrash/smetrics for complete documentation.

Example

package main

import (
	"github.com/xrash/smetrics"
)

func main() {
	smetrics.WagnerFischer("POTATO", "POTATTO", 1, 1, 2)
	smetrics.WagnerFischer("MOUSE", "HOUSE", 2, 2, 4)

	smetrics.Ukkonen("POTATO", "POTATTO", 1, 1, 2)
	smetrics.Ukkonen("MOUSE", "HOUSE", 2, 2, 4)

	smetrics.Jaro("AL", "AL")
	smetrics.Jaro("MARTHA", "MARHTA")

	smetrics.JaroWinkler("AL", "AL", 0.7, 4)
	smetrics.JaroWinkler("MARTHA", "MARHTA", 0.7, 4)

	smetrics.Soundex("Euler")
	smetrics.Soundex("Ellery")

	smetrics.Hamming("aaa", "aaa")
	smetrics.Hamming("aaa", "aab")
}
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].