Open-source · BSD-2-Clause

Every authority.
Every script.
One map.

Interscript encodes the world's romanization systems — BGN/PCGN, ISO, UN, ALA-LC, ODNI, ICAO, DIN — as machine-readable maps that produce byte-identical output across Ruby, TypeScript, and the browser. 289 systems, 35 authorities, 31 script pairs, all checked into git and tested against the published reference documents.

Systems
289
Authorities
35
Scripts
31
Runtimes
3
Warming up the engine…
Cyrillic1/3

Антон

BGN/PCGNUkrainian · 2019

Антон

Arabic1/3

عَبد الله

BGN/PCGNArabic · 1956

عَبد الله

Devanagari1/3

महात्मा

UNHindi · 2016

महात्मा

Han1/3

台北

Academia SinicaTongyong · 2002

台北

Ethiopic1/2

ኢትዮጵያ

ALA-LCAmharic · 2011

ኢትዮጵያ

Greek1/3

Αθήνα

ISOGreek · 843/1997

Αθήνα

Authority-backed. Real documents. Real test vectors.

  • BGN/PCGN
  • ISO
  • UNGEGN
  • ALA-LC
  • ODNI
  • ICAO
  • DIN
  • MOFA
  • Academia Sinica

What it is

Transliteration as data, not code.

Most romanization libraries hand-roll one system per language. Interscript encodes the entire corpus of authority-backed systems using a single declarative map format. Maps are checked into git, versioned, independently testable, and compiled to a typed JSON IR that any runtime can execute.

01

Author the map

A declarative Ruby DSL captures the rules of an authority document verbatim, including all special cases and notes.

stage :main do
  parallel do
    sub "щ" => "shch"
    sub "ъ" => "ʺ"
    sub "Антон" => "Anton"
  end
end
02

Compile to JSON IR

The Ruby Compiler::JsonIR emits a typed, versioned intermediate representation any runtime can load.

{
  "schemaVersion": 1,
  "systemCode": "bgnpcgn-ukr-Cyrl-Latn-2019",
  "stages": [
    { "kind": "stage", "name": "main",
      "rules": [ /* parallel sub-rules */ ] }
  ]
}
03

Run anywhere

Ruby gem, TypeScript package, and in-browser widget — all consume the same IR and produce the same bytes for the same input.

Interscript.transliterate(
  "bgnpcgn-ukr-Cyrl-Latn-2019",
  "Антон"
)
# => "Anton"

The neural layer

Where maps end, models begin.

Some conversions have no authority document: restoring the diacritics a scribe left out, reading Thai or Urdu as phonemes. Those ship as checksummed neural artifacts under the same discipline — measured metrics, teacher next to student, identical bytes from every runtime.

  • diacritization heb-diac-1.0 DER 17.46 beam-4
  • g2p tha-g2p-base-1.0 PER 9.19
  • diacritization urd-diac-1.0 CER 3.74
  • g2p · client tha-g2p-small-1.0 int8/int4 · 246/193 MiB · PER 2.85

The model catalogue →

Get started

Install in one line.

Open source under BSD-2-Clause. Maintained by Ribose Inc.

# Ruby
gem install interscript

# TypeScript / JavaScript
npm install interscript-ts

# Or load a single map's IR directly
curl interscript.org/maps/<system-code>.json