Natural Language Processing exercises with solutions
45 practice problems from the 15 lessons of the Natural Language Processing course, in lesson order and from easy to hard inside each lesson. Open a problem, write your code and press Submit: the tests run in your browser and nothing is sent to a server.
15 easy problems 15 medium problems 15 hard problems
What natural language processing is
3 problems · Read the lesson
Tokenization and normalization
3 problems · Read the lesson
Regular expressions for text
3 problems · Read the lesson
Bag of words and n-grams
3 problems · Read the lesson
TF-IDF: weighting words
3 problems · Read the lesson
Text similarity and search
3 problems · Read the lesson
Naive Bayes text classification
3 problems · Read the lesson
Sentiment analysis
3 problems · Read the lesson
Language models and smoothing
3 problems · Read the lesson
Part-of-speech tagging with an HMM
3 problems · Read the lesson
Named entities and chunking
3 problems · Read the lesson
Edit distance and spelling correction
3 problems · Read the lesson
Word embeddings
3 problems · Read the lesson
Byte-pair encoding tokenization
3 problems · Read the lesson
Attention, transformers and LLMs in practice
3 problems · Read the lesson