Logo Lanfrica

SAINATH0224/NigeriaWiki

Domain:

natural language processing

Record type:

softwaremodel
Creator:
SAI
Host:
A Streamlit-based sentiment analysis application trained on Nigeria-related Wikipedia content. It uses TF-IDF and a Random Forest classifier to predict sentiment with confidence scores. The app also provides TextBlob insights, word clouds, and interactive visualizations. # πŸ‡³πŸ‡¬ Nigeria Wikipedia Sentiment Analysis A **Streamlit-based Sentiment Analysis application** that predicts the sentiment of user-input text using a **Random Forest Classifier** trained on **Nigeria-related Wikipedia content**. The app combines **machine learning predictions**, **TextBlob sentiment scores**, and **visual analytics** for better interpretability. --- ## πŸ“Œ Project Overview This project demonstrates how **Natural Language Processing (NLP)** and **Machine Learning** can be applied to analyze sentiment in textual data. The model is trained on text extracted from **Wikipedia articles about Nigeria**, making it domain-specific and context-aware. Users can input any sentence and instantly receive: - Sentiment prediction (Positive / Negative) - Prediction confidence - Word cloud visualization - TextBlob polarity and subjectivity insights --- ## πŸš€ Features ### πŸ” Machine Learning Sentiment Prediction - Uses a **Random Forest Classifier** - Text transformed using **TF-IDF Vectorization** - Outputs sentiment label with confidence scores ### ☁️ Word Cloud Visualization - Generates a word cloud from user input - Highlights dominant words in the sentence ### 🧠 Dual Sentiment Analysis - **ML-based sentiment** (Random Forest) - **Rule-based sentiment** (TextBlob) ### πŸ“Š Visual Analytics - Probability bar chart for sentiment confidence - Polarity & subjectivity visualization using Seaborn ### πŸ–₯️ Interactive UI - Built using **Streamlit** - Simple, clean, and user-friendly interface --- ## πŸ—οΈ Tech Stack - **Frontend / App Framework**: Streamlit - **Machine Learning**: Scikit-learn (Random Forest) - **NLP**: TextBlob, NLTK - **Vectorization**: TF-IDF - **Visualization**: Matplotlib, Seaborn, WordCloud - **Model Persistence**: Joblib --- ## πŸ“ Project Structure ```bash β”œβ”€β”€ app.py # Streamlit application β”œβ”€β”€ Nigeria.ipynb # Data processing & model training notebook β”œβ”€β”€ random_forest_sentiment_model.pkl # Train …