doublemarkov

package
v0.0.0-...-1e57096 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2021 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Brain

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

TODO Use a bi-directional markov chain instead of 2 separate chains to lower memory footprint

func (*Brain) Generate

func (brain *Brain) Generate(prompt string) (string, error)

func (*Brain) Init

func (brain *Brain) Init(order int, lengthLimit int)

func (Brain) MarshalJSON

func (brain Brain) MarshalJSON() ([]byte, error)

func (*Brain) Train

func (brain *Brain) Train(data string) error

func (*Brain) UnmarshalJSON

func (brain *Brain) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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