Wednesday, April 25, 2007

Kannada In Software

Even though the main software revolution is happening In Bangalore and so many Kannadiga's are working in software field, there are only few activities going on to bring Kannada Software to main stream, and there are lots of people who are in software and not aware of Kannada software which is said to be more efficient to use compare to other languages

I proudly tried to give a brief introduction of Baraha which is working on developing software in Kannada and also in other Indian language
For more details visit http://www.baraha.com/

About Baraha

Baraha means 'writing' in Kannada. Baraha is a transliteration based application which converts 'Indian language text written in English' to their own respective scripts.

The first public release of Baraha software was made on January 1998. This initial release was developed with an intention to provide a free, easy to use Kannada language software to enable even non-computer professionals to use Kannada in computers thereby promoting Kannada language in the cyber world. Today hundreds of thousands of Indians are using Baraha for sending e-mails to friends & family across the world in their mother tongue. Many websites have been created using Baraha. Various Indian organizations around the world are publishing their newsletters using Baraha. Government & private offices, schools, litterateurs, journalists are among those who have been using Baraha for documentation purposes.
The biggest challenge for use of Indian languages is the keyboard. At present, usage of English language & English keyboard(QWERTY) in computers is inevitable. One has to use the English keyboard only to type Indian language text. Today, there exist many different keyboard layouts for typing Indian languages. Many such layouts are based on the earlier typewriter designs, which are not at all relevant for the intelligent computers. It is also very difficult and confusing for a common user, who most of the time uses the English keyboard, to switch to one such keyboard for quickly typing an email in Kannada or Hindi.

Baraha breaks the keyboard barrier for Indian languages by using a transliteration scheme in which any Indian language word can be typed using the standard English keyboard. Baraha user doesn't feel any discomfort when he switches between typing Indian language text and English. In fact, writing in Baraha is as simple and easy as writing our names in English! Kannada and Hindi text such as cheluva kannaDa nADu, merA bhArat mahAn can be typed as shown.

Many Indian language software were created based on True Type fonts (ANSI encoding) many years before Windows/Linux re-introduced them using Open Type fonts (Unicode encoding). Even today, majority of the Indian language content is being created using TrueType fonts and almost all Indian publications use ANSI based TrueType fonts for printing and online publications. Baraha breaks the barrier between ANSI and Unicode. Using Baraha, one can effortlessly convert text between ANSI and Unicode. For example, there are a lot of Tamil documents that are created using True Type fonts based on TSCII - which is a popular standard for Tamil. These documents can be converted to Unicode with a few keystrokes! Similarly, when a user on Windows 98 - that doesn't support Unicode, receives a Hindi email in Unicode, he can convert it to ANSI and read it.

Baraha breaks the script barrier between different Indian languages. All the Indian scripts are derived from the Brahmi script, which is also the underlying concept in Baraha. Baraha uses a common code-set for representing all the Indian languages. So, it is possible to convert text from one script to another. For example, lets say a Malayalam user who understands Hindi language receives a Hindi email. If the user is not fluent in reading Devanagari script, then he can convert the email to Malayalam script and read it.

One of the main objectives of Baraha is "portability of data". Baraha can export the data in various data formats such as ANSI text, Unicode text, RTF, HTML. User can convert documents to Unicode format by a few clicks of mouse, which means the documents that are created in Baraha, stay relevant in the future and will never become obsolete.

"The language is not just a means of communication. Instead, it is the only means that can save the culture of its people." Baraha was made freeware in order to motivate Indians to communicate in their languages on computers. We believe that only an easy to use, good quality, free Indian language software can jump-start the extensive usage of Indian language on computers, which today is dominated by English. Baraha can be freely downloaded from the Internet and can be distributed to others.



Kannada script processing API reference

Files:C/C++ Header: brh_kanapi_api.hVisual Basic definition:

brh_kanapi.basLibrary: brh_kanapi.dllImport Library: brh_kanapi.lib
Kannada Data Conversion Flow.
BrhRegister() function registers the Kannada Data Processing SDK. This function should be called before you call any other functions in the DLL.

