verbatim

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: 2 Imported by: 0

Documentation

Overview

Package verbatim provides a trumpet.Generator that keeps track of training data for the purposes of checking that generated data isn't identical to any piece of training data.

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 is a trumpet.Generator that keeps track of training data. Exist can be called to check whether a string has been given to the Generator.

func New

func New() *Generator

New returns a *Generator.

func (*Generator) Exists

func (g *Generator) Exists(s string) bool

Exists returns a bool indicating whether the given string has already been given to Train.

func (*Generator) Generate

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

Generate panics.

func (*Generator) Train

func (g *Generator) Train(s string)

Train adds the given string to the Generator's internal data structure of strings.

Jump to

Keyboard shortcuts

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