summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2018-04-04 20:08:59 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2018-04-04 20:08:59 +0200
commite923843eae4055a07e9d162ba54725a1078b65f3 (patch)
treea9336ebc48304cb07ee700a2027f374e437ada28
parentcc6f125b8c4437af5588bb679ca2af18e6248a99 (diff)
downloadragequitte-e923843eae4055a07e9d162ba54725a1078b65f3.tar.gz
ragequitte-e923843eae4055a07e9d162ba54725a1078b65f3.zip
write basic readme docsHEADmaster
-rw-r--r--README.md25
1 files changed, 25 insertions, 0 deletions
diff --git a/README.md b/README.md
index 6b4b329..02a8410 100644
--- a/README.md
+++ b/README.md
@@ -10,3 +10,28 @@ Tech to evaluate:
* https://spacy.io/
* other
* https://prodi.gy/
+
+SETUP
+---
+
+ * Create a virtual Python environment `virtualenv venv -p python3`
+ * Enter it `source venv/bin/activate`
+ * Install dependencies `pip install -r requirements.txt`
+ * Set up a Redis server
+ * Copy and modify `config_example.py`
+
+USAGE
+---
+
+ * Enter the virtual environment
+ * Start the Discord log collector (optional): `PYTHONPATH="." python grabbers/discord_to_redis.py`
+ * Train a word2vec model: `PYTHONPATH="." python processors/redis_to_word2vec.py`
+ * Try the model, run an interactive Python shell with `python`:
+ * `>>> import gensim`
+ * `>>> import config`
+ * `>>> model = gensim.models.Word2Vec.load(config.model)`
+ * `>>> model.wv.most_similar_cosmul("what", topn=4)`
+ * `[('where', 0.8449756503105164), ('how', 0.8136355876922607), ('whatever', 0.8117746114730835), ('why', 0.8039281368255615)]`
+ * `>>> model.wv.similarity("league", "dota")`
+ * `0.6141897432617985`
+ * more examples here: https://radimrehurek.com/gensim/models/keyedvectors.html