Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# π° Fake or Real News Classifier Using FastText
|
| 2 |
+
|
| 3 |
+
[](https://www.python.org/)
|
| 4 |
+
[](https://fasttext.cc/)
|
| 5 |
+
[](https://huggingface.co/vikasgautam2003/Text_Classification_Using_FastText)
|
| 6 |
+
|
| 7 |
+
> β‘ A **text classification project** that classifies news as **Fake or Real** using **FastText**.
|
| 8 |
+
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
## π Features
|
| 12 |
+
β
Train and test a FastText classifier
|
| 13 |
+
β
Support for CSV datasets
|
| 14 |
+
β
Preprocessing and simple text tokenization
|
| 15 |
+
β
Save/load trained FastText model
|
| 16 |
+
β
Ready for deployment or further experimentation
|
| 17 |
+
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
## π οΈ Tech Stack
|
| 21 |
+
- **Model** β FastText
|
| 22 |
+
- **Language** β Python 3.10+
|
| 23 |
+
- **Libraries** β pandas, fasttext
|
| 24 |
+
- **Dataset** β Custom CSV dataset (`ecommerce_dataset.csv`)
|
| 25 |
+
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+
## π Project Structure
|
| 29 |
+
```bash
|
| 30 |
+
βββ .ipynb_checkpoints/ # Jupyter notebook checkpoints
|
| 31 |
+
βββ TextClassification.ipynb # Main notebook
|
| 32 |
+
βββ TextClassificationPart2.ipynb # Extended analysis notebook
|
| 33 |
+
βββ requirements.txt # Python dependencies
|
| 34 |
+
βββ .gitattributes # Git LFS configuration
|
| 35 |
+
βββ ecommerce.train # Training dataset (LFS)
|
| 36 |
+
βββ ecommerce.test # Test dataset (LFS)
|
| 37 |
+
βββ ecommerce_dataset.csv # Full dataset (LFS)
|
| 38 |
+
βββ README.md # Project documentation
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
βοΈ Setup Instructions
|
| 42 |
+
1οΈβ£ Install Dependencies
|
| 43 |
+
pip install -r requirements.txt
|
| 44 |
+
|
| 45 |
+
2οΈβ£ Run Training / Evaluation
|
| 46 |
+
|
| 47 |
+
Open the Jupyter notebooks:
|
| 48 |
+
|
| 49 |
+
jupyter notebook TextClassification.ipynb
|
| 50 |
+
jupyter notebook TextClassificationPart2.ipynb
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
Make sure to have datasets available locally (ecommerce.train, ecommerce.test, ecommerce_dataset.csv) or tracked via Git LFS.
|
| 54 |
+
|
| 55 |
+
π― Use Cases
|
| 56 |
+
|
| 57 |
+
Detect fake news in real-time applications
|
| 58 |
+
|
| 59 |
+
Build NLP portfolio projects
|
| 60 |
+
|
| 61 |
+
Experiment with FastText embeddings and text classification
|
| 62 |
+
|
| 63 |
+
π‘ Future Improvements
|
| 64 |
+
|
| 65 |
+
Add real-time API for classification
|
| 66 |
+
|
| 67 |
+
Integrate with Hugging Face Datasets
|
| 68 |
+
|
| 69 |
+
Hyperparameter tuning for better accuracy
|
| 70 |
+
|
| 71 |
+
Add visualization dashboards for analysis
|
| 72 |
+
|
| 73 |
+
π¨βπ» Author
|
| 74 |
+
|
| 75 |
+
Vikas Gautam
|