One Logo Pool Ball
NaturalLanguage · IOS API REFERENCE

NLTokenizer

class · iOS 12.0+ · SDK 27.1

class NLTokenizer

Members (8)

init · iOS 12.0+

init

TypeScript
static init(unit: NLTokenUnit): NLTokenizer
Swift declaration
init(unit: NLTokenUnit)
method · iOS 12.0+

setLanguage

TypeScript
setLanguage(language: NLLanguage): void
Swift declaration
func setLanguage(_ language: NLLanguage)
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+

unit

TypeScript
get unit(): NLTokenUnit
Swift declaration
var unit: NLTokenUnit { get }
method · iOS 12.0+

tokenRange

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

tokenRange

TypeScript
tokenRangeFor(range: SDKHandle): SDKHandle
Swift declaration
@nonobjc func tokenRange(for range: Range<String.Index>) -> Range<String.Index>
method · iOS 12.0+

tokens

TypeScript
tokens(range: SDKHandle): Array<SDKHandle>
Swift declaration
@nonobjc func tokens(for range: Range<String.Index>) -> [Range<String.Index>]

Skipped declarations

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

NLTokenizer.enumerateTokens(in:using:)

callback cannot propagate synchronous failure

NLTokenizer.init()

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

All NaturalLanguage types →