naming

package
v0.0.0-...-80299db Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultSyllableStructures = structureList{
	"CVC",
	"CVV?C",
	"CVVC?", "CVC?", "CV", "VC", "CVF", "C?VC", "CVF?",
	"CL?VC", "CL?VF", "S?CVC", "S?CVF", "S?CVC?",
	"C?VF", "C?VC?", "C?VF?", "C?L?VC", "VC",
	"CVL?C?", "C?VL?C", "C?VLC?",
}

Functions

func RandomRange

func RandomRange(min, max int) int

func RandomRuneFromString

func RandomRuneFromString(str string) string

Types

type Language

type Language struct {
	ApplyOrtho           bool
	ApplyMorph           bool
	Phonemes             map[string]string
	Morphemes            map[string][]string
	SyllableRestrictions []string
	ConsOrtho            orthoMapping
	VowelOrtho           orthoMapping
	Words                generatedWords
}

func BasicLanguage

func BasicLanguage() *Language

func OrthoLanguage

func OrthoLanguage() *Language

func RandomLanguage

func RandomLanguage(ortho bool, morph bool) (lang *Language)

func (Language) Describe

func (lang Language) Describe()

func (*Language) GetWord

func (lang *Language) GetWord(p *WordParams, group string) (word string)

func (*Language) MakeName

func (lang *Language) MakeName(params *NameParams) (name string)

type NameParams

type NameParams struct {
	MinLength  int
	MaxLength  int
	WordParams *WordParams
	Joiners    string
	Group      string
}

type WordParams

type WordParams struct {
	MinSyllables int
	MaxSyllables int
	Structure    structureList
}

Jump to

Keyboard shortcuts

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