SFMS is a menu-driven command-line tool for managing student course feedback. Every piece of feedback submitted through the CLI is automatically analyzed โ sentiment polarity and subjectivity via TextBlob, emotion tags via keyword extraction, and key phrases โ then stored in a simple flat file and displayed in polished tables. An advanced sentiment summary and a rating-distribution pie chart turn raw comments into quick, presentable insight.
No database, no server โ just Python, a text file, and your terminal.
Interactive 7-option menu:
| # | Action | What it does |
|---|---|---|
| 1 | Add Feedback | Enter registration no, student, course, comment and rating โ sentiment, emotions and key phrases are extracted automatically |
| 2 | Delete Feedback | Remove a record by registration number or student name |
| 3 | Search Feedback | Look up records by registration number or student name |
| 4 | Display All Feedback | Full tabular view (tabulate) of every record |
| 5 | Advanced Sentiment Analysis | Aggregate sentiment breakdown across all feedback |
| 6 | Rating Distribution | matplotlib pie chart of rating frequencies |
| 7 | Exit | Saves and quits |
- Sentiment โ TextBlob polarity scored and classified:
> 0.1Positive ยท< -0.1Negative ยท otherwise Neutral, with the numeric score and subjectivity stored - Emotions โ positive / negative / neutral keyword matching ("excellent", "boring", "average"โฆ)
- Key phrases โ the three most substantial sentences from the comment
Everything persists to student_feedback.txt (auto-created), a pipe-separated (|) table:
| Column | Description |
|---|---|
Registration_No ยท Student_Name ยท Course |
Who and what |
Feedback |
The free-text comment |
Sentiment ยท Sentiment_Score ยท Subjectivity |
TextBlob analysis results |
Emotions ยท Key_Phrases |
Extracted tags |
Rating ยท Date |
Numeric rating and timestamp |
python -m venv .venv # Windows: .venv\Scripts\activate # macOS/Linux: source .venv/bin/activate pip install pandas tabulate textblob matplotlib numpy python-dateutil pytz tzdata python -m textblob.download_corpora
nltk,click,joblib,regex,tqdmandcoloramaare pulled in automatically as transitive dependencies of the core packages above.
python student_feedback_manager.py
Then follow the menu prompts โ add a few feedback entries and try options 4โ6 to see the table, sentiment summary and rating chart.
SFMS/
โโโ student_feedback_manager.py # The entire application (CLI, NLP pipeline, charting)
โโโ student_feedback.txt # Data file (created automatically on first save)
โโโ LICENSE # MIT
โโโ README.md
StudentFeedbackManagerclass wraps load/save (pandasCSV with|separator), so data survives restarts and stays human-editable- Sentiment thresholds (
ยฑ0.1) keep clearly negative comments from being masked by neutral text - The pie chart renders in a separate matplotlib window (
plt.show()) - Records are kept sorted by registration number for stable display
MIT โ see LICENSE.
Prince Kumar โ @princekumar-dev