This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Reason given by maintainers: Package renamed — see "document-analyser" instead
DocumentLens
Text Analysis & Academic Intelligence Microservice
Transform text content into actionable insights through comprehensive linguistic analysis, writing quality assessment, and academic integrity checking.
🚀 Quick Start
# Docker deployment (recommended)
docker-compose up -d
# Or raw deployment
./deploy.sh
# API available at: http://localhost:8002
# Documentation: http://localhost:8002/docs
📊 API Endpoints
Core Analysis
GET /health- Service health checkPOST /text- Text analysis (readability, quality, word frequency)POST /academic- Academic analysis (citations, DOI resolution, integrity)POST /files- File upload + analysis (PDF, DOCX, TXT, MD)
Advanced Text Analysis
POST /advanced/ngrams- N-gram extraction with optional filter termsPOST /advanced/ner- Named entity recognitionPOST /advanced/search/keywords- Batch keyword search across multiple terms
Document Intelligence
POST /files/infer-metadata- Infer year, company, industry, document type from contentPOST /text/infer-metadata- Metadata inference from raw text- Page-level text extraction (via
include_extracted_text=trueon/files)
Integration
- Root endpoint:
GET /- Service info and available endpoints - For presentations: Use PresentationLens
- For recordings: Use RecordingLens
🎯 Use Cases
- Text Analysis: Readability, writing quality, word frequency for any text content
- Academic Analysis: Citation verification, DOI resolution, AI detection, integrity checking
- Document Intelligence: Extract and analyze text from PDFs and Word documents
- Sustainability Research: Batch keyword analysis for TCFD, GRI, SDGs, SASB frameworks
- Corporate Report Analysis: Auto-detect metadata (year, company, industry) from annual reports
- Multi-Service Workflows: Integrate with specialized analysis services
Desktop Application Support
DocumentLens powers the document-lens-desktop Electron application for researchers analyzing corporate sustainability reports. Features include:
- Smart metadata inference (company name, year, industry, document type)
- Framework keyword analysis (TCFD, GRI, SDGs, SASB)
- Batch processing with SQLite storage
- Offline operation via bundled Python backend
🏗️ Microservices Ecosystem
DocumentLens is part of a focused microservices architecture:
| Service | Purpose | Repository |
|---|---|---|
| DocumentLens | Text analysis & academic intelligence | This repo |
| PresentationLens | Presentation design & structure analysis | presentation-lens |
| RecordingLens | Student recordings (video/audio) analysis | recording-lens |
| CodeLens | Source code quality & analysis | code-lens |
| SubmissionLens | Student submission router & frontend | submission-lens |
Integration Pattern
graph LR
A[Student Submission] --> B[SubmissionLens Frontend]
B --> C{File Type Router}
C -->|Text/PDF/DOCX| D[DocumentLens]
C -->|PPTX| E[PresentationLens]
C -->|Video/Audio| F[RecordingLens]
C -->|Source Code| G[CodeLens]
E --> D
F --> D
G --> D
D --> H[Combined Feedback]
H --> B
B --> I[Student Dashboard]
🚀 Deployment
Docker Deployment (Recommended)
git clone https://github.com/michael-borck/document-lens.git
cd document-lens
docker-compose up -d # Single container deployment
Raw/Native Deployment
git clone https://github.com/michael-borck/document-lens.git
cd document-lens
./deploy.sh # Handles venv, dependencies, and production server
🧪 Testing
# Install dev dependencies
uv sync --extra dev
# Run all tests
uv run pytest tests/ -v
# Run specific test file
uv run pytest tests/test_files.py -v
# Run only PDF tests
uv run pytest tests/ -m pdf -v
# Skip slow tests
uv run pytest tests/ -m "not slow" -v
# Run with coverage report
uv run pytest tests/
Test Structure
tests/conftest.py- Shared fixtures and test client setuptests/test_health.py- Health/smoke teststests/test_text_analysis.py- Text analysis endpoint teststests/test_academic_analysis.py- Academic analysis endpoint teststests/test_files.py- PDF file upload tests
Test Data
Place test files (PDF, DOCX, etc.) in the test-data/ directory. The test suite automatically discovers and uses these files for parameterized tests.
📚 Documentation
DEPLOYMENT.md- Deployment guide for Docker and raw installationsDOCUMENTLENS_SETUP.md- Setup and usage instructions.env.example- Configuration templatedocs/- Additional architecture and integration documentation
DocumentLens: Pure text intelligence at the heart of content analysis
Metadata
Release files for document-lens 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| document_lens-0.1.0.tar.gz | 317.8 kB | Without provenance | Details for document_lens-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| document_lens-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for document_lens-0.1.0-py3-none-any.whl |
Total release size: 384.6 kB
Release files / document_lens-0.1.0.tar.gz
| Download URL | document_lens-0.1.0.tar.gz |
|---|---|
| Size | 317.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
282d1c75f2a4b735cc262d19ee2b39e8e3d9ad7072c0048a8b64fbbad3a4e1e2
|
|
BLAKE2b-256 checksum How to use checksums |
b4408e46d8596e1c5262eda657b22ce6f52f7e12cb60276295f9178676aaa22e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.0
|
Release files / document_lens-0.1.0-py3-none-any.whl
| Download URL | document_lens-0.1.0-py3-none-any.whl |
|---|---|
| Size | 66.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bbd20a66c58b86918d9b9726f2c7d3477325a726f52aa9f2e1412dfbae9efa23
|
|
BLAKE2b-256 checksum How to use checksums |
969ca38dd69ed0a1677ed6d0b5f2134f03df4bd4178c2db201bcda8ad764c8dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.0
|
Security for document-lens 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.