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

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

Determines whether the specified word in the given phrase is an ignorable verb. If so, it tags it appropriately.
private CheckForIgnorableVerb ( PhraseNode parsedName, int wordIndex ) : int
parsedName ABB.Swum.Nodes.PhraseNode The PhraseNode containing the word to check.
wordIndex int The index of the desired word within the PhraseNode.
Результат int
        private int CheckForIgnorableVerb(PhraseNode parsedName, int wordIndex)
        {
            if (wordIndex < parsedName.Size() - 1 //make sure last word in name is verb
                && (PosData.IsIgnorableVerb(parsedName[wordIndex].Text)
                    && (PositionalFrequencies.GetVerbProbability(parsedName[wordIndex + 1].Text) > PositionalFrequencies.GetNounProbability(parsedName[wordIndex + 1].Text))
                    || PosData.IsModalVerb(parsedName[wordIndex].Text))
                )
            {
                parsedName[wordIndex].Tag = PartOfSpeechTag.VerbIgnorable;
                wordIndex++;
            }
            return wordIndex;
        }