User:Wilderz

From SMC Wiki
Revision as of 07:51, 19 March 2014 by 115.251.23.209 (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Personal information

Name : Jaydeep Singh

Email : jay.jaydeepsingh@gmail.com

Phone : +919098386505

Freenode IRC nick : wilderz

Current Education : 3rd year Computer Science and Engineering, National Institute of Technology Bhopal

Why SMC : I really appreciate the work this organisation is doing and would love to contribute along with you in empowering our society to learn and use technology in their native language.

Other commitments : My college exams will be held during the last week of April, after which my classes will reopen in second week of July. I assume i'll have sufficient time to work on the project and give the best possible result. I will give at least 40 hours per week to the project and try to complete the milestones managing the time efficiently.

Why me : I have good understanding of C and Java along with android framework which are necessary for the project. I will be involved with the project even after GSOC 2014 adding features and updates to make it better. I have done initial research and understand working of both varnam and android systems. Thanks to Navaneeth K N for his help which has given me a better understanding about the project.


Introduction

To create an android IME(Input Method Editor) which uses varnam internally, we must consider a few questions first:

  • What is the main purpose for creating such an application on android platform?
  • How will we create the proposed IME? What would be its features?
  • How are we going to compile Varman on android ? How will the IME interact with Varnam and give predictions to user.

I will try to answer these questions in best possible way in my proposal.


Need for such IME?

Simply because it would be awesome!

An input method editor(IME) is a user control that enables users to enter text. Once installed the user can select which IME they want to use from the system settings and use it across the entire system.

Varnam is a powerful tool for the purpose of transliteration for Indian languages and can be currently used on Chrome & Firefox with the help of addons and locally using Ibus engine. But there is no way to use Varnam on our phones so that we can interact with friends and family in our native language. The proposed IME would be a predictive transliterator for Indian languages which takes input through a soft keyboard and provide best possible results in a View above the keyboard.


Details about the project and implementation

  • To add an IME to the Android system, we have to create an Android application containing a class that extends InputMethodService[1] and add it in the Manifest file. In addition, we also create a settings activity that passes option to the IME service.
  • The project will be roughly based on default LatinIME[2].
  • Basically it would work like the suggestion feature which is integrated in LatinIME except it would consume the key events and send to varnam for transliteration before forwarding them to the application and show results on the View above the keyboard. An android service will be created which would get the string the user is currently typing by Overriding InputMethodService.onKey(). (@Override is a java annotation used to mark methods that override a method declaration in a superclass). A service is an application component that can perform long-running operations in the background and does not provide a user interface.
  • Varnam is written in C which would be good for the IME since it will overcome the limitations of Java, such as memory management and performance. Android provides Native Development Kit(NDK) to support native development in C/C++, besides the Android SDK. I will use these tools integrated in Eclipse IDE extensively for development of the IME. This application will have its API in Java and transliteration service i.e varnam in C.
  • To compile varnam, it will be placed in a sub-directory jni and a Android.mk file will describe the native source to the NDK build system. Running ndk-build script from projects directory will build the native code. The build tools copy the stripped, shared libraries needed by the application to the proper location in the application's project directory. Finally, it can be compiled and run using the SDK tools in the usual way.
  • We will create a special type of Android service that generates a transliteration session object. Based on the text user provides, the session object returns the result generated by the varnam. As a client terminates its operation, it closes its transliteration session and if necessary can shut down this service at any time.
  • This IME will support all devices with Android 2.2+(API level 8 and above) as most of the devices today running on these versions of android as suggested by android developers statistics[3]. I will test the project using Android Virtual Device Manager with different versions of Android and also try to test it on real devices, as many as possible.


Milestones

Required Deliverables :

May 20 : Develop a basic IME.

May 30 : Create Android.mk file, build and compile Varnam on android.

June 20 : Hook varnam to the IME. Create an android service to enable interaction between IME and Varnam.

June 30 : Create the Manifest file and settings activity that passes options to IME.

July 10 : Find out limitations and errors by testing on Virtual device.

July 15 : Perfect the application.

July 25 : Make installation on real devices and resolve issues.

July 30 : Testing and Documentation.

Nice to haves :

  • User guide for the IME
  • Better support for Hindi in varnam.


References

1. http://developer.android.com/reference/android/inputmethodservice/InputMethodService.html

2. https://android.googlesource.com/platform/packages/inputmethods/LatinIME/+/master

3. http://developer.android.com/about/dashboards/index.html