-
Notifications
You must be signed in to change notification settings - Fork 2
v2.0.1 Changelog
kesac edited this page Nov 18, 2021
·
2 revisions
- Grapheme positioning and clustering probabilities are now set by calling
WithProbability()
on aSyllableProvider
var g = new NameGenerator()
.UsingProvider(x => x
.WithVowels("ae")
.WithLeadingConsonants("str")
.WithTrailingConsonants("mnl")
.WithProbability(x => x
.LeadingConsonantExists(1.0)
.TrailingConsonantExists(0.20)));
- Weights can now be assigned directly to consonants and vowels to influence their frequency of use
var g = new NameGenerator()
.UsingProvider(x => x
.WithVowels("a").Weight(5) // This vowel will now occur 2.5 times more often than other vowels
.WithVowels("ei").Weight(2)
.WithConsonants("trs"));
- Name mutators have been reimplemented and are now called name
Transformers
. Similarly, Mutations are nowTransforms
and MutationSteps areTransformSteps
. - Transformation frequency is now set by calling
Select()
andChance()
directly on aTransformer
- Weights can now be assigned to transforms to influence their frequency
var g = new NameGenerator()
.UsingProvider(x => x
.WithVowels("ae")
.WithLeadingConsonants("str"))
.UsingTransformer(x => x
.Select(1).Chance(0.5)
.WithTransform(x => x.AppendSyllable("gard")).Weight(2)
.WithTransform(x => x.AppendSyllable("dar")))
.UsingSyllableCount(3);
- Additionally, all
Transforms
are now serializable unless usingExecuteUnserializableAction()
- Name validators are now name
Filters
-
DoNotAllow()
,DoNotAllowEnding()
,DoNotAlllowBeginning()
methods have been added to filters as an alternative to providing regular expressions
var g = new NameGenerator()
.UsingFilter(x => x
.DoNotAllowEnding("j","p","q","w") // Invalidate these awkward endings
.DoNotAllowPattern(@"(\w)\1\1") // Invalidate any sequence of 3 or more identical letters
.DoNotAllowPattern(@"([^aeiouAEIOU])\1\1\1")); // Invalidate any sequence of 4 or more consonants
-
ConfigurationFile
has been replaced with classNameGeneratorSerializer
-
NameGenerator
LimitSyllableCount()
is nowUsingSyllableCount()
- Added
SyllableSet
as first alternative toSyllableProvider
- Syllabore now uses Archigen