Documentation ¶
Overview ¶
Package snowball implements a stemmer
Example ¶
package main import ( "fmt" "github.com/tebeka/snowball" ) func main() { fmt.Printf("%d languages\n", len(snowball.Languages())) stemmer, err := snowball.New("english") if err != nil { fmt.Println("error", err) return } defer stemmer.Close() fmt.Println(stemmer.Stem("running")) }
Output: 29 languages run
Index ¶
Examples ¶
Constants ¶
View Source
const ( // Version is the library version Version = "0.7.0" // SnowballVersion is the underlying snowball library version SnowballVersion = "2.2.0" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Stemmer ¶
type Stemmer struct {
// contains filtered or unexported fields
}
Stemmer structure Warning: Stemmers are not goroutine safe, create a stemmer per gorutine or use a pool (such as sync.Pool) to esnure safty.
Click to show internal directories.
Click to hide internal directories.