Example #1
0
        public void GetLinguisticTagsTest()
        {
            var testString = new NSString("Hello Hola Bonjour!");
            var range      = new NSRange(0, testString.Length - 1);

            NSValue[] tokenRanges;
            var       tags = testString.GetLinguisticTags(range, NSLinguisticTagScheme.NameOrLexicalClass, NSLinguisticTaggerOptions.OmitWhitespace, null, out tokenRanges);

            Assert.AreEqual(3, tags.Length, "Tags Length");
        }
Example #2
0
        public void GetLinguisticTagsTest()
        {
            var testString = new NSString("Hello Hola Bonjour!");
            var range      = new NSRange(0, testString.Length - 1);

            NSValue[] tokenRanges;
            var       tags = testString.GetLinguisticTags(range, NSLinguisticTagScheme.NameOrLexicalClass, NSLinguisticTaggerOptions.OmitWhitespace, null, out tokenRanges);
            var       expectedWordCount = 3;

#if __MACOS__
            if (!TestRuntime.CheckSystemVersion(PlatformName.MacOSX, 10, 9))
            {
                expectedWordCount = 4;
            }
#endif
            Assert.AreEqual(expectedWordCount, tags.Length, "Tags Length");
        }