A structured, hands-on walkthrough of classical Natural Language Processing — from raw text to a trained classifier — built as a personal study reference and portfolio artifact.
- 🔍 Overview
- 📚 Notebooks
- 🛠️ Tech Stack
- 🗂️ Data
- ⚙️ Getting Started
⚠️ Known Issues- 🔗 Related Work
- 📄 Status & License
This repository is a topic-by-topic study log covering classical/traditional NLP — before deep learning enters the picture. Each notebook pairs a plain-language explanation of a concept with runnable code, moving from cleaning raw text, through feature extraction and word embeddings, to a full text-classification pipeline and part-of-speech tagging. It's a study reference rather than a packaged library: expect notebook-style exploratory code, not a production module.
It's the NLP counterpart to
Deep-Learning-Complete-Guide,
a companion repo in the same "complete guide" series.
| # | Notebook | Topics Covered |
|---|---|---|
| 01 | Text Preprocessing | Lowercasing, HTML/URL removal, punctuation removal, chat-word normalization, Ekphrasis social-text cleaning, spelling correction (TextBlob), stop-word removal, emoji handling, word/sentence tokenization, stemming (Porter), lemmatization (WordNet), NLTK vs. spaCy |
| 02 | Feature Extraction | Corpus/vocabulary/document terminology, One-Hot Encoding, Bag of Words, N-grams, TF-IDF, hand-crafted text features |
| 03 | Word2Vec | Word embeddings, Word2Vec via gensim, pretrained vector loading |
| 04 | Text Classification | End-to-end pipeline: CountVectorizer features, RandomForestClassifier, GaussianNB, train/test split, accuracy and confusion matrix |
| 05 | POS Tagging | Part-of-speech tagging and dependency visualization with spaCy (displacy) |
Supporting reference diagrams (visual notes, not rendered by any notebook):
Bag of Words Example.png, TF-IDF Diagram.png,
Summary important NLP feature extraction techniques.png.
Classical NLP tooling only — no deep learning frameworks (no PyTorch/TensorFlow/
transformers); embeddings go through gensim's Word2Vec and classification
through scikit-learn.
| Category | Tools |
|---|---|
| Tokenization / normalization | NLTK, spaCy (en_core_web_sm) |
| Text cleanup | TextBlob (spelling correction), Ekphrasis (social-media text) |
| Word embeddings | gensim (Word2Vec) |
| Feature extraction & modeling | scikit-learn (CountVectorizer, TfidfVectorizer, RandomForestClassifier, GaussianNB) |
| Data handling | pandas, numpy |
| Utilities | emoji, wget |
Two CSVs are included for the classification/preprocessing notebooks:
IMDB Review.csv— despite the filename, this is not the standard IMDB movie-review sentiment dataset. Its columns (Review_ID, Game_Title, Sentiment_Label, Review_Text) and contents (tweets about entities like Borderlands, Amazon, Microsoft) match the Twitter Entity Sentiment Analysis dataset on Kaggle.twitter_validation.csv— the validation split of that same dataset.
pip install pandas numpy nltk spacy textblob ekphrasis emoji gensim wget scikit-learn jupyter
python -m spacy download en_core_web_sm
python -m nltk.downloader stopwords punkt wordnetThen open any notebook with Jupyter/JupyterLab and run cells top to bottom:
jupyter notebookNotebooks were written independently as topic-by-topic notes rather than one linear
pipeline, but 01 → 05 roughly follows a learning order: cleaning → features →
embeddings → classification → POS tagging.
01 Text Preprocessing.ipynbloads a dataset viapd.read_csv('IMDB Dataset.csv'), but no file with that name exists in this repo — onlyIMDB Review.csvis present, and (per the note above) it isn't the same dataset that filename implies. Running that cell as written raisesFileNotFoundError. Left unmodified rather than guessed at, since either the notebook's dataset reference or the committed CSV needs to change, and it isn't clear which was originally intended.
Deep-Learning-Complete-Guide— the deep-learning counterpart to this repo, same series.
Active personal reference/learning collection, not a maintained package — expect exploratory notebook code rather than tested, production-ready modules. Shared for educational and portfolio purposes.