    \documentclass[english]{jnlp_1.3e}

\usepackage{jnlpbbl_1.1}
\usepackage[dvips]{graphicx}
\usepackage{amsmath}
\usepackage{rotating}     
\usepackage{tipa}     
\usepackage{sinhala}
\usepackage{multirow}
\usepackage{url}


\Volume{14}
\Number{5}
\Month{Oct.}
\Year{2007}
\received{2007}{3}{22}
\revised{2007}{5}{3}
\rerevised{2007}{5}{30}
\accepted{2007}{6}{20}

\setcounter{page}{147}

\etitle{An Efficient and User-friendly Sinhala Input Method Based on Phonetic Transcription}
\eauthor{Sandeva Goonetilleke\affiref{Author_1}  \and
	Yoshihiko Hayashi\affiref{Author_2} \and
	Yuichi Itoh \affiref{Author_1} \and
	Fumio Kishino \affiref{Author_1}} 
\eabstract{
We propose an application-independent  Sinhala character input method called {\it Sri Shell} with a principled key assignment based on phonetic transcription of Sinhala characters. 
A good character input method should fulfill two  criteria, efficiency and user-friendliness.
We have introduced several quantification methods to quantify the efficiency and user-friendliness of Sinhala character input methods.
Experimental results prove the efficiency and user-friendliness of our proposed method.
}
\ekeywords{Sinhala, Character Input Methods, Sri Shell}

\headauthor{Goonetilleke et al.}
\headtitle{An efficient and user-friendly Sinhala input method}

\affilabel{Author_1}{}{Graduate School of Information Science and Technology, Osaka University}
\affilabel{Author_2}{}{Graduate School of Language and Culture, Osaka University}

\begin{document}

\maketitle

\section{Introduction}

The mother tongue of 14.6 million (74\% of the total Sri Lankan population of 19.7 million) Sri Lankans is Sinhala \cite{population}. 
In Sri Lanka, there are three official languages,  Sinhala, Tamil and English.
Most of the governmental affairs in Sri Lanka are carried out in  Sinhala. 
The education system also uses  Sinhala up to the  high school or university  levels. 

In Sri Lanka the use of computers has begun to spread  rapidly due  to the reduction in price and high performance. 
 However,  to date there is no well established method to input Sinhala scripts into the computer. 
Even though various kinds of Sinhala  fonts  and Sinhala input applications have been proposed,  the language is still not  well supported by computer systems.
Hundreds of Sinhala fonts have been developed, but most of them have their own weaknesses. 
The character codes used in these fonts are  the  same as ASCII or sometimes Japanese character codes. 
As a result, in some cases Sinhala characters cannot be displayed together with foreign characters in the same context. Another problem is some rare Sinhala characters (such as {\SHa\char21}  ,{\SHa\char21\char3} ) are missing in most of the fonts. 
 Sinhala Unicode provides a good solution to this problem, but it is still not supported by most  of applications and system software. 
 On the other hand, there are very few available Sinhala input systems. 
On top of that, the major problems of the current input systems are the lack of user-friendliness and efficiency. 

The objective of this research is to propose an efficient and user-friendly Sinhala input method based on phonetic notation, and to evaluate the efficiency and the user-friendliness compared with other input methods. 
Here, efficiency is quantified by the average typing cost  per Sinhala  character, and user-friendliness is quantified by ease of remembering. 
We required 30 subjects to romanize the most frequently used 275 Sinhala characters. 
The average edit distance between romanized Sinhala characters and the input sequences of each input method is taken as a measurement of  the  difficulty of remembering. Our  experimental  results proved  that the  proposed input system {\it Sri Shell} gives the highest efficiency in most cases with a considerably high level of user-friendliness.

The rest of the paper is organized as follows.
Chapter \ref{sinhala_language} provides a brief introduction of  the  Sinhala language.
In Chapter \ref{related_work} we  discuss various  Sinhala input methods proposed up to now, and their main features.
The main features of the proposed input method {\it Sri Shell}  are  explained in Chapter \ref{srishell}.
The evaluations are reported in Chapter \ref{evaluation}.
Chapter \ref{conclusions} concludes and  outlines  future work.



  \section{Sinhala Language and Characters}
\label{sinhala_language}

The  modern ``Sammata Sinhala H\={o}\d{d}iya'' (Standard Sinhala Alphabet\footnote{ Alphabet: A character set that includes letters and is used to write a language.})
 is made up of 60  {\it basic characters} \cite{Unicode}, as shown in Table \ref{tbl:sammata_sinhala_hodiya}. 
These  basic characters  are modified to produce hundreds of conjunct characters   that  are also known as  {\it grapheme clusters}  \cite{Unicode}, by adding various components (such as  {\it vowel signs}, {\it devowelizers} and {\it consonant signs}). 
Because of this,  the  definition of a  ``character''  may vary from person to person. 
As discussed later, to evaluate the ``user-friendliness'' and ``efficiency'' of an input method, it is vital to know the occurrence rate of each character. 
 To this end, we need to  define a  ``Sinhala character.'' 
 Before giving the definition, we  will  discuss the main characteristics of  the  Sinhala language, the history of Sinhala Alphabet development, and how the conjunct characters are created. 
We use Mikami's notation \cite{codes} to explain the structure of Sinhala  characters.


