Text this: Efficient discriminative learning of parametric nearest neighbor classifiers