fuzzy-score
v1.0.0
Published
Fuzzy score typescript implementation
Downloads
16
Maintainers
Readme
Fuzzy Score in Typescript
Fuzzy Score algorithm implementation
- Used to find the similarity of the strings
- A higher score indicates a higher similarity
- This package mainly converted from org.apache.commons.text.similarity.FuzzyScore
Install
npm install -S fuzzy-score
Usage
import fuzzyScore from "fuzzy-score";
fuzzyScore('', '');
// 0
fuzzyScore('Workshop', 'b');
// 0
fuzzyScore('Room', 'o');
// 1
fuzzyScore('Workshop', 'w');
// 1
fuzzyScore('Workshop', 'ws');
// 2
fuzzyScore('Workshop', 'wo');
// 4