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

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

Finds the index of the first preposition within the given PhraseNode, starting from the word indicated by startIndex.
private FindFirstPreposition ( PhraseNode parsedName, int startIndex ) : int
parsedName ABB.Swum.Nodes.PhraseNode The PhraseNode to search.
startIndex int The index of the word to start searching for prepositions from.
Результат int
        private int FindFirstPreposition(PhraseNode parsedName, int startIndex)
        {
            for (int i = startIndex; i < parsedName.Size(); i++)
            {
                if (parsedName[i].Tag == PartOfSpeechTag.Preposition) { return i; }
            }
            return -1;
        }