Skip to content

Natural Language Processing (NLP) service application with multiple NLP tasks, where users can input text and get results based on their selected task.

License

Notifications You must be signed in to change notification settings

goutam-kul/Multi_Purpose_NLP_service

Repository files navigation

Multi-Purpose NLP Services 🤖

NLP.Service.Dashboard.webm

Project Overview

A Natural Language Processing (NLP) service providing comprehensive text analysis capabilities through a REST-like API interface. Built with FastAPI and powered by advanced language models including Llama3.2, this service delivers robust and efficient NLP solutions.

Core Services

1. 🎭 Sentiment Analysis

  • Model: Llama3.2:3b via Ollama
  • Key Features:
    • Sophisticated sentiment detection (POSITIVE/NEGATIVE/NEUTRAL)
    • High-precision confidence scoring
    • Contextual sentiment understanding
    • Detailed sentiment breakdown and metadata

2. 🎯 Named Entity Recognition (NER)

  • Model: Custom fine-tuned TinyLlama
  • Capabilities:
    • Core entity detection (PERSON, ORG, LOC)
    • Extended entity types (TIME, NUMBER, EMAIL)
    • Precise position tracking
    • Multi-language support

3. 📚 Text Summarization

  • Model: Llama3.2:3b via Ollama
  • Features:
    • Dual mode: Abstractive & Extractive
    • Dynamic length control
    • Key points extraction
    • Compression ratio analysis

4. 📑 Text Classification

  • Model: Llama3.2:3b via Ollama
  • Highlights:
    • Multi-label classification support
    • Customizable category system
    • Confidence scoring with explanations
    • Balanced category distribution

Technical Implementation

Performance Optimization

  • Redis-based Caching System
    • Service-specific cache timeouts
    • Intelligent cache key generation
    • Automatic cache invalidation
    • Performance monitoring

Robust Architecture

  • Error Management:
    • Custom exception hierarchy
    • Comprehensive error tracking
    • Graceful degradation
    • Detailed error reporting

Quality Assurance

  • Testing Suite:
    • Comprehensive unit testing
    • Integration test coverage
    • Load testing with Locust
    • Continuous monitoring

Developer Experience

  • Documentation:
    • Interactive Swagger UI
    • Comprehensive ReDoc
    • OpenAPI specifications
    • Usage examples

Deployement Setup

  • Containerization and CI/CD
    • Multi container Microservice approach
    • microservices: frontend, backend, redis
    • CI/CD using github actions

Future Work

1. Model Enhancements

  • Model quantization for faster inference
  • Support for newer model architectures
  • Custom model fine-tuning options
  • Multi-model ensemble support

2. Feature Expansion

  • Text similarity analysis
  • Language detection
  • Toxicity detection
  • Custom plugin system

3. Performance Optimization

  • Batch processing implementation
  • Async processing pipeline
  • GPU acceleration support
  • Distributed processing capability

4. Infrastructure

  • Kubernetes deployment configurations
  • Monitoring dashboard
  • Auto-scaling implementation

Technical Stack

  • Backend: FastAPI, Python 3.10+
  • Models: Llama3.2, TinyLlama, Phi3, Gemma2, Qwen2.5
  • Caching: Redis
  • UI: Streamlit
  • Testing: Pytest, Locust
  • Documentation: OpenAPI, ReDoc

Project Status

🟢 Active Development

  • Core services: Completed
  • Caching system: Implemented
  • Error handling: Implemented
  • Documentation: Completed
  • Testing: Implemented
  • UI/UX: Completed

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Natural Language Processing (NLP) service application with multiple NLP tasks, where users can input text and get results based on their selected task.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages