A Python script that filters political-related sentences from a CSV dataset using keyword-based matching (Hausa & English). It extracts sentences containing political terms and saves them to a new CSV file. Ideal for sentiment analysis, data preprocessing, and studying political discourse.
# Political Sentence Extractor
This Python script filters and extracts political-related sentences from a CSV dataset using keyword-based matching. It searches for both Hausa and English political terms and saves the filtered sentences to a new CSV file for further analysis.
## 📁 Dataset Format
The input CSV (`train.csv`) should have the following structure:
## ⚙️ Features
- Extracts political-related sentences based on predefined keywords.
- Supports Hausa and English political terms.
- Saves filtered sentences to `political_sentences.csv`.
## 🛠️ Requirements
- Python 3.x
- pandas
Install dependencies:
```bash
pip install pandas
pip install tensorflow
How to Use
Place your dataset (train.csv) in the same directory as the script.
Run the script:
bash
Copy
Edit