Sunday, May 18, 2014

NMergec and Tagore's Golden Boat

Nmergec, the rewritten form of nmerge in the C language has reached a milestone. It managed to merge 11 versions of the Tagore poem সোনার তরী (Golden Boat). Since there are several transpositions and much variation between the versions there is good reason to think that nmergec now 'works', and that it can handle much longer texts. What it does prove is that the revised program can handle Asian scripts like Bengali with ease, and it promises to deliver other benefits: such as the ability to merge (and hence compare) any number of versions of texts of any size. So, for example, it is designed to handle entire novels with rearranged chapters, or texts that contain thousands of versions (such as the Greek New Testament). For my next test though I'll be trying to merge an entire novel, perhaps Joseph Furphy's Such is Life, or Conrad's Under Western Eyes to get an idea of the practical size limits. There is a description of the nmergec program and its advantages on Digital Variants.

The merging time for the 11 versions was just 0.5 seconds, and that is with a ton of debugging code. Once it is stripped down and optimised it should be much faster. Here's one version of the poem:

সোনার তরী

গগনে গরজে মেঘ, ঘন বরষা।
কূলে একা বসে’ আছি, নাহি ভরসা।
রাশি রাশি ভারা ভারা
ধান কাটা হ’ল সারা,
ভরা নদী ক্ষুরধারা
খর-পরশা।
কাটিতে কাটিতে ধান এল বরষা।

একখানি ছোট ক্ষেত আমি একেলা,
চারিদিকে বাঁকা জল করিছে খেলা।
পরপারে দেখি আঁকা
তরুছায়ামসীমাখা
গ্রামখানি মেঘে ঢাকা
প্রভাত বেলা।
এ পারেতে ছোট ক্ষেত আমি একেলা।

গান গেয়ে তরী বেয়ে কে আসে পারে!
দেখে’ যেন মনে হয় চিনি উহারে।
ভরা-পালে চলে’ যায়,
কোনো দিকে নাহি চায়,
ঢেউগুলি নিরুপায়
ভাঙে দু’ধারে,
দেখে’ যেন মনে হয় চিনি উহারে।

ওগো তুমি কোথা যাও কোন বিদেশে!
বারেক ভিড়াও তরী কূলেতে এসে।
যেয়ো যেথা যেতে চাও,
যারে খুসি তা’রে দাও,
শুধু তুমি নিয়ে যাও
ক্ষণিক হেসে
আমার সোনার ধান কূলেতে এসে।

যত চাও তত লও তরণী পরে।
আর আছে?—আর নাই, দিয়েছি ভরে’।
এতকাল নদীকূলে
যাহা লয়ে’ ছিনু ভুলে’
সকলি দিলাম তুলে’
থরে বিথরে
এখন আমারে লহ করুণা করে’।

ঠাঁই নাই, ঠাঁই নাই! ছোট সে তরী
আমারি সোনার ধানে গিয়েছে ভরি’।
শ্রাবণ গগন ঘিরে
ঘন মেঘ ঘুরে ফিরে
শূন্য নদীর তীরে
রহিনু পড়ি’,
যাহা ছিল নিয়ে গেল সোনার তরী।
ফাল্গুন, ১২৯৮।

No comments: