public bool IsPastTense(string input) { /* special case were to avoid complications. The past of be is was OR were * and handling two types gets complicated so we special case it here */ if (input == "were" || input == "was") { return(true); } if (verbsData.past_base.ContainsKey(input) || verbsData.pastpart_base.ContainsKey(input)) { return(true); } else { string verb = conjugator.InputToBase(input); string past = conjugator.ComposePast(verb); if (past == input) { return(true); } else { past = conjugator.ComposePastpart(verb); if (past == input) { return(true); } } } return(false); }
// something is transitive if it is not in the intransitive list public bool IsTransitive(string input) { string verb = conjugator.InputToBase(input); return(!verbsData.intransitive.ContainsKey(verb)); }