multi

package
v0.0.0-...-cc2f434 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2018 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package multi provides a trumpet.Generator that multiplexes training data over multiple trumpet.Generators.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

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

Generator multiplexes given data over several trumpet.Generators and generates data from the specified trumpet.Generator.

func New

func New() *Generator

New returns a *Generator.

func (*Generator) AddTrainer

func (g *Generator) AddTrainer(trainer trumpet.Generator)

AddTrainer adds a new trumpet.Generator to the list of trainers that will be given data passed to Train.

func (*Generator) Generate

func (g *Generator) Generate(maxLength int) string

Generate returns the string generated by the trumpet.Generator set by SetGenerator.

func (*Generator) SetGenerator

func (g *Generator) SetGenerator(generator trumpet.Generator)

SetGenerator sets the trumpet.Generator that will generate the string returned by Generate. The generator should also be passed to AddTrainer to make sure its gets the training data as well.

func (*Generator) Train

func (g *Generator) Train(s string)

Train calls the Train method on all trumpet.Generators given by the AddTrainer method calls.

Jump to

Keyboard shortcuts

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