Contents

distanceBetweenString:andString:distanceType:

Calculates the distance between two strings in the vocabulary space.

Declaration

- (NLDistance) distanceBetweenString:(NSString *) firstString andString:(NSString *) secondString distanceType:(NLDistanceType) distanceType;

Parameters

  • 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 firstString and secondString.

Mentioned in

Return Value

The distance associated with distanceType.

See Also

Finding strings and their distances in an embedding