lexvec

package
v0.0.0-...-ba2758a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lexvec

type Lexvec struct {
	*model.Option
	*LexvecOption
	*corpus.CountModelCorpus
	// contains filtered or unexported fields
}

Lexvec stores the configs for Lexvec models.

func NewLexvec

func NewLexvec(option *model.Option, lexvecOption *LexvecOption) *Lexvec

NewLexvec create *Lexvec.

func (*Lexvec) Get

func (l *Lexvec) Get() (map[string][]float64, error)

func (*Lexvec) Save

func (l *Lexvec) Save(outputPath string) error

func (*Lexvec) Train

func (l *Lexvec) Train(f io.Reader) error

Train trains words' vector on corpus.

type LexvecOption

type LexvecOption struct {
	NegativeSampleSize int
	SubSampleThreshold float64
	Theta              float64
	Smooth             float64
	RelationType       corpus.RelationType
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL