Sarcasm and HateSpan Detection is a machine learning project designed to classify text as sarcastic, hate speech, or neutral. The project utilizes deep learning models and NLP techniques to analyze text and highlight specific words that indicate sarcasm or hate speech.
- Text Classification: Detect sarcasm and hate speech in textual data.
- Highlighted Words: Identify and highlight words contributing to sarcasm or hate speech.
- Multiple Models: Utilizes various models including LSTM, Decision Tree, SVC, KNN, and Naive Bayes.
- Performance Metrics: Evaluates models using AUC-ROC and confusion matrices.
- Streamlit Web App: User-friendly interface to input text and get predictions.
- Programming Language: Python
- Frameworks/Libraries: TensorFlow, Keras, Scikit-learn, NLTK, Pandas, NumPy
- Web Interface: Streamlit
- Python 3.x installed
- Required libraries installed via pip
- Clone the repository:
git clone https://github.com/divyaprabha1805/SarcasNet.git cd SarcasmNet - Install dependencies:
pip install -r requirements.txt
- Run the Streamlit web app:
streamlit run app.py
- Sarcasm Detection Dataset: Contains labeled sarcastic and non-sarcastic text.
- HateSpan Dataset: Identifies words contributing to hate speech.
- Enter text in the web app.
- Get real-time predictions for sarcasm and hate speech.
- View highlighted words contributing to classification.
- If the model fails to load, ensure all dependencies are installed.
- If Streamlit does not start, try running:
streamlit run app.py --server.enableCORS false --server.enableXsrfProtection false