Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Huffman tree from word2vec

main.c

This is mostly a copy/paste from the Google word2vec implementation in C.

I've removed a lot of the code, and left only the Huffman tree creation behind.

I did this to study the results of the CreateBinaryTree() function to better understand how a Huffman tree is used in this library.

I have posted a full write-up of what I learned on my blog.

printjs.c

Again this is mostly the same thing as main.c, but I added a bunch of JavaScript callbacks to the stdout as the program runs. These callbacks call functions defined in script.js.

I just copy/paste these function callbacks to the bottom of script.js to view the results.

The goal is to create a picture of "memory" that looks like this:

memory picture

And then animate the changes.

The animation is in anim.html. Note that this has in now way been optimized for vocabularies with more than 8 unique words...

About

Exploration of word2vec's huffman tree

Resources

Releases

No releases published

Packages

No packages published