Documentation ¶
Overview ¶
Package vonny transforms text by making it corrupted yet still recognizable.
Translate will transform single piece of text. If more parameter tuning needed, New returns instance of Vonny with custom settings applied
Translate performs NFC transformation to make sure that characters are in same normal form.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Vonny ¶
type Vonny struct {
// contains filtered or unexported fields
}
Vonny corrupts everything you feed to it. Implements transform.Transformer interface so it can be used in transform.Chain.
func New ¶
func New(config VonnyConfig) *Vonny
New returns customized instance of Vonny. Configuration parameters described in VonnyConfig
func (*Vonny) Reset ¶
func (*Vonny) Reset()
Reset does nothing and exists only to correctly implement transform.Transformer interface
type VonnyConfig ¶
type VonnyConfig struct { VowelExcludeRate float64 // control exclusion of vowels (default: 61.1) ExcludeRate float64 // control exclusion of any character (default: 50.0) SwapRate float64 // how often to swap characters instead of delete (default: 50.0) Strength float64 // rate of changes (default: 50.0) Language language.Tag }
VonnyConfig allows to tune transform parameters