Awesome Go

stemmer

CategoryNatural Language Processing
SubcategoryTokenizers
Stars0

Stemmer packages for Go programming language. Includes English and German stemmers

About stemmer

Stemmer package for Go

Stemmer package provides an interface for stemmers and includes English, German and Dutch stemmers as sub-packages:

Installation

English stemmer:

go get github.com/dchest/stemmer/porter2

German stemmer:

go get github.com/dchest/stemmer/german

Dutch stemmer:

go get github.com/dchest/stemmer/dutch

This will also install the top-level stemmer package.

Example

import (
    "github.com/dchest/stemmer/porter2"
    "github.com/dchest/stemmer/german"
    "github.com/dchest/stemmer/dutch"
)

// English.
eng := porter2.Stemmer
eng.Stem("delicious")   // => delici
eng.Stem("deliciously") // => delici

// German.
ger := german.Stemmer
ger.Stem("abhängen")   // => abhang
ger.Stem("abhängiger") // => abhang

// Dutch.
dt := dutch.Stemmer
dt.Stem("lichamelijke") // => licham
dt.Stem("opglimpende")  // => opglimp

Tests

Included test_output.txt and test_voc.txt are from the referenced original implementations, used only when running tests with go test.

License

2-clause BSD-like (see LICENSE and AUTHORS files).

Frequently Asked Questions

What is stemmer?

stemmer is a Natural Language Processing library for the Go programming language. Stemmer packages for Go programming language. Includes English and German stemmers

How do I install stemmer?

Install stemmer with the Go module system using `go get dchest/stemmer`. Check the repository for the current installation instructions.

What category does stemmer belong to?

stemmer is listed under Natural Language Processing, specifically Tokenizers.

← Back to Tokenizers