VC++:BOOL BrhRegister( LPCSTR strCompanyName , LPCSTR strRegKey );

VB:Declare Function BrhRegister Lib "brh_kanapi.dll" (ByVal strCompanyName As String, ByVal strRegKey As String) As Long

VC++ COM:HRESULT Register (/*[in]*/ BSTR strCompanyName, /*[in]*/ BSTR strRegKey, /*[out, retval]*/ BOOL* bOutput);

VB COM:bOutput = kanapi.Register(strCompanyName, strRegKey)
Parameters:strCompanyName: Specifies the name of the company/person to which/whom this product is registered.strRegkey: Specifies the registration key of the product.

Return Value: If the function is successful, the return value is 1. If the function fails, the return value is 0.

Remarks:If you don't have valid registration key, then you should not call BrhRegister() or kanapi.Register() function at all. This causes BRH_KANAPI to run in the demo mode.

In the demo mode only the first 32 bytes (32 characters in the case of UNICODE) in the input string are converted to the specified output format by the BrhConvert & BrhConvertEx functions.

In the demo mode only first 16 bytes (16 characters in the case of UNICODE) are compared by BrhCompare & BrhCompareEx functions.
BrhConvert() function converts the input string represented in "KANTRANS" format to "ANSI" output data format. This function internally calls BrhConvertEx() function.

VC++:long BrhConvert( LPCSTR strInput , LPSTR strOutput , long nMaxCount );

VB:Declare Function BrhConvert Lib "brh_kanapi.dll" (ByVal strInput As String, ByVal strOutput As String, ByVal nMaxCount As Long) As Long
VC++ COM:HRESULT Convert (/*[in]*/ BSTR strInput, /*[out, retval]*/ BSTR* strOutput);

VB COM:strOutput = kanapi.Convert(strInput)
Parameters:strInput: Points to the string in "KANTRANS" format to be converted.strOutput: Points to a buffer that receives the converted string in "ANSI" format.nMaxCount: Specifies the size, in bytes, of the buffer pointed to by the strOutput parameter.

Return Value: If the function succeeds, and nMaxCount is nonzero, the return value is the number of bytes written to the buffer pointed to by strOutput.If the function succeeds, and nMaxCount is zero, the return value is the required size, in bytes, for a buffer that can receive the translated string.If the function fails, the return value is zero.

BrhConvertEx() function converts the input string represented in strInputFormat format to the output format specified by strOutputFormat.
VC++:long BrhConvertEx( LPCSTR strInput , LPCSTR strInputFormat , LPSTR strOutput , LPCSTR strOutputFormat , long nMaxCount );

VB:Declare Function BrhConvertEx Lib "brh_kanapi.dll" (ByVal strInput As String, ByVal strInputFormat As String, ByVal strOutput As String, ByVal strOutputFormat As String, ByVal nMaxCount As Long) As Long
VC++ COM:HRESULT ConvertEx (/*[in]*/ BSTR strInput, /*[in]*/ BSTR strInputFormat, /*[in]*/ BSTR strOutputFormat, /*[out, retval]*/ BSTR* strOutput);

VB COM:strOutput = kanapi.ConvertEx(strInput, strInputFormat, strOutputFormat)
Parameters:strInput: Points to the string in strInputFormat format to be converted.strInputFormat: Specifies the input string format.strOutput: Points to a buffer that receives the converted string in strOutputFormat format.strOutputFormat: Specifies the output string format.nMaxCount:Specifies the size, in bytes (UNICODE characters if strOutputFormat = "UNICODE"), of the buffer pointed to by the strOutput parameter.

Return Value: If the function succeeds, and nMaxCount is nonzero, the return value is the number of bytes (UNICODE characters if strOutputFormat = "UNICODE") written to the buffer pointed to by strOutput.If the function succeeds, and nMaxCount is zero, the return value is the required size, in bytes, for a buffer that can receive the translated string.If the function fails, the return value is zero.

BrhCompare() function compares two Kannada strings represented in "KANTRANS" format. This function internally calls BrhCompareEx() function.

VC++:long BrhCompare( LPCSTR strString1 , LPCSTR strString2 , BOOL bMemcmp );

