コード例 #1
0
        static string FirstPersonIndicativeStem(string infinitive)
        {
            string stem = infinitive.Substring(0, infinitive.Length - 2);

            Tense         t  = Tenses.Find(o => o.conjugation == Conjugation.Present);
            IrregularVerb iv = t.irregularVerbs.Find(o => o.m_infinitive == infinitive);

            if (iv != null)
            {
                IrregularConjugation c = iv.m_conjugations.Find(o => o.m_person == Person.firstPersonSingular);
                stem = c.m_conjugatedVerb.Substring(0, c.m_conjugatedVerb.Length - 1);
            }

            return(stem);
        }
コード例 #2
0
        static string ThirdPersonPluralPreteriteStem(string infinitive)
        {
            string stem = infinitive.Substring(0, infinitive.Length - 2);

            Tense         t  = Tenses.Find(o => o.conjugation == Conjugation.Preterite);
            IrregularVerb iv = t.irregularVerbs.Find(o => o.m_infinitive == infinitive);

            if (iv != null)
            {
                IrregularConjugation c = iv.m_conjugations.Find(o => o.m_person == Person.thirdPersonPlural);
                stem = c.m_conjugatedVerb.Substring(0, c.m_conjugatedVerb.Length - 2);
            }

            return(stem);
        }
コード例 #3
0
ファイル: Verbs.cs プロジェクト: DougHoople/fc
        static string conjugateIrregularVerb(string infinitive, PersonalPronoun pronoun, Conjugation conjugation)
        {
            string conjugatedVerb = null;
            Tense  tense          = Tenses.Find(o => o.conjugation == conjugation);
            List <IrregularVerb> irregularVerbs = tense.irregularVerbs;
            // not guaranteed to find
            IrregularVerb v = irregularVerbs.Find(o => o.m_infinitive == infinitive);

            if (v != null)
            {
                // guaranteed to find
                IrregularConjugation c = v.m_conjugations.Find(o => o.m_person == pronoun.person);
                conjugatedVerb = c.m_conjugatedVerb;
            }
            return(conjugatedVerb);
        }