diff options
| author | schneefux <schneefux+git@schneefux.xyz> | 2018-04-02 22:13:17 +0200 |
|---|---|---|
| committer | schneefux <schneefux+git@schneefux.xyz> | 2018-04-02 22:13:17 +0200 |
| commit | 422d30584dfd7d72b62a4feb1094cd87fd7684ca (patch) | |
| tree | b3819550e8379f0eb36c6861b7a2c1589f22016a /scripts/most_similar.py | |
| parent | d239f542a1de1ee1c74b3fc3e14e5c91385ee3bf (diff) | |
| download | ragequitte-422d30584dfd7d72b62a4feb1094cd87fd7684ca.tar.gz ragequitte-422d30584dfd7d72b62a4feb1094cd87fd7684ca.zip | |
first setup of chat crawler & word2vec model
Diffstat (limited to 'scripts/most_similar.py')
| -rw-r--r-- | scripts/most_similar.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/most_similar.py b/scripts/most_similar.py new file mode 100644 index 0000000..ad780a7 --- /dev/null +++ b/scripts/most_similar.py @@ -0,0 +1,12 @@ +#!/usr/bin/python3 + +import gensim + +import config + +# load model +model = gensim.models.Word2Vec.load(config.model) +wv = model.wv +del model + +print(wv.most_similar_cosmul(positive=["lol"])) |
