Varnam, An Editor To Easily Type Malayalam & Other Indian Languages


Read {count} times since 2020

Today, I’m introducing Varnam Editor, an easy software for you to write Malayalam and other Indian languages. It is easily installable for GNU/Linux distros like Ubuntu, Linux Mint, Debian, Archlinux etc.

Technically, it’s an editor for transliterating Indian languages. Varnam Editor uses an existing library called Varnam and makes it easy to install & use.

Transliteration

From Wikipedia :

Transliteration is a type of conversion of a text from one script to another that involves swapping letters (thus trans- + liter-) in predictable ways (such as α → a, д → d, χ → ch, ն → n or æ → ae).

Basically transliteration is Manglish to Malayalam conversion. Example :

ennaa -> എന്നാ

We write the text in english letters and it will be converted to the language we need. This can be done for any languages. Even malayalam to hindi or tamil to bangla. Check out libindic project which do just that.

Varnam

Varnam is a C library to easily type Indian languages using transliteration. The project was started by a malayalee Navaneeth K.N in 2010. It’s written in C and works on GNU/Linux and Windows.

Varnam is a great tool ! I found it very useful and typing with it so easy ! There’s an ibus integration which makes it easy to type natively in apps (ibus is a keyboard input system for GNU/Linux.) :

Varnam ibus autocomplete dialog in Telegram, a Qt app

Varnam Components

Compiling and installing libvarnam will give a nifty command line tool :

varnamc -s ml -t aa ennaa undu

which will give an output :

ആ എന്നാ ഉണ്ട്

Installing varnam for the first time won’t give good predictions. You need to import a word corpus. Read the README. This is also another problem that is solved by my flatpak package.

One amazing feature of Varnam is that it has predictions + character map :

ennaa -> എന്നാ eNNaa -> എണ്ണാ

So capitalizing letters will give better results. Google Input Tools doesn’t support this.

Varnam Editor

Why I Built Varnam Editor

Altough varnam is a great tool, setting it up was difficult :

  • Need to compile and manually install
  • No debian or other distro package
  • Setting it with ibus didn’t work in some apps such as Telegram (Qt app)
  • In KDE+i3, switching ibus layouts didn’t work sometimes
  • Varnam has to be set up to learn words which is time consuming
  • For the average user, setting up Varnam is hard
  • Google Input Tools which does transliteration isn’t available for GNU/Linux

Varnam is such a great tool that most people don’t know of it, possibly because it’s hard to set up. So to make things very very easy, I made a Flatpak package ! 🎉

I tried packaging it with Flatpak, but the ibus engine didn’t work out because flatpak has some issues with ibus, dbus. I’ve filed a bug report; if that gets solved, I’ll package the engine too.

So I made an editor web app that integrates with the varnamc CLI tool installed in the system :

Varnam Editor app

I purposefully avoided electron, cause that would make it heavy. Instead I used Python eel.

Install

GNU/Linux

  1. Install flatpak
  2. Download the latest varnam.zip from here
  3. Extract the zip file
  4. Double clicking the extracted varnam.flatpak file may open it in your Softwares app and allow you to install from there
  5. If step 4 didn’t work, open a terminal an do these :
cd ~/Downloads
flatpak install varnam.flatpak

Windows

I don’t know if it’ll work in Windows, but it may work with the new Windows subsystem for Linux. The steps are same as GNU/Linux’s. Please do let me know what it took to make it work there. I’ll include it here.

If you have any problems setting it up, please feel free to comment below.

Features

  • Lightweight
  • Supports Malayalam, Hindi, Tamil, Telugu, Bangla
  • Malayalam works really good. Better than Google Input Tools
  • Free & Open Source Software
  • Pressing the corresponding number will pick the suggested word

Contribute

Varnam uses C, Go, Ruby & Varnam Editor uses Python, JavaScript, HTML/CSS. So there are multiple stacks you can contribute to.

Thanks to Navaneeth K N for this amazing Varnam library without which we won’t be able to type Malayalam so easily in GNU/Linux !

Screenshots

Varnam multiple language support

Varnam Malayalam better than Google Input Tools