Skip to main content

CuneiScribe

Bridge a 4,000-year cultural gap — read and write in cuneiform.

CuneiScribe lets you interact with humanity's oldest writing system. Translate between English and Akkadian, convert to cuneiform Unicode signs, and render clay tablet images — with built-in confidence gating that tells you when results are unreliable.

$ cuneiscribe cuneiform "LUGAL dan-nu LUGAL KUR aš-šur"
𒈗 𒆗𒉡 𒈗 𒆳 𒀸𒋩

$ cuneiscribe classify "The computer sends an email"
Type:       modern
Confidence: 0.70
Warnings:
  - Contains 2 modern concept(s) with no direct Akkadian equivalent

All outputs are machine-generated approximations. Consult Assyriological expertise for research or public-facing use.

Showcase

Reading the past: Epic of Gilgamesh → English

Input (Akkadian):  ša naq-ba i-mu-ru i-šid ma-a-ti ša kul-la-ta i-du-u₂
Cuneiform:         𒊭 𒅘𒁀 𒄿𒈬𒊒 𒄿𒋃 𒈠𒀀𒋾 𒊭 𒆰𒆷𒋫 𒄿𒁺𒌑
English:           "What Naqba saw, the fortress of all the lands, which knows all of them."

Gilgamesh tablet

Writing the past: Shakespeare → Cuneiform

Input (English):   "To be, or not to be, that is the question"
Akkadian:          šá-a-šú u la šá-a-šú šá-a-lu
Input (English):   "The king sent a letter to his brother"
Akkadian:          LUGAL a-na ŠEŠ-šu i-sap-ra
Cuneiform:         𒈗 𒀀𒈾 𒋀𒋗 𒄿𒉺𒅁𒊏

Royal inscription tablet

Confidence gating in action

$ cuneiscribe classify "The king rules the land"
Type:       short
Confidence: 0.85
Mode:       experience          ← Safe to render

$ cuneiscribe classify "Send me an email about the algorithm"
Type:       modern
Confidence: 0.70
Mode:       educational
Warnings:
  - Contains 2 modern concept(s) with no direct Akkadian equivalent
                                ← Warning: these concepts have no Akkadian equivalent

$ cuneiscribe classify "<script>alert(1)</script>"
Type:       anomalous
Confidence: 0.90
Warnings:
  - Input rejected              ← Blocked: anomalous input

Install

pip install cuneiscribe

Quick Start

CLI

# Convert transliteration to cuneiform
cuneiscribe cuneiform "LUGAL dan-nu"        # → 𒈗 𒆗𒉡

# Classify input before processing
cuneiscribe classify "The king rules"       # → short, 0.85, experience mode

# Render as clay tablet
cuneiscribe render "šar kiš-ša-ti" -o tablet.svg

# Full pipeline with confidence gating (requires model)
cuneiscribe craft "The king rules" --model models/byt5-base-akkadian --json

# Look up a sign
cuneiscribe info LUGAL                      # → 𒈗, U+12217

Python API

from cuneiscribe import CuneiScribe, classify

# Check input first
result = classify("I love pizza")
print(result.input_type)   # "short"
print(result.warnings)     # []

# Full pipeline with gating
tc = CuneiScribe(model_path="models/byt5-base-akkadian")
result = tc.craft("The mighty king")

print(result.akkadian)     # Transliteration
print(result.cuneiform)    # Unicode cuneiform
print(result.confidence)   # 0.0-1.0
print(result.suggestion)   # "render" / "render_with_caveat" / "fallback"
print(result.warnings)     # List of caveats

# No model needed for transliteration → cuneiform
result = tc.transliterate_and_render("LUGAL dan-nu", output_path="tablet.svg")

Web Demo

pip install cuneiscribe[serve]
python -m cuneiscribe.interfaces.demo --model models/byt5-base-akkadian --share

How It Works

User Input
    │
    ▼
Input Classifier ──→ anomalous? → REJECT
    │
    ▼
ByT5 Translation (En→Ak)
    │
    ▼
Output Validator ──→ unreliable? → FALLBACK (transliteration only)
    │
    ▼
Cuneiform Converter (14,240 mappings)
    │
    ▼
Tablet Renderer (SVG/PNG)
    │
    ▼
Result + Confidence + Warnings

The confidence gating pipeline ensures the system never confidently renders wrong cuneiform. When output quality is uncertain, it degrades gracefully to transliteration-only with a warning.

Features

Feature Description
Confidence Gating Input classification + output validation before rendering
Cuneiform Converter 14,240 transliteration→Unicode mappings, 95.3% coverage
Clay Tablet Renderer SVG/PNG with authentic Mesopotamian styling, <10ms
Bidirectional NMT English→Akkadian and Akkadian→English (ByT5-base, 49.1 BLEU)
CLI cuneiform, render, craft, classify, info commands
Web Demo Gradio interface with 4-panel display

Architecture

cuneiscribe/
├── pipeline/      ← Confidence gating (classifier + validator)
├── models/        ← ByT5 bidirectional translator
├── knowledge/     ← Sign tables + cuneiform converter
└── interfaces/    ← CLI, web demo, SVG renderer

Four decoupled layers. Swap the model, update sign tables, or add a dialect without breaking interfaces.

Limitations

  • English→Akkadian produces approximate modern transliterations, not authentic ancient text
  • Trained on Neo-Assyrian/Old Babylonian data; other Akkadian dialects (e.g., Old Assyrian commercial texts) may have substantially lower quality
  • Even with 14,240 sign mappings and a 17K-lemma dictionary, domain-specific data matters more than model size
  • Currently English-only

See ROADMAP.md for the engineering roadmap.

Citation

@inproceedings{cuneiscribe2026,
  title={CuneiScribe: Bridging a 4,000-Year Cultural Gap with Bidirectional Akkadian NMT and Cuneiform Rendering},
  author={Wang, Geoffrey},
  booktitle={Proceedings of the 4th Workshop on Cross-Cultural Considerations in NLP (C3NLP)},
  year={2026}
}

License

Apache 2.0

Metadata

Release files for cuneiscribe 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cuneiscribe 0.2.0
File Size Uploaded Provenance Actions
cuneiscribe-0.2.0.tar.gz 139.8 kB Without provenance Details for cuneiscribe-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cuneiscribe 0.2.0
File Interpreter ABI Platform Actions
cuneiscribe-0.2.0-py3-none-any.whl Python 3 none any Details for cuneiscribe-0.2.0-py3-none-any.whl

Total release size: 279.1 kB

Release files / cuneiscribe-0.2.0.tar.gz

Download URL cuneiscribe-0.2.0.tar.gz
Size 139.8 kB
Tags Source
SHA-256 checksum
How to use checksums
803d2858d55ee3cafef9c942556146377071f3423c2ad8fd3d52b938ccdae85a
BLAKE2b-256 checksum
How to use checksums
656241e004055e4818945fb7e20352c15f9813a3c8fb18032d5bcf9688219831
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / cuneiscribe-0.2.0-py3-none-any.whl

Download URL cuneiscribe-0.2.0-py3-none-any.whl
Size 139.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7f10db241de4d70d75416f0ed4bb6e2bdfd72403c7ed9172c37b6a7b9230f48
BLAKE2b-256 checksum
How to use checksums
38d888d5b562c0498489e3476bf44e68c980c42299f3c1716b27037457289122
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Security for cuneiscribe 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page