def getNNModel(wordVectors): neigh = NearestNeighbors() neigh.metric = 'cosine' neigh.fit(wordVectors) return neigh