Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
t
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Text::Diff::Sift4

A Perl 6 implementation of the common version of the Sift4 string distance algorithm (https://siderite.dev/blog/super-fast-and-accurate-string-distance.html).

Synopsis

use Text::Diff::Sift4;

say sift4("string1", "string2");
# 1

Description

An algorithm to compute the distance between two strings in O(n).

sift4(Str s1, Str s2, Int maxOffset = 100, Int maxDistance = 100 --> Int)
s1 and s2 are the strings to compare
maxOffset is the number of characters to search for matching letters
maxDistance is the distance at which the algorithm should stop computing the value and just exit (the strings are too different anyway)

Copyright & License

Copyright 2016 Daniel Green.

This module may be used under the terms of the Artistic License 2.0.

About

A Perl 6 implementation of the Sift4 string distance algorithm

Resources

License

Releases

No releases published

Packages

No packages published