Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

CHANGE-SCOPE

NLP-Driven Requirement Traceability and Risk Scoring System using Text Mining

Python FastAPI React License


Team: SEDA B10 | Vishwakarma Institute of Technology, Pune
Course: Software Engineering (CS2308)
Version: 1.0.0 | May 2026


Overview

CHANGE-SCOPE is an intelligent, web-based requirement analysis and risk assessment platform. It applies Natural Language Processing (NLP) and Text Mining techniques to Software Requirements Specification (SRS) documents to:

  • Automatically extract and structure requirement statements
  • Detect dependencies and build traceability matrices
  • Identify change-prone and high-risk requirements
  • Perform change impact analysis
  • Generate analytical reports for project planning

Architecture

CHANGE-SCOPE/
├── backend/                  # Python FastAPI REST API
│   ├── app/
│   │   ├── main.py           # FastAPI application entry
│   │   ├── core/             # Config, DB, Security
│   │   ├── models/           # SQLAlchemy ORM models
│   │   ├── services/         # NLP Engine, Parser, Reports
│   │   └── api/routes/       # REST endpoints
│   ├── tests/                # Pytest test suite
│   └── requirements.txt
├── frontend/                 # React + TypeScript + Vite
│   ├── src/
│   │   ├── pages/            # Dashboard, Documents, Risk, etc.
│   │   ├── components/       # Reusable UI components
│   │   ├── hooks/            # Zustand auth store
│   │   └── utils/            # Axios API client
│   └── package.json
├── docs/                     # Documentation
│   ├── architecture/         # System design docs
│   └── research/             # Research paper
└── scripts/                  # Setup and seed scripts

Technology Stack

Layer Technology Purpose
Backend Framework FastAPI (Python) REST API, async endpoints
NLP Processing NLTK + scikit-learn Tokenization, TF-IDF, cosine similarity
Database SQLite + SQLAlchemy Async ORM, data persistence
Authentication JWT (python-jose) + bcrypt RBAC security
Document Parsing pdfplumber + python-docx .pdf, .docx, .txt support
Report Generation fpdf2 PDF/CSV report export
Frontend React 18 + TypeScript + Vite SPA dashboard
UI Styling Tailwind CSS Utility-first design system
State Management Zustand Auth + client state
Data Fetching TanStack Query Server state + caching
Charts Recharts Risk visualization

Quick Start

Prerequisites

  • Python 3.11+
  • Node.js 18+
  • pip and npm

1. Clone and Setup

git clone https://github.com/your-org/CHANGE-SCOPE.git
cd CHANGE-SCOPE

2. Backend Setup

cd backend

# Create virtual environment
python -m venv venv
source venv/bin/activate          # Linux/macOS
# venv\Scripts\activate           # Windows

# Install dependencies
pip install -r requirements.txt

# Download spaCy model (optional, for enhanced NLP)
python -m spacy download en_core_web_sm

# Download NLTK data
python -c "import nltk; [nltk.download(p) for p in ['punkt','stopwords','wordnet','averaged_perceptron_tagger']]"

# Start the API server
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

The API will be available at: http://localhost:8000
Interactive docs (Swagger UI): http://localhost:8000/docs

3. Frontend Setup

cd frontend

# Install dependencies
npm install

# Start development server
npm run dev

The frontend will be available at: http://localhost:5173

4. Create Initial Admin User

cd backend
python scripts/seed_admin.py

Default credentials:


Core Workflow

1. Register / Login
        ↓
2. Upload SRS Document (.pdf / .docx / .txt)
        ↓
3. System auto-parses and extracts requirements
        ↓
4. Click "Run NLP Analysis"
        ↓
5. System computes:
   • TF-IDF vectors for each requirement
   • Cosine similarity matrix (pairwise)
   • Direct and indirect dependency detection
   • Complexity and volatility scores
   • Risk scores (weighted formula)
   • Traceability links
        ↓
6. Explore outputs:
   • Requirements view (with risk levels)
   • Traceability Matrix
   • Risk Scoring Dashboard
   • Change Impact Analysis
        ↓
7. Generate & Export Reports (PDF / CSV)

Risk Scoring Formula

The system computes requirement risk using a weighted composite formula:

Risk(R) = 0.40 × V(R) + 0.35 × C(R) + 0.25 × D_norm(R)

Where:

  • V(R) = Volatility score — linguistic uncertainty markers, modal verbs, vague quantifiers
  • C(R) = Complexity score — word count, conjunctions, conditional clauses, entity density
  • D_norm(R) = Normalized dependency density = min(dep_count / 10, 1.0)

Risk levels:

  • High: score ≥ 0.65
  • Medium: 0.35 ≤ score < 0.65
  • Low: score < 0.35

API Endpoints

Method Endpoint Description
POST /api/v1/auth/register Register user
POST /api/v1/auth/login Login (JWT)
POST /api/v1/documents/upload Upload SRS document
POST /api/v1/documents/{id}/parse Parse and extract requirements
POST /api/v1/nlp/{id}/analyze Run full NLP pipeline
POST /api/v1/nlp/impact/{doc_id}/{req_id} Change impact analysis
GET /api/v1/requirements/ List all requirements
GET /api/v1/traceability/matrix/{id} Traceability matrix
GET /api/v1/risk/summary/{id} Risk summary
POST /api/v1/reports/{id}/generate Generate report
GET /api/v1/reports/download/{id} Download report
GET /api/v1/admin/users List users (Admin only)
GET /api/v1/admin/stats System statistics

User Roles (RBAC)

Role Capabilities
BusinessAnalyst Upload SRS, review/edit requirements, run NLP analysis
ProjectManager View risk scores, perform impact analysis, generate reports
Developer View traceability links and requirement dependencies
QAEngineer View traceability matrix for test coverage verification
SystemAdministrator Manage users, roles, backup, monitor logs

Running Tests

cd backend
pip install pytest pytest-asyncio pytest-cov
pytest tests/ -v --cov=app --cov-report=html

Test coverage report will be generated in htmlcov/index.html.


Configuration

Key settings in backend/app/core/config.py (override via .env):

SECRET_KEY=your-secret-key-here
DATABASE_URL=sqlite+aiosqlite:///./changescope.db
COSINE_SIMILARITY_THRESHOLD=0.75
WEIGHT_VOLATILITY=0.40
WEIGHT_COMPLEXITY=0.35
WEIGHT_DEPENDENCY=0.25
RISK_HIGH_THRESHOLD=0.65
RISK_MEDIUM_THRESHOLD=0.35

Project Team

Member Role Institute
Varad Khedkar NLP & Backend Lead VIT Pune
Gautam Pise NLP & Integration VIT Pune
Shivaji Rathod Backend & Database VIT Pune
Harshal Khade QA & Admin Module VIT Pune

Guide: Software Engineering Faculty, VIT Pune
Client: SYG Solutions Pvt Ltd, Kalyan West, Maharashtra


License

This project is developed as an academic prototype for the Software Engineering course (CS2308) at Vishwakarma Institute of Technology, Pune. All intellectual property belongs to the development team unless otherwise specified.


CHANGE-SCOPE v1.0.0 | May 2025 | SEDA B10 | VIT Pune

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages