Skip to main content

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:

  1. Detects file type by extension
  2. Calls the correct parser (PDF, OCR, Whisper, etc.)
  3. Passes the raw text through data_cleaner.py to 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 .json support by extending dispatcher.py and 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

allyin-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

allyin-0.1.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file allyin-0.1.0.tar.gz.

File metadata

  • Download URL: allyin-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for allyin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a3d75842515e7856449a5f9aabecdb4910bd344c07449a940bcca32d189e86bc
MD5 d8a1afff98099948e18ffcbea87b38aa
BLAKE2b-256 4c37cbc27ac64864b27cf3519f7ae508bf41c834ddc32333bc30ffedeeb84e82

See more details on using hashes here.

File details

Details for the file allyin-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: allyin-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for allyin-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f01f35b48911c02ab3426ec523519e0b13270732eea7953743b2dfe2bc8d084
MD5 cc928f714c8623ad959ef69f843300bc
BLAKE2b-256 fbf5369f17c2eedb1c75f180128a160933f7ca6c97c48033437410dd3554da95

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page