One Logo Pool Ball
NaturalLanguage · IOS API REFERENCE

NLModel

class · iOS 12.0+ · SDK 27.1

class NLModel

Members (7)

init · iOS 12.0+

init

TypeScript
static initContentsOf(url: string): NLModel
Swift declaration
convenience init(contentsOf url: URL) throws
init · iOS 12.0+

init

TypeScript
static initMlModel(mlModel: _CoreML_MLModel): NLModel
Swift declaration
convenience init(mlModel: MLModel) throws
method · iOS 12.0+

predictedLabel

TypeScript
predictedLabel(string: string): (string) | null
Swift declaration
func predictedLabel(for string: String) -> String?
method · iOS 12.0+

predictedLabels

TypeScript
predictedLabels(tokens: Array<string>): Array<string>
Swift declaration
func predictedLabels(forTokens tokens: [String]) -> [String]
get · iOS 12.0+

configuration

TypeScript
get configuration(): NLModelConfiguration
Swift declaration
@NSCopying var configuration: NLModelConfiguration { get }
method · iOS 14.0+

predictedLabelHypotheses

TypeScript
predictedLabelHypothesesForMaximumCount(string: string, maxCount: number): Record<string, number>
Swift declaration
@nonobjc func predictedLabelHypotheses(for string: String, maximumCount maxCount: Int) -> [String : Double]
method · iOS 14.0+

predictedLabelHypotheses

TypeScript
predictedLabelHypothesesForTokensMaximumCount(tokens: Array<string>, maxCount: number): Array<Record<string, number>>
Swift declaration
@nonobjc func predictedLabelHypotheses(forTokens tokens: [String], maximumCount maxCount: Int) -> [[String : Double]]

Skipped declarations

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

NLModel.init()

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

All NaturalLanguage types →