Documentation
¶
Overview ¶
Package paicehusk provides an implementation of the Paice / Husk stemmer, along with a default ruleset for the English Language
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultRules = NewRuleTable(strings.Split(defaultRules, "\n"))
DefaultRules is a default ruleset for the english language.
Functions ¶
func ParseRule ¶
ParseRule parses a rule in the form: |suffix|intact flag|number to strip|Append|Continue flag
Eg, a rule: ht*2. Means if the stem is still intact, strip the suffix th and make no further attempts to stem the word.
Rule nois4j> Means strip the sion suffix, append a j and check for any more rules to follow
Types ¶
type RuleTable ¶
type RuleTable struct {
Table map[string][]*rule
}
RuleTable stores rules based on the final letter of the suffix they act on allowing for easy lookup.
func NewRuleTable ¶
NewRuleTable returns a new RuleTable instance
Click to show internal directories.
Click to hide internal directories.