naming

package
v0.0.0-...-72bb7b7 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 8 Imported by: 0

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

	SyllableRestrictions []string

	ConsOrtho  orthoMapping
	VowelOrtho orthoMapping

	Morphemes map[string][]string

	Words generatedWords
}

func BasicLanguage

func BasicLanguage() (lang *Language)

func OrthoLanguage

func OrthoLanguage() (lang *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