A comprehensive document parser with AI-powered intelligence for converting and analyzing academic materials
Project description
NoteParser ๐
A comprehensive AI-powered document parser for converting and analyzing academic materials
NoteParser is a powerful AI-enhanced academic document processing system built on Microsoft's MarkItDown library. It combines traditional document parsing with cutting-edge AI services to provide intelligent document analysis, semantic search, and knowledge extraction for university students and educators.
โจ Key Features
๐ Multi-Format Support
- Documents: PDF, DOCX, PPTX, XLSX, HTML, EPUB
- Media: Images with OCR, Audio/Video with transcription
- Output: Markdown, LaTeX, HTML
๐ Academic-Focused Processing
- Mathematical equations preservation and enhancement
- Code blocks with syntax highlighting and language detection
- Bibliography and citation extraction
- Chemical formulas with proper subscript formatting
- Academic keyword highlighting (theorem, proof, definition, etc.)
๐ Extensible Plugin System
- Course-specific processors (Math, Computer Science, Chemistry)
- Custom parser plugins for specialized content
- Easy plugin development with base classes
๐ Organization Integration
- Multi-repository synchronization for course organization
- Cross-reference detection between related documents
- Automated GitHub Actions for continuous processing
- Searchable indexing across all notes
๐ค AI-Powered Intelligence
- Semantic document analysis with keyword and topic extraction
- Natural language Q&A over your document library
- Intelligent summarization and insight generation
- Knowledge graph construction and navigation
- AI-enhanced search with relevance ranking
๐ฅ๏ธ Multiple Interfaces
- AI-enhanced CLI with natural language commands
- Interactive web dashboard with AI features
- Python API with async AI integration
- REST API endpoints with AI processing
๐ Quick Start
Installation
Option 1: Using pip (Recommended)
# Install from PyPI with all features (recommended)
pip install noteparser[all]
# Install with AI features only
pip install noteparser[ai]
# Install basic version
pip install noteparser
# Install from source with all features (recommended)
git clone https://github.com/CollegeNotesOrg/noteparser.git
cd noteparser
pip install -e .[dev,all]
Option 2: Development Installation
# Clone the repository
git clone https://github.com/CollegeNotesOrg/noteparser.git
cd noteparser
# Create a virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install with all dependencies (includes dev tools)
pip install -e .[dev,all]
# Or install with specific feature sets
pip install -e .[dev] # Development tools only
pip install -e .[ai] # AI features only
Note: As of v2.1.0, all dependencies are managed through
pyproject.toml. Therequirements.txtfiles are maintained for compatibility but using pip extras is the recommended approach.
System Dependencies
Some features require system packages:
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install -y \
tesseract-ocr \
tesseract-ocr-eng \
ffmpeg \
poppler-utils
# macOS
brew install tesseract ffmpeg poppler
# Windows (using Chocolatey)
choco install tesseract ffmpeg poppler
Python Version Compatibility
- Python 3.10+ is required (updated from 3.9+ due to markitdown dependency)
- Tested on Python 3.10, 3.11, and 3.12
- Python 3.9 and earlier support was removed due to compatibility requirements with latest dependencies
Basic Usage
# Initialize in your project directory
noteparser init
# Parse a single document
noteparser parse lecture.pdf --format markdown
# Parse with AI enhancement
noteparser ai analyze lecture.pdf --output enhanced-lecture.md
# Query your knowledge base
noteparser ai query "What is machine learning?" --filters '{"course": "CS101"}'
# Batch process a directory
noteparser batch input/ --recursive --format latex
# Start the AI-enhanced web dashboard
noteparser web --host 0.0.0.0 --port 5000
# Check AI services health
noteparser ai health --detailed
# Sync to organization repository
noteparser sync output/*.md --target-repo study-notes --course CS101
Python API
import asyncio
from noteparser import NoteParser
from noteparser.integration import OrganizationSync
# Initialize parser with AI capabilities
parser = NoteParser(enable_ai=True, llm_client=your_llm_client)
# Parse single document
result = parser.parse_to_markdown("lecture.pdf")
print(result['content'])
# Parse with AI enhancement
async def ai_parse():
result = await parser.parse_to_markdown_with_ai("lecture.pdf")
print(f"Content: {result['content']}")
print(f"AI Insights: {result['ai_processing']}")
asyncio.run(ai_parse())
# Query knowledge base
async def query_knowledge():
result = await parser.query_knowledge(
"What are the key concepts in machine learning?",
filters={"course": "CS101"}
)
print(f"Answer: {result['answer']}")
for doc in result['documents']:
print(f"- {doc['title']} (relevance: {doc['score']:.2f})")
asyncio.run(query_knowledge())
# Batch processing
results = parser.parse_batch("notes/", output_format="markdown")
# Organization sync
org_sync = OrganizationSync()
sync_result = org_sync.sync_parsed_notes(
source_files=["note1.md", "note2.md"],
target_repo="study-notes",
course="CS101"
)
๐ Project Structure
your-study-organization/
โโโ noteparser/ # This repository - AI-powered parsing engine
โโโ noteparser-ai-services/ # AI microservices (RagFlow, DeepWiki)
โโโ study-notes/ # Main notes repository
โ โโโ courses/
โ โ โโโ CS101/
โ โ โโโ MATH201/
โ โ โโโ PHYS301/
โ โโโ .noteparser.yml # Organization configuration
โโโ note-templates/ # Shared LaTeX/Markdown templates
โโโ note-extensions/ # Custom plugins
โโโ note-dashboard/ # Optional: separate web interface
๐ค AI Services Setup
NoteParser can operate in two modes:
Standalone Mode (Basic)
Works without external AI services - provides core document parsing functionality.
AI-Enhanced Mode (Recommended)
Requires the noteparser-ai-services repository for full AI capabilities.
# Clone and start AI services
git clone https://github.com/CollegeNotesOrg/noteparser-ai-services.git
cd noteparser-ai-services
docker-compose up -d
# Verify services are running
curl http://localhost:8010/health # RagFlow
curl http://localhost:8011/health # DeepWiki
# Test AI integration
noteparser ai health
AI Services Documentation: https://collegenotesorg.github.io/noteparser-ai-services/
โ๏ธ Configuration
AI Services Configuration (config/services.yml)
services:
ragflow:
host: localhost
port: 8010
enabled: true
config:
embedding_model: "sentence-transformers/all-MiniLM-L6-v2"
vector_db_type: "faiss"
chunk_size: 512
top_k: 5
deepwiki:
host: localhost
port: 8011
enabled: true
config:
ai_model: "gpt-3.5-turbo"
auto_link: true
similarity_threshold: 0.7
features:
enable_rag: true
enable_wiki: true
enable_ai_suggestions: true
Organization Configuration (.noteparser-org.yml)
organization:
name: "my-study-notes"
base_path: "."
auto_discovery: true
repositories:
study-notes:
type: "notes"
auto_sync: true
formats: ["markdown", "latex"]
noteparser:
type: "parser"
auto_sync: false
sync_settings:
auto_commit: true
commit_message_template: "Auto-sync: {timestamp} - {file_count} files updated"
branch: "main"
push_on_sync: false
cross_references:
enabled: true
similarity_threshold: 0.7
max_suggestions: 5
Plugin Configuration
plugins:
math_processor:
enabled: true
config:
equation_numbering: true
symbol_standardization: true
cs_processor:
enabled: true
config:
code_line_numbers: true
auto_language_detection: true
๐ Plugin Development
Create custom plugins for specialized course content:
from noteparser.plugins import BasePlugin
class ChemistryPlugin(BasePlugin):
name = "chemistry_processor"
version = "1.0.0"
description = "Enhanced processing for chemistry courses"
course_types = ['chemistry', 'organic', 'biochemistry']
def process_content(self, content: str, metadata: Dict[str, Any]) -> Dict[str, Any]:
# Your custom processing logic here
processed_content = self.enhance_chemical_formulas(content)
return {
'content': processed_content,
'metadata': {**metadata, 'chemical_formulas_found': count}
}
๐ GitHub Actions Integration
Automatic processing when you push new documents:
# .github/workflows/parse-notes.yml
name: Parse and Sync Notes
on:
push:
paths: ['input/**', 'raw-notes/**']
jobs:
parse-notes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: pip install noteparser[all]
- name: Parse documents
run: noteparser batch input/ --format markdown
- name: Sync to study-notes
run: noteparser sync output/*.md --target-repo study-notes
๐ฅ๏ธ AI-Enhanced Web Dashboard
Access the AI-powered web interface at http://localhost:5000:
noteparser web
Core Features:
- Browse all repositories and courses
- Search across all notes with semantic similarity
- View documents with syntax highlighting
- Parse new documents through the web interface
- Manage plugins and configuration
- Monitor sync status and cross-references
AI Features (/ai dashboard):
- ๐ค AI Document Analysis: Upload and analyze documents with AI insights
- ๐ Knowledge Querying: Natural language Q&A over your document library
- ๐ Text Analysis: Extract keywords, topics, and summaries from content
- ๐ Enhanced Search: Semantic search with relevance ranking and AI answers
- ๐ก Smart Insights: Automatic topic detection and content relationships
- ๐ Service Health: Real-time monitoring of AI service status
Production Deployment:
# Using Docker Compose (recommended)
docker-compose -f docker-compose.prod.yml up -d
# Using deployment script
./scripts/deploy.sh production 2.1.0
# Access the application
open http://localhost:5000
open http://localhost:5000/ai # AI Dashboard
๐ Use Cases
๐ Individual Student
# Daily workflow
noteparser parse "Today's Lecture.pdf"
noteparser sync output/todays-lecture.md --course CS101
๐ซ Course Organization
# Semester setup
noteparser init
noteparser batch course-materials/ --recursive
noteparser index --format json > course-index.json
๐ฅ Study Group
# Collaborative notes
noteparser parse shared-notes.docx --format markdown
git add . && git commit -m "Add processed notes"
git push origin main # Triggers auto-sync via GitHub Actions
๐ฌ Research Lab
# Research paper processing
noteparser parse "Research Paper.pdf" --format latex
noteparser web # Browse and cross-reference with existing notes
๐ Advanced Features
๐ Smart Content Detection
- Mathematical equations: Automatic LaTeX formatting preservation
- Code blocks: Language detection and syntax highlighting
- Citations: APA, MLA, IEEE format recognition
- Figures and tables: Structured conversion with captions
๐ท๏ธ Metadata Extraction
- Course identification from file names and paths
- Topic extraction and categorization
- Author and date detection
- Academic keywords and tagging
๐ Cross-References
- Similar content detection across documents
- Prerequisite tracking between topics
- Citation network visualization
- Knowledge graph construction
๐ ๏ธ Development
Setup Development Environment
git clone https://github.com/CollegeNotesOrg/noteparser.git
cd noteparser
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install with all development dependencies (recommended)
pip install -e .[dev,all]
# Or install dev tools only
pip install -e .[dev]
# Install pre-commit hooks
pre-commit install
Development Dependencies
The [dev] extra includes comprehensive development tools:
- Testing:
pytest,pytest-cov,pytest-mock,pytest-asyncio,pytest-xdist - Code Quality:
black,ruff,mypy,isort,pylint,pre-commit - Documentation:
sphinx,mkdocs-material,myst-parser - Development Tools:
ipython,jupyter,notebook - Profiling:
memory-profiler,line-profiler - Security:
bandit,safety
Run Tests
pytest tests/ -v --cov=noteparser
Code Quality
# Auto-formatting (required)
black src/ tests/
# Linting with auto-fixes
ruff check src/ tests/ --fix
# Type checking
mypy src/noteparser/ --ignore-missing-imports
# All quality checks at once
make lint # Runs black, ruff, and mypy
CI/CD Information
The project uses GitHub Actions for continuous integration with the following jobs:
- Cross-platform testing (Ubuntu, Windows, macOS) on Python 3.10-3.12
- Code quality checks (black, ruff, mypy)
- Security scans (bandit, safety)
- Performance benchmarking with pytest-benchmark
- Docker image testing and validation
- Integration testing with Redis and PostgreSQL services
All dependencies are now managed through pyproject.toml for better reproducibility and CI reliability.
๐ค Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Run the test suite
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ฆ Dependencies
All dependencies are managed through pyproject.toml with the following structure:
Core Dependencies (included in base installation)
- markitdown - Microsoft's document parsing engine
- Flask - Web framework for dashboard
- Click - CLI interface
- PyYAML - Configuration management
- Pillow - Image processing
- OpenCV - Advanced image operations
- pytesseract - OCR capabilities
- SpeechRecognition - Audio transcription
- moviepy - Video processing
- pandas - Data processing
- requests - HTTP client
- gunicorn - Production WSGI server
Optional Dependency Groups
[ai] - Advanced AI/ML Features
- sentence-transformers - Semantic embeddings
- faiss-cpu - Vector similarity search
- langchain - LLM framework integration
- openai - OpenAI API client
- sqlalchemy - Database ORM
- elasticsearch - Full-text search
- prometheus-client - Metrics collection
- pydantic - Data validation
[dev] - Development Tools
- pytest ecosystem - Testing framework
- black, ruff, mypy - Code quality
- sphinx, mkdocs-material - Documentation
- jupyter, ipython - Interactive development
- bandit, safety - Security scanning
[all] - All Optional Features
Combines AI and development dependencies for complete functionality.
Installation Examples
pip install noteparser # Core only
pip install noteparser[ai] # Core + AI features
pip install noteparser[dev] # Core + dev tools
pip install noteparser[all] # Everything
๐ Acknowledgments
- Microsoft MarkItDown - The core parsing engine that powers format conversion
- Academic Community - For inspiration and requirements gathering
- Open Source Libraries - All the amazing Python packages that make this possible
๐ Support
- Documentation: https://collegenotesorg.github.io/noteparser/
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Made with โค๏ธ for students, by a student
Transform your study materials into a searchable, interconnected knowledge base
Author: Suryansh Sijwali GitHub: @SuryanshSS1011 Organization: CollegeNotesOrg
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file noteparser-2.1.2.tar.gz.
File metadata
- Download URL: noteparser-2.1.2.tar.gz
- Upload date:
- Size: 140.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97cdf3b8b3922ce91dc08aacec0bb2e040120e0d5c1742e44541f663cbe1209b
|
|
| MD5 |
144516e79e14cf5396b5c666fd7f76ba
|
|
| BLAKE2b-256 |
932e5e21d73d925b33e124c1edf8285a1fd0c6e83a1ca999e2b1461623375f26
|
Provenance
The following attestation bundles were made for noteparser-2.1.2.tar.gz:
Publisher:
publish.yml on CollegeNotesOrg/noteparser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
noteparser-2.1.2.tar.gz -
Subject digest:
97cdf3b8b3922ce91dc08aacec0bb2e040120e0d5c1742e44541f663cbe1209b - Sigstore transparency entry: 423490881
- Sigstore integration time:
-
Permalink:
CollegeNotesOrg/noteparser@f07231adc84fd0724549c3813d97bb2b510ec3dc -
Branch / Tag:
refs/tags/v2.1.2 - Owner: https://github.com/CollegeNotesOrg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f07231adc84fd0724549c3813d97bb2b510ec3dc -
Trigger Event:
push
-
Statement type:
File details
Details for the file noteparser-2.1.2-py3-none-any.whl.
File metadata
- Download URL: noteparser-2.1.2-py3-none-any.whl
- Upload date:
- Size: 102.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ca4bec0aac8af904c38baa0471196e1e6bfc5e4b88a3281e7d30b33ecf29aa3
|
|
| MD5 |
2cc93082285048b808b350a1dd1c013c
|
|
| BLAKE2b-256 |
826b1cccb8cf42542ec638da086d65f478a14492c49154d690f992370d527611
|
Provenance
The following attestation bundles were made for noteparser-2.1.2-py3-none-any.whl:
Publisher:
publish.yml on CollegeNotesOrg/noteparser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
noteparser-2.1.2-py3-none-any.whl -
Subject digest:
1ca4bec0aac8af904c38baa0471196e1e6bfc5e4b88a3281e7d30b33ecf29aa3 - Sigstore transparency entry: 423490909
- Sigstore integration time:
-
Permalink:
CollegeNotesOrg/noteparser@f07231adc84fd0724549c3813d97bb2b510ec3dc -
Branch / Tag:
refs/tags/v2.1.2 - Owner: https://github.com/CollegeNotesOrg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f07231adc84fd0724549c3813d97bb2b510ec3dc -
Trigger Event:
push
-
Statement type: