public void GetTagHypotheses() { TestRuntime.AssertXcodeVersion(12, TestRuntime.MinorXcode12APIMismatch); using (var tagger = new NLTagger(NLTagScheme.LexicalClass) { String = Text }) { var dict = tagger.GetTagHypotheses(0, NLTokenUnit.Sentence, NLTagScheme.LexicalClass, nuint.MaxValue); Assert.That(dict.Count, Is.EqualTo(1), "Count"); var item = dict [NLLanguage.Unevaluated]; Assert.That(item, Is.EqualTo(1.0d), "value"); } }
public void GetTagHypotheses_Range() { TestRuntime.AssertXcodeVersion(12, 0); using (var tagger = new NLTagger(NLTagScheme.LexicalClass) { String = Text }) { var dict = tagger.GetTagHypotheses(0, NLTokenUnit.Sentence, NLTagScheme.LexicalClass, nuint.MaxValue, out NSRange range); Assert.That(dict.Count, Is.EqualTo(1), "Count"); var item = dict [NLLanguage.Unevaluated]; Assert.That(item, Is.EqualTo(1.0d), "value"); Assert.That(range.Location, Is.EqualTo((nint)0), "Location"); Assert.That(range.Length, Is.EqualTo((nint)88), "Length"); } }