\begin{table}[t]
\caption{Sammata Sinhala H\={o}\d{d}iya (Standard Sinhala Alphabet)}
\label{tbl:sammata_sinhala_hodiya}
\input{06t01.txt}
\end{table}

\subsection{Characteristics of Sinhala Language}

 The  Sinhala language is mainly spoken in Sri Lanka.
It is also one of the official languages of Sri Lanka. 
It has 16 million speakers in total. 
This language is categorized under the ``Indo-European: Indo-Iranian: Indo-Aryan: Southern zone: Sinhalese-Maldivian'' language families \cite{family}. 
Sinhala language has its own writing system  that  is an offspring of the Brahmi script \cite{codes}.
The grammatical structures of spoken Sinhala differ from written Sinhala. 
Written Sinhala has very complicated grammar compared to spoken Sinhala. 
For example the verb  word form  of written Sinhala depends on the tense, gender, and number, 
but in spoken Sinhala the verb  word form  depends only on the tense. 



\subsection{Sinhala H\={o}\d{d}iya (Sinhala alphabet)}

\label{sinhala_alphabet}

H\={o}\d{d}iya is a list of characters  that  defines all the basic characters of Sinhala.
The ``\'{S}uddha Sinhala H\={o}\d{d}iya'' ( pure Sinhala alphabet) has thirty-seven characters (twelve vowels and twenty-five consonants). 
Most of the Sinhala words can be written using only these thirty-seven characters.
After  the  thirteenth century \cite{alphabet}  the  Sinhala language was very strongly influenced by Sanskrit and P\={a}li languages. 
As a result, many Sanskrit characters were incorporated into the Sinhala alphabet.
The revised alphabet is called the ``Mi\'{s}ra Sinhala H\={o}\d{d}iya'' (Mixed Sinhala Alphabet). 
The ``Mi\'{s}ra Sinhala H\={o}\d{d}iya'' consists of fifty-nine characters (eighteen vowels and forty-one consonants). 
The occurrence rate of these newly added twenty-two characters is lower than the original thirty-seven pure Sinhala characters. 
However, these new characters are frequently used in formal sentences. 
Thus they are also an indispensable part of the Sinhala alphabet.
In the nineteenth and twentieth centuries, Sinhala language was strongly influenced by Portuguese, Dutch and English languages. 
Consequently the modern Sinhala alphabet  also includes  the `f' sound. 
The  modern  ``Sammata Sinhala H\={o}\d{d}iya'' ( standard Sinhala alphabet) consists of eighteen vowels and forty-two consonants (altogether sixty characters), as shown in Table \ref{tbl:sammata_sinhala_hodiya}. 


\subsection{Sinhala Characters}

The Sinhala script belongs to the   {\it south indic scripts}   
and  is classified under the  {\it combining syllabics} , which is a subset of the  {\it syllabary}. 
Sinhala script is then further categorized as ``a-Vowel Inherent Combining Syllabics'' \cite{codes}. 
A number of relevant concepts are described as follows.


 Basic characters in Sinhala  can be classified  into three  classes.


\begin{description}
\item[Vowel syllabics]
The first eighteen characters  ({\SHa\char16}(a) to {\SHa\char24\char3}(au))  shown in Table \ref{tbl:sammata_sinhala_hodiya} are 
 vowel syllabics. 
The shapes of these  characters never change. 
Thus these vowel syllabics are {\it atomic characters} \cite{Unicode}. 
 Mikami uses  the   symbol $V$ for this kind of  character, and the pronunciation is represented by $v$.

\item[Diacritics]
There are two diacritics in  Sinhala,  which  are the {\it anusvaraya} ({\SHa\char11}=\d{m}) and the  {\it visargaya} ({\SHa\char10}=\d{h}). 
These two characters can appear after any other vowel syllabic or a consonant syllabic. 
Mikami uses the symbol $\underline{D}$ for them. 

\item[Consonant syllabics]
 The Sammata Sinhala H\={o}\d{d}iya  has forty-two  consonant syllabics  as shown in  the  Table \ref{tbl:sammata_sinhala_hodiya} Consonant section. 
All these   consonant syllabics  include the vowel sound {\SHa\char16}(=``a'') which is called the  {\it inherent vowel}.  
Mikami uses $C$ to represent these   consonant syllabics  and the pronunciation is denoted by $cv_0$, where $v_0$=``a''.
\end{description}


Sinhala grapheme clusters can have the following constructions.
A grapheme cluster is in \cite{Unicode2} described as ``what end users usually think of as characters.''



\begin{description}
\item[Consonant-vowel combinations]
 {\it Vowel signs}   are used to change the inherent vowel (``a'') of a  consonant syllabics  into another vowel. 
Mikami uses $\underline{V}$ to represent vowel signs, 
and the  consonant-vowel combining characters  are represented by $C\underline{V}$.
These vowel signs are called  {\it pilla}({\SHa\char221i}{\SHb\char37}{\SHb\char37a}) or  {\it pili}({\SHa\char221i}{\SHb\char37i}) in Sinhala.
Table \ref{tbl:vow_con_comb} shows a few examples of consonant-vowel combinations. 
Most of the vowel signs do not take different shapes corresponding to the consonant except the  vowel sign for u ( {\it p\={a}pilla}),
which takes various shapes depending on the consonant.

\begin{table}[t]
\caption{Examples of Consonant Vowel Combinations} 
\label{tbl:vow_con_comb}
\input{06t02.txt}
\end{table}

\item[Removing the inherent vowel]
In Sinhala pure consonants are also used in Sinhala scripts, not only at the end of a word but  also in the middle of a word and at  the beginning of a word. There are four ways to remove the inherent vowel {\SHa\char16}(=a). 
\begin{itemize}
\item \textbf{Devowelizer}
 A devowelizer  is added to  consonant syllabics  in order to remove the inherent vowel sound. 
This is the most  general  way to remove the inherent vowel, but it has a  lower priority compared to other specific  inherent vowel removers.
 In Sinhala this  devowelizer  is called the {\it hal-laku\d{n}a}. 
There are two shapes for   hal-laku\d{n}a  and one of them is selected depending on the shape of the   consonant syllabic. 
Mikami uses $X$ to represent this  devowelizer.
A few examples are shown in Table \ref{tbl:devowelizer}.
In  {\it Shape 1}  a flag-like symbol is added at the end of the character,
and in  {\it Shape 2}  the top ending line is doubled by reversing it.

\begin{table}[b]
\caption{Examples of Devowelizers (two shapes)} 
\label{tbl:devowelizer}
\input{06t03.txt}
\end{table}

\item \textbf{Consonant signs}
In some cases   consonant signs  are used to devowelize the inherent vowel. 
There are three  consonant signs:  {\it ya\d{m}saya},  {\it rakar\={a}\d{m}\'{s}aya } and  {\it r\={e}phaya}.
If the consonant next to the devowelized consonant is {\SHb\char21a}(=ya) then {\SHb\char205a}(ya\d{m}saya) is used. 
If the consonant next to the devowelized consonant is {\SHb\char29a}(=ra), then  rakar\={a}\d{m}\'{s}aya is used. 
These two  consonant signs  have a higher priority compared to  the  devowelizer.
A few examples are shown in Table \ref{tbl:consonant_signs}.

\begin{table}[t]
\caption{Examples of Consonant Signs}
\label{tbl:consonant_signs}
\input{06t04.txt}
\end{table}

The third  consonant sign  is called  r\={e}phaya  and it is exactly equivalent to {\SHb\char29}(=r).
As this  r\={e}phaya  is extremely rare in modern Sinhala text, we do not take this into account in our evaluations. This  consonant sign  is optional in modern Sinhala.
Mikami uses $\underline{C} $ to represent  consonant signs.

\item \textbf{Half-letters}
 Half letters  can be used instead of    devowelizers. 
However this is also optional.
Nowadays these  half letters  are also very rare, thus we  exclude  them in our evaluations. 
A few examples are shown in Table \ref{tbl:half_letters}.

\begin{table}[t]
\caption{Examples of Half Letters}
\label{tbl:half_letters}
\input{06t05.txt}
\end{table}

\item \textbf{Special characters (or Conjunct consonants)}
Traditionally there were many  special characters  in use, but currently only one  special character  remains. 
This is {\SHc\char27a}={\SHa\char133}(=j)+{\SHb\char139a}(=\~{n}a).
In the Sinhala Unicode character set, this is considered  an   independent  character. 
In our evaluation we also consider  it an 
independent Sinhala  character. 

\end{itemize}
\end{description}



\subsection{Definition of Character}

We now give a definition of  a  Sinhala character. 
Let $T$ be an arbitrary Sinhala text and $f_{0}...f_{n}$ be the phonetic notation of $T$. This phonetic
notation can be NLAC ({\it National Library at Calcutta romanization}) or IPA ({\it International Phonetic
Alphabet}) or an input string of any phonetic based Sinhala input system. Then we can
define a function such that, $T = \mathit{phonetic\_to\_Sinhala}(f_{0}...f_{n})$.
\begin{align}
\exists i,j , \text{and}, i\leq j & \nonumber \\
T&=\mathit{phonetic\_to\_Sinhala}(f_{0}...f_{i-1})\nonumber \\
 & \quad {} + \mathit{phonetic\_to\_Sinhala}(f_{i}...f_{j})\nonumber \\
 & \quad {} + \mathit{phonetic\_to\_Sinhala}(f_{j+1}...f_{n})\\
\text{and}, \forall k, i\leq k<j &\nonumber\\
T &\neq \mathit{phonetic\_to\_Sinhala}(f_{0}...f_{k})+\mathit{phonetic\_to\_Sinhala}(f_{k+1}...f_{n})
\end{align}
where, + means to simply  concatenate  the two strings.\\
Then, $\mathit{phonetic\_to\_Sinhala}(f_{i}...f_{j})$is defined as a single Sinhala character.

According to Mikami's notation  a  Sinhala  character  can be represented by the following combinations.
\begin{equation}
S:=V|C|C\underline{V}|CX|C\underline{C}|C\underline{CV}|\underline{D}
\end{equation}
Table \ref{tbl:conj_cons} shows all the characters derived from Sinhala character {\SHa\char77a}(=ka). 
All other consonants also produce derivatives similarly. 
As a result Sinhala language has hundreds of characters.

\begin{table}[t]
\caption{Conjunct consonants derived from {\SHa\char77a}(=ka)}
\label{tbl:conj_cons}
\input{06t06.txt}
\end{table}




\section{Sinhala Input Systems}
\label{related_work}

This section reviews the representative Sinhala input systems proposed so far.



\subsection{Direct Input Method}

Sinhala fonts assign Sinhala  characters  to the ASCII character code. For example,  Sinhala {\SHa\char16} (=a) was assigned to 0x61  (=ASCII `a') . 
In the direct input method, users have to input the character codes as assigned in a specific Sinhala font as shown in Figure \ref{fig:image}.
Some of the Sinhala fonts use character codes between 0x80 $\sim$ 0xFF.
As there are no keys assigned for these character codes in the normal English keyboard, users have to refer to a character code table to input Sinhala text.

