lexvec

package
v0.0.0-...-16eb04b Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadForCmd

func LoadForCmd(cmd *cobra.Command, opts *Options)

func New

func New(opts ...ModelOption) (model.Model, error)

func NewForOptions

func NewForOptions(opts Options) (model.Model, error)

Types

type ModelOption

type ModelOption func(*Options)

func BatchSize

func BatchSize(v int) ModelOption

func Dim

func Dim(v int) ModelOption

func DocInMemory

func DocInMemory() ModelOption

func Goroutines

func Goroutines(v int) ModelOption

func Initlr

func Initlr(v float64) ModelOption

func Iter

func Iter(v int) ModelOption

func LogBatch

func LogBatch(v int) ModelOption

func MaxCount

func MaxCount(v int) ModelOption

func MinCount

func MinCount(v int) ModelOption

func MinLR

func MinLR(v float64) ModelOption

func NegativeSampleSize

func NegativeSampleSize(v int) ModelOption

func Relation

func Relation(typ RelationType) ModelOption

func Smooth

func Smooth(v float64) ModelOption

func SubsampleThreshold

func SubsampleThreshold(v float64) ModelOption

func ToLower

func ToLower() ModelOption

func UpdateLRBatch

func UpdateLRBatch(v int) ModelOption

func Verbose

func Verbose() ModelOption

func Window

func Window(v int) ModelOption

type Options

type Options struct {
	BatchSize          int
	Dim                int
	DocInMemory        bool
	Goroutines         int
	Initlr             float64
	Iter               int
	LogBatch           int
	MaxCount           int
	MinCount           int
	MinLR              float64
	NegativeSampleSize int
	RelationType       RelationType
	Smooth             float64
	SubsampleThreshold float64
	ToLower            bool
	UpdateLRBatch      int
	Verbose            bool
	Window             int
}

func DefaultOptions

func DefaultOptions() Options

type RelationType

type RelationType = string
const (
	PPMI           RelationType = "ppmi"
	PMI            RelationType = "pmi"
	Collocation    RelationType = "co"
	LogCollocation RelationType = "logco"
)

Jump to

Keyboard shortcuts

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