textgen

package
v0.0.0-...-7a0dda3 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SplitText

func SplitText(text string) []string

Types

type Weights

type Weights struct {
	// contains filtered or unexported fields
}

func LoadWeights

func LoadWeights(filename string) (*Weights, error)

func NewWeights

func NewWeights() *Weights

func (*Weights) Add

func (w *Weights) Add(word, next string)

func (*Weights) Predict

func (w *Weights) Predict(word string) string

func (*Weights) Save

func (w *Weights) Save(filename string) error

func (*Weights) Train

func (w *Weights) Train(text string)

Jump to

Keyboard shortcuts

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