Text this: Likelihood inference in nearest-neighbour classification models