Splashery

Playground
Word Vectors, a still.

AI and Computing · Built from a recipe

Word Vectors

E♭5 on the minor comb. Its drum rings at 598.6 Hz.

Turn it in the PlaygroundTap the picture to strike it.

Word vectors turn each word into a list of numbers, a point in a space with many directions, so that words used in similar ways land near each other.

Shelf
AI and Computing
Kind
Built from a recipe
Your own
Your own words
Sound
Yes
Licenses
PDDL

Its note

Splashery stretches a drumhead over this Splash's outline, twelve inches across, and finds the ways it can ring. Its lowest is 598.6 Hz, 67 cents flat of E♭5, the nearest tine on the comb. The next fifteen are its overtones, and each one draws its own figure: sand gathers on the lines that stay still.

The sixteen ways Word Vectors's drum can ring, lowest first.
  1. 1599 Hz
  2. 2712 Hz
  3. 3855 Hz
  4. 41022 Hz
  5. 51130 Hz
  6. 61182 Hz
  7. 71215 Hz
  8. 81292 Hz
  9. 91360 Hz
  10. 101430 Hz
  11. 111517 Hz
  12. 121586 Hz
  13. 131667 Hz
  14. 141684 Hz
  15. 151723 Hz
  16. 161753 Hz

How to play

Tap it to work out king − man + woman. Type your own words in the Splash tab.

Its controls

ControlKindRangeStart
A − B + CTap
AddButton

About it

Word vectors turn each word into a list of numbers, a point in a space with many directions, so that words used in similar ways land near each other. These have 50 numbers per word, learned from a huge amount of text. Directions in the space can carry meaning: the step from man to woman is much like the step from king to queen.

Tap it: an arrow runs out to KING, the step from MAN to WOMAN is added on from there, and it lands right next to QUEEN, which lights up. Type your own A − B + C in the Splash tab, with any of 24,000 common words, and it finds the nearest of the 10,000 most common words, with the runner-up in gray. A text file containing A − B + C works too. These relationships are approximate and can reflect biases in the training text.

Details

Splats
Opens at 200,000 at Mid Detail, 60,000 at Low, and up to 600,000 at Max
Your own files
.txt

Is it right?

The asset is a quantized subset of Stanford’s 50-dimensional GloVe vectors. The analogy calculation really uses all 50 dimensions and finds queen for king − man + woman. The nearest-word score approximates cosine similarity, and the 3D picture preserves the arrows rather than all distances.

  1. Correct

    These are named, real 50-dimensional word vectors.1

    Rebuilding the asset from the first 40,000 rows of Stanford’s official GloVe 6B 50D release gives identical bytes. Four original source vectors are also checked directly.

  2. Correct

    A − B + C is computed over all 50 dimensions.1

    Independent dot-product rankings match queen/throne, rome/milan, large/one, and swimming/diving for four analogies. The input vocabulary has 24,000 entries and the answer search uses 10,000.

  3. Close

    The nearest-word score approximates cosine similarity.1

    Only the query is normalized after loading. Quantized candidate lengths range from 0.99153 to 1.00849, so their dot products can differ from cosine by less than 0.009.

  4. Correct

    The 3D arrows preserve the analogy parallelogram.1

    The linear projection gives sum = A − B + C in the displayed coordinates for all four checked queries.

  5. Simplified

    Word relationships are approximate rather than universal truths.1

    The retained vocabulary and training corpus determine the answers; queen is the nearest example, not an exact equality or a rule for all words.

  1. 1GloVe: Global Vectors for Word Representation, Stanford NLP; Pennington, Socher, and Manning
Simplified
The source is filtered to 24,000 lowercase words and quantized to signed bytes. Answers search only the first 10,000 retained words and exclude the three inputs. The 3D projection rescales axes; it is not a map of every high-dimensional distance.

Sources and credits

Share it

This link opens it in the Playground. To put it on your own page, add the element and one script tag. Every option.

https://splashery.app/play/?toy=word-vectors<script type="module" src="https://splashery.app/play/src/element.js"></script> <splashery-toy toy="word-vectors"></splashery-toy>

Nearby on the strip