Skip to content

lozhn/hp-w2v

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

While PyData Amsterdam 2024 was not that interesting, I wrote kind-of word2vec (cbow) as I understood it. I didn't care about anything but to kill some time and train a small NN on a M2 Pro.

  1. Run data.py to preprcoess hp.txt into vocabs and word-to-index and index-to-word
  2. Run train.py to start far-from-optimal train loop
  3. Run run.py like python run.py 'harry+ron-hermione' to get top-5 words that are close in the learned space

About

Naive stupid word2vec on Harry Potter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages