Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSLinguisticTaggerMBS class.
NSLinguisticTaggerMBS.availableTagSchemesForLanguage(Language as String) as String()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
language: A BCP-47 tag identifying the language. For example, "en" for English or "zh-Hans" for Chinese written using the Simplified Chinese script.
Returns the available tag schemes. For possible values, see NSLinguisticTagScheme.
This is a convenience method for calling the availableTagSchemesForUnit, passing NSLinguisticTaggerUnitWord as the linguistic unit.
NSLinguisticTaggerMBS.availableTagSchemesForUnit(unit as Integer, Language as String) as String()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
unit: The linguistic unit. For possible values, see NSLinguisticTaggerUnit.
language: A BCP-47 tag identifying the language. For example, "en" for English or "zh-Hans" for Chinese written using the Simplified Chinese script.
Returns the supported tag schemes. For possible values, see NSLinguisticTagScheme.
Available in macOS 10.13 and newer.
NSLinguisticTaggerMBS.dominantLanguageForString(text as String) as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
string: The string for which the dominant language is determined.
Returns the BCP-47 tag identifying the dominant language of the string, or the tag "und" if a specific language cannot be determined.
This is a convenience method for creating a new linguistic tagger, setting the string property, and getting the dominantLanguage property. If you analyze the same string more than once, you should create a linguistic tagger object instead of calling this method.
Available in macOS 10.13 and newer.
Lexical Classes
NSLinguisticTaggerMBS.NSLinguisticTagAdjective as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is an adjective.
NSLinguisticTaggerMBS.NSLinguisticTagAdverb as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is an adverb.
NSLinguisticTaggerMBS.NSLinguisticTagClassifier as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is a classifier.
NSLinguisticTaggerMBS.NSLinguisticTagCloseParenthesis as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is a close parenthesis.
NSLinguisticTaggerMBS.NSLinguisticTagCloseQuote as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is a close quote.
NSLinguisticTaggerMBS.NSLinguisticTagConjunction as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is a conjunction.
NSLinguisticTaggerMBS.NSLinguisticTagDash as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is a dash.
NSLinguisticTaggerMBS.NSLinguisticTagDeterminer as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is a determiner.
NSLinguisticTaggerMBS.NSLinguisticTagIdiom as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is an idiom.
NSLinguisticTaggerMBS.NSLinguisticTagInterjection as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is an interjection.
NSLinguisticTaggerMBS.NSLinguisticTagNoun as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The token is a noun.
Some examples using this method:
NSLinguisticTaggerMBS.NSLinguisticTagNumber as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is a number.
NSLinguisticTaggerMBS.NSLinguisticTagOpenParenthesis as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is an open parenthesis.
NSLinguisticTaggerMBS.NSLinguisticTagOpenQuote as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is an open quote.
NSLinguisticTaggerMBS.NSLinguisticTagOtherPunctuation as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is punctuation other than a kind described by other lexical classes (sentence terminator, open or close quote, open or close parenthesis, word joiner, and dash).
NSLinguisticTaggerMBS.NSLinguisticTagOtherWhitespace as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is whitespace other than a kind described by other lexical classes (paragraph break).
NSLinguisticTaggerMBS.NSLinguisticTagOtherWord as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is a word other than a kind described by other lexical classes (noun, verb, adjective, adverb, pronoun, determiner, particle, preposition, number, conjunction, interjection, classifier, and idiom).
NSLinguisticTaggerMBS.NSLinguisticTagParagraphBreak as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is a paragraph break.
NSLinguisticTaggerMBS.NSLinguisticTagParticle as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is a particle.
NSLinguisticTaggerMBS.NSLinguisticTagPreposition as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is a preposition.
NSLinguisticTaggerMBS.NSLinguisticTagPronoun as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is a pronoun.
NSLinguisticTaggerMBS.NSLinguisticTagSentenceTerminator as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is a sentence terminator.
NSLinguisticTaggerMBS.NSLinguisticTagVerb as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is a verb.
Some examples using this method:
NSLinguisticTaggerMBS.NSLinguisticTagWordJoiner as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is a word joiner.
Name Types
NSLinguisticTaggerMBS.NSLinguisticTagOrganizationName as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is an organization name.
Some examples using this method:
NSLinguisticTaggerMBS.NSLinguisticTagPersonalName as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is a personal name.
Some examples using this method:
NSLinguisticTaggerMBS.NSLinguisticTagPlaceName as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This token is a place name.
Some examples using this method:
NSLinguisticTaggerMBS.NSLinguisticTagSchemeLanguage as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
For example, the language identifier for English is "en" and the identifier for Chinese written using the Simplified Chinese script is "zh-Hans". The identifier "und" is used if a specific language cannot be determined.
The tagger generally attempts to determine the language of text at the level of an entire sentence, paragraph, or document, rather than word by word.
NSLinguisticTaggerMBS.NSLinguisticTagSchemeLemma as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NSLinguisticTaggerMBS.NSLinguisticTagSchemeLexicalClass as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Some examples using this method:
NSLinguisticTaggerMBS.NSLinguisticTagSchemeNameType as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Some examples using this method:
NSLinguisticTaggerMBS.NSLinguisticTagSchemeNameTypeOrLexicalClass as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NSLinguisticTaggerMBS.NSLinguisticTagSchemeScript as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
For example, the identifier for Latin script is "Latn" and the identifier for Simplified Chinese script is "Hans". The identifier "Zyyy" is used if a specific script cannot be determined.
NSLinguisticTaggerMBS.NSLinguisticTagSchemeTokenType as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
To classify tokens by a more specific type, for example, distinguishing words between nouns and verbs, use the
NSLinguisticTagSchemeLexicalClass scheme.
NSLinguisticTaggerMBS.tagForString(text as string, charIndex as Integer, unit as Integer, Scheme as String, orthography as NSOrthographyMBS, byref tokenRange as NSRangeMBS) as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
charIndex: The position of the initial character.
unit: The linguistic unit. See NSLinguisticTaggerUnit for possible values.
tagScheme: The tag scheme. See NSLinguisticTagScheme for possible values.
tokenRange: The token range for output.
Returns the tag for the requested tag scheme and linguistic unit, or nil. If a tag is returned, this function returns by reference the range of the token to tokenRange.
This is a convenience method for initializing a linguistic tagger, setting the string property, and calling the tagForString method. If you analyze the same string more than once, you should create a linguistic tagger object instead of calling this method.
NSLinguisticTaggerMBS.TagsForString(text as string, range as NSRangeMBS, unit as Integer, Scheme as String, options as Integer, orthography as NSOrthographyMBS) as NSLinguisticValueMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
range: The range from which to return tags.
unit: The linguistic unit. See NSLinguisticTaggerUnit for possible values.
tagScheme: The tag scheme. See NSLinguisticTagScheme for possible values.
options: The linguistic tagger options to use. See NSLinguisticTaggerOptions for possible values.
An array of the values in the requested range (tag and tokenRange set).
When the returned array contains an entry that doesn't have a corresponding tag scheme, that entry is an empty string ("").
This is a convenience method for initializing a linguistic tagger, setting the
string property, and calling the tagsInRange method. If you analyze the same string more than once, you should create a linguistic tagger object instead of calling this method.
Available in macOS 10.13 and newer.
Token Types
NSLinguisticTaggerMBS.NSLinguisticTagOther as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The token indicates a non-linguistic item, such as a symbol.
NSLinguisticTaggerMBS.NSLinguisticTagPunctuation as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The token indicates punctuation.
NSLinguisticTaggerMBS.NSLinguisticTagWhitespace as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The token indicates white space of any sort.
NSLinguisticTaggerMBS.NSLinguisticTagWord as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Linguistic | MBS MacCocoa Plugin | 17.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The token indicates a word.
The items on this page are in the following plugins: MBS MacCocoa Plugin.