https://github.com/tebeka/snowball
Snowball stemmer for Go
https://github.com/tebeka/snowball
golang snowball stemmer
Last synced: 2 months ago
JSON representation
Snowball stemmer for Go
- Host: GitHub
- URL: https://github.com/tebeka/snowball
- Owner: tebeka
- License: mit
- Created: 2012-12-04T06:33:23.000Z (about 13 years ago)
- Default Branch: main
- Last Pushed: 2025-06-10T15:06:16.000Z (7 months ago)
- Last Synced: 2025-08-13T15:10:58.023Z (5 months ago)
- Topics: golang, snowball, stemmer
- Language: C
- Size: 560 KB
- Stars: 47
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-machine-learning - snowball - Snowball Stemmer for Go. (Go / [Tools](#tools-1))
- awesome-machine-learning - snowball - Snowball Stemmer for Go. (Go / Speech Recognition)
- awesome-machine-learning - snowball - Snowball Stemmer for Go. (Go)
- fucking-awesome-machine-learning - snowball - Snowball Stemmer for Go. (Go / [Tools](#tools-1))
- awesome-machine-learning - snowball - Snowball Stemmer for Go. (Go / [Tools](#tools-1))
- awesome-machine-learning - snowball - Snowball Stemmer for Go. (Go / Speech Recognition)
- awesome-machine-learning - snowball - Snowball Stemmer for Go. (Go / [Tools](#tools-1))
- awesome-advanced-metering-infrastructure - snowball - Snowball Stemmer for Go. (Go / Speech Recognition)
README
# [Snowball](http://snowball.tartarus.org/) Stemmer for Go
[](https://pkg.go.dev/github.com/tebeka/snowball)
[](https://github.com/tebeka/snowball/actions?query=workflow%3ATest)
## Usage
```go
package snowball_test
import (
"fmt"
"github.com/tebeka/snowball"
)
func Example() {
stemmer, err := snowball.New("english")
if err != nil {
fmt.Println("error", err)
return
}
defer stemmer.Close()
for _, word := []string{"worked", "working", "works"} {
fmt.Println(stemmer.Stem(word))
}
// Output:
// work
// work
// work
}
```
This project was mostly a learning exercise for me, I don't consider it production quality.
## Installing
`go get github.com/tebeka/snowball@latest`
You will need a C compiler on your machine.
## Development
If you want to update the underlying C library, run `update-c.sh`. Make sure to run the tests after.