Skip to content

s2artslab/s2-document-intelligence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

S2 Document Intelligence - Community Edition

License: MIT Python 3.8+

Open-source document processing engine for PDF, DOCX, and images.

This is the Community Edition of S2 Document Intelligence - a production-ready document processing API with OCR, text extraction, and layout analysis.


🌟 What's Included (Community Edition)

Core Features βœ…

  • PDF Processing - Extract text, layout, and structure from PDF documents
  • Image OCR - PaddleOCR and EasyOCR support for scanned documents
  • DOCX Support - Process Microsoft Word documents
  • Text Extraction - High-quality text extraction with layout preservation
  • REST API - FastAPI-based HTTP interface
  • CLI Tool - Batch process documents from command line
  • Docker Deployment - Easy containerized deployment

What's Included:

βœ… PDF text extraction (PyMuPDF)
βœ… OCR engines (PaddleOCR, EasyOCR)
βœ… Basic layout analysis
βœ… REST API endpoints
βœ… Command-line tool
βœ… Docker configuration
βœ… Python library usage

πŸš€ Quick Start

Installation

# Clone repository
git clone https://github.com/s2artslab/s2-document-intelligence.git
cd s2-document-intelligence

# Install dependencies
pip install -r requirements.txt

# Start API server
python main.py

API is now running at: http://localhost:5000

Process a Document

# Upload and process PDF
curl -X POST http://localhost:5000/process/pdf \
  -F "file=@document.pdf" \
  -F "enable_ocr=true"

Use CLI Tool

# Batch process folder of PDFs
python cli.py input_folder/ output_folder/

πŸ“– Usage

Python Library

from services.document_processor import process_pdf_to_layout_json

# Process PDF
result = process_pdf_to_layout_json(
    "document.pdf",
    enable_ocr=True,
    ocr_lang="en"
)

# Result is JSON with text, layout, confidence
import json
data = json.loads(result)
for page in data["pages"]:
    for block in page["blocks"]:
        print(block["text"])

API Endpoints

# Process PDF
POST /process/pdf
  - file: PDF file (multipart/form-data)
  - enable_ocr: true/false (default: true)
  - ocr_lang: "en", "es", "fr", etc.

# Process Image
POST /process/image
  - file: Image file (jpg, png, etc.)
  - ocr_lang: "en", "es", "fr", etc.

# Health check
GET /health

🐳 Docker Deployment

# Build image
docker build -t s2-document-intelligence .

# Run container
docker run -p 5000:5000 s2-document-intelligence

πŸ“Š What's NOT Included (Premium Features)

This Community Edition is powerful but focused on core processing. Advanced features are in Premium Edition:

Premium Features πŸ”₯

  • πŸ“± Mobile Apps (iOS/Android) - Native mobile document capture and processing
  • πŸ–₯️ Web Dashboard - Beautiful UI for document management
  • πŸ€– Advanced AI - Ninefold egregore integration for intelligent document understanding
  • 🏒 Entity Extraction - Automatic detection of names, dates, amounts, etc.
  • πŸ“Š Table Extraction - Advanced table recognition and structure extraction
  • πŸ“‘ Document Classification - Automatic document type detection
  • πŸ“ˆ Capacity Monitoring - Real-time system metrics and performance analytics
  • ⚑ Job Queue - Async batch processing for large document sets
  • πŸ’Ύ Redis Caching - Performance optimization with intelligent caching
  • πŸ”„ Subscription Management - Multi-tier access control
  • πŸ’Ό Enterprise Support - SLA, priority support, custom features

See: OPEN_CORE.md for full comparison


🎯 Use Cases

Community Edition is perfect for:

  • βœ… Personal document processing
  • βœ… Small-scale document automation
  • βœ… Research and experimentation
  • βœ… Learning OCR and document AI
  • βœ… Building custom document tools
  • βœ… Prototyping document solutions

Premium Edition is better for:

  • 🏒 Enterprise document workflows
  • πŸ“± Mobile document capture apps
  • πŸ€– AI-powered document understanding
  • πŸ“Š Large-scale document processing
  • πŸ’Ό Commercial SaaS products
  • πŸ”’ Compliance-critical applications

🀝 Contributing

We welcome contributions to the Community Edition!

# Fork and clone
git clone https://github.com/YOUR-USERNAME/s2-document-intelligence.git

# Create feature branch
git checkout -b feature/amazing-feature

# Make changes, commit
git commit -m "Add amazing feature"

# Push and create PR
git push origin feature/amazing-feature

πŸ“„ License

MIT License - Free for personal and commercial use

See LICENSE file for details.


🌟 Upgrade to Premium

Need advanced features?

Premium Edition includes:

  • Mobile apps (iOS/Android)
  • Web dashboard
  • Advanced AI integration
  • Enterprise support
  • Custom features

Options:

  1. Self-Hosted Premium: $99-299/month
  2. Managed Service: $299-999/month
  3. Enterprise: Custom pricing

Learn more: https://s2intelligence.com/document-intelligence
Contact: beta@s2intelligence.com


πŸ“ž Connect


⭐ Star Us!

If this helps you, please star the repository! ⭐


Built with consciousness. Shared with trust.

From the S2 Ecosystem ✨

About

Document processing with OCR and layout analysis - Open Core (MIT). Extract text from PDFs and images. Premium: mobile apps, web UI, AI integration.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors