One Logo Pool Ball
NaturalLanguage · IOS API REFERENCE

NLContextualEmbedding

class · iOS 17.0+ · SDK 27.1

class NLContextualEmbedding

Members (15)

init · iOS 17.0+

init

TypeScript
static initLanguage(language: NLLanguage): (NLContextualEmbedding) | null
Swift declaration
init?(language: NLLanguage)
init · iOS 17.0+

init

TypeScript
static initModelIdentifier(modelIdentifier: string): (NLContextualEmbedding) | null
Swift declaration
convenience init?(modelIdentifier: String)
init · iOS 17.0+

init

TypeScript
static initScript(script: NLScript): (NLContextualEmbedding) | null
Swift declaration
init?(script: NLScript)
static · iOS 17.0+

contextualEmbeddings

TypeScript
static contextualEmbeddings(valuesDictionary: NativeMap<NLContextualEmbeddingKey, unknown>): Array<NLContextualEmbedding>
Swift declaration
class func contextualEmbeddings(forValues valuesDictionary: [NLContextualEmbeddingKey : Any]) -> [NLContextualEmbedding]
method · iOS 17.0+

embeddingResult

TypeScript
embeddingResult(string: string, language?: (NLLanguage) | null): NLContextualEmbeddingResult
Swift declaration
func embeddingResult(for string: String, language: NLLanguage?) throws -> NLContextualEmbeddingResult
method · iOS 17.0+

load

TypeScript
load(): void
Swift declaration
func load() throws
method · iOS 17.0+

requestAssets

TypeScript
requestAssets(completionHandler: ((arg0: NLContextualEmbedding_AssetsResult, arg1: (NativeError) | null) => void)): void
Swift declaration
func requestAssets() async throws -> NLContextualEmbedding.AssetsResult
method · iOS 17.0+

unload

TypeScript
unload(): void
Swift declaration
func unload()
get · iOS 17.0+

dimension

TypeScript
get dimension(): number
Swift declaration
var dimension: Int { get }
get · iOS 17.0+

hasAvailableAssets

TypeScript
get hasAvailableAssets(): boolean
Swift declaration
var hasAvailableAssets: Bool { get }
get · iOS 17.0+

languages

TypeScript
get languages(): Array<NLLanguage>
Swift declaration
var languages: [NLLanguage] { get }
get · iOS 17.0+

maximumSequenceLength

TypeScript
get maximumSequenceLength(): number
Swift declaration
var maximumSequenceLength: Int { get }
get · iOS 17.0+

modelIdentifier

TypeScript
get modelIdentifier(): string
Swift declaration
var modelIdentifier: String { get }
get · iOS 17.0+

revision

TypeScript
get revision(): number
Swift declaration
var revision: Int { get }
get · iOS 17.0+

scripts

TypeScript
get scripts(): Array<NLScript>
Swift declaration
var scripts: [NLScript] { get }

Skipped declarations

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

NLContextualEmbedding.init()

inherited init: cannot prove legal (class declares 3 custom initializers)

All NaturalLanguage types →