Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wmentor/soundex
Go implementation of the Soundex algorithm.
https://github.com/wmentor/soundex
go go-library golang phonetic-algorithm phonetic-algorithms soundex soundex-algorithm
Last synced: 4 days ago
JSON representation
Go implementation of the Soundex algorithm.
- Host: GitHub
- URL: https://github.com/wmentor/soundex
- Owner: wmentor
- License: mit
- Created: 2021-01-29T18:49:07.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-31T18:51:14.000Z (almost 4 years ago)
- Last Synced: 2024-06-20T16:41:45.823Z (5 months ago)
- Topics: go, go-library, golang, phonetic-algorithm, phonetic-algorithms, soundex, soundex-algorithm
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# soundex
Soundex is a phonetic algorithm for indexing names by sound, as pronounced in English. The goal is for homophones to be encoded to the same representation so that they can be matched despite minor differences in spelling.
This library is a Go implementation of the Soundex algorithm.
# Summary
* Require Go version >= 1.14
* Support two algorithm version
* Work only with English words
* No external dependencies
* MIT license# Install
```plaintext
go get github.com/wmentor/soundex
```# Usage
```golang
package mainimport (
"fmt""github.com/wmentor/soundex"
)func main() {
snd, _ := soundex.New()
fmt.Println(snd.Code("ammonium")) // A555
fmt.Println(snd.Code("implementation")) // I514
fmt.Println(snd.Code("Miller")) // M460
fmt.Println(snd.Code("Muller")) // M460// improved algorithm version
snd, _ = soundex.New(soundex.AlgoImproved)
fmt.Println(snd.Code("morphs")) // M913
fmt.Println(snd.Code("traderworld")) // T969976
fmt.Println(snd.Code("aquaman")) // A588
}
```