Skip to content

An efficient implementation of the German porter-stemming algorithm in Golang.

License

Notifications You must be signed in to change notification settings

antonbaumann/german-go-stemmer

Repository files navigation

Build Status codecov Go Report Card

German Go Stemmer

An efficient implementation of the German stemming algorithm from snowballstem.org in Golang that does not need any dependency.

Install

go get -u "github.com/antonbaumann/german-go-stemmer"

then import it

import "github.com/antonbaumann/german-go-stemmer"

Usage

You can stem queries

stemmed := stemmer.Stem("wie wird das wetter morgen in münchen")
// "wett morg munch"

or just words one by one

stemmed := stemmer.StemWord("kategorischen")
// "kategor"

or multiple keywords

stemmed := stemmer.StemWords([]string{"kategorisch", "kategorische", "kategorischen"})
// []string {"kategor", "kategor", "kategor"}