Commit 8901bd6a authored by Jim Hoekstra's avatar Jim Hoekstra 👋🏻
Browse files

Merge branch 'issue/MSX-44' into 'develop'

word is made lowercase before it is fed to the word2vec model

See merge request !15
parents 955640cd fb98378d
......@@ -10,9 +10,10 @@ class AssociatedWords:
print(" Word2Vec model is ready. Enjoy!!!\n")
def get_associated_words(self, word, top_n=10):
gensim_result = self.model.most_similar(word, topn=top_n)
lowercase_word = word.lower()
gensim_result = self.model.most_similar(lowercase_word, topn=top_n)
# gensim_result = [('apple', 1.0), ('banana', 1.0), ('strawberry', 1.0)]
words = self.filter_results(gensim_result, word)
words = self.filter_results(gensim_result, lowercase_word)
return words
def filter_results(self, gensim_result, base_word):
......
......@@ -2,4 +2,4 @@ from dash_app.index import app
if __name__ == '__main__':
app.run_server(debug=True)
app.run_server(debug=False)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment