This repository presents a Natural Language Processing (NLP) project aimed at detecting spam URLs using machine learning. The project performs text cleaning, feature extraction, and classification using an SVM model with grid search tuning.
📦 URL-Spam-Detection/
├── explore.ipynb # Jupyter notebook with full analysis
├── README.md # Project description and usage
- 📂 Source: 4Geeks Academy GitHub -
url_spam.csv - 💡 Contents:
- URL text
- Spam labels (binary classification)
- 🔍 Initial cleanup removed over 600 duplicate entries
- ✅ Lowercasing, stopwords removal (
nltk) - 🔤 Lemmatization with
WordNetLemmatizer - 🔧 Regex cleanup
- ☁️ WordCloud for spam vs. non-spam terms
- ✨ Model: Support Vector Machine (SVM)
- 🔍 Tuning:
GridSearchCVwithRepeatedStratifiedKFold - 📈 Metrics: Classification report including Precision, Recall, F1-score
- Clone the repository
git clone https://github.com/jilemp/URL-Spam-Detection.git
cd URL-Spam-Detection- Install dependencies
pip install -r requirements.txt- Launch the notebook
jupyter notebook "explore.ipynb"pandas,numpynltk,regexmatplotlib,wordcloudsklearn
Project developed as part of 4Geeks Academy — NLP Curriculum. Feel free to open an issue or fork the repo for improvements!