Skip to content

darshyadav12/PolicyRecommendationAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Policy Recommendation AI

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.

Features

  • 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

How It Works

1.) We collected responses from a Google Form survey, then exported them as an Excel sheet

2.) The AI reads the “Issue” column from the Excel file.

3.) For each issue:

  • It checks the overall emotion using VADER Sentiment Analysis
  • It predicts which policy category best fits the issue using a trained model

4.) Finally, the program prints:

  • 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).

Installation

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.

Deployment

Open a terminal in the project folder and run:

  python main.py

The program will automatically read the Excel file, analyze issues, and display policy recommendations in the terminal.

Tech Stack

  • 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

Lessons Learned

  • 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

Future Improvements

  • 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

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages