Platforms to show: All Mac Windows Linux Cross-Platform
NSLinguisticTaggerMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The NSLinguisticTaggerMBS class provides a uniform interface to a variety of natural language processing functionality with support for many different languages and scripts. You can use NSLinguisticTaggerMBS to segment natural language text into paragraphs, sentences, or words, and tag information about those tokens, such as part of speech, lexical class, lemma, script, and language.
When you create a linguistic tagger, you specify what kind of information you're interested in by passing one or more
NSLinguisticTagScheme values. Set the string property to the natural language text you want to analyze, and the linguistic tagger processes it according to the specified tag schemes. You can then enumerate over the tags in a specified range, using the methods described in Enumerating Linguistic Tags, to get the information requested for a given scheme and unit.
- 3 properties
- property dominantLanguage as String
- property Handle as Integer
- property Text as String
- 10 methods
- method Constructor(tagSchemes() as String, options as integer = 0)
- method orthographyAtIndex(charIndex as integer, byref effectiveRange as NSRangeMBS) as NSOrthographyMBS
- method sentenceRangeForRange(range as NSRangeMBS) as NSRangeMBS
- method setOrthography(orthography as NSOrthographyMBS, range as NSRangeMBS)
- method tagAtIndex(charIndex as Integer, Scheme as String, byref tokenRange as NSRangeMBS, byref sentenceRange as NSRangeMBS) as String
- method tagAtIndex(charIndex as Integer, unit as Integer, Scheme as String, byref tokenRange as NSRangeMBS) as String
- method tagSchemes as String()
- method tagsInRange(range as NSRangeMBS, Scheme as String, options as Integer) as NSLinguisticValueMBS()
- method tagsInRange(range as NSRangeMBS, unit as Integer, Scheme as String, options as Integer) as NSLinguisticValueMBS()
- method tokenRangeAtIndex(charIndex as Integer, Unit as Integer) as NSRangeMBS
- 43 shared methods
- shared method availableTagSchemesForLanguage(Language as String) as String()
- shared method availableTagSchemesForUnit(unit as Integer, Language as String) as String()
- shared method dominantLanguageForString(text as String) as String
- shared method NSLinguisticTagAdjective as String
- shared method NSLinguisticTagAdverb as String
- shared method NSLinguisticTagClassifier as String
- shared method NSLinguisticTagCloseParenthesis as String
- shared method NSLinguisticTagCloseQuote as String
- shared method NSLinguisticTagConjunction as String
- shared method NSLinguisticTagDash as String
- shared method NSLinguisticTagDeterminer as String
- shared method NSLinguisticTagIdiom as String
- shared method NSLinguisticTagInterjection as String
- shared method NSLinguisticTagNoun as String
- shared method NSLinguisticTagNumber as String
- shared method NSLinguisticTagOpenParenthesis as String
- shared method NSLinguisticTagOpenQuote as String
- shared method NSLinguisticTagOrganizationName as String
- shared method NSLinguisticTagOther as String
- shared method NSLinguisticTagOtherPunctuation as String
- shared method NSLinguisticTagOtherWhitespace as String
- shared method NSLinguisticTagOtherWord as String
- shared method NSLinguisticTagParagraphBreak as String
- shared method NSLinguisticTagParticle as String
- shared method NSLinguisticTagPersonalName as String
- shared method NSLinguisticTagPlaceName as String
- shared method NSLinguisticTagPreposition as String
- shared method NSLinguisticTagPronoun as String
- shared method NSLinguisticTagPunctuation as String
- shared method NSLinguisticTagSchemeLanguage as String
- shared method NSLinguisticTagSchemeLemma as String
- shared method NSLinguisticTagSchemeLexicalClass as String
- shared method NSLinguisticTagSchemeNameType as String
- shared method NSLinguisticTagSchemeNameTypeOrLexicalClass as String
- shared method NSLinguisticTagSchemeScript as String
- shared method NSLinguisticTagSchemeTokenType as String
- shared method NSLinguisticTagSentenceTerminator as String
- shared method NSLinguisticTagVerb as String
- shared method NSLinguisticTagWhitespace as String
- shared method NSLinguisticTagWord as String
- shared method NSLinguisticTagWordJoiner as String
- shared method tagForString(text as string, charIndex as Integer, unit as Integer, Scheme as String, orthography as NSOrthographyMBS, byref tokenRange as NSRangeMBS) as String
- shared method TagsForString(text as string, range as NSRangeMBS, unit as Integer, Scheme as String, options as Integer, orthography as NSOrthographyMBS) as NSLinguisticValueMBS()
- 9 constants
Options
Constant | Value | Description |
---|---|---|
NSLinguisticTaggerJoinNames | 16 |
Typically, multiple-word names will be returned as multiple tokens, following the standard tokenization practice of the tagger. If this option is set, then multiple-word names will be joined together and returned as a single token. |
NSLinguisticTaggerOmitOther | 8 |
Omit tokens of type NSLinguisticTagOther (non-linguistic items, such as symbols). |
NSLinguisticTaggerOmitPunctuation | 2 |
Omit tokens of type NSLinguisticTagPunctuation (all punctuation). |
NSLinguisticTaggerOmitWhitespace | 4 |
Omit tokens of type NSLinguisticTagWhitespace (whitespace of all sorts). |
NSLinguisticTaggerOmitWords | 1 |
Omit tokens of type NSLinguisticTagWord (items considered to be words). |
Units
Constant | Value | Description |
---|---|---|
NSLinguisticTaggerUnitDocument | 3 |
The document in its entirety. |
NSLinguisticTaggerUnitParagraph | 2 |
An individual paragraph. |
NSLinguisticTaggerUnitSentence | 1 |
An individual sentence. |
NSLinguisticTaggerUnitWord | 0 |
An individual word. |
This class has no sub classes.
Some examples using this class:
Blog Entries
Release notes
- Version 21.1
- Updated NSOrthographyMBS, NSLinguisticTaggerMBS, NSLinguisticValueMBS and NSTextCheckingResultMBS for iOS.
- Version 17.3
- Added NSLinguisticTaggerMBS, NSOrthographyMBS and NSLinguisticValueMBS classes.
The items on this page are in the following plugins: MBS MacCocoa Plugin.
NSLevelIndicatorMBS - NSLinguisticValueMBS