Instance Method

getVector:forString:

Copies a vector into the given a pointer to a float array.

Declaration

- (BOOL)getVector:(float *)vector forString:(NSString *)string;

Parameters

vector

An array of floats the method copies the vector to. The array’s capacity must be at least dimension.

string

The term to find in the word embedding.

Return Value

A Boolean indicating whether the method copied the vector.

See Also

Inspecting the Vocabulary of an Embedding

dimension

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

vocabularySize

The number of words in the vocabulary.

language

The language of the text in the word embedding.

- containsString:

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

- vectorForString:

Requests the vector for the given term.

revision

The revision of the word embedding.