Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cbow ¶
type Cbow struct {
// contains filtered or unexported fields
}
Cbow behaviors as one of Word2vec solver.
type HierarchicalSoftmax ¶
type HierarchicalSoftmax struct { *SigmoidTable // contains filtered or unexported fields }
HierarchicalSoftmax is a piece of Word2Vec optimizer.
func NewHierarchicalSoftmax ¶
func NewHierarchicalSoftmax(maxDepth int) *HierarchicalSoftmax
NewHierarchicalSoftmax creates *HierarchicalSoftmax.
type Model ¶
type Model interface {
// contains filtered or unexported methods
}
Model is the interface to train a word vector.
type NegativeSampling ¶
type NegativeSampling struct { *SigmoidTable ContextVector []float64 // contains filtered or unexported fields }
NegativeSampling is a piece of Word2Vec optimizer.
func NewNegativeSampling ¶
func NewNegativeSampling(sampleSize int) *NegativeSampling
NewNegativeSampling creates *NegativeSampling.
type Optimizer ¶
type Optimizer interface {
// contains filtered or unexported methods
}
Optimizer is the interface to initialize after scanning corpus once, and update the word vector.
type OptimizerType ¶
type OptimizerType int
const ( NEGATIVE_SAMPLING OptimizerType = iota HIERARCHICAL_SOFTMAX )
func (OptimizerType) String ¶
func (t OptimizerType) String() string
type SigmoidTable ¶
type SigmoidTable struct {
// contains filtered or unexported fields
}
SigmoidTable stores the values of sigmoid function.
type SkipGram ¶
type SkipGram struct {
// contains filtered or unexported fields
}
SkipGram behaviors as one of Word2vec solver.
func NewSkipGram ¶
NewSkipGram creates *SkipGram
type Word2vec ¶
type Word2vec struct { *model.Option *Word2vecOption *corpus.Word2vecCorpus // contains filtered or unexported fields }
Word2vec stores the configs for Word2vec models.
func NewWord2vec ¶
func NewWord2vec(option *model.Option, word2vecOption *Word2vecOption) *Word2vec
NewWord2vec creates *Word2Vec.
Click to show internal directories.
Click to hide internal directories.