stemmer

package module
Version: v0.0.0-...-66719a2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2016 License: BSD-2-Clause Imports: 0 Imported by: 1

README

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

Documentation

Overview

Package stemmer declares Stemmer interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stemmer

type Stemmer interface {
	Stem(s string) string
}

Source Files

Directories

Path Synopsis
Package dutch implements Dutch stemmer, as described in http://snowball.tartarus.org/algorithms/dutch/stemmer.html
Package dutch implements Dutch stemmer, as described in http://snowball.tartarus.org/algorithms/dutch/stemmer.html
Package german implements German stemmer, as described in http://snowball.tartarus.org/algorithms/german/stemmer.html
Package german implements German stemmer, as described in http://snowball.tartarus.org/algorithms/german/stemmer.html
Package porter2 implements English (Porter2) stemmer, as described in http://snowball.tartarus.org/algorithms/english/stemmer.html
Package porter2 implements English (Porter2) stemmer, as described in http://snowball.tartarus.org/algorithms/english/stemmer.html

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL