ABB.Swum.UnigramTagger.TagDigits C# (CSharp) Метод

TagDigits() публичный Метод

Tags any word nodes in the given phrase that contain digits.
public TagDigits ( PhraseNode phrase ) : void
phrase ABB.Swum.Nodes.PhraseNode The phrase to tag.
Результат void
        public void TagDigits(PhraseNode phrase)
        {
            if (phrase == null) { return; }

            foreach (var word in phrase.GetPhrase())
            {
                if(Regex.IsMatch(word.Text, @"\d+"))
                {
                    word.Tag = PartOfSpeechTag.Digit;
                }
            }
        }