Practical Data Structures and Algorithms (English)

The Google-Docs typeset version of the book “Practical Data Structures and Algorithms,” in English is released here; this book is still under preparation – so once the proofs are completed a PDF will be released. People interested to collaborate can drop me a email at

The original version of the book can be found at

ஆடுகளம் – 2020

Tamil projects for 2019-2020

Over the course of this year, since translating Ruby Kin, and preparing a summary of 3 years work on spell-checker for Tamil Internet Conference – 2019, I’ve been thinking of next level of interesting projects.

The following have come to mind, expressed in Twitter @ezhillang in various forms. Here they are in simply chronological order,

  1. Translating “Data Structures and Algorithms” book in Tamil
  2. Translating/Writing a “Debugging Techniques” book in Tamil: ‘கணினி செயல்முறை நிரகளில் வழுநீக்கம்‘ – பயிற்சி, நூல்
    • Debugging techniques are important learning milestone for any professional software/hardware developer which are usually learnt on the job and essentially skipped in academia (perhaps for practical purposes).
  3. (Research/Proof-of-concept) Viterbi algorithm based spelling correction algorithm for Tamil
  4. (Research/Proof-of-concept) Concordance based context ambiguity resolution for Tamil spelling correction.

Contingent on our levels and degrees of success we can share our work in forums like Tamil Internet Conference, ACL or ACM, etc.

நிவாடா மாகனத்தில் மலையேரும் சமயம் மொட்டை வெயிலில் எடுத்த தம்படம் 🙂

As always collaborators are welcome: email: ezhillang -AT- gmail -DOT- com

ஆண்ட்ராய்டு செயலி “கால்சீ” : தமிழ் பேசும் கணக்கீடு



கால்சீ என்பது இன்று எழில் மொழி அறக்கட்டளை வெளியிடும் ஒரு தமிழ் பேசும்

கால்சீ: தமிழ் பேசும் கணக்கீடு – Google Play தளத்தில் பெறலாம் 

கணித செயலி / கணிப்பான். இந்த  தமிழ் பேசும் கால்குலேட்டர் கண் பார்வை
இல்லாதவர்களும் பயன்படுத்தும் வகையில் அமைந்தது. It has a simple tamil talkback calculator for blind users. கால்சீ என்ற ஆண்ட்ராய்டு செயலி : Android app Kalsee நிறுவ (Install from play store) இங்கு பார்க்கவும்



கால்சீ என்பது ஒரு எளிய Talkback தமிழ் கால்குலேட்டர் (கணிப்பான்).
ஒரு எளிய கணிதம் படங்களை ஒலி வழி பேசவும் செய்யும்.

இதன் வசதிகள்,

0. கண் பார்வை அற்றவர்களும் பயன்படுத்தும் வண்ணம் “long-press-mode” என்ற “நீள் அழுத்து” அமைப்பு உள்ளது
1. சுலபமான +, -, x, /. கணித செயல்பாடுகள்
2. இனிய தமிழ் குரலில் விடைகள் ஒலிக்கப்படும்
3. அதே குரலில் 0 முதல் – 9 வரை உள்ள இலக்குகளை (digits) ஒலிக்கும்
4. எழுத்துரு மாற்றலுக்கும் வழி உள்ளது
5. முற்றிலும் இலவசமாக, எந்த விளம்பரமும் இன்றி கிடைக்கிறது

வழங்கியது : எழில் மொழி அறக்கட்டளை

இந்த செயலியை வழங்க உறுதுணையாக இருந்த பலருக்கும் எனது நன்றிகள்.

Bernoulli numbers


உலகின் முதல் நிரல் இயற்றிய அரசி அடா லவ்லேஸ், (Bernoulli numbers) பெர்னொல்லீ எண்களை கணக்கிட்டார்!

Bernoulli number’s have the historic significance in computer programming – Lady Ada Lovelace’s “first” computer program for the Babbage Analytical engine calculated the Bernoulli number sequence. Here we do the same operations using a slightly easier method of recursion using the recurrence relation:

 \begin{align}   B_m(n) &= n^m-\sum_{k=0}^{m-1}\binom mk\frac{B_k(n)}{m-k+1} \\   B_0(n) &= 1. \end{align}


