Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(vectorizer vectorizer) modulecapabilities.Classifier
Types ¶
type Classifier ¶
type Classifier struct {
// contains filtered or unexported fields
}
func (*Classifier) ClassifyFn ¶
func (c *Classifier) ClassifyFn(params modulecapabilities.ClassifyParams) (modulecapabilities.ClassifyItemFn, error)
func (*Classifier) Name ¶
func (c *Classifier) Name() string
func (*Classifier) ParseClassifierSettings ¶
func (c *Classifier) ParseClassifierSettings(params *models.Classification) error
type ParamsContextual ¶
type ParamsContextual struct { MinimumUsableWords *int32 `json:"minimumUsableWords"` InformationGainCutoffPercentile *int32 `json:"informationGainCutoffPercentile"` InformationGainMaximumBoost *int32 `json:"informationGainMaximumBoost"` TfidfCutoffPercentile *int32 `json:"tfidfCutoffPercentile"` }
func (*ParamsContextual) SetDefaults ¶
func (params *ParamsContextual) SetDefaults()
type TermWithTfIdf ¶
type TfIdfCalculator ¶
type TfIdfCalculator struct {
// contains filtered or unexported fields
}
func NewTfIdfCalculator ¶
func NewTfIdfCalculator(size int) *TfIdfCalculator
func (*TfIdfCalculator) AddDoc ¶
func (c *TfIdfCalculator) AddDoc(doc string) error
func (*TfIdfCalculator) Calculate ¶
func (c *TfIdfCalculator) Calculate()
func (*TfIdfCalculator) GetAllTerms ¶
func (c *TfIdfCalculator) GetAllTerms(docIndex int) []TermWithTfIdf
Click to show internal directories.
Click to hide internal directories.