NLP Basics: Word Embeddings, Word2Vec, and Hand‑crafted RNN Implementation in PyTorch
This article introduces word‑level representations—from one‑hot encoding to dense word embeddings via Word2Vec—explains cosine similarity, then walks through the structure, limitations, and PyTorch implementation of a vanilla RNN, including a custom forward function and verification against the library API.