One Logo Pool Ball
NaturalLanguage · IOS API REFERENCE

NLTagger

class · iOS 12.0+ · SDK 27.1

class NLTagger

Members (18)

static · iOS 12.0+

availableTagSchemes

TypeScript
static availableTagSchemes(unit: NLTokenUnit, language: NLLanguage): Array<NLTagScheme>
Swift declaration
class func availableTagSchemes(for unit: NLTokenUnit, language: NLLanguage) -> [NLTagScheme]
static · iOS 13.0+

requestAssets

TypeScript
static requestAssets(language: NLLanguage, tagScheme: NLTagScheme, completionHandler: ((arg0: NLTagger_AssetsResult, arg1: (NativeError) | null) => void)): void
Swift declaration
class func requestAssets(for language: NLLanguage, tagScheme: NLTagScheme) async throws -> NLTagger.AssetsResult
method · iOS 13.0+

gazetteers

TypeScript
gazetteers(tagScheme: NLTagScheme): Array<NLGazetteer>
Swift declaration
func gazetteers(for tagScheme: NLTagScheme) -> [NLGazetteer]
init · iOS 12.0+

init

TypeScript
static init(tagSchemes: Array<NLTagScheme>): NLTagger
Swift declaration
init(tagSchemes: [NLTagScheme])
method · iOS 12.0+

models

TypeScript
models(tagScheme: NLTagScheme): Array<NLModel>
Swift declaration
func models(forTagScheme tagScheme: NLTagScheme) -> [NLModel]
method · iOS 13.0+

setGazetteers

TypeScript
setGazetteers(gazetteers: Array<NLGazetteer>, tagScheme: NLTagScheme): void
Swift declaration
func setGazetteers(_ gazetteers: [NLGazetteer], for tagScheme: NLTagScheme)
method · iOS 12.0+

setModels

TypeScript
setModels(models: Array<NLModel>, tagScheme: NLTagScheme): void
Swift declaration
func setModels(_ models: [NLModel], forTagScheme tagScheme: NLTagScheme)
get · iOS 12.0+

dominantLanguage

TypeScript
get dominantLanguage(): (NLLanguage) | null
Swift declaration
var dominantLanguage: NLLanguage? { get }
get · iOS 12.0+

string

TypeScript
get string(): (string) | null
Swift declaration
var string: String? { get set }
set · iOS 12.0+

string

TypeScript
set string(value: (string) | null)
Swift declaration
var string: String? { get set }
get · iOS 12.0+

tagSchemes

TypeScript
get tagSchemes(): Array<NLTagScheme>
Swift declaration
var tagSchemes: [NLTagScheme] { get }
method · iOS 12.0+

setLanguage

TypeScript
setLanguage(language: NLLanguage, range: SDKHandle): void
Swift declaration
@nonobjc func setLanguage(_ language: NLLanguage, range: Range<String.Index>)
method · iOS 12.0+

tokenRange

TypeScript
tokenRangeAtUnit(index: SDKHandle, unit: NLTokenUnit): SDKHandle
Swift declaration
@nonobjc func tokenRange(at index: String.Index, unit: NLTokenUnit) -> Range<String.Index>
method · iOS 14.0+

tokenRange

TypeScript
tokenRangeForUnit(range: SDKHandle, unit: NLTokenUnit): SDKHandle
Swift declaration
@nonobjc func tokenRange(for range: Range<String.Index>, unit: NLTokenUnit) -> Range<String.Index>
method · iOS 14.0+

tagHypotheses

TypeScript
tagHypotheses(index: SDKHandle, unit: NLTokenUnit, scheme: NLTagScheme, maximumCount: number): [Record<string, number>, SDKHandle]
Swift declaration
@nonobjc func tagHypotheses(at index: String.Index, unit: NLTokenUnit, scheme: NLTagScheme, maximumCount: Int) -> ([String : Double], Range<String.Index>)
method · iOS 12.0+

setOrthography

TypeScript
setOrthography(orthography: _Foundation_NSOrthography, range: SDKHandle): void
Swift declaration
@nonobjc func setOrthography(_ orthography: NSOrthography, range: Range<String.Index>)
method · iOS 12.0+

tag

TypeScript
tag(index: SDKHandle, unit: NLTokenUnit, scheme: NLTagScheme): [(NLTag) | null, SDKHandle]
Swift declaration
@nonobjc func tag(at index: String.Index, unit: NLTokenUnit, scheme: NLTagScheme) -> (NLTag?, Range<String.Index>)
method · iOS 12.0+

tags

TypeScript
tags(range: SDKHandle, unit: NLTokenUnit, scheme: NLTagScheme, options?: NLTagger_Options): Array<[(NLTag) | null, SDKHandle]>
Swift declaration
@nonobjc func tags(in range: Range<String.Index>, unit: NLTokenUnit, scheme: NLTagScheme, options: NLTagger.Options = []) -> [(NLTag?, Range<String.Index>)]

Skipped declarations

2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

NLTagger.enumerateTags(in:unit:scheme:options:using:)

callback cannot propagate synchronous failure

NLTagger.init()

inherited init: cannot prove legal (class declares 1 custom initializer)

All NaturalLanguage types →