All projects

Natural language processing

Text classification.

I turned raw text into numerical features and compared predicted categories with reference labels.

  • Python
  • NLTK
  • TF-IDF
  • Bag of words
Try the example

Interactive example · Sample data

Classify a phrase.

This example compares your phrase with three short sample documents. It weights the words using TF-IDF and measures how closely each document matches.

Illustration of the project’s sample exercise
Enable JavaScript to try this example.

How I built it.

Coursework

Natural Language Processing

Normalize the text

I broke text into tokens, removed stop words, and reduced variations in word forms through stemming or lemmatization.

Represent the words

I explored bag-of-words and TF-IDF representations to turn collections of text into features that a classifier could use.

Check the labels

I compared the predicted categories with the reference labels to interpret the classifier’s output.