Instance Method

vector(for:)

Requests the vector for the given term.

Declaration

@nonobjc func vector(for string: String) -> [Double]?

Parameters

string

The term to find in the word embedding.

Return Value

A vector represented as an array of doubles if present in the word embedding, otherwise nil.

See Also

Inspecting the Vocabulary of an Embedding

var dimension: Int

The number of dimensions in the vocabulary’s vector space.

var vocabularySize: Int

The number of words in the vocabulary.

var language: NLLanguage?

The language of the text in the word embedding.

func contains(String) -> Bool

Requests a Boolean value that indicates whether the term is in the vocabulary.

var revision: Int

The revision of the word embedding.