This project is an AI tool that reads real-world issues from a survey (stored in an Excel sheet) and recommends suitable policy actions. It uses sentiment analysis, machine learning, and a policy dataset to understand how students feel about different issues and then suggest the best type of policy response.
The goal was to analyze school-wide feedback and convert it into meaningful policy recommendations that decision-makers can act on.
- Reads issues directly from an Excel file containing survey responses
- Performs sentiment analysis (positive, negative, neutral) on each issue
- Uses a Decision Tree Classifier to categorize issues into policy categories
- Recommends a policy statement based on the predicted category
- Fully automated pipeline: Input survey → AI analysis → Policy output
- Easy to extend with more training data or additional policy categories
- It checks the overall emotion using VADER Sentiment Analysis
- It predicts which policy category best fits the issue using a trained model
- The issue
- Its sentiment
- A recommended policy The machine learning model uses TF-IDF (to convert text into numerical values) and a Decision Tree classifier (to learn patterns between issues and policy categories).
Make sure you have Python installed (3.8+ recommended). Install all required modules:
pip install pandas
pip install vaderSentiment
pip install scikit-learn
pip install openpyxl
Place your survey file in the same folder as the script and name it:
Responses.xlsx
- Make sure all the file paths match the names used in the code.
Open a terminal in the project folder and run:
python main.pyThe program will automatically read the Excel file, analyze issues, and display policy recommendations in the terminal.
- Python 3
- Pandas — reading Excel data
- VADER Sentiment Analysis — detecting emotions
- Scikit-Learn — training Decision Tree classifier
- TF-IDF Vectorizer — converting text into meaningful features
- Excel (OpenPyXL) — survey data input
- How to perform sentiment analysis using NLP tools
- How to build a complete machine learning pipeline (vectorizer → classifier → prediction)
- Working with Excel datasets in Python
- Handling real survey data and cleaning issues
- Making AI systems that convert raw input into actionable insights
- Basics of supervised learning using Decision Trees
- Structuring a practical real-world AI project end-to-end
- Train with a larger dataset for higher-accuracy recommendations
- Add more detailed policy categories
- Build a web interface for uploading survey files
- Add a graphical dashboard to visualize sentiments
- Improve the model by using more advanced algorithms (e.g., Random Forest, SVM, or transformers)
- Export recommendations to a PDF or Google Sheet automatically