This project provides a comprehensive sentiment analysis solution with a modern web interface for analyzing PDF documents. The system can determine sentiment towards specific topics in uploaded documents and extract relevant keywords and sentences.
The project is built as a monorepo using Turborepo to manage multiple services:
- Frontend: Next.js application that provides the user interface
- Backend: Flask-based API service that performs the sentiment analysis
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ │ │ │ │ │
│ Frontend │ ──────► │ Backend │ ──────► │ GROBID Service │
│ (Next.js) │ │ (Flask) │ │ (PDF Parser) │
│ │ │ │ │ │
└─────────────────┘ └─────────────────┘ └─────────────────┘
- Upload and analyze PDF documents
- Perform topic-focused sentiment analysis
- Extract relevant sentences and keywords
- Visual representation of sentiment results
- Node.js 18.0+
- Python 3.8+
- Docker (for GROBID service)
- Clone the repository
git clone https://git.ecdf.ed.ac.uk/psd2425/Rose-Campbell/sentiment-analysis.git
cd sentiment-analysis- Start the GROBID service (required for PDF processing)
cd apps/backend/grobid_deployment && chmod +x deploy-grobid.sh
./deploy-grobid.sh- Set up the backend
cd apps/backend && chmod +x start_conda.sh
./start_conda.sh- Set up the frontend
cd apps/frontend
npm install
npm run dev- Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- GROBID Service: http://localhost:8070
sentiment-analysis/
├── apps/
│ ├── frontend/ # Next.js frontend application
│ └── backend/ # Flask backend service
├── packages/ # Shared packages and utilities
├── README.md # This file
└── package.json # Root package.json for Turborepo
For more detailed information about each component:
