is

Interscript

Interoperable
script conversion systems

Transliteration systems stored in a maps/maps/ directory as Interscript Map files. You can create a new file and add it to the directory.

The file should be named as <system-code>.imp, where system-code is in accordance with ISO/CC 24229.

File structure

The file structure is described in Interscript Map Format documentation

Testing transliteration systems

To test all transliteration systems in the maps/ directory, run:

cd ruby/
bundle exec rspec

The command takes source texts from the test section, transforms them using rules and charmaps from the map key, and compares the results with expected: text from the source: section.

To test a specific transliteration system, set the environment variable TRANSLIT_SYSTEM to the system code of the desired system (i.e. the “basename” of the system’s YAML file):

TRANSLIT_SYSTEM=bgnpcgn-rus-Cyrl-Latn-1947 bundle exec rspec spec/interscript_spec.rb

To test staging maps, which may or may not work, you would need to execute a slightly different command:

TRANSLIT_SYSTEM=bgnpcgn-rus-Cyrl-Latn-1947 INTERSCRIPT_STAGING=1 bundle exec rspec spec/interscript_spec.rb

Testing new maps

We envisioned various ways to extend this library with custom repositories of maps, but the easiest way would be to run the interscript CLI utility, when you are located in a directory in which you have your .imp files. To install the interscript CLI utility you need to run gem install interscript.