Open javiaxum opened 10 months ago
Thanks for your interest in the library! Here are my responses to each bug/question:
Coda clusters in the final syllable can be controlled using a combination of WithFinalConsonantSequences()
and OfFinalConsonants()
like so:
var syllables = new SyllableGenerator()
.WithVowels("ae")
.WithLeadingConsonants("srl")
.WithFinalConsonantSequences("th") // "Final consonants" are trailing consonants used in the final syllable only
.WithProbability(x => x
.OfFinalConsonants(1.0, 1.0)); // 100% chance of a final coda, 100% chance the coda is a coda cluster
A NameGenerator
using the SyllableGenerator
above would produce names like Saleth
or Raseth
.
Using a combination of WithTrailingConsonantSequences()
and OfTrailingSequences()
would also work, but the coda cluster th
would appear in the opening and intermediate syllables too. (eg. Sathleth
, Rathseth
)
My sincere apologies: I now realize the wiki is missing information about final consonants and I will ensure the wiki gets updated to include it.
SyllableGenerator
with no vowel graphemes provided return an empty string?In a scenario where a SyllableGenerator
has no vowels defined it should occasionally throw exceptions during syllable generation unless the consonant probability is set to 100% or empty string generation is explicitly permitted.
This would be ok to use:
var syllables = new SyllableGenerator()
.WithLeadingConsonants("srl")
.AllowEmptyStrings(true);
And this would be ok too:
var syllables = new SyllableGenerator()
.WithLeadingConsonants("srl")
.WithProbability(x => x
.OfLeadingConsonants(1)
.OfVowels(0));
Guide 1.1.2 mentions that onset and coda are optional, is that from a linguistic perspective or it is intended to be a constraint for
SyllableGenerator
?
Great question, I need to update 1.1.2 as this is from a linguistic perspective only.
Are vowels intended to be mandatory to specify for
SyllableGenerator
to function?
Vowels are mandatory if the vowel probability is not zero and SyllableGenerator
should throw an exception during generation (ie. when it reaches into the vowel pool and finds no graphemes to use).
Also I noticed that when I try to override...
I agree this is a bug, I will look into it. You should be able to define vowels and clusters only, and have it all appear in the output space without touching the probability table.
3.1 Section has a typo?
Thanks I will get it corrected!
At the end of the section a deprecated
UsingProvider
method is being used.
Thanks! I will also get this corrected!
Edits:
Cheers, just getting started with Syllabore but want to express my appreciation for the authors' work. So far this solution fits my needs the best of all I could find on Github.
This might be a mix of general questions and bug reports here, so I may split them into distinct issues. I did read all the guides on the wiki. My version is 2.3.2.
OfTrailingConsonantIsSequence
function, since this is the only function I found which is able to configure that. Documentation suggests to useOfTrailingConsonants
but then it appears to me I'm unable to assure the syllable does end with a coda cluster at all.A side question there:
Should a
SyllableGenerator
with no vowel graphemes provided return an empty string? Also guide 1.1.2 mentions that onset and coda are optional, is that from a linguistic perspective or it is intended to be a constraint forSyllableGenerator
? Are vowels intended to be mandatory to specify forSyllableGenerator
to function? If I have no probabilities specified forSyllableGenerator
making coda cluster to occur all the time, I get an exception due to an empty string generated as a result.Also I noticed that when I try to override
DefaultSyllableGenerator
(andSyllableGenerator
as well) trailing consonant cluster without specifying the probability, it never returns a syllable containing the coda cluster specified. (And in case of Syllable generator, an empty string is returned as mentioned above).And tiny remarks for the guides:
UsingProvider
method is being used.Thanks for your time!