A landscape made of language.
Word Embeddings
Ten thousand words, each with 200 dimensions. A browser-based exploration of relationships, analogies, and the space between meanings.
- JavaScript
- React
- Three.js
- Web Workers
- Typed arrays
Private source · project overview

Giving vectors a place
A Word2Vec tensor and its word labels become a navigable point cloud. Search focuses a word, relationship fields connect two terms, and vector arithmetic explores analogies. It turns an otherwise abstract table of numbers into something you can move through.
Keep the interface responsive
A Web Worker loads and parses the binary tensor and calculates a deterministic projection. The original Float32Array buffer is transferred back to the main thread instead of copied. Instanced point rendering and an adjustable visible-word count keep the scene manageable.
BINARY VECTORS + LABELS
│
▼
WEB WORKER
parse → centre → project
│ transfer buffer
▼
INSTANCED 3D POINTS ← search / inspect
│
ORIGINAL 200D VECTORS → cosine similarityA worker prepares the map. Vectors keep the meaning.
- 01 / assets
Tensor + word labels
Binary vectors · TSV labels
200 dimensions per word
- load / parse → 2. embeddingWorker
- 02 / worker thread
embeddingWorker
loadTensor / loadWords
Deterministic random projection
- postMessage · transfer buffer → 3. useWordEmbeddings
- 03 / main thread
useWordEmbeddings
Receives labels + 3D positions
Transferred Float32Array buffer
- original 200D vectors → 4. vectorMath
- projected positions → 5. CartesianSpace
- 04 / original vector space
vectorMath
Cosine search + arithmetic
Semantic neighbours + paths
- matches + relationships → 5. CartesianSpace
- 05 / 3D view
CartesianSpace
Instanced points + word labels
Focus, halo and path geometry
- 06 / interaction
EmbeddingViewer
Search / analogy / path inputs
Visible word count + inspection
- query → 4. vectorMath
- 1Tensor + word labels embeddingWorkerload / parse
- 2embeddingWorker useWordEmbeddingspostMessage · transfer buffer
- 3useWordEmbeddings vectorMathoriginal 200D vectors
- 4useWordEmbeddings CartesianSpaceprojected positions
- 5EmbeddingViewer vectorMathquery
- 6vectorMath CartesianSpacematches + relationships
Read from the implementation
workers/embeddingWorker.jshooks/useWordEmbeddings.jsutils/vectorMath.jscomponents/CartesianSpace.jsxpages/EmbeddingViewer.jsx
The map is not the territory
The scene uses a deterministic random projection, not full PCA, despite an older helper name. Analogy search uses cosine similarity in the original 200-dimensional vectors. Three-dimensional proximity is a visual aid; it is not a faithful measure of every semantic relationship.
Three ways into the space
Word arithmetic draws an analogy one step at a time. A neighborhood halo reveals nearby words and similarities. Path mode traces intermediate words between a start and destination. The film shows all three using the actual application interface and results.

