Initializer

init(dictionary:parameters:)

Creates a word embedding from a set of strings and their vectors provided with the given dictionary.

Declaration

init(dictionary: [String : [Double]], parameters: MLWordEmbedding.ModelParameters = ModelParameters()) throws

Parameters

dictionary

A dictionary of strings and their vectors, represented as an array of doubles. Each value in the double array is a coordinate for the corresponding dimension.

parameters

Parameters that you use to configure word embedding.

See Also

Creating a Word Embedding

struct MLWordEmbedding.ModelParameters

Parameters that configure a word embedding.

let modelParameters: MLWordEmbedding.ModelParameters

The configuration parameters that the word embedding used during initialization.