Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSLinguisticTaggerMBS class.
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.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.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.
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.
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.
The items on this page are in the following plugins: MBS MacCocoa Plugin.