ABB.Swum.UnigramMethodRule.GetVerbPhrase C# (CSharp) Метод

GetVerbPhrase() приватный Метод

Finds all the verbs in the given name and adds them to the given preamble.
private GetVerbPhrase ( PhraseNode parsedName, PhraseNode preamble ) : PhraseNode
parsedName ABB.Swum.Nodes.PhraseNode The PhraseNode to gets the verbs from.
preamble ABB.Swum.Nodes.PhraseNode The preamble PhraseNode to add the verbs to.
Результат ABB.Swum.Nodes.PhraseNode
        private PhraseNode GetVerbPhrase(PhraseNode parsedName, PhraseNode preamble)
        {
            //TODO: should this make a copy of the preamble first?
            PhraseNode phrase = preamble;
            foreach (WordNode word in parsedName.GetPhrase())
            {
                if (word.Tag == PartOfSpeechTag.Verb
                    || word.Tag == PartOfSpeechTag.VerbModifier
                    || word.Tag == PartOfSpeechTag.VerbParticle
                    || word.Tag == PartOfSpeechTag.NonVerb
                    || word.Tag == PartOfSpeechTag.VerbIgnorable)
                {
                    phrase.Add(word);
                }
            }
            return phrase;
        }