You can see the full code listing at Ezhil-Language repository

# பெர்னொல்லீ எண்களை கணக்கிடு
நிரல்பாகம்  பெர்னொல்லீ_எண் ( m, n  )
  @( m == 0 ) ஆனால்
    # பெர்னொல்லீ_எண்( 0, n ) = 1
    பின்கொடு  1.0
    பெர்னொல்லீ = 0.0
    மொத்தம் = 0.0
    எண்கள் = range(0,m)
    @(எண்கள் இல் இவ்வெண்) ஒவ்வொன்றாக
        மொத்தம் = மொத்தம் + binomial_coeff(m,இவ்வெண்)*பெர்னொல்லீ_எண்(இவ்வெண்,n)/(m - இவ்வெண் + 1.0)	
        #பதிப்பி இவ்வெண், மொத்தம்
    பெர்னொல்லீ = n^(m*1.0) - மொத்தம்
    பின்கொடு    பெர்னொல்லீ


You can run the code to verify the first few Bernoulli numbers:

B1 = பெர்னொல்லீ_எண்(1,0)
பதிப்பி "B1 = B(1,0)", B1
assert( (B1 - 0.5) < 1e-3 )

பதிப்பி "B2 = B(2,0)", பெர்னொல்லீ_எண்(2,0)
பதிப்பி "B4 = B(4,0)", பெர்னொல்லீ_எண்(4,0)

B6 = பெர்னொல்லீ_எண்(6,0)
பதிப்பி "B6 = B(6,0)", B6
assert( (B6 - 0.02380) < 1e-3 )

பதிப்பி "B4 = B(4,1)", பெர்னொல்லீ_எண்(4,1)

Credits: Photo from Flickr user.

Java and Open-Tamil : Write Tamil Applications using Java

Java and Open-Tamil : Write Tamil Applications using Java

I’m sharing a small example; you can download (from Github) the whole Java package and include it in your desktop, mobile or web app. For Free! Example gist follows.

