Documentation
¶
Overview ¶
Package newton contains elements that can be used for generating a random name (both sound and spelling).
Consonant sounds supported:
b - as pronounced in Beep c - as pronounced in miCe d - as pronounced in Deep f - as pronounced in Fish * - as pronounced in Gate j - as pronounced in Jack k - as pronounced in Kiss l - as pronounced in Lime m - as pronounced in Meat n - as pronounced in Neat p - as pronounced in beeP r - as pronounced in Rise t - as pronounced in Tise v - as pronounced in Vase w - as pronounced in Wine x - as pronounced in Zeal y - as pronounced in Yard
Vowel sounds supported:
@ - as pronounced in At a - as pronounced in Ape ! - as pronounced in Exclaim e - as pronounced in mEAt o - as pronounced in pOke _ - as pronounced in Underscore # - as pronounced in Ubuntu
Using the info above:
the sound for "Silicon" would be: "selek_n"; the sound for "Apple" would be "@p#l".
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Sound_TypeCons byte = 0 Sound_TypeVowl byte = 1 )
Functions ¶
func InitReport ¶
func InitReport() error
Types ¶
type Name ¶
type Name struct {
// contains filtered or unexported fields
}
func Name_Rand ¶ added in v0.3.0
Function Name_Rand () provides a random name (i.e. a name's sound). Argument should be the desired pattern for the name's sound.
Example:
cevecv cve
'c' stands for consonant sound; 'v' stands for vowel sound; 'e' stands for either 'c' or 'v'
In other words, pattern 'ecv' can yield 'et@'.
func (*Name) Polish ¶ added in v0.3.0
func (n *Name) Polish()
Method Polish () modifies a name such that it becomes easier to pronounce.
func (Name) Spelling ¶ added in v0.3.0
Method Spelling () provides English spelling for the name. Its argument should be the number of possible spellings you would like.
If there are as much spelling as you requested, you would get that number of spellings. If there are not as much spelling as you requested, all the ones available would be returned.
type Sound ¶
type Sound struct {
// contains filtered or unexported fields
}
func Sound_Rand ¶ added in v0.3.0
Function Sound_Rand () provides a random sound. The type of sound you want can be optionally supplied as an argument. For a consonant sound: use 'c' as your argument, and for a vowel sound: use 'v'.
sound, err := Sound_Rand ('c')
If you are not bothered about the sound being consonant or vowel, do not supply any argument.
sound, err := Sound_Rand ()