distance(between:and:distanceType:)
Calculates the distance between two strings in the vocabulary space.
Declaration
@nonobjc func distance(between firstString: String, and secondString: String, distanceType: NLDistanceType = .cosine) -> NLDistanceParameters
- firstString:
A string in the embedding vocabulary.
- secondString:
Another string in the embedding vocabulary.
- distanceType:
A means of calculating distance that determines which formula the method uses to evaluate the distance between
firstStringandsecondString.
Return Value
The distance associated with distanceType.