// include the sources for the com/tamil package from
import java.util.Arrays;
import java.util.List;
import java.util.HashMap;
import com.tamil.utf8;
import com.tamil.Numeral;
public class utf8Demo {
public static void main(String [] args) {
/* Example 1: Get length of a Tamil word */
String inputWord = "எழில்",inputWord2 = "கட்டளை";
HashMap<String,Object> actual = utf8.get_length(inputWord);
System.out.println("Length of word "+ inputWord+ "= "+ actual.get("length") );
/* Example 2: Get number of Tamil letters */
//List<String> expected = Arrays.asList(new String [] {"எ","ழி","ல்"} );
StringBuffer actual = new StringBuffer();
for(String t : utf8.get_letters(inputWord)) {
actual.append( t );
if ( actual.toString() != inputWord)
throw new Exception("this will never happen because open-tamil parsed the words for you!");
/* Example 3: Convert number to a numeral */
double number = 1011.0;
/// you should see String numeral = "ஓர் ஆயிரத்தி பதினொன்று";
System.out.println("running -> "+number);
String numeral = Numeral.num2tamilstr(number).getNumeral();

view raw

hosted with ❤ by GitHub

பயணங்கள் முடிவதில்லை – தமிழ் கணிமை

Concluding my recent trip to Chennai, I am happy to report my two speaking engagements

Speaking at Univeristy Computer Science department
Speaking at Computer Science department of SRM University, via Skype. Photo courtesy, of SRM University, (2015).

Meeting with SKP Karuna, Tamil writer, and chairman of SKP group of institutions, before my speaking engagement at SKP College in Thiruvannamalai.
Meeting with Mr. SKP Karuna, Tamil writer, and chairman of SKP group of institutions, before my speaking engagement at SKP College in Thiruvannamalai. Photo couresty, SKP Engineering College, (2015).

were well received at SKP (Thiruvannamalai), and SRM (Kattankulathur). I’m always indebted to the wonderful reception of the hosts and Tamil hospitality they extended to me.

At SRM, Dr. Ila. Sundaram received me and signed a gift copy of his recent book, “தமிழ் கணிமை“. We spoke about documenting the history of Tamil computing; Dr. Sundaram emphasized need for developers and language experts to work hand-in-hand. Later, I spoke with Computer Science professor Dr. Poovammal, and other faculty who were very enthusiastic about adopting computational linguistics as project topics for their final year (senior) students.

The virtual-hosts (no pun intended 🙂 ) Mr. Nagarajan, and Mr. Ravishankar, organized the travel and speaking engagement at SKP college in Thiruvannamalai; it was an eventful trip as I met Mr. SKP Karuna, and various faculty at his institution. Mr. Karuna gifted me a signed copy of his book, “கவர்னரின் ஹெலிகாப்டர்“, among other niceties of the invitation; we spoke briefly about my meeting with writer Appadurai Muttulingam, who has also written the foreword for his book. On the long ride from Thiruvannamalai, I found his story, “கலர் மானிட்டர் (color monitor),” to be entertaining and funny;  area of a triangle with a perimeter s needed some typographical fixes & -> ‘-‘. I enjoyed a few other short stories in the collection.

Talking Points

My primary messages to the first- to final year (4 year program) engineers were,

  1. You are a creator; think of every application you use from role of a developer
  2. Engineering allows you to create with social responsibility
  3. Language software needs to be developed with Tamil (or your-native-language) as primary focus instead of only localizing other software
  4. Use open-source tools like open-tamil as a foundation for your Tamil software; this library is supported for Python and Java languages with free licensing model
  5. I spoke about github, 2 years of open-source development, and our collaborators – Arulalan, Shrinivasan, Sathia, and others.
  6. Tamil language and Tamil computing have a long history, and lot of unsolved hard computer-science problems; you have a good chance of putting your mark on these problems, and having a great impact.

Due to time constraints I was only able to make a Skype interview with SRM Computer Science engineering folks, whereas I traveled to SKP College for my presentations.  At SRM I was impressed by some thoughtful questions and answers on Tamil software adoption/usage. At SKP the speaking engagements was in 2-parts; the focus group engagement with Center-of-Excellence students was admirable for their knowledge and skill in developing Android applications in various education/geo-location based applications.

Consider Sharing your Expertise

My note to professional engineers and senior engineers in the community seeking to have impact on next generation of Tamil software developers is the following,

  1. Definitely reach out to the staff/faculty/administration of the various engineering institutions in Tamilnadu; you are fulfilling a social responsibility role. Reach out to various administrators on Twitter/Facebook or via email etc.
  2. I recommend you to freely mix your language between Tamil/English to convey the message; written/spoken forms of Tamil have that dichotomy, and besides your audience will follow both forms easily.
  3. Talk more about engineering challenges of Tamil computing; how doing this work is creatively challenging
  4. Motivate the students about their potential, capability, and limitations
  5. Motivate students on multiplicity of several roles in software development:
    1. Developer
    2. Test/Quality Engineer
    3. Requirements specification Analyst
    4. Liason/Analyst – Customer focus
    5. Team Leader
  6. Use a slide-show to aid your talk/presentation
  7. Show concrete examples of software with demos/audio/video
  8. Take Q&A

I’m very hopeful that young students, men and women, who are future India, future Tamil speaking developers and users will participate in a software market in buying/creating and using native Tamil software primarily developed for Tamil, not just localized for it.

Unfortunately on the return flight, I misplaced my phone and lost it; unless I receive the device from lost-and-found I maynot be able to share some useful audio content from both presentations. Please hope I do get the phone. More later.

Yours Truly Jet-Lagged,


தொடக்க அளவு பைத்தன் (Beginning Python)

தொடக்க அளவு பைத்தன் கற்பதற்கு, Swaroop எழுதிய “Byte of Python” என்ற மின் புத்தகம் மிக அறுமையானது. இதை இங்கிருந்து தரவிரக்கலாம்.

இந்த புத்தகம் பல மொழிகளில் மொழிபெயர்க்கப்பட்டாலும் இன்னும் தமிழில் வரவில்லை. இதற்கு தன்னார்வலர்கள்  இங்கிருந்து பங்களிக்கலாம்.