Allyin: Modular AI tools for enterprise data processing
Project description
📚 multimodal2text — Universal Unstructured Content Extractor
multimodal2text is a plug-and-play Python library that extracts clean, structured text from unstructured files like PDFs, images, audio, slides, and HTML. Ideal as a preprocessing layer for RAG pipelines, LLM agents, and enterprise data ingestion systems.
🔧 Installation
pip install -r requirements.txt
Ensure dependencies like Tesseract (brew install tesseract) and ffmpeg (brew install ffmpeg) are installed if running OCR or audio transcription.
🏗️ Directory Structure
multimodal2text/
├── dispatcher.py # Central router
├── pdf_parser.py
├── image_ocr.py
├── audio_transcriber.py
├── slide_parser.py
├── html_cleaner.py
├── data_cleaner.py # Final text cleaner
├── utils.py
tests/
└── test_*.py # Test cases for all parsers
⚙️ How It Works
from allyin.multimodal2text import extract_text
text = extract_text("path/to/your/file.pdf") # Works for .pdf, .png, .wav, .pptx, .html
print(text)
The dispatcher:
- Detects file type by extension
- Calls the correct parser (PDF, OCR, Whisper, etc.)
- Passes the raw text through
data_cleaner.pyto normalize
📥 Supported Formats
| Format | Module | Notes |
|---|---|---|
.pdf |
pdf_parser.py |
Uses PyMuPDF (fitz) |
.png/jpg |
image_ocr.py |
Uses Tesseract OCR |
.wav/mp3/mp4 |
audio_transcriber.py |
Uses OpenAI Whisper |
.pptx |
slide_parser.py |
Uses python-pptx |
.html |
html_cleaner.py |
Strips boilerplate + tags |
🧪 Testing
pytest -s tests/
Sample files are provided under tests/sample_files/.
💡 Use Cases
- Input preprocessor for RAG pipelines
- Cleaner for enterprise document search
- Bridge between files and embeddings
- ETL for AI agent ingestion
📁 Example Script: run_demo.py
from allyin.multimodal2text import extract_text
file_path = "tests/sample_files/sample.pdf"
print(extract_text(file_path))
🚧 Notes
- You can add
.docx,.xlsx, or.jsonsupport by extendingdispatcher.pyand adding a new parser module. - Tesseract and Whisper must be installed and callable in your system PATH.
- These are external system binaries, not Python packages.
brew install ffmpeg
brew install tesseract
Project details
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 allyin-0.1.1.tar.gz.
File metadata
- Download URL: allyin-0.1.1.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9a603d10be3c68735be2831983ac199d370a659ab8d0d92acad1b05a2e4426f
|
|
| MD5 |
2e421b2f54ab2c5751ffbb3c46019d3d
|
|
| BLAKE2b-256 |
ba674face7a59d95c10242c694514d4057b20466ecf5d9151a81fb02df43eccf
|
File details
Details for the file allyin-0.1.1-py3-none-any.whl.
File metadata
- Download URL: allyin-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
837ebed48bfe314d723265d7e8d8276bd4891614cdf081ac47eaea5319921bed
|
|
| MD5 |
e38334a42184ca3e671d26c7dfd7dec5
|
|
| BLAKE2b-256 |
7ee391738c4946efc79d9381eb65844365c1018432ba69715fe4e76ec2c4fa10
|