Semantic PDF-to-Markdown engine for Arabic and bilingual texts with local routing and repair
Project description
versed
Local PDF-to-Markdown tooling for Arabic and bilingual texts.
It repairs broken extraction, decodes QCF Quran fonts, classifies pages, and renders semantic Markdown from local PDFs.
It also normalizes parsed OpenITI block JSON into the same public Document
and markdown/plain-text outputs.
Install
pip install versed-pdf
pip install versed-pdf[pdf]
pip install versed-pdf[pdf,ocr]
Quick start
from versed import extract_document
result = extract_document("book.pdf", title="Book")
print(result.markdown)
OpenITI normalization:
from versed import build_openiti_markdown
parsed = {
"metadata": {"title": "رسالة"},
"content": [
{"type": "title", "content": "رسالة"},
{"type": "pageNumber", "content": {"volume": "01", "page": "218"}},
{"type": "paragraph", "content": "قال المصنف ..."},
],
}
result = build_openiti_markdown(parsed)
print(result.markdown)
CLI
versed repair-text "taf߬l"
versed detect book.pdf
versed classify book.pdf
versed extract book.pdf -o book.md
Public modules
versed.repair: Sabon mojibake repair helpersversed.qcf: QCF Quran font decodingversed.classify: local page classification and backend selectionversed.routing: cost-aware routing heuristicsversed.layout: aligned words to semantic blocksversed.markdown: semantic blocks to Markdown/plain textversed.openiti: parsed OpenITI block JSON toDocumentand markdownversed.extract: end-to-end local extraction
License
MIT
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 versed_pdf-1.2.2.tar.gz.
File metadata
- Download URL: versed_pdf-1.2.2.tar.gz
- Upload date:
- Size: 2.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eddc30aa594c0602de7cb84d0fe3fbc4cb8785a083c6e30234d58d2cedbdf6b5
|
|
| MD5 |
4f7eac5e4ee1f90dcea9e45c5f4a2e8b
|
|
| BLAKE2b-256 |
fa992dec74b278959ca5e8bd111e309f2017e8df0ad02f0b2dc5bf1c0f6ff970
|
File details
Details for the file versed_pdf-1.2.2-py3-none-any.whl.
File metadata
- Download URL: versed_pdf-1.2.2-py3-none-any.whl
- Upload date:
- Size: 2.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa87dd12c0b8f236f2a284570f7c79fa6c456dac89a7ae19f9d6e0bc2d118709
|
|
| MD5 |
24cd9722e89a70cda7f521c3b91c57bc
|
|
| BLAKE2b-256 |
37a2e5691b40316be2120a9655de29a35f11c64e424c141422385c67390716e8
|