Documentation ¶
Overview ¶
Package normalize provides simlpe normalizer chain
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BASIC_NON_ALPHANUMERIC = regexp.MustCompile(`[^\pL\pN]+`)
Functions ¶
func Normalize ¶
func Normalize(s string, normalizers ...Normalizer) string
Types ¶
type Normalizer ¶
type PorterStemmer ¶
type PorterStemmer struct {
// contains filtered or unexported fields
}
func NewPorterStemmer ¶
func NewPorterStemmer(minimumCharacters int) *PorterStemmer
Create new porter stemmer that stems words with minimum length of minimumCharacters, others are left as is
func (*PorterStemmer) Apply ¶
func (p *PorterStemmer) Apply(s string) string
type RemoveNonAlphanumeric ¶
type RemoveNonAlphanumeric struct{}
func NewRemoveNonAlphanumeric ¶
func NewRemoveNonAlphanumeric() *RemoveNonAlphanumeric
func (*RemoveNonAlphanumeric) Apply ¶
func (l *RemoveNonAlphanumeric) Apply(s string) string
type SpaceBetweenDigits ¶
type SpaceBetweenDigits struct{}
func NewSpaceBetweenDigits ¶
func NewSpaceBetweenDigits() *SpaceBetweenDigits
func (*SpaceBetweenDigits) Apply ¶
func (l *SpaceBetweenDigits) Apply(s string) string
Click to show internal directories.
Click to hide internal directories.