コード例 #1
0
        public override void Propogate(Context env, object matched, double strength)
        {
            base.Propogate(env, matched, strength);

            if (matched is IParsedPhrase)
            {
                IParsedPhrase matchphr = (IParsedPhrase)matched;
                ((Variable)env.Lookup("%verbx")).Propogate(env, new WordPhrase(verbs.InputToBase(matchphr.Text), "VB"), .5 * strength);
                ((Variable)env.Lookup("%verben")).Propogate(env, new WordPhrase(verbs.ComposePastpart(matchphr.Text), "VBN"), .5 * strength);
                ((Variable)env.Lookup("%verbing")).Propogate(env, new WordPhrase(verbs.ComposePrespart(matchphr.Text), "VBG"), .5 * strength);
                ((Variable)env.Lookup("%verbed")).Propogate(env, new WordPhrase(verbs.ComposePast(matchphr.Text), "VBD"), .5 * strength);
                ((Variable)env.Lookup("%verbs")).Propogate(env, new WordPhrase(verbs.ComposePresent(matchphr.Text), "VBZ"), .5 * strength);
            }
        }