// private IEnumerable <Verb> GetTestVerbs() { Inflections inflections = new Inflections(); inflections.Yo = "abro"; inflections.El = "abre"; inflections.Tu = "abres"; inflections.Ellos = "abren"; inflections.Nos = "abremos"; inflections.Vos = "abreis"; var verb = new Verb(); //verb.Name = "abrir"; verb.Modo = "Indicativo"; verb.Tense = "Presente"; verb.Inflections = inflections; yield return(verb); }
/// <summary>Stub. Get the proper inflection for the passed-in verb, which is presumably in its root form.</summary> public static string FormOf(this string verb, Inflections inflection) { // first of all, for the verb "is", handle it separately // (note that "is" does exist in the FindVerb list as the first element, but it's obviously missing a few forms) if (new List <string> { "is", "are", "am", "be", "was", "were", "being", "been" }.Contains(verb)) { switch (inflection) { case Inflections.root: return("were"); // whatever case Inflections.infinitive: return("to be"); case Inflections.singular: return("is"); case Inflections.plural: return("are"); case Inflections.past: return("was"); // one of them, anyway case Inflections.present_participal: return("being"); case Inflections.past_participal: return("been"); default: return("am"); } } // second, is it one of the irregular ones that have all five forms? fiveforms f5 = FindVerb(verb); if (f5 != null) { switch (inflection) { case Inflections.singular: return(f5.singular); case Inflections.plural: return(f5.plural); case Inflections.past: return(f5.past); case Inflections.present_participal: return(f5._ing); case Inflections.past_participal: return(f5._en); } } // for now, make stuff up switch (inflection) { case Inflections.root: return(verb); // used for the imperative invocation case Inflections.infinitive: return("to " + verb); // used for the infinitive definition case Inflections.singular: return(verb + "s"); // used for relations case Inflections.plural: return(verb); // used for relations case Inflections.past: return(verb + "ed"); case Inflections.present_participal: return(verb + "ing"); // used for continuous tense & for gerund (noun phrase) case Inflections.past_participal: return(verb + "n"); // used for perfect tense & for adjective } return(verb); }