Пример #1
0
        public PluralInfoLgE(string bayse, string slenderizationTarget)
        {
            this.strength = Strength.Weak;

            string form = bayse;

            form = Opers.Slenderize(form, slenderizationTarget) + "e";

            this.nominative.Add(new Form(form));
            this.genitive.Add(new Form(Opers.Broaden(bayse)));
            this.vocative.Add(new Form(form));
        }
Пример #2
0
        public PluralInfoLgA(string bayse, string broadeningTarget)
        {
            this.strength = Strength.Weak;

            string form = bayse;

            form = Opers.Broaden(form, broadeningTarget) + "a";

            this.nominative.Add(new Form(form));
            this.genitive.Add(new Form(Opers.Broaden(bayse)));
            this.vocative.Add(new Form(form));
        }
Пример #3
0
        public SingularInfoL(string lemma, Gender gender, string broadeningTarget)
        {
            this.gender = gender;
            this.nominative.Add(new Form(lemma));
            this.vocative.Add(new Form(lemma));
            this.dative.Add(new Form(lemma));

            //derive the genitive:
            string form = lemma;

            form = Opers.Broaden(form, broadeningTarget);
            this.genitive.Add(new Form(form));
        }
Пример #4
0
        //Performs irregular broadening: if the base ends in a consonant, and if the vowel cluster immediately before this consonant
        //ends in a slender vowel, then it changes this vowel cluster into the target (the second argument).
        //Note: if the target does not end in a broad vowel, then regular broadening is attempted instead.
        //Note: a base that's already broad passes through unchanged.
        public static string Broaden(string bayse, string target)
        {
            string ret = bayse;

            if (!Regex.IsMatch(target, "[" + Opers.VowelsBroad + "]$"))
            {
                ret = Opers.Broaden(bayse);               //attempt regular broadening instead
            }
            else
            {
                Match match = Regex.Match(bayse, "^(.*?)[" + Opers.Vowels + "]*[" + Opers.VowelsSlender + "]([" + Opers.Cosonants + "]+)$");
                if (match.Success)
                {
                    ret = match.Groups[1].Value + target + match.Groups[2].Value;
                }
            }
            return(ret);
        }
Пример #5
0
        public SingularInfoAX(string lemma, Gender gender, bool syncope, string broadeningTarget)
        {
            this.gender = gender;
            this.nominative.Add(new Form(lemma));
            this.vocative.Add(new Form(lemma));
            this.dative.Add(new Form(lemma));

            //derive the genitive:
            string form = lemma;

            if (syncope)
            {
                form = Opers.Syncope(form);
            }
            form = Opers.Broaden(form, broadeningTarget);
            form = form + "ach";
            this.genitive.Add(new Form(form));
        }
Пример #6
0
        public PluralInfoLgC(string bayse, string slenderizationTarget)
        {
            this.strength = Strength.Weak;

            //generate the genitive:
            string form = Opers.Broaden(bayse);

            this.genitive.Add(new Form(form));

            //generate the vocative:
            form = form + "a";
            this.vocative.Add(new Form(form));

            //generate the nominative:
            form = bayse;
            form = Regex.Replace(form, "ch$", "gh");           //eg. bacach > bacaigh
            form = Opers.Slenderize(form, slenderizationTarget);
            this.nominative.Add(new Form(form));
        }
Пример #7
0
        public SingularInfoA(string lemma, Gender gender, bool syncope, string broadeningTarget)
        {
            this.gender = gender;
            this.nominative.Add(new Form(lemma));
            this.vocative.Add(new Form(lemma));
            this.dative.Add(new Form(lemma));

            //derive the genitive:
            string form = lemma;

            form = Regex.Replace(form, "([" + Opers.VowelsSlender + "])rt$", "$1rth");     //eg. bagairt > bagartha
            form = Regex.Replace(form, "([" + Opers.VowelsSlender + "])nnt$", "$1nn");     //eg. cionnroinnt > cionnranna
            form = Regex.Replace(form, "([" + Opers.VowelsSlender + "])nt$", "$1n");       //eg. canúint > canúna
            if (syncope)
            {
                form = Opers.Syncope(form);
            }
            form = Opers.Broaden(form, broadeningTarget);
            form = form + "a";
            this.genitive.Add(new Form(form));
        }