word2vec-pure-js

A package to load binary word2vec models in pure javascript which doesn't rely on c dependencies.

Usage no npm install needed!

<script type="module">
  import word2vecPureJs from 'https://cdn.skypack.dev/word2vec-pure-js';
</script>

README

word2vec-pure-js

-- THIS IS A PROTOTYPE FOR NOW -- This is a module capable of reading pre-trained word2vec models in .bin format. It is written in pure JS and only implements getting similar words for now.

Methods

  • load(path) - load a file from path -path: string Loads model at path to
  • getSimilarWords(word, count=10) -word: string -count: number Get the count closest words from word

TODO:

Implements all the useful functions when working with word vectors to make this useable.