Retrieves the nearest neighbors of a string, given a number of neighbors and a distance type.
- iOS 12.0+
- macOS 10.14+
- Mac Catalyst 13.0+
- tvOS 12.0+
- watchOS 5.0+
- Xcode 11.0+
- Natural Language
A string in the embedding vocabulary.
The largest number of neighboring strings to find.
The type of distance, which determines the formula the method uses to calculate distance.
An array of terms and their distances.