\begin{figure}[b]
\input{06f1.txt}
\caption{Sinhala character input systems using {\SHa\char16\char0}{\SHb\char21u}{\SHa\char5\char237a\char7}{\SHb\char14a}{\SHa\char213}(\={a}yub\={o}van:Welcome) as an example}
\label{fig:image}
\end{figure}

Later some improved versions of Sinhala fonts have been introduced. 
These fonts assign character  codes  to the vowels, consonants and vowel signs. 
With this method, the binary range used is reduced to 0x20 $\sim$ 0x7F. 
Thanks to these fonts, it became possible to type Sinhala text using a normal English keyboard. 
Although some rare Sinhala characters are missing, these fonts are used very widely. 
A typical example of this kind of  font  is the ``{\it kaputadotcom}''  font\footnote{\url{http://www.info.lk/slword/news.htm}}. Most of the online Sinhala sites including news sites use these kinds of fonts.



\subsection{\itshape Natural SinGlish}

Even though it is possible to type Sinhala text using the direct input method, there is just a key for each Sinhala character (or a part of a character). 
For this reason,  this key assignment  is far from intuitive. 
To resolve this problem the {\it Natural SinGlish} \cite{naturalsinglish} typing method was introduced by A.D.R. Sasanka. 
This system converts the input sequence  that  is more natural for  users into character  codes as shown in Figure \ref{fig:image}. English spellings and the English pronunciations are the  basis  of this system.
For example {\it shree la$\backslash$nkaa} $\rightarrow$ {\SHb\char53iir} {\SHb\char37a}{\SHa\char11}{\SHa\char77a\char0}(=Sri Lanka).
However,  Sinhala language has  many  more characters than English. To  avoid ambiguity, this system has introduced several techniques, such as:
\begin{itemize}
\item Capitals\\
\begin{tabular}{|lll|lll|lll}
a & $\rightarrow$&{\SHa\char16}(=a) & ta & $\rightarrow$&{\SHa\char149a}(=\d{t}a)\\
A & $\rightarrow$ & {\SHa\char16\char8}(=\ae) & Ta&$\rightarrow$&{\SHa\char157a}(=\d{t}ha)
\end{tabular}
\item Key combinations\\
\begin{tabular}{|lll|lll|lll}
ea & $\rightarrow$&{\SHa\char23}(=\={e}) & KNa & $\rightarrow$&{\SHb\char139a}(=\~{n}a)\\
oe & $\rightarrow$ & {\SHa\char25}(=\={o}) & Sha&$\rightarrow$&{\SHb\char61a}(=\d{s}a)
\end{tabular}
\item Dead keys: ``$\setminus$'' is used as a dead key\\
\begin{tabular}{lll}
$\setminus$n & $\rightarrow$&{\SHa\char11}(=\textipa{\ng}) \\
$\setminus$h & $\rightarrow$ & {\SHa\char10}(=h) 
\end{tabular}
\end{itemize} 

This system is simply based on English spellings, making the system quite complex. The sounds  that  have phonetic similarities cannot be typed in a similar manner. 
\\
\begin{tabular}{llllllll}
ka&$\rightarrow$&{\SHa\char77a}(=ka) &and& kha&$\rightarrow$&{\SHa\char85a}(=kha)\\
ta&$\rightarrow$&{\SHa\char149a}(=\d{t}a) &but& tha&$\not\rightarrow$&{\SHa\char157a}(=\d{t}ha)\\
\\
da&$\rightarrow$&{\SHa\char165a}(=da) &and& nnda&$\rightarrow$&{\SHb\char109a}(= \v{n}\d{d}a )\\
ba&$\rightarrow$&{\SHa\char237a}(=ba) &but& nnba&$\not\rightarrow$&{\SHb\char117a}(= \v{m}ba )\\
\end{tabular}

This system is not very efficient in some cases, because it uses a lot of upper case letters in the middle of the words, where the user needs to press and release the shift-key repeatedly.  





\section{Proposed system}
\label{srishell}

\begin{table}[t]
\caption{Sinhala characters, phonetic notations (NLAC [IPA]) and {\it Sri Shell}}
\label{tbl:sritext}
\input{06t07.txt}
\end{table}

Here we propose a Sinhala typing system called {\it Sri Shell}. 
{\it Sri Shell} assigns a key combination to each Sinhala character. 
The basis of this system is the phonetic notation of Sinhala characters. 
Table \ref{tbl:sritext} shows the Sinhala characters, phonetic notation using NLAC ({\it National Library at Calcutta romanization}), 
phonetic notation using IPA ({\it International Phonetic Alphabet}), and the key assignment by {\it Sri Shell}.

Unlike the {\it Natural SinGlish}, {\it Sri Shell} has been implemented as an independent module, which allows the input of Sinhala text into any application program.

\paragraph{Principles of the proposed system}
\begin{itemize}
\item 
It is based on phonetic notation of the characters:
\begin{itemize}
\item 
All aspirated consonants can be produced by adding an ``h'' to the unaspirated consonants. 
\item
Nasals can be produced by voiceless vowel preceded by ``/''.
\item
Nasal+voiced can be produced by voiced vowel preceded by ``/''.
\end{itemize}

\item 
It is consistent:
\begin{itemize}
\item 
All long-vowels can be produced by doubling the last character of  a  short-vowel.
\item 
If two Sinhala characters map to the same roman character, then these Sinhala characters are differentiated by adding an  ``x.''  
 The ``x'' is added to the one  that  has  a  lower occurrence rate. \\(for example retroflex \& dental, Table \ref{tbl:sritext})
\end{itemize}

\item 
It is complete:\\
Most of the Sinhala input systems introduced up to now have several missing characters. Especially  rare characters such as {\SHa\char20\char1}  ,{\SHa\char20\char2} ,{\SHa\char21}  ,{\SHa\char21\char3}  are missing in most systems. 
The proposed system supports all the characters even though some of them cannot be displayed with most of the fonts.
\end{itemize}





\section{Evaluation}
\label{evaluation}

This section describes the evaluation of the proposed input method.
The evaluation of an input method should be based on user friendliness, as well as input efficiency. 
We can evaluate the input efficiency by simply measuring the time taken to input a prepared text. 
For example, Masui measured the average input time that was necessary to input a prepared text with 53 
    characters \cite{masui}. 
This principle applies not only to the evaluation of an input method for a language with a small number of characters, but also for a language with many characters.

 The user-friendliness  evaluation of an input method, on the other hand, should be greatly different  between two  language types. 
Each character  that  appears in conventional English texts can be assigned a unique key  on a typical  English keyboard.
The correspondence between a character and a key is 1-to-1, enabling the user to input texts without performing any conversions.

In this setting, the physical arrangement of the keys and the  mapping  of keys to a set of characters are crucial.
Dominic et al. \cite{english_text_input} proposed a method for predicting
maximum typing speeds with such key arrangements. 
The purpose of their proposal was to provide a tool  that  makes the development process of  a  user interface more efficient;  the  usual development process involves an initial evaluation backed up by mathematical models, as well as a final evaluation
through fully empirical testing.

However, in  an input method for a language with many characters, we need some conversion process  that  maps the input key sequence into a linguistic expression in some representation form in the target language. 
A typical example of such a method is kana-kanji conversion-based Japanese input methods, with which we get Kanji characters usually by inputting the associated romanized character sequence; each of the  characters  can be directly mapped into alpha  keys  with  ordinary  English keyboards.
There is no difficulty in inputting alpha key  sequences because  there are only a  few standard  conversion rules for romanizing Japanese expressions. Also, the rules are well known even  to average  users.

Unfortunately, such a standard conversion rule does not exist for Sinhala. 
Therefore user-friendliness of a Sinhala input method with  typical  English keyboards should be primarily dependent on the applicability of the underlying conversion rule,  which in our proposal, is  based on principled phonetic transcription.

\begin{table}[t]
\caption{Occurrence rates of Sinhala characters}
\input{06t08.txt}
\end{table}

\begin{figure}[t]
\input{06f2.txt}
  \caption{ Occurrence rates of characters}
\end{figure}

For our evaluation,  the most popular Sinhala input methods,  which are the {\it kaputadotcom} (direct input), {\it Natural SinGlish}, and {\it Sri Shell}  as shown in Figure \ref{fig:image}, have been taken into account. 
First of all it is necessary to know the occurrence rates of each Sinhala character, because an efficient input system must be more efficient with frequent characters. 
For this purpose, the Divaina online Sinhala newspaper\footnote{\url{http://www.divaina.com/}}  from January 2005 to May 2006 
(about 50MB of kaputadotcom font text) was used as a corpus to calculate the occurrence rate of each Sinhala character.


\begin{figure}[t]
\input{06f3.txt}
\caption{Accumulated frequency}
\end{figure}


In our evaluation 275 Sinhala characters were used, and this covers more than 99\% of the characters occurred in the corpus, and all the characters have more than  a  0.0155\% occurrence rate. 




\subsection{User-friendliness}

In order to produce an experiment more natural for the test subjects, we used a word list  that  includes  all 275  characters mentioned above, instead of using the characters separately. 
We tried to minimize the number of words in order to reduce the test subjects' load. However,  the word list ended up with 106 words. 
The difference between the input sequences and test subjects' romanization proposals is taken as a measure of how difficult it is to remember the input sequence for each Sinhala character.

    \subsubsection*{Romanizing Experiment} 
Test subjects  were  asked to romanize the above Sinhala word list.  
This experiment was carried out on a group of 30 subjects between 14 to 60 years old, which  included  14 males and 16 females. 
The romanized word  lists we  got from the subjects  were  split into characters. 
Then the difference between the input key sequence of each input method  and the  proposed romanized sequence of each test subject  was  measured by the edit distance between the two strings.

    \subsubsection*{Edit Distance}
The \textbf{Levenshtein distance} or \textbf{edit distance} between two strings is given by the minimum number of operations needed to transform one string into the other, 
where an operation is an insertion, deletion, or substitution of a single character \cite{edit_distance}.
\begin{gather}
 \mathit{avg\_edit\_dist}(\mathit{chr})=\frac{1}{\#\_\mathit{Subs}}\sum _{\mathit{subject}= 1} ^{\#\_\mathit{Subs}} \mathit{edit\_dist}(\mathit{input\_sequence}(\mathit{chr}), \mathit{proposal}(\mathit{subject,chr})) \label{eqn:edit_dist_1} \\ 
 \mathit{average}=\sum _{\mathit{chr}= 1} ^{\#\_\mathit{Chars}} \mathit{freq}(\mathit{chr})\cdot \mathit{avg\_edit\_dist}(\mathit{chr}) \label{eqn:edit_dist_2}
\end{gather}

\begin{table}[t]
\centering
\caption{Average edit distances }
\label{tabl:avg_edit_dist}
\input{06t09.txt}
\end{table}

    \subsubsection*{Results}
As a measurement of user-friendliness, we have calculated the average edit distance between  an  input key sequence and  the  proposed romanization of each character. 
The average edit distances of each input method are calculated using  Equations \ref{eqn:edit_dist_1} and \ref{eqn:edit_dist_2} and are  shown in Table \ref{tabl:avg_edit_dist}.
The results show that there is a big difference between the subjects' proposals and  the  input sequence proposed by {\it kaputadotcom}. 
In {\it Natural SinGlish} and {\it Sri Shell} the differences are very small. 
However,  {\it Natural SinGlish} is slightly more user-friendly than {\it Sri Shell}. This happened because the test subjects always tried to produce a romanized Sinhala word that resembles an English word. So they tried to avoid key combinations such as ``aa'', ``uu'' and ``ii'', which are very rare in English.
 However,  {\it Sri Shell} uses these as long vowels because repeated keys are more efficient in typing.
The other reason is, {\it Natural SinGlish} has adopted a lot of English-like input sequences, where {\it Sri Shell} emphasizes  more phonetic  transcription.



\subsection{Efficiency}

The most general way to calculate efficiency is to experimentally compute the maximum typing speeds for each input method. 
However,  for several reasons this method is not applicable to Sinhala.
\begin{itemize}
\item  Sinhala has  hundreds of characters with very low occurrence  rates. Thus,  it is not fair to take a short paragraph for calculating the efficiency.
\item Most of the Sinhala computer users are used to typing Sinhala based on only one input method. Therefore,  the experimental results will be biased. 
\item In order to calculate the efficiency,  we need to calculate peak typing speed, but in Sri Lanka, people who have good experience  with  the above three input methods are very rare.
\end{itemize}
Hence, instead of the actual typing speed we used the typing cost, which represents the normalized typing speed.

We define the weight of average time taken to input one single key stroke as 1. The weight of shifted keys and the repeated keys may differ from 1. As a measurement of efficiency we have calculated the average typing cost of the input key sequences for each input method. We have defined the typing cost of the input sequence as  Equation \ref{eqn:weight}. 
 Experiments 1 and 2  are carried out in order to calculate the weights of shifted keys and repeated keys.
\begin{align}
 \mathit{typing\_cost}&=w_{\mathit{shift}}\times \mathit{shifts}+w_{\mathit{repeat}}\times \mathit{repeats}+1\times \mathit{normal\_keys} \label{eqn:weight}\\
 w_{\mathit{shift}}&=\frac{t_{xY}+t_{Xy}}{t_{xy}}-2\\
w_{\mathit{repeat}}&=\frac{t_{xx}}{t_{xy}}
\end{align}
where,
\begin{tabbing}
$t_{xy}$ \= = \=average time lapse between two alpha key strokes\\
$t_{xx}$\>=\>average time lapse to repeat an alpha key stroke\\
$t_{xY}$\>=\>average time lapse between an alpha key and a shifted alpha key\\
$t_{Xy}$\>=\>average time lapse between a shifted alpha key and an alpha key
\end{tabbing}


    \subsubsection*{Experiment 1} 
Test subjects are asked to type a set of character pairs. Some pairs consist of two different characters and in the others the two characters are the same. 
Then $t_{xy}$ and $t_{xx}$ are calculated by averaging them. This experiment was carried out on a group of 12 subjects (3 female and 9 male, Age 18-46 years).

    \subsubsection*{Experiment 2}
The test subjects are asked to type a set of common English words, but some characters of the word are capitalized. 
Then $t_{xy},t_{xY}$ and $t_{Xy}$ are calculated by averaging them.
This experiment was carried out on a group of 11 subjects (7 female and 4 male, Age 20-31 years).

    \subsubsection*{Least Square Method}
The trend of the above experiment data is estimated using the least square method. The trend is approximated into a line (Equation \ref{eqn:line}). $b$ and $m$ are calculated,  which minimize the $\sum{(y-actual\_data)^2}$.
\begin{align}
 y&=mx+b\label{eqn:line}\\
 m&=\frac{\sum{(x-\overline{x})(y-\overline{y})}}{\sum{(x-\overline{x})}}\\
 b&=\overline{y}-m\overline{x}\\
 r&=\frac{n\sum{xy}-(\sum{x})(\sum{y})}{\sqrt{n\sum{x^2}-(\sum{x})^2}\sqrt{n\sum{y^2}-(\sum{y})^2}} 
\end{align}

The experiment results are shown in  Figures  \ref{fig:w_repeat}  and \ref{fig:w_shift}. 
 The  X-axis shows $t_{xy}$, the average time lapse between two alpha key strokes, while  the  Y-axis shows the weights of repeated keys and the shift key.

\begin{figure}[b]
\input{06f4.txt}
  \caption{Weight of repeated keys}
  \label{fig:w_repeat}
\end{figure}

\begin{figure}[t]
\input{06f5.txt}
  \caption{Weight of shift key}
  \label{fig:w_shift}
\end{figure}

The equations of the approximation  lines and  the coefficient correlations are shown in  \\Equations \ref{eqn:w_repeat} and \ref{eqn:w_shift}.



    \subsubsection*{Results}

\begin{table}[b]
\centering
\caption{Average typing cost}
\input{06t10.txt}
\label{tabl:weight}
\end{table}

The average typing cost for each input method is calculated using Equation \ref{eqn:avg_weight}, and the results are shown in Table \ref{tabl:weight}.
These results show that {\it Sri Shell} has the lowest typing cost among the three input methods except for $t_{xy}$=600\,ms. Even though our results show that {\it kaputadotcom} has the lowest typing cost for $t_{xy}$=600\,ms, {\it kaputadotcom} is not recommendable even to the slow typists, because {\it kaputadotcom} is not user-friendly.
This means that {\it Sri Shell} is the most efficient input method. 
{\it Sri Shell} has the best results because {\it Sri Shell} uses lowercase alpha characters and ``/'' only, 
where the other methods use a lot of uppercase characters and a lot of symbols (for example ``{\it ),@,\#,\$} '').
There are a lot of  drawbacks  in using uppercase characters and symbols. 
It increases the users' load and error rates. 
As our target  is average  computer users in Sri Lanka, who are quite familiar with English typing, they do not feel a conceptual difference  with  case differences.
The other problem is  that  a mixture of symbols, uppercases and lowercases results in an unreadable input sequence (for example {\it kuruNA)gala} or {\it kOr\#N\$gl}).
One may argue that this is just an input method and there is no  need for readability. 
 However, if a sequence is  readable it will be easier to memorize, and for an application like \LaTeX  where one has to type without any output feedback,
it is an advantage if what is typed can be read.
\begin{align}
 w_{\mathit{repeat}}&=0.87-0.73t_{xy}	\quad (|r|=85\%)\label{eqn:w_repeat} \\
 w_{\mathit{shift}}&=2.50-2.92t_{xy}	\quad (|r|=69\%)\label{eqn:w_shift}\\
 \mathit{average}&=\sum _{\mathit{chr}= 1} ^{\#\_\mathit{Chars}} \mathit{freq}(\mathit{chr})\cdot \mathit{weight}(\mathit{chr}) \label{eqn:avg_weight}
\end{align}




\section{Conclusions and Future Work}
\label{conclusions}

We have proposed a Sinhala input method {\it Sri Shell}\footnote{\url{http://www.sandeva.com/sri_shell/}}, which is based on Sinhala phonetic transcription.
We evaluated the user-friendliness and efficiency of the method by comparing it with other Sinhala character input methods such as {\it kaputadotcom} and {\it Natural SinGlish}. 

\begin{figure}[b]
\input{06f6.txt}
\caption{Some many-to-many relationships in test subjects' proposals}
\label{fig:many-to-many}
\end{figure}

All the Sinhala input methods proposed up to now have a one-to-one (or many-to-one) relationship between  the  input sequence and output characters. 
This is the simplest way to design an input method,  and these kinds of input systems require very  few  resources (less memory or disk space). 
 For  this reason, these input methods can be implemented even on mobile terminals,  etc. 
However, the romanization experiment results revealed that there were certain character contexts that require many-to-many correspondences.
Figure \ref{fig:many-to-many}  shows some examples.

In order to improve the user-friendliness of the proposed method, our future work is to incorporate these correspondences into the method, 
which will require the development of a context-sensitive character conversion algorithm.



\acknowledgment

The authors would like to thank Mr. Goonetilleke M.D.N.G. for the collection of experiment data from the 30 test subjects.



\bibliographystyle{jnlpbbl_1.3}
\begin{thebibliography}{}

\bibitem[\protect\BCAY{Davis}{Davis}{2006}]{Unicode2}
Davis, M. \BBOP 2006\BBCP.
\newblock {\Bem Text Boundaries, Unicode Standard Annex \#29}.
\newblock \\ \url{http://unicode.org/reports/tr29/}.

\bibitem[\protect\BCAY{Dominic~Hughes \BBA\ Warren}{Dominic~Hughes \BBA\
  Warren}{2002}]{english_text_input}
Dominic~Hughes, O.~B.\BBACOMMA\ \BBA\ Warren, J. \BBOP 2002\BBCP.
\newblock \BBOQ Empirical Bi-action Tables: a Tool for the Evaluation and
  Optimization of Text Input Systems, Application I: Stylus Keyboards\BBCQ\
\newblock {\Bem ACM Transactions on Computer-Human Interaction (TOCHI)}, {\Bbf
  17}, \mbox{\BPGS\ 131--169}.

\bibitem[\protect\BCAY{Gordon}{Gordon}{2005}]{family}
Gordon, R.~G. \BBOP 2005\BBCP.
\newblock {\Bem Ethnologue: Languages of the World, Fifteenth edition}.
\newblock SIL International\\ \url{http://www.ethnologue.com/family_index.asp}.

\bibitem[\protect\BCAY{Indras\={e}na}{Indras\={e}na}{2001}]{alphabet}
Indras\={e}na, D. \BBOP 2001\BBCP.
\newblock {\Bem sinhala akshara m\={a}l\={a}va}.
\newblock Sridevi Printers (pvt) Ltd.

\bibitem[\protect\BCAY{Masui}{Masui}{1998}]{masui}
Masui, T. \BBOP 1998\BBCP.
\newblock \BBOQ An efficient text input method for pen-based computers\BBCQ\
\newblock {\Bem Proceedings of the SIGCHI conference on Human factors in
  computing systems}, \mbox{\BPGS\ 328--335}.

\bibitem[\protect\BCAY{Mikami}{Mikami}{2002}]{codes}
Mikami, Y. \BBOP 2002\BBCP.
\newblock {\Bem A History of Character Codes in Asia (in Japanese)}.
\newblock Kyoritsu Publishing Co.

\bibitem[\protect\BCAY{Sasanka}{Sasanka}{2004}]{naturalsinglish}
Sasanka, A. D.~R. \BBOP 2004\BBCP.
\newblock {\Bem Natural Singlish}.
\newblock \url{http://www.geocities.com/naturalsinglish/}.

\bibitem[\protect\BCAY{State}{State}{2007}]{population}
State, U. S. D.~O. \BBOP 2007\BBCP.
\newblock {\Bem Background Note: Sri Lanka}.
\newblock \\ \url{http://www.state.gov/r/pa/ei/bgn/5249.htm}.

\bibitem[\protect\BCAY{Unicode}{Unicode}{2007}]{Unicode}
Unicode \BBOP 2007\BBCP.
\newblock {\Bem Glossary of Unicode Terms}.
\newblock \url{http://unicode.org/glossary/}.

\bibitem[\protect\BCAY{Wagner \BBA\ Fischer}{Wagner \BBA\
  Fischer}{1974}]{edit_distance}
Wagner, R.~A.\BBACOMMA\ \BBA\ Fischer, M.~J. \BBOP 1974\BBCP.
\newblock \BBOQ The String-to-String Correction Problem\BBCQ\
\newblock {\Bem Journal of the ACM}, {\Bbf 21}  (1), \mbox{\BPGS\ 168--173}.

\end{thebibliography}

\begin{biography}

\bioauthor[:]{Sandeva Goonetilleke}{
Sandeva Goonetilleke received his B.E, and M.E. degrees from
Osaka university in 2004 and 2006 respectively. 
He is currently a Ph.D candidate, and pursuing a research on Sinhala computing
as his doctoral theme.
His research interests include natural langugae processing, human interfaces,
and character input systems especialy for indic scripts.
}
\bioauthor[:]{Yoshihiko Hayashi}{
Yoshihiko Hayashi received his B.E, M.E, and Dr.Eng. degrees from
Waseda university in 1981, 1983, and 1996 respectively.  He has
been a professor of graduate school of language and culture,
Osaka university since 2004. Before moved to Osaka university, he
had been a researcher at NTT laboratories, working on natural
language processing technologies associated with
Japanese-to-English machine translation, Japanese text revision,
cross-language information retrieval, and speech-based
multi-media indexing. He is now additionally affiliated with NICT
language grid project, where he is working on a domain ontology
for describing language resources and NLP tools in the context of
language infrastructure on the web.  His research interests
include natural language processing, intelligent information
access, and lexical ontologies.}

\bioauthor[:]{Yuichi Itoh}{
Yuichi Itoh received his B.E, M.E, and Ph.D. degrees from Osaka
university in 1998, 2000, and 2006 respectively.  He has been an
assistant professor of graduate school of information science and
technology, Osaka university since 2002. His research interests include
realizing natural and intuitive human-computer interactions.
}

\bioauthor[:]{Fumio Kishino}{
Fumio Kishino received the B. E., M. E. and D. E. degrees from Nagoya
Institute of Technology, Nagoya, Japan, in 1969, 1971 and 1995, respectively.
In 1971, he joined NTT laboratories, where he was involved in work on
research and development of image processing and visual communication
systems. From 1989 to 1996 he was a head of Artificial Intelligence Department,
ATR Communication Systems Research Laboratories,
where he was engaged in research on virtual space teleconferencing.
In July 1996, he became a Professor of Graduate School of Engineering, Osaka
University. Since April 2002, he is a Professor of Graduate School of
Information
Science and Technology, Osaka University. His research interests include
human interface in virtual environment and multimedia content processing.}
\end{biography}

\biodate

\end{document}
