poem

package
v0.0.0-...-552d52e Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2019 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CharUnknown  = "Unknown"
	CharLinefeed = "Linefeed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ByProbabilityDesc

type ByProbabilityDesc []Char

func (ByProbabilityDesc) Len

func (a ByProbabilityDesc) Len() int

func (ByProbabilityDesc) Less

func (a ByProbabilityDesc) Less(i, j int) bool

func (ByProbabilityDesc) Swap

func (a ByProbabilityDesc) Swap(i, j int)

type Char

type Char struct {
	S           string
	Probability float64
}

func (Char) String

func (c Char) String() string

type Dataset

type Dataset struct {
	Chars map[string]int
	Shis  [][][]int
}

type Generator

type Generator struct {
	Dataset     Dataset
	IndexToChar map[int]string
	// contains filtered or unexported fields
}

func NewGenerator

func NewGenerator(filepath string) (*Generator, error)

func (*Generator) EndOfPoem

func (g *Generator) EndOfPoem() []float64

func (*Generator) GenSeq

func (g *Generator) GenSeq() ([][]float64, []int)

func (*Generator) InputSize

func (g *Generator) InputSize() int

func (*Generator) Linefeed

func (g *Generator) Linefeed() []float64

func (*Generator) OutputSize

func (g *Generator) OutputSize() int

func (*Generator) SortOutput

func (g *Generator) SortOutput(output []float64) []Char

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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