synth

package
v0.0.0-...-3aebbef Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package synth generates made-up texts and rule sets for tests and benchmarks. The words are generic job title words plus generated pseudo-words; word and text frequencies follow a power law, so a large sample repeats texts and words the way real titles do.

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 not safe for concurrent use.

func New

func New(seed uint64, pseudoWords int) *Generator

New makes a generator whose vocabulary grows with pseudoWords made-up nouns and sectors on top of the fixed lists; more of them means more distinct patterns and texts at scale.

func (*Generator) Exclude

func (g *Generator) Exclude() string

func (*Generator) Rule

func (g *Generator) Rule() string

Rule returns a valid rule that uses most of the syntax.

func (*Generator) Set

func (g *Generator) Set(includes, excludes int) rules.Set

func (*Generator) Text

func (g *Generator) Text() string

Text returns a title-like text of one to six words.

Jump to

Keyboard shortcuts

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