Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 german
Octocat-spinner-32 porter2
Octocat-spinner-32 AUTHORS
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 stemmer.go
README.md

Stemmer package for Go

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

Installation

English stemmer:

go get github.com/dchest/stemmer/porter2

German stemmer:

go get github.com/dchest/stemmer/german

This will also install the top-level stemmer package.

Example

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

// 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

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).

Something went wrong with that request. Please try again.