Closed LuukSuurmeijer closed 2 years ago
Added if __name__ == "__main__:" syntax so one can import functionalities from main. Added find_possible_vectorized() as a function to compute the possible candidates. I just now found the gen-sim function distances(word_or_vector, other_words=()) (https://radimrehurek.com/gensim/models/keyedvectors.html#gensim.models.keyedvectors.KeyedVectors.get_normed_vectors), which does that same thing and is probably even more optimized. However, that is no fun :-)
if __name__ == "__main__:"
find_possible_vectorized()
distances(word_or_vector, other_words=())
Tested and approved! It looks great and runs much faster now. Thanks!
Added
if __name__ == "__main__:"
syntax so one can import functionalities from main. Addedfind_possible_vectorized()
as a function to compute the possible candidates. I just now found the gen-sim functiondistances(word_or_vector, other_words=())
(https://radimrehurek.com/gensim/models/keyedvectors.html#gensim.models.keyedvectors.KeyedVectors.get_normed_vectors), which does that same thing and is probably even more optimized. However, that is no fun :-)