Natural language processing flashcards
Teach computers to read, sort and understand human language.
What is natural language processing, in one plain sentence?
Teaching computers to work with the languages people speak and write, so they can read, sort, translate, answer and write text.
Tap to turn over. Swipe right if you know it, left to see it again.
What you will learn
Start from zero
- What NLP is3 cards
- The key words6 cards
- Many languages and next steps2 cards
Core basics
- Text and Unicode3 cards
- Words and tokens3 cards
- Classic models4 cards
- Measuring results2 cards
- Finding structure3 cards
- Meaning as numbers3 cards
Next steps
- Subword tokens3 cards
- Transformers3 cards
- Fine-tuning4 cards
- No-training options2 cards
- Search and grouping2 cards
- Generation tasks2 cards
- Real-world text2 cards
Go deeper
- Inside transformers5 cards
- Decoding2 cards
- Choosing the right tool3 cards
- Domain and language2 cards
- Robustness2 cards
- Privacy2 cards
- Embeddings in depth2 cards
Final test and certificate
10 questions drawn fresh from the whole topic, about 15 minutes. Sign in, score 80% or more and get a free certificate with your name and a public check link anyone can open, such as an employer or a teacher. Not signed in? Try a practice test from the cards.
Take the final testAbout these cards
- Reviewed 26 October 2026
- CoversspaCy 3.8Hugging Face Transformersscikit-learn 1.7Python 3.13
Checked against
Natural language processing at a glance
Natural language processing (NLP) is how computers read, sort, translate and write human language, from a spam filter to a chat assistant.
Like a very fast new clerk in a busy post office: first he learns to split letters into words, then to sort them by topic, spot names and addresses, and finally to write short replies.
Words you will meet
- Token
- One piece of text the computer works with: a word or part of a word
- Tokenization
- Cutting text into those pieces
- Corpus
- A big collection of text used to teach or test a program
- Classification
- Putting a text into a group, like spam or not spam
- Sentiment
- Whether a text sounds happy, unhappy or neutral
- Named entity
- A real name in text: a person, place, company, date or amount
- Embedding
- A list of numbers that stands for the meaning of a word or sentence
- Language model
- A program that has learned to guess the next word, and so can write
The steps
- 1. Start from zero (11 cards): What NLP is, why language is hard, and the words you need before Core basics.
- 2. Core basics (18 cards): Unicode, tokens, classic classifiers, metrics, entities, regex and embeddings.
- 3. Next steps (18 cards): Subword tokens, transformers, fine-tuning, zero-shot, search, generation and real-world text.
- 4. Go deeper (18 cards): Attention maths, decoding, model choice, domains, robustness, privacy and embeddings in depth.
All 11 cards in Start from zero
- What is natural language processing, in one plain sentence?
- Teaching computers to work with the languages people speak and write, so they can read, sort, translate, answer and write text.
- Where do you meet NLP every day?
- Autocorrect and next-word hints, spam filters, voice assistants, phone translation, search boxes that understand typos, and chat assistants that write replies.
- Why is language hard for a computer?
- Words have many meanings ("bank" of a river or for money), people use slang, sarcasm and typos, and there are thousands of languages and scripts. Meaning depends on context.
- What are tokens and tokenization?
- Tokenization cuts text into pieces called tokens, such as words, parts of words or punctuation. "Don't worry!" might become "Do", "n't", "worry", "!". Everything later works on tokens.
- What is a corpus?
- A big collection of text used to teach or test a program, such as a million product reviews, all of a newspaper's articles, or every support email from last year.
- What are classification and sentiment?
- Classification puts a text into a group, like "billing question" or "delivery problem". Sentiment is a common kind: is the text happy, unhappy or neutral?
- What is a named entity?
- A real name in text: a person, place, company, date, amount. In "Ravi paid 500 rupees in Madurai on Monday", the entities are Ravi, 500 rupees, Madurai and Monday.
- What is an embedding?
- A list of numbers that stands for the meaning of a word or sentence. Texts with similar meaning get similar numbers, so the computer can tell "cheap" is close to "low price".
- What is a language model?
- A program trained on huge amounts of text to guess the next word. Guessing well, word after word, lets it complete sentences, answer questions and write. Chat assistants are large language models.
- Why does NLP in Tamil, Hindi or Arabic need extra care?
- Scripts, word endings and spelling differ a lot from English, and there is less training text for many languages. People also mix languages in one message, like Tamil written in English letters.
- What do you need before Core basics, and what will you be able to do?
- Basic Python and a first idea of machine learning. By the end you will clean text, build classifiers, find names in text and choose between small models and large AI models.
Natural language processing cheatsheet
spaCy
spacy.load("en_core_web_sm")Load an English pipelinedoc = nlp(text)Run the pipelinetok.lemma_Dictionary formtok.pos_Part of speechdoc.entsNamed entitiesdoc.sentsSentencesnlp.pipe(texts, batch_size=64)Fast batch processing
scikit-learn text
TfidfVectorizer(ngram_range=(1, 2))Words and word pairsmin_df=2Drop words seen onceLogisticRegression(max_iter=1000)Strong linear baselineclassification_report(y, p)Per-class precision, recall, F1f1_score(y, p, average="macro")Rare classes count equally
Hugging Face Transformers
AutoTokenizer.from_pretrained(name)Matching tokenizerAutoModelForSequenceClassificationText classification headAutoModelForTokenClassificationEntity tagging headpipeline("sentiment-analysis", model=...)Ready-made tasktruncation=True, max_length=512Cut long inputs explicitly
Unicode and cleaning
unicodedata.normalize("NFC", s)One form for accented textlen(s)Counts code points, not visible letterss.encode("utf-8")Bytes for storages.casefold()Stronger lowercasing for matchingre.findall(pattern, s)Fixed-shape patterns
Metrics
precisionFlagged ones that were rightrecallReal ones that were caughtmacro F1Average over classes equallyentity-level F1Span and type must matchCohen's kappaLabel agreement beyond chanceperplexityLower is less surprised