Skip to content

Zero dependency Metric Longest Common Subsequence implementation in js.

License

Notifications You must be signed in to change notification settings

nickdeis/metric-lcs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

metric-lcs

Zero dependency Metric Longest Common Subsequence implementation in js.

Usage

npm i metric-lcs

const metriclcs = require("metric-lcs");
console.log(metriclcs("ABDEF", "ABDIF")); //.8

Use case

Longest Common Subsequence is used with diff, so the metric version of it is suitable for comparing larger strings or for comparing likely subsets of strings since it ignores edit distance and lowers the cost of insertion.

Thanks

Special thanks to tdebatty for java-string-similarity, which I used as a reference implementation.

About

Zero dependency Metric Longest Common Subsequence implementation in js.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published