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
90 changes: 90 additions & 0 deletions src/content/docs/Workflow_Extension.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
= ISC-WF-1: workflow extension (rulesets, overrides, language variants)

The Interscript Configuration Syntax (ISC) describes each transliteration
system as a self-contained map. *ISC-WF-1* extends the language with three
additive constructs for reuse and specialization: named rulesets, use-time
overrides, and language conditioning. The constructs are defined by the
normative specification
https://github.com/interscript/maps/blob/main/docs/isc-wf-1.md[ISC-WF-1]
and are additive: any map that does not use them transliterates
byte-identically under runtimes with and without the extension.

== W1 — named rulesets

A `ruleset` is a named block of rules that never runs on its own. A stage
pulls it in with `use`, which expands the ruleset's items at that position:

[source,ruby]
----
ruleset romanize_descenders {
parallel {
sub "җ" "ž̧"
sub "қ" "ķ"
sub "ҫ" "ş"
}
}

stage main {
use romanize_descenders
parallel {
sub "а" "a"
}
}
----

Rulesets compose with dependencies: after `dependency "id" as alias`, a
ruleset from that map is referenced as `use alias.<name>`. Expansion is
recursive; a reference cycle is a load error.

== W2 — use with override

A `use` directive may carry an `override` block. Rows whose source string
matches an override row exactly are replaced by it; all other rows pass
through; new rows are added. The whole expansion still applies as one
longest-match pass:

[source,ruby]
----
stage main {
use romanize_descenders override {
sub "қ" "k̦" # this map's tradition uses the comma-below form
}
parallel {
sub "а" "a"
}
}
----

An override row is complete: it replaces the imported row's output and any
constraints, and it may carry its own language guard.

== W3 — language conditioning

A map can declare the languages it serves, and individual rows can be
guarded by a language selected at call time:

[source,ruby]
----
system "ISO:rus-Cyrl:Latn:9-1995" {
languages kur ckv
}
stage main {
parallel {
sub "қ" "ķ" # generic
sub "қ" "k̦" when kur # Kurdish tradition
}
}
----

Rules whose guard lists the selected language apply; guard-applicable rows
take precedence over an unguarded row with the same source string; with no
language selected every guard is inert and the map behaves as if the guarded
rows were absent.

== Availability

The construct semantics are specified in ISC-WF-1. Runtime support is
landing across the Interscript runtimes (Ruby reference implementation
first, then TypeScript, Python and Rust); each landing is gated by the
corpus additivity proof, so maps that do not use these constructs are never
affected.
21 changes: 21 additions & 0 deletions src/data/maps-catalogue.json
Original file line number Diff line number Diff line change
Expand Up @@ -9064,6 +9064,27 @@
"one_to_many": 0
}
},
"odni-zho-Hani-Latn-2015": {
"class": "Interscript::Node::MetaData",
"data": {
"authority_id": "odni",
"id": "2015",
"language": "iso-639-2:zho",
"source_script": "Hani",
"destination_script": "Latn",
"name": "ICS-630-01 Romanization of Chinese Personal Names (2015)",
"description": "This system applies to personal names rendered in Modern Chinese as\n represented in the Hanyu Pinyin Romanization System. It does not\n apply to names that are represented in other systems or in\n Romanization schemes or practices that are used to represent\n personal names in Chinese dialects.\n\n The Intelligence Community (IC) standard for transliterating Chinese\n personal names into English is the Hanyu Pinyin Romanization System\n (or pinyin), officially known as the Scheme of the Chinese Phonetic\n Alphabet (汉语拼音方案), with several modifications as specified in\n this document (e.g., absence of umlauted ü, title case for\n surnames). In 1982 the International Organization for\n Standardization (ISO) codified the Hanyu Pinyin Romanization System\n as ISO 7098, Information and Documentation – Romanization of Chinese\n (Second Edition, 12-15-1991).\n\n The primary purpose for designating a singular system is to allow\n for a consistent transcription of names that is specifically\n readable to the English-speaking non-specialist. It is not intended\n to be fully \"reversible\". Disambiguation should be accomplished by\n providing additional information following best practices of the\n issuing organization: the Unicode-encoded form of the original\n Chinese characters, the original encoding scheme if other than\n Unicode (e.g., Big5 or GB), whether traditional or simplified\n characters were used, and Standard Telegraphic Code (标准电码)\n representations (The Standard Telegraph Codebook, revised edition,\n PRC Ministry of Post and Telecommunications) — e.g., Ma Yingjiu\n (STC: 7456/5391/0036). Use simplified (or short form) characters as\n the default; traditional (or long form) characters may be used for\n non-Mainland persons.\n\n Personal names in Chinese should be transliterated into the IC\n Standard in accordance with the following criteria:\n\n a. the surname (family name) should appear first, followed by the\n given name\n b. the surname should be separated from the given name and be\n followed by the given name. The initial letter of each name\n should be capitalized, with the rest in lower case letters\n c. commas should not be placed between the surname and given name\n d. syllables should not be separated in the given name\n e. hyphens should not be used between any syllables (except as\n noted in paragraph 12)\n f. apostrophes should not be used between any syllables (see\n paragraph 14 for details)\n g. compound surnames should be capitalized with no space between\n the characters\n\n Examples include Zhang Wei, Hu Jintao, Ouyang Xiu, Zhou Youguang,\n and Ouyang Qianqing. If an official spelling of a name differs from\n the IC Standard, it may be used throughout the document, with the\n IC Standard spelling included where capabilities allow.\n\n When a married woman uses both her surname and her husband's\n surname, both surnames are capitalized, but a hyphen should be used\n to separate the surnames (e.g., Chen-Li Meiling; the first surname\n is the husband's, the second the wife's maiden name).\n\n The umlaut (ü), as in Lü and Nü, should not be used. The standard\n uses u for the ü character: Lu, Nu. No apostrophe (’) should be\n used between syllables; other forensic information (e.g. original\n Chinese characters, STC codes) should be used where necessary to\n disambiguate syllable combinations. Any additional ambiguity should\n be addressed in a Translator's Comment.",
"url": "",
"creation_date": "2015",
"nonstandard": {}
},
"test": [
"丁",
"Ding",
null
],
"skip_js": false
},
"royin-tha-Thai-Latn-1999": {
"class": "Interscript::Node::MetaData",
"data": {
Expand Down
Loading