VB:Declare Function BrhCompare Lib "brh_kanapi.dll" (ByVal strString1 As String, ByVal strString2 As String, ByVal bMemcmp As Long) As Long

VC++ COM:HRESULT Compare (/*[in]*/ BSTR strString1, /*[in]*/ BSTR strString2, /*[in]*/ BOOL bMemcmp, /*[out, retval]*/ long* lOutput);
VB COM:lOutput = kanapi.CompareEx(strString1, strString2, bMemcmp)
Parameters:strString1: Points to the first string in "KANTRANS" format.strString2: Points to the second string in "KANTRANS" format.bMemcmp : If 1, the strings are compared based on their binary values. If 0, a special comparison algorithm is used.
Return Value: Returns 0 if strString1 identical to strString2.Returns -ve value if strString1 less than strString2. Returns +ve value if strString1 greater than strString2.

Remarks:In the special comparison, the vedic, music, laghu, & guru symbols are ignored. Also, 'ra' kaara & 'repha' are matched.Ex: If bMemcmp is 0, then strings "karma" & "kaRma" are evaluated as identical.

BrhCompareEx() function compares two Kannada strings represented in various formats.

VC++:long BrhCompareEx( LPCSTR strString1 , LPCSTR strString1Format , LPCSTR strString2 , LPCSTR strString2Format , BOOL bMemcmp );

VB:Declare Function BrhCompareEx Lib "brh_kanapi.dll" (ByVal strString1 As String, ByVal strString1Format As String, ByVal strString2 As String, ByVal strString2Format As String, ByVal bMemcmp As Long ) As Long

VC++ COM:HRESULT CompareEx (/*[in]*/ BSTR strString1, /*[in]*/ BSTR strString1Format, /*[in]*/ BSTR strString2, /*[in]*/ BSTR strString2Format, /*[in]*/ BOOL bMemcmp, /*[out, retval]*/ long* lOutput);

VB COM:lOutput = kanapi.CompareEx(strString1, strString1Format, strString2, strString2Format, bMemcmp)

Parameters:strString1: Points to the first string.strString1Format: Specifies the first string format.strString2: Points to the second string.strString2Format: Specifies the second string format.bMemcmp : If 1, the strings are compared based on their binary values. If 0, a special comparison algorithm is used.

Return Value: Returns 0 if strString1 identical to strString2.Returns -ve value if strString1 less than strString2. Returns +ve value if strString1 greater than strString2.

Remarks:In the special comparison, the vedic, music, laghu, & guru symbols are ignored. Also, 'ra' kaara & 'repha' are matched.Ex: If bMemcmp is 0, then strings "karma" & "kaRma" are evaluated as identical.
BrhConvertDate() function converts the Date/Time strings to/from Kannada(KANTRANS) to English.

VC++:void BrhConvertDate( LPCSTR strInput, BOOL bFromEnglish , LPSTR strOutput, long nMaxCount);
VB:Declare Sub BrhConvertDate Lib "brh_kanapi.dll" (ByVal strInput As String, ByVal bFromEnglish as Long, ByVal strOutput As String, ByVal nMaxCount As Long )

VC++ COM:HRESULT ConvertDate (/*[in]*/ BSTR strInput, /*[in]*/ BOOL bFromEnglish , /*[in]*/ BSTR* strOutput);

VB COM:strOutput = kanapi.ConvertDate(strInput, bFromEnglish)
Parameters:strInput: Points to the input string to be converted.bFromEnglish: If 1 convert from English to KANTRANS. Else, convert from KANTRANS to English.strOutput: Points to the output string.nMaxCount: Specifies the size in bytes, of the buffer pointed to by the strOutput parameter.

Remarks:The Date/Time strings can be converted to/from English to KANTRANS format. The string can be later converted to other Kannada data formats.Ex: "Tuesday, January 23, 1968" is converted to "maMgaLavAra, janavari 23, 1968", when bFromEnglish is 1Ex: "mArch 15, 1972, 8:00 pUrvAhna" is converted to "MARCH 15, 1972, 8:00 AM", when bFromEnglish is 0.