text

package
v0.0.0-...-0da26dc Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package text contains functions needed to generate random sentences.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator interface {
	// Sentences generates n sentences.
	Sentences(int) []string
}

Generator is a generator of text.

type NounGenerator

type NounGenerator struct {
	Nouns []string
}

NounGenerator generates text by concatenating nouns.

func (*NounGenerator) Sentences

func (g *NounGenerator) Sentences(n int) []string

Sentences returns an array of n random sentences.

Jump to

Keyboard shortcuts

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