Skip to content

Commit

Permalink
chore: update README.md
Browse files Browse the repository at this point in the history
* badges
* example use of the package
  • Loading branch information
rotemhoresh authored Sep 30, 2024
1 parent 2848bc1 commit 9b18b41
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# levenshtein

[![Go Reference](https://pkg.go.dev/badge/github.com/rotemhoresh/levenshtein.svg)](https://pkg.go.dev/github.com/rotemhoresh/levenshtein)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Go Report Card](https://goreportcard.com/badge/github.com/rotemhoresh/levenshtein)](https://goreportcard.com/report/github.com/rotemhoresh/levenshtein)


Go implementations for the [Levenshtein Distance](https://en.wikipedia.org/wiki/Levenshtein_distance).

There are existing packages that implement Levenshtein Distance, I have created this package for learning.
Expand All @@ -13,6 +18,22 @@ Implementations:

When using this package, you should use the `Distance` - alias for the Two Rows implementaion.

### Example

Using this package:

```bash
go get github.com/rotemhoresh/levenshtein
```

```go
d := levenshtein.Distance("kitten", "sitting")
fmt.Printf("edit distance between 'kitten' and 'sitting' is %d", d)

// Output:
// edit distance between 'kitten' and 'sitting' is 3
```

## Testing and Benchmarking

Test and Benchmark fucntions are available for all implementations.
Expand Down

0 comments on commit 9b18b41

Please sign in to comment.