Classifying the jobs and finding the nearest neighbors