<jupyter_start><jupyter_text>Akina Word GeneratorThis is a basic word generator to help speed up creating new words based on my language's current spec.<jupyter_code>using System.Collections.Generic;
using System.Linq;
string SuffixTrimmer(string word)
{
    var suffixes =  new string[] { "ta", "won", "lu", 
    "ot", "li", "os" };

    foreach(var suffix in suffixes)
        if (word.EndsWith(suffix))
            return word.TrimEnd(suffix.ToCharArray());

    return word;
}

string RngLetters(string letters)
{
    var rng = new Random();
    return new string(Enumerable.Repeat(letters, 1)
        .Select(s => s[rng.Next(s.Length)])
        .ToArray());
}

string RngMoras(string[] moras)
{
    var rng = new Random();
    return moras[rng.Next(moras.Length)];
}

string CVCV(string[] moras, string vowels)
{
    var rng = new Random();
    
    if (rng.NextDouble() > 0.5)
        return $"{RngLetters(vowels)}{RngMoras(moras)}{RngMoras(moras)}";

    return $"{RngMoras(moras)}{RngMoras(moras)}";
}

string CVCVCV(string[] moras, string vowels)
{
    var rng = new Random();
    
    if (rng.NextDouble() > 0.5)
        return $"{RngLetters(vowels)}{RngMoras(moras)}{RngMoras(moras)}{RngMoras(moras)}";

    return $"{RngMoras(moras)}{RngMoras(moras)}{RngMoras(moras)}";
}
var moras = new[] { 
    "da", "de", "do", "du",
    "ga", "ge", "go", "gu", 
    "ya", "ye", "yo", "yu",
    "ma", "me", "mo", "mu",
    "na", "ne", "no", "nu",
    "pa", "pe", "po", "pu", 
    "wa", "we", "wo", "wu",
    "ta", "te", "to", "tu",
    "za", "ze", "zo", "zu" };
var vowels = "aeou";
var FirstSet = new[] { 
    CVCV(moras, vowels),
    CVCVCV(moras, vowels),
    CVCV(moras, vowels),
    CVCVCV(moras, vowels),
    CVCV(moras, vowels),
    CVCVCV(moras, vowels),
    CVCV(moras, vowels),
    CVCVCV(moras, vowels),
};
var SecondSet = new[] {
    CVCVCV(moras, vowels),
    CVCV(moras, vowels),
    CVCVCV(moras, vowels),
    CVCV(moras, vowels),
    CVCVCV(moras, vowels),
    CVCV(moras, vowels),
    CVCVCV(moras, vowels),
    CVCV(moras, vowels),
};
var ThirdSet = new[] {
    RngMoras(moras),
    RngMoras(moras),
    RngMoras(moras),
    RngMoras(moras),
    RngMoras(moras),
    RngMoras(moras),
};
foreach (var word in FirstSet)
    Console.WriteLine(word);
foreach (var word in SecondSet)
    Console.WriteLine(word);
foreach (var word in ThirdSet)
    Console.WriteLine(word);<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18227009113504558, 'fraction_numerical': 0.002071251035625518, 'mean_word_length': 3.5480225988700567, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '542151', 'license': 'CC0-1.0', 'n_tokens_mistral': 1027, 'n_tokens_neox': 953, 'n_words': 209, 'path': 'notebooks/wordgen.ipynb', 'repo_name': 'tonytins/akina', 'size': '2414'}