Ejemplo n.º 1
0
        public Phoneme GetPhoneme(string rawAlias)
        {
            // HACK: can't find how to escape ~ in yaml
            var alias   = rawAlias ?? "~";
            var phoneme = Phonemes.Find(n => n.Alias == alias);

            if (phoneme is null)
            {
                phoneme = new Consonant(alias);
                Phonemes.Add(phoneme);
                Consonants.Add(phoneme);
            }
            var clone = phoneme.Clone();

            return(clone);
        }
Ejemplo n.º 2
0
        public Recline(Reclist reclist, string name, List <Phoneme> phonemes, string description) : this(reclist, name)
        {
            Description = description;

            Phonemes.Add(Rest.Create(this));
            foreach (var phoneme in phonemes)
            {
                Phonemes.Add(phoneme);
                PhonemesRaw.Add(phoneme);
            }
            Phonemes.Add(Rest.Create(this));

            Vowels     = Phonemes.Where(n => n.IsVowel).ToList();
            Consonants = Phonemes.Where(n => n.IsConsonant).ToList();
            Rests      = Phonemes.Where(n => n.IsRest).ToList();

            IsEnabled = true;
        }