Department Prediction System for Academic Project Titles Based on Keyword Analysis
PROGRAM:
import pandas as pd
import re
titles = [
"A STUDY ON ADVERSITY QUOTIENT OF EMPLOYEES IN THE IT COMPANY",
"A STUDY ON THE ENTREPRENEURIAL PROPENSITY OF ENGINEERING STUDENTS OF SATHYABAMA",
"A STUDY ON CUSTOMER PERCEPTION TOWARDS DIGITAL BANKING",
"THE EFFECT OF ONLINE REVIEWS ON BRAND EQUITY FOR ELECTRONIC HOME APPLIANCES (SAMSUNG)",
"A STUDY ON EFFECTIVENESS OF ORGANISATIONAL CULTURE AMONG EMPLOYEES IN AUTOMOBILE SECTOR",
"EMPLOYEE PERCEPTION ON QUALITY OF WORK LIFE TOWARDS JOB SATISFACTION IN BANKING INDUSTRY",
"A STUDY OF CUSTOMER SATISFACTION ON RETAIL AUTOMOBILE BATTERY",
"A STUDY ON EFFECTIVENESS OF PACKAGING PRODUCT IN ONLINE SHOPPING",
"A STUDY ON WORK-LIFE BALANCE DURING COVID-19 WITH SPECIAL REFERENCE TO EMPLOYEES",
"STUDY ON IMPACTS OF CORONA VIRUS PANDEMIC ON TOURISM",
"A STUDY OF COMPREHENSIVE ATTRITION RATE IN BPO SECTORS IN CHENNAI CITY",
"SUPPLY CHAIN OPTIMIZATION IN FOSTER GEARS",
"A STUDY OF EMOTIONAL INTELLIGENCE AND ITS IMPACT ON PERFORMANCE OF EMPLOYEES IN IT SECTOR",]
departments = {
"HR": ["employee", "job satisfaction", "morale", "work-life", "training", "recruitment", "retention", "motivation", "engagement", "welfare"],
"Finance": ["financial", "investment", "bank", "loan", "mutual fund", "capital", "returns", "stock", "market", "tax", "planning"],
"Marketing": ["consumer", "customer", "brand", "buying behaviour", "advertising", "digital", "perception", "promotion", "satisfaction", "social media"],
"IT": ["it", "software", "cyber", "online", "technology", "e-commerce", "virtual", "remote", "web", "data"],
"Operations": ["supply chain", "inventory", "logistics", "warehouse", "materials", "manufacturing", "project management", "quality"],
"Education": ["student", "teaching", "education", "school", "learning", "class", "online education"],
"Healthcare": ["health", "safety", "nurse", "hospital", "covid", "pandemic", "sanitizer", "wellbeing"]
}
def preprocess(text):
return re.sub(r"[^\w\s]", "", text.lower())
def classify_title(title):
title_clean = preprocess(title)
scores = {dept: 0 for dept in departments}
for dept, keywords in departments.items():
for keyword in keywords:
if keyword in title_clean:
scores[dept] += 1
best_dept = max(scores, key=scores.get)
return best_dept if scores[best_dept] > 0 else "Uncategorized"
classified_titles = {title: classify_title(title) for title in titles}
user_input = input("\nEnter a project title to classify: ").strip()
if user_input in classified_titles:
print(f"Predicted Department: {classified_titles[user_input]}")
else:
print("Project title not found in the list. Please check your input.")
Comments
Post a Comment