This is my (unsuccessful) idea of word2vec implementation without any neurons and machine learning layers.
libAW2V.js
Contains some shared fragments of code.generateBasicData.js
Using this file, you can generate vectors and dictionary from some dataset loaded from the file.postprocessVectors.js
Does some small post-processing on vectors generated by generator.finetuneVectors.js
By implementing some sort of loss function and random multiplication, it should've corrected vectors enough to generate seemingly good text, but something is still missing.