On-Prem Document-AI für Schweizer Belege & QR-Rechnungen (DE/FR/IT) — Client, Verifier & lokaler Assistent
Project description
Belegant
🇨🇭 Schweiz · 🇩🇪 DE · 🇫🇷 FR · 🇮🇹 IT · 🇦🇹 AT
On-Prem Document-AI für Schweizer Belege & QR-Rechnungen — DE / FR / IT.
Liest IBAN, Betrag, MWST und Positionen aus einem Beleg-Bild und prüft jedes Feld
deterministisch mit der Prüfschicht belegant-verify.
Läuft lokal beim Kunden, keine Cloud. Von den Machern von German-OCR.
Installation
pip install belegant
Lokaler Assistent
belegant serv --port 8700 # Web-Assistent auf http://127.0.0.1:8700
Beleg hochladen → strukturiertes JSON plus deterministische Prüfung: IBAN/QR-IBAN, QR-Referenz (Modulo-10 rekursiv), Creditor Reference (ISO 11649), MWST-Arithmetik (8.1 / 2.6 / 3.8 %), CHE-UID, Swico-S1 und ein QR-Oracle-Abgleich. Was einen Check nicht besteht, wird geflaggt — nie still ausgegeben.
CLI
belegant extract rechnung.png # extrahierter, geprüfter Beleg als JSON
Modell-Backend
Belegant spricht Belegant-4B (multimodal, 4B) über Ollama oder
vLLM an — OpenAI-kompatibel. Konfiguration über Umgebungsvariablen (siehe .env.example):
BELEGANT_BASE_URL=http://127.0.0.1:11434/v1
BELEGANT_MODEL=belegant-4b
Prinzip
LLM proposes, verifier disposes. Das Modell extrahiert, belegant-verify prüft jedes
Feld gegen Prüfsummen, Arithmetik und den konventionell dekodierten QR-Code. Ergebnis:
0 % Halluzination auf validierten Feldern — lieber ein ehrliches null als eine
erfundene IBAN.
BelegBench v1
Fairer 4B-Vergleich, n = 300, 100 % synthetisch, DE / FR / IT.
| Modell | Field-EM | Halluzinationsrate | Parse-Fehler |
|---|---|---|---|
| Belegant-4B | 84.7 % | 0.0 % | 3/300 |
| Qwen3.5-4B (roh) | 75.8 % | 1.2 % | 15/100 |
| gemma3:4b (roh) | 16.5 % | 15.9 % | 76/100 |
Trilingual: DE 84.7 % · FR 81.4 % · IT 83.0 % — je 0 % Halluzination.
Takeaway: +9 Punkte in der 4B-Klasse und als einziges Modell mit 0 % Halluzination (die Treuhänder-Metrik) — bei ~3 s pro Beleg, lokal, auf einem 4B.
Credits & Danksagung
Basiert auf Qwen3.5-4B von Alibaba Cloud · Qwen Team (Apache-2.0) — grosser Dank ans Qwen-Team.
Lizenz
Apache-2.0
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 belegant-0.1.0.tar.gz.
File metadata
- Download URL: belegant-0.1.0.tar.gz
- Upload date:
- Size: 34.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d7618281320ea3f5c3058e523119250ac440e963dc283ba18ae2ffc87eb15b9
|
|
| MD5 |
c22a9daef29372e3341408a957c3ef02
|
|
| BLAKE2b-256 |
7d6f407c109cfe4a1f998c96d94790b873e4463212ea09794ca4b0363bfc7918
|
Provenance
The following attestation bundles were made for belegant-0.1.0.tar.gz:
Publisher:
publish.yml on Keyvanhardani/belegant
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
belegant-0.1.0.tar.gz -
Subject digest:
7d7618281320ea3f5c3058e523119250ac440e963dc283ba18ae2ffc87eb15b9 - Sigstore transparency entry: 2087617133
- Sigstore integration time:
-
Permalink:
Keyvanhardani/belegant@883e4528ea88867c0808b0fc1eca64420d00a02a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Keyvanhardani
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@883e4528ea88867c0808b0fc1eca64420d00a02a -
Trigger Event:
release
-
Statement type:
File details
Details for the file belegant-0.1.0-py3-none-any.whl.
File metadata
- Download URL: belegant-0.1.0-py3-none-any.whl
- Upload date:
- Size: 38.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce9a7c6a52242dcda6805263fa9d0404bf785546f7d988fb4d6132c9693820d5
|
|
| MD5 |
cd4885713b727274181c43550c9bbd2f
|
|
| BLAKE2b-256 |
fea497455462b9e32ae74db13d2809f842582df33020edd9b534c445f6399700
|
Provenance
The following attestation bundles were made for belegant-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Keyvanhardani/belegant
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
belegant-0.1.0-py3-none-any.whl -
Subject digest:
ce9a7c6a52242dcda6805263fa9d0404bf785546f7d988fb4d6132c9693820d5 - Sigstore transparency entry: 2087617210
- Sigstore integration time:
-
Permalink:
Keyvanhardani/belegant@883e4528ea88867c0808b0fc1eca64420d00a02a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Keyvanhardani
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@883e4528ea88867c0808b0fc1eca64420d00a02a -
Trigger Event:
release
-
Statement type: