markov

package module
v2.0.0-...-8d6b7a8 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2021 License: MIT Imports: 2 Imported by: 0

README

Go-Markov

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graph

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

Graph is the generic holder of all of the data for a certain graph of words needed to generate a markov chain.

func (*Graph) GenerateMarkovString

func (graph *Graph) GenerateMarkovString() string

GenerateMarkovString generates a random string based off of the current model in the graph.

func (*Graph) LoadPhrase

func (graph *Graph) LoadPhrase(phrase string)

LoadPhrase loads a whole phrase (be it a sentence, single word that someone said, or paragraph) into the graph. Splits the phrase along spaces in order to load each word into the chain.

Jump to

Keyboard shortcuts

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