Skip to content

Commit

Permalink
test: add tests and code coverage
Browse files Browse the repository at this point in the history
Signed-off-by: SphericalKat <[email protected]>
  • Loading branch information
SphericalKat committed Mar 28, 2021
1 parent 3689312 commit c316f47
Show file tree
Hide file tree
Showing 7 changed files with 469 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@
.pub/
build/

.vscode
.vscode

test/.test_coverage.dart
coverage
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# FuzzyWuzzy

![Coverage](https://raw.githubusercontent.com/{sphericalkat}/{dart-fuzzywuzzy}/master/coverage_badge.svg?sanitize=true)

This is a dart port of the popular [FuzzyWuzzy](https://github.com/seatgeek/fuzzywuzzy) python package. This algorithm uses [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) to calculate similarity between strings.

I personally needed to use this for my own search algorithms, and there weren't any packages as good as my experience with FuzzyWuzzy was, so here we are. Enjoy!
Expand Down
20 changes: 20 additions & 0 deletions coverage_badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion example/fuzzywuzzy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ void main() {

// Token sort ratio
print(tokenSortPartialRatio("order words out of", "words out of order"));
print(tokenSortRatio("order words out of", " words out of order"));
print(tokenSortRatio("order words out of", "words out of order"));

// Token set ratio
print(tokenSetRatio("fuzzy was a bear", "fuzzy fuzzy fuzzy bear"));
Expand Down
Loading

0 comments on commit c316f47

Please sign in to comment.