Documentation ¶
Index ¶
Constants ¶
View Source
const ( Good = "Good" Bad = "Bad" Neutral = "Neutral" ClassIdxOfGood = 0 ClassIdxOfBad = 1 Threshold = 0.01 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BayesianAnalyzer ¶
type BayesianAnalyzer struct {
// contains filtered or unexported fields
}
func NewBayesianAnalyzer ¶
func NewBayesianAnalyzer(traningDataFilePath string, dictDataFilePath string) (*BayesianAnalyzer, error)
func (*BayesianAnalyzer) Explain ¶
func (ba *BayesianAnalyzer) Explain(text string) WordFreqList
func (*BayesianAnalyzer) Learn ¶
func (ba *BayesianAnalyzer) Learn(text, class string)
func (*BayesianAnalyzer) Test ¶
func (ba *BayesianAnalyzer) Test(text string) string
type DelayedUpdater ¶
type DelayedUpdater struct {
// contains filtered or unexported fields
}
func NewDelayedUpdater ¶
func NewDelayedUpdater(classifier *bayesian.Classifier, traningDataFilePath string, updateDelay time.Duration, coordinator *sync.RWMutex) *DelayedUpdater
func (*DelayedUpdater) Update ¶
func (bu *DelayedUpdater) Update()
type WordFreqList ¶
type WordFreqList []WordFreq
func (WordFreqList) String ¶
func (wfl WordFreqList) String() string
Click to show internal directories.
Click to hide internal directories.