Text as Data

Week 4 lecture

Open full screen ↗ Week 4 workshop → F full screen · S speaker notes · ? shortcuts

Exxon's vocabulary as a map

Each dot is one of the 1,500 most Exxon-specific nouns and adjectives in the workshop's 182 transcripts. Each word is represented by GPT-2: we feed GPT-2 up to 20 real Exxon sentences containing the word and average the 768 numbers it produces for that word (layer 6), so the vector reflects how Exxon uses the word. UMAP squashes the 768 numbers to 3D so nearby dots have similar meanings. Colour = cluster (k-means on the full 768-d GPT-2 vectors), size = how often Exxon says it. Drag to rotate, scroll to zoom, hover for the word, or search a word to see its nearest neighbours.

Find a word

Nearest neighbours

Similarity = cosine similarity of the full 768-d GPT-2 vectors (after centring) (1 = same direction). The 3D map is only an approximation: two dots can look close and not be, or vice versa.