Natural Language Processing (NLP)

Train AI to understand and generate human language — from chatbots to language translation and sentiment analysis.

40 Problems Available
Bag-of-Words Representation
Intermediate

Create a bag-of-words model using CountVectorizer.

100 points Solve
Capitalize First Letters
Beginner

Capitalize the first letter of each word in a sentence.

40 points Solve
Check Digit
Beginner

Check if a string contains any digits.

40 points Solve
Check Palindrome
Beginner

Check if a word is a palindrome (reads same forwards and backwards).

40 points Solve
Check Substring
Beginner

Check if one string contains another string.

30 points Solve
Convert to Lowercase
Beginner

Convert all tokens to lowercase.

50 points Solve
Count Characters in String
Beginner

Count the number of characters in a string (including spaces).

30 points Solve
Count Specific Word
Beginner

Count how many times a specific word appears in text.

40 points Solve
Count Vowels
Beginner

Count the number of vowels in a string.

50 points Solve
Count Word Frequencies
Beginner

Count how many times each word appears in a text.

75 points Solve
Count Words in String
Beginner

Count the number of words in a string.

30 points Solve
Extract Numbers
Beginner

Extract all numbers from a string.

50 points Solve
Find First Occurrence
Beginner

Find the index of the first occurrence of a word.

40 points Solve
Find Longest Word
Beginner

Find the longest word in a sentence.

50 points Solve
Join Words
Beginner

Join a list of words into a single string with spaces.

40 points Solve
Language Detection
Beginner

Detect language of text using langdetect.

75 points Solve
Lemmatize Words
Beginner

Reduce words to their dictionary form using WordNetLemmatizer.

75 points Solve
Named Entity Recognition
Intermediate

Identify named entities in text using NLTK.

100 points Solve
Part-of-Speech Tagging
Intermediate

Tag words with their part-of-speech using NLTK.

100 points Solve
Remove Digits
Beginner

Remove all digits from a string.

50 points Solve
Remove Punctuation
Beginner

Remove punctuation from a list of tokens.

50 points Solve
Remove Stopwords
Beginner

Remove common stopwords from text using NLTK.

75 points Solve
Remove Whitespace
Beginner

Remove extra whitespace from the beginning and end of a string.

30 points Solve
Repeat String
Beginner

Repeat a string multiple times.

30 points Solve
Replace Words
Beginner

Replace all occurrences of a word in a sentence.

40 points Solve
Reverse a String
Beginner

Reverse the characters in a string.

30 points Solve
Sentiment Analysis with TextBlob
Beginner

Analyze sentiment polarity of a sentence.

75 points Solve
Simple Chat Response
Beginner

Return a predefined response based on input text.

60 points Solve
Simple Chatbot
Intermediate

Create a rule-based response system.

150 points Solve
Spell Checker
Beginner

Correct spelling in a sentence using TextBlob.

75 points Solve
Split by Character
Beginner

Split a string into a list of characters.

30 points Solve
Stem Words
Beginner

Reduce words to their stems using Porter Stemmer.

75 points Solve
Swap Cases
Beginner

Swap uppercase and lowercase letters in a string.

40 points Solve
Text Generation (Markov)
Intermediate

Generate text using a simple Markov chain.

150 points Solve
Text Similarity (Cosine)
Intermediate

Calculate cosine similarity between two sentences.

100 points Solve
Text Summarization
Intermediate

Extract key sentences from text using NLTK.

150 points Solve
TF-IDF Vectorization
Intermediate

Convert text to TF-IDF vectors.

100 points Solve
Tokenize Sentence
Beginner

Split a sentence into words using NLTK's word_tokenize.

50 points Solve
Word Cloud Generation
Beginner

Create a word cloud from text.

75 points Solve
Word Embeddings (GloVe)
Advanced

Load and use pre-trained GloVe word vectors.

200 points Solve