markov

package module
v0.0.0-...-d8f1f84 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2017 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-markov_chain_Japanese

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data interface {
	Add(mecabs.PhraseString)
	Generate(int) mecabs.PhraseString
}

type DataMap

type DataMap struct {
	Order       int
	FirstPrefix prefix
	Chain       map[string][]mecabs.MorphemeString
	// contains filtered or unexported fields
}

func NewDataMap

func NewDataMap(order int) DataMap

func (*DataMap) Add

func (d *DataMap) Add(ps mecabs.PhraseString)

func (*DataMap) Generate

func (d *DataMap) Generate(length int) mecabs.PhraseString

type Markov

type Markov struct {
	MeCabS *mecabs.MeCabS
	Data   Data
}

func New

func New(m *mecabs.MeCabS, d Data) Markov

func (*Markov) Add

func (m *Markov) Add(s string) error

func (*Markov) Generate

func (m *Markov) Generate(length int) mecabs.Phrase

Jump to

Keyboard shortcuts

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