Contents

NLDistance

The distance between two strings in a text embedding.

Declaration

typealias NLDistance = Double

Discussion

The meaning of an NLDistance is directly related to the NLDistanceType you use when you call a method that uses it. For example, if you use the neighborsForString:maximumCount:distanceType: method and use NLDistanceType.cosine for the distanceType parameter, the method calculates the cosine distance and returns it as an NLDistance.

Topics

Calculating Distance

See Also

Finding strings and their distances in an embedding