| Quick Reference NLP CheatsheetNatural language processing on one page — tokens, TF-IDF, embeddings, attention, and the traps around UNK, BLEU, and data leakage. 10 sections 10 tables 14 code snippets Clean the textCase A whitespace split The first cuts
This page is the ideas. spaCy pipelines, training loops, and hosted model APIs are left out. Subword tokensA continuation mark Apply a saved BPE How a vocabulary is built
Counts and TF-IDFFit on the training docs What a count can see
EmbeddingsAngle, not length One vector or many
Tags and spansOne person span Label rules
Encoders and decodersHide the future Read both sides Which model
AttentionScaled dot-product What the three matrices do
TasksRaw string equality Match the task
MetricsFit and surprise Pick the number that matches
Interview trapsTraps worth memorising
Train weights, then apply them Keep the negation How to use this page: tokenize the way the model was trained, fit counts on the training set only, and pick a metric that matches the task. A high overlap score is not a proof that the meaning is right. |