Instance Method


Retrieves the vector of the string.


func vector(for text: String) -> [Double]?



A string in the word embedding’s vocabulary.

Return Value

An array of doubles representing the vector of the string, if it exists in the vocabulary; otherwise nil.

See Also

Testing a Word Embedding

func distance(between: String, and: String, distanceType: NLDistanceType) -> Double

Requests the distance between two strings given a distance calculation method.

enum NLDistanceType

The means of calculating a distance between two locations in a text embedding.

func contains(String) -> Bool

Queries whether the given string is in the vocabulary.