Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSLinguisticTaggerMBS class.

Previous items

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
Supplies a BCP-47 language identifier for a token.

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
Supplies a stem form of a word token, if known.

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
Classifies tokens according to class: part of speech for words, type of punctuation, or whitespace.

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
Classifies tokens according to whether they are part of a named entity.

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
Classifies tokens corresponding to names according to NSLinguisticTagSchemeNameType and tokens all other tokens according to NSLinguisticTagSchemeLexicalClass.

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
Supplies an ISO 15924 script identifier for a token.

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
Classifies tokens according to their broad type: word, punctuation, or whitespace.

To classify tokens by a more specific type, for example, distinguishing words between nouns and verbs, use the
NSLinguisticTagSchemeLexicalClass scheme.

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
One of the lexical classes.

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
One of the lexical classes.

This token is a verb.

Some examples using this method:

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
One of the token types.

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
One of the token types.

The token indicates a word.

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
One of the lexical classes.

This token is a word joiner.

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
Returns a tag for a single scheme for a given linguistic unit at the specified character position in a string.

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
Returns an array of linguistic tags and token ranges.

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.

Previous items

The items on this page are in the following plugins: MBS MacCocoa Plugin.


💬 Ask a question or report a problem
The biggest plugin in space...