Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/pages/about.astro
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,25 @@ const partners: Partner[] = [
</p>
</section>

<section>
<h2>What the measurements show</h2>
<p>
For conversions no authority document covers — restoring the diacritics a scribe left out,
or reading unwritten Thai as phonemes — we train neural models and measure them the same
way we test maps. On the public Arabic benchmark SadeedDiac-25, our Arabic model scores
2.29% error with 580 million parameters: better than every general-purpose language model
we measured it against (one vendor-published figure is lower; we could not reproduce it),
and about three times better than the 1.5-billion-parameter system the benchmark was
published with. The newest general-purpose models we tested were three to five times
worse than their predecessor on this task. One of our models is small enough (95 MB) to
run in a web browser.
</p>
<p>
Every score, the method used to produce it, and the full results table are on
<a href="/ml">the neural layer page</a>.
</p>
</section>

<section>
<h2>History</h2>
<p>
Expand Down
135 changes: 75 additions & 60 deletions src/pages/openapi.json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,77 +32,20 @@ const spec = {
url: "https://opensource.org/license/bsd-2-clause",
},
},
servers: [{ url: `${SITE}/api` }],
servers: [{ url: "https://api.interscript.org/v1" }],
tags: [
{ name: "transliterate", description: "Run a transliteration system" },
{ name: "systems", description: "Browse the system catalogue" },
{ name: "detect", description: "Find a matching system" },
{ name: "infer", description: "Run a neural model" },
],
paths: {
"/transliterate": {
get: {
tags: ["transliterate"],
summary: "Transliterate a single string",
description:
"Translates non-Latin text into Latin (or another script) using the named authority system. Idempotent, cacheable for the lifetime of a system version.",
operationId: "transliterateGet",
parameters: [
{
name: "system",
in: "query",
required: true,
description: "Interscript system code (e.g. `bgnpcgn-ukr-Cyrl-Latn-2019`).",
schema: { type: "string", maxLength: 200 },
example: "bgnpcgn-ukr-Cyrl-Latn-2019",
},
{
name: "input",
in: "query",
required: true,
description: "Source text to transliterate.",
schema: { type: "string", maxLength: 10_000 },
example: "Антон",
},
{
name: "stage",
in: "query",
required: false,
description: "Stage to execute (default: `main`).",
schema: { type: "string", default: "main" },
},
],
responses: {
"200": {
description: "Successful transliteration.",
content: {
"application/json": {
schema: { $ref: "#/components/schemas/TransliterationResult" },
},
},
},
"400": {
description: "Missing or invalid parameters.",
content: {
"application/json": {
schema: { $ref: "#/components/schemas/Error" },
},
},
},
"404": {
description: "System not found.",
content: {
"application/json": {
schema: { $ref: "#/components/schemas/Error" },
},
},
},
},
},
post: {
tags: ["transliterate"],
summary: "Transliterate via JSON body",
description:
"Same as GET /transliterate but accepts a JSON body — useful when input is large, contains newlines, or you prefer POST semantics.",
"Accepts a JSON body. The only request form this endpoint supports — query-parameter GET requests are not implemented.",
operationId: "transliteratePost",
requestBody: {
required: true,
Expand Down Expand Up @@ -233,6 +176,78 @@ const spec = {
},
},
},
"/infer": {
post: {
tags: ["infer"],
summary: "Run a neural model",
description:
"Runs a neural model from the model index (diacritization, grapheme-to-phoneme). Model ids and their measured scores are listed in the models.yaml index; see interscript.org/ml for the catalogue.",
operationId: "inferPost",
requestBody: {
required: true,
content: {
"application/json": {
schema: {
type: "object",
required: ["model", "input"],
properties: {
model: { type: "string", example: "ara-diac-small-2.1" },
input: { type: "string", example: "كتاب" },
},
},
},
},
},
responses: {
"200": {
description: "Successful inference.",
content: {
"application/json": {
schema: {
type: "object",
properties: {
model: { type: "string" },
task: { type: "string" },
input: { type: "string" },
output: { type: "string", example: "كِتَابٍ" },
},
},
},
},
},
},
},
options: {
tags: ["infer"],
summary: "CORS preflight",
responses: { "204": { description: "No content" } },
},
},
"/info": {
get: {
tags: ["systems"],
summary: "API version and catalogue counts",
description: "Returns the API version, the map count, and the model count.",
operationId: "infoGet",
responses: {
"200": {
description: "API metadata.",
content: {
"application/json": {
schema: {
type: "object",
properties: {
api_version: { type: "string" },
maps: { type: "integer" },
models: { type: "integer" },
},
},
},
},
},
},
},
},
"/detect": {
get: {
tags: ["detect"],
Expand Down