script conversion systems



Interscript depends on Ruby. Once you manage to install Ruby, it’s easy. This part won’t work until we release Interscript v2, please use the one below.

gem install interscript -v "~>2.0"

You can also download a local copy of this Git repository, eg. for development purposes:

git clone
cd lcs/ruby
bundle install

Additional prerequisites for Thai systems

If you want to transliterate Thai systems, you will need to install some additional requirements. Please consult: Usage with Secryst.


Assume you have a file ready in the source script like this:

cat <<EOT > rus-Cyrl.txt
Эх, тройка! птица тройка, кто тебя выдумал? знать, у бойкого народа ты
могла только родиться, в той земле, что не любит шутить, а
ровнем-гладнем разметнулась на полсвета, да и ступай считать версты,
пока не зарябит тебе в очи. И не хитрый, кажись, дорожный снаряд, не
железным схвачен винтом, а наскоро живьём с одним топором да долотом
снарядил и собрал тебя ярославский расторопный мужик. Не в немецких
ботфортах ямщик: борода да рукавицы, и сидит чёрт знает на чём; а
привстал, да замахнулся, да затянул песню — кони вихрем, спицы в
колесах смешались в один гладкий круг, только дрогнула дорога, да
вскрикнул в испуге остановившийся пешеход — и вон она понеслась,
понеслась, понеслась!

Н.В. Гоголь

You can run interscript on this text using different transliteration systems.

interscript rus-Cyrl.txt \
  --system=bgnpcgn-rus-Cyrl-Latn-1947 \

interscript rus-Cyrl.txt \
  --system=iso-rus-Cyrl-Latn-9-1995 \

interscript rus-Cyrl.txt \
  --system=icao-rus-Cyrl-Latn-9303 \

interscript rus-Cyrl.txt \
  --system=bas-rus-Cyrl-Latn-2017-bss \

It is then easy to see the exact differences in rendering between the systems.

diff bgnpcgn-rus-Latn.txt bas-rus-Latn.txt

You can also run some maps in reverse (warning: not all maps are made to be reversed), either by changing an order of character sets in a name (for bas-rus-Cyrl-Latn-2017-bss it would be bas-rus-Latn-Cyrl-2017-bss) or appending -reverse to their name:

interscript my_jamos.txt \
  --system=var-kor-Hang-Hang-jamo-reverse \

You can also compose some maps, by joining their names with | (similar to how bash pipe works). For instance:

interscript my_file.txt \
  --system='var-map1-Xxxx-Xxxx|var-map2-Xxxx-Xxxx' \

If you use Interscript from the Git repository, you would call the following command instead of interscript:

# Ensure you are in your Git repository root path
ruby/bin/interscript rus-Cyrl.txt \
  --system=bas-rus-Cyrl-Latn-2017-bss \

Integration with Ruby Applications


Interscript can be used as a Ruby Gem library to be integrated with other Ruby applications.


You need to make sure your Gemfile contains the following lines:

source ""

gem "interscript", "~>2.0"


In your codebase, if you don’t do Bundler.require, you will need to add the following line:

require "interscript"

Listing all available maps

To list all available maps, one must execute the following code:

maps = Interscript.maps

maps will be an array containing all Interscript maps by their name.

Transliterating text

To transliterate test using a given map, like bas-rus-Cyrl-Latn-2017-bss, one must execute:

cache = {}
input = "Хелло"
output = Interscript.transliterate("bas-rus-Cyrl-Latn-2017-bss",

You should preserve the cache variable for performance reasons. It is optional, you don’t need to (but should) supply it.

Using Ruby compiler

If performance is of utmost performance for your application and you want to sacrifice a little bit of loading time for much better performance, you can use Interscript::Compiler::Ruby instead of Interscript::Interpreter (which is used by default).

require "interscript/compiler/ruby"

cache = {}
input = "Хелло"
output = Interscript.transliterate("bas-rus-Cyrl-Latn-2017-bss",
                                   compiler: Interscript::Compiler::Ruby)