Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Filter ¶
Filter removes elements from the input slice where the supplied predicate is satisfied
func IsNotStopWord ¶
IsNotStopWord is the inverse function of IsStopWord
func IsStopWord ¶
IsStopWord performs a binary search against a list of known english stop words returns true if v is a stop word; false otherwise
Types ¶
type Classifier ¶
type Classifier interface { // Train allows clients to train the classifier Train(io.Reader, string) error // TrainString allows clients to train the classifier using a string TrainString(string, string) error // Classify performs a classification on the input corpus and assumes that // the underlying classifier has been trained. Classify(io.Reader) (string, error) // ClassifyString performs text classification using a string ClassifyString(string) (string, error) }
Classifier provides a simple interface for different text classifiers
type Tokenizer ¶ added in v0.3.0
type Tokenizer interface { // Tokenize breaks the provided document into a token slice Tokenize(r io.Reader) chan string }
Tokenizer provides a common interface to tokenize documents
func NewRegexTokenizer ¶ added in v0.3.0
func NewRegexTokenizer() Tokenizer
NewRegexTokenizer initializes a new regular expression Tokenizer instance
func NewTokenizer ¶ added in v0.3.0
func NewTokenizer() Tokenizer
NewTokenizer initializes a new standard Tokenizer instance
Click to show internal directories.
Click to hide internal directories.