protected object DecideValue(object defval, object[] args) { Datum start = (Datum)args[0]; Datum noundat = KnowledgeUtilities.GetClosestDatum(memory, start, nounrel); Datum tensedat = KnowledgeUtilities.GetClosestDatum(memory, start, Relations.Relation.Tense); if (noundat.Left.IsEvent) { Verbs.Person person; if (noundat != null) { person = nouns.GetPerson(noundat.Right.Name); } else { person = Verbs.Person.ThirdSingle; } // Conjugate this verb accordingly string conjugated = Relations.ConjugateToTense(memory, tensedat.Left.Name, person, tensedat.Right, verbs); return(new WordPhrase(conjugated, "VB")); } return(defval); }
public override IParsedPhrase ConceptToPhrase(Context context, Concept concept, POSTagger tagger, GrammarParser parser) { Verbs.Person person = Verbs.Person.ThirdSingle; object start = context.LookupDefaulted <object>("$check", null); if (start != null && start is Datum) { Datum noundat = KnowledgeUtilities.GetClosestDatum(memory, (Datum)start, Relations.Relation.Subject); person = nouns.GetPerson(noundat.Right.Name); } return(Relations.ConjugateToPhrase(memory, conjugate, person, concept)); }