예제 #1
0
        public static string ConjugateToTense(Memory memory, string verb, Verbs.Person person, Concept right, Verbs verbs)
        {
            if (right == memory.past)
            {
                return(verbs.ComposePersonable(verb, person, Verbs.Convert.ext_Ved));
            }
            if (right == memory.now)
            {
                return(verbs.ComposePersonable(verb, person, Verbs.Convert.ext_Vs));
            }
            if (right == memory.future)
            {
                return("will " + verbs.ComposePersonable(verb, person, Verbs.Convert.ext_V));
            }

            List <string> parts    = StringUtilities.SplitWords(right.Name, true);
            bool          usedverb = false;

            for (int ii = 0; ii < parts.Count; ii++)
            {
                if (parts[ii] == "en")
                {
                    parts[ii] = verbs.ComposePersonable(verb, person, Verbs.Convert.ext_Ven);
                    usedverb  = true;
                }
                else if (parts[ii] == "ing")
                {
                    parts[ii] = verbs.ComposePersonable(verb, person, Verbs.Convert.ext_Ving);
                    usedverb  = true;
                }
            }
            if (!usedverb)
            {
                parts.Add(verbs.InputToBase(verb));
            }
            return(StringUtilities.JoinWords(parts));
        }