← All docs

Libraries

Interscript ships as libraries for three languages, a command-line tool, and a web API. All of them run the same transliteration systems and the same neural models, and all model artifacts are checksum-verified when they load.

TypeScript (Node and browsers)

Install:

npm install interscript

Transliterate with any of the 428 authority systems:

import { transliterateAsync } from "interscript"

const out = await transliterateAsync(
  "bgnpcgn-ukr-Cyrl-Latn-2019",
  "Антон",
)

Use a neural model (for example, Arabic diacritization). The model downloads once, is verified against its checksum, and is cached:

import { imf } from "interscript/ml"

const resolved = await imf.resolve("ara-diac-layerdrop-1.0-int4")
const model = await imf.IMFModel.fromZipBytes(resolved.bytes)
const vocalized = await model.translate("السلام عليكم")

All four language runtimes execute the same canonical grammar: the ISC grammar has a single normative source (the parsanol .parg file, checksum-pinned), and the TypeScript and Python parsers are generated from it — verified structurally identical across the whole 434-file corpus on every change.

Rust (crates.io)

Install:

cargo add interscript

Transliterate and run the golden conformance gate:

use interscript_rs::Runtime;

let rt = Runtime::new(vec![
    std::path::PathBuf::from("maps/maps"),
    std::path::PathBuf::from("maps/libs"),
]);
let out = rt.transliterate("bgnpcgn-ukr-Cyrl-Latn-2019", "Антон")?;

The crate also ships the iscrs CLI (transliterate, corpus test sweeps, the golden capture, and IMF model inference).

Python

Install:

pip install secryst

Load a model and run it:

from secryst import Model

model = Model.load("ara-diac-small-2.1-int8")
print(model.translate("قوله فحكمها في الوفاة"))

Ruby

Install:

gem install interscript

Transliterate (deterministic maps), optionally with a language selection for maps that declare languages:

require "interscript"

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

Use a neural model — the gem embeds the IMF v1 runtime (index resolution, checksum verification, ONNX inference):

require "interscript/ml"

Interscript::ML::Translator.new(model_file: "ara-diac-base-1.0")
  .translate("قوله فحكمها في الوفاة")

Command line

The deterministic systems:

echo "Антон" | npx interscript t bgnpcgn-ukr-Cyrl-Latn-2019

The neural layer:

echo "السلام عليكم" | npx interscript m ara-diac-layerdrop-1.0-int4

Run npx interscript --help for the full command list, including bulk processing and script detection.

Web API

A hosted REST API serves both layers: api.interscript.org. Its documentation, including batch endpoints and asset serving, lives at /docs.

Try it in the browser

The playground runs the full stack in your browser: pick any system, optionally vocalize Arabic text first, and copy the exact code for the configuration you selected. Nothing is sent to a server.

Which models exist

The model catalog with measured quality numbers for every artifact is on the neural layer page. The machine-readable index that the libraries resolve against is models.yaml in the interscript-ml repository.