distance(between:and:distanceType:)
Calculates the distance between two strings in the vocabulary space.
Declaration
func distance(between first: String, and second: String, distanceType: NLDistanceType = .cosine) -> DoubleParameters
- first:
A string in the embedding vocabulary.
- second:
Another string in the embedding vocabulary.
- distanceType:
The metric to use to calculate the distance between the first and second strings.
Return Value
The distance