https://github.com/caneroj1/stemmer
A library in golang that implements the PorterStemmer algorithm for stemming words.
https://github.com/caneroj1/stemmer
Last synced: about 1 month ago
JSON representation
A library in golang that implements the PorterStemmer algorithm for stemming words.
- Host: GitHub
- URL: https://github.com/caneroj1/stemmer
- Owner: caneroj1
- License: mit
- Created: 2015-10-18T16:19:20.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-28T03:58:09.000Z (over 8 years ago)
- Last Synced: 2025-03-25T10:42:18.248Z (about 2 months ago)
- Language: Go
- Size: 15.6 KB
- Stars: 35
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stemmer
A library in golang that implements the PorterStemmer algorithm for stemming words.## usage
```go
package mainimport "github.com/caneroj1/stemmer"
func main() {
str := "running"// stem a single word
stem := stemmer.Stem(str)// stem = RUN
strings := []string{
"playing",
"skies",
"singed",
}// stem a list of words
stems := stemmer.StemMultiple(strings)// stems = [PLAI SKI SIN]
// stem a list of words in place, modifying the original slice
stemmer.StemMultipleMutate(strings)
// strings = [PLAI SKI SIN]
// stem a list of words concurrently. this also stems in place, modifying
// the original slice.
// NOTE: the order of the strings is not guaranteed to be the same.
stemmer.StemConcurrent(strings)// strings = [PLAI SKI SIN]
}
```