\documentclass[english]{jnlp_3.5}
\usepackage{jnlpbbl_2.2}
\usepackage[dvipdfmx]{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{url}
\usepackage{hangcaption_jnlp}
\usepackage{array}
%%%%\usepackage{udline}
%%%%\setulminsep{1.2ex}{0.2ex}
%%%%\let\underline=\ul
\allowdisplaybreaks


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% author's definition
%%%%\usepackage{graphics}
%%%%\usepackage{graphicx}
%%%%\usepackage{comment}
%%%%\usepackage{lipsum}
%%%%\usepackage{amsmath}
%%%%\usepackage{colortbl}
%%%%\usepackage{wrapfig,booktabs}
%%%%\usepackage{lineno}
%%%%\usepackage{color,soul}
%%%%\usepackage{tikz}
%%%%\usetikzlibrary{automata,positioning}
%%%%\usepackage{rotating}
%%%%\usepackage{comment}
%%%%\usepackage[tone,extra]{tipa}
%%%%\usepackage{enumitem}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\Volume{29}
\Number{4}
\Month{December}
\Year{2022}
%%%%\Issuetitle{Special Issue: XXXXXXXX}

\received{2022}{4}{25}
\revised{2022}{7}{22}
\accepted{2022}{9}{1}

\setcounter{page}{1254}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\esubject{Technical Report}

\etitle{Inputting Writing Systems with Medium Complexity:\\ A Generalized Input Method Editor {\textbf{\texttt {AKKHARA}}}\\  and Case Study on Myanmar Script}

\eauthor{Chenchen Ding\affiref{Author} \and Masao Utiyama\affiref{Author} \and Eiichiro Sumita\affiref{Author}} 

\eabstract{%
In this study, an input method editor called {\tt AKKHARA} is developed to accommodate writing systems comprising several tens to hundreds of symbols. As an engineering realization, {\tt AKKHARA} accepts and applies a set of rewrite rules with priorities such that the alternation, substitution, and normalization of character strings are applied alongside the keystrokes. Compared with general key-character editors, {\tt AKKHARA} provides a greater flexibility for Romanization-based rule editions. Compared with the input methods developed for Chinese and Japanese, {\tt AKKHARA} is lightweight and easy to maintain. As an application case of {\tt AKKHARA}, this study illustrates the realization of a Romanization-based Myanmar input method using the Unicode standard. A version of {\tt AKKHARA} for Microsoft Windows was released that supports Unicode characters with customizable functions for rewriting rule editions.
}
\ekeywords{Abugida writing systems, Input method editor, Myanmar script}

\headauthor{Ding et al.}
\headtitle{Inputting Writing Systems with Medium Complexity}

\affilabel{Author}{}{Advanced Translation Technology Laboratory, Advanced Speech Translation Research and Development Promotion Center, National Institute of Information and Communications Technology.}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

\maketitle


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}

Various alphabet writing systems have been used to record numerous languages worldwide. These alphabet systems use tens of distinguishable symbols to transcribe phonemes. Conversely, languages, such as Chinese and Japanese, apply logogram systems totally or partially in their orthographies, thus requiring thousands of symbols to represent morphemes.


This study focuses on a group of syllabic systems that lie between the aforementioned extremes. In this report, they are referred to as having a {\it medium complexity}. Compared with logogram systems, they are still based on phonetics, although a redundancy in spelling may be retained to distinguish morphemes; compared with an alphabet system, they assign symbols based on syllables rather than phonemes, and may apply a nonlinear combination to characters.

Traditionally, these syllabic systems are input by direct keystrokes and treated as common alphabets. Because of the larger symbol set, the keyboard layout is crowded and requires one or more alternating keys. However, these systems are not as complex as those used in Chinese or Japanese scripts, wherein language-dependent input methods are indispensable. Therefore, an input editor that is 1) lightweight, 2) language-independent, and 3) editable and maintainable, is expected to efficiently input such writing systems.

Motivated by these requirements, the {\tt AKKHARA} editor developed in this study provides a general solution. {\tt AKKHARA} repeatedly applies rewrite operations to convert keystrokes into specific character strings. Therefore, compared with a keyboard layout editor, {\tt AKKHARA} has a greater ability and flexibility in applying string operations than simply appending new characters using keystrokes. This is important for writing systems with certain redundancies in their encoding systems, because some complex combined glyphs can be realized in more than one ways. Thus, the rewrite operations can normalize the input to generate consistently encoded textual data. 

Temporary input methods for Chinese and Japanese scripts are typically based on common Romanization systems, such as {\it Pinyin} and {\it R\={o}maji}. However, numerous languages that do not use the Latin alphabet lack a consistent Romanization system. In {\tt AKKHARA}, a set of rewrite rules is organized in an editable textual file in a structured format, thereby enabling users to customize the input method according to their preferences.

Predictions based on words, phrases, or even sentences, supported by large-scale data, are a common function provided by Chinese and Japanese input methods. \citeA{ding-etal-2018-simplified} investigated an auto-complete method for several abugida systems that can achieve a high accuracy, even with limited training data. This is a direction for the future development of {\tt AKKHARA}. {\tt AKKHARA} primarily provides a layer for the local decisive conversion between raw keystrokes and writing systems for users to generate correctly coded and normalized strings. Based on this layer, sophisticated functions, such as context-based prediction can be further developed.

The remainder of this study is organized as follows. Section \ref{sec:linguistic} introduces the linguistic background of writing systems. Section~\ref{sec:related} reviews related works and applications. Section~\ref{sec:rule} provides a general overview and instructions for rewriting rule editions to define an input method on arbitrary character sets. To illustrate the application of {\tt AKKHARA}, an input method of the Myanmar script \cite{ding-etal-2019-akkhara} is used as a case study. Section~\ref{sec:my-akkhara} reviews the original design of the Myanmar input method and describes {\tt AKKHARA}'s more extendable realization. Section \ref{sec:conclusion} concludes the report and presents ideas for future work.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Linguistic Background}
\label{sec:linguistic}

Table \ref{tab:scripts} lists the main types of writing systems used worldwide, 
\pagebreak
with a comparison of the number of symbols applied. Generally, an analytic phonetic writing system, e.g., a typical alphabet or abjad system, contains approximately $30$ $(\approx 10^{1.5})$ symbols. This is because the average phonetic inventory of natural languages contains \mbox{$22\pm{3}$} consonants \cite{wals-1} and five or six vowels \cite{wals-2}. By contrast, a logogram system may contain thousands of symbols for daily use. For example, the {\it Table of General Standard Chinese Characters}\footnote{\url{http://www.gov.cn/gzdt/att/att/site1/20130819/tygfhzb.pdf}} contains $8,105$ characters for Chinese, and the {\it List of J\={o}y\={o} Kanji}\footnote{\url{https://www.bunka.go.jp/kokugo_nihongo/sisaku/joho/joho/kijun/naikaku/pdf/joyokanjihyo_20101130.pdf}} contains 2,136 characters for Japanese.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% table 1
\begin{table}[b]
\input{07table01.tex}
\hangcaption{Types of writing systems and the scale of symbols used in them. This report refers to the abugida/syllabic systems as having {\it medium complexity}.}
\label{tab:scripts}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% fig. 1
\begin{figure}[b]
\begin{center}
\includegraphics{29-4ia7f1.pdf}
\end{center}
\hangcaption{Character distribution of Latin letters in English, the {\it kana} and {\it kanji} in Japanese, and the four abugida systems of Myanmar, Khmer, Thai, and Lao. Frequency is the normalized relative frequency, i.e., empirical probability; the rank is by the descending order of the frequency.}
\label{fig:loglog}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Figure \ref{fig:loglog} compares character distributions across different writing systems. Parallel data from the Asian Language Treebank \cite{riza2016introduction}\footnote{\url{https://att-astrec.nict.go.jp/member/mutiyama/ALT/}} were used. The differences between an alphabet system (English), a mixed syllabic and logogram system (Japanese), and four abugida systems (Myanmar, Khmer, Thai, and Lao) are presented. Evidently, the four abugida systems with medium complexity share similar features, but differ from the alphabet/logogram systems. Generally, these medium complexity systems contain more commonly used symbols and a longer tail of obscure characters compared with general alphabet systems. However, their complexity is still far from that of a logogram system. 

For scripts supported by the  {\it Unicode Basic Multilingual Plane}, the following are taken as the objects of {\tt AKKHARA}, where the number of points assigned by Unicode is provided in parentheses. Most scripts are abugidas; herein the dagger symbol indicates that the script is syllabic.

{\it
    Devanagari~($\it 128$),
    Bengali~($\it 96$),
    Gurmukhi~($\it 80$),
    Gujarati~($\it 91$),
    Oriya~($\it 91$),
    Tamil~($\it 72$),
    Telugu~($\it 98$),
    Kannada~($\it 89$),
    Malayalam~($\it 118$),
    Sinhala~($\it 91$),
    Thai~($\it 87$),
    Lao~($\it 82$),
    Tibetan~($\it 211$),
    Myanmar~($\it 160$),
    Ethiopic~($\it 358$),
    Cherokee$^\dagger$~($\it 92$),
    Unified Canadian Aboriginal Syllabics\footnote{Essentially Abugida but encoded as syllabary.}~($\it 640$),
    Khmer~($\it 114$),
    Limbu~($\it 68$),
    New Tai Lue~($\it 83$),
    Tai Tham~($\it 127$),
    Balinese~($\it 121$),
    Sundanese~($\it 66$),
    Batak~($\it 56$),
    Lepcha~($\it 74$),
    Vai$^\dagger$~($\it 300$),
    Bamum$^\dagger$~($\it 88$),
    Saurashtra~($\it 82$),
    Javanese~($\it 91$),
    Cham~($\it 83$),
    Tai Viet~($\it 72$), {\rm and}
    Meetei Mayek~($\it 56$).
}
    
Herein, systems with lesser complexity, such as {\it Tai Le ($\it 35$)} were excluded. For brevity, only the names of the scripts and number of assigned points are listed. One script may be used in different writing systems,\footnote{For example, the Devanagari is used by the languages of Hindi, Marathi, Sindhi, Nepali, and Sanskrit.} wherein only a portion of the symbols is used, or extended symbols are required.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Related Work and Applications}
\label{sec:related}

Popular operating systems (OS) such as Microsoft Windows and Macintosh provide keyboard layouts for various writing systems. Several keyboard layout editors, such as {\tt Keyman},\footnote{\url{https://keyman.com/}} have been developed for more sophisticated layout editions. These input editors focus on key-character mapping with extensions for handling contextually dependent keystrokes.

For writing systems using Chinese characters, the {\tt RIME}\footnote{\url{https://github.com/rime}} input method engine has customization functions that allow users to design input schemes. This project supports obscure ancient fonts and dialect-based input methods. Regarding the medium complexity scripts of interest in this study, the {\tt RIME} configuration is excessively complex.

\citeA{ding-etal-2019-akkhara} proposed an input method for Myanmar script that can be formulated using a complex automaton. Rather than key-character mapping, the basic idea concerns converting strings such that operations, such as looped alternations, substitutions for combined glyphs, and normalizations for ambiguities and redundancies, in Unicode can be modeled in a uniform framework. However, this method is applicable only to the particular writing system, and the overall automaton is hard-coded. {\tt AKKHARA} follows the basic idea of the specific input method and extends it to a language-independent input editor.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Functions of {\textbf{\texttt {AKKHARA}}}} 
\label{sec:rule}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Interface}

{\tt AKKHARA} can be installed and used as a common input editor for {\tt Windows}.\footnote{\url{https://att-astrec.nict.go.jp/member/ding/my-akkhara.html}} It supports multiple input methods that can be selected from a list. Figure \ref{fig:ime} shows the launch screen of {\tt AKKHARA}, and Fig. \ref{fig:input} shows an image of typed and converted strings. For a selected input method, the details can be customized and viewed in the interface, as shown in Fig. \ref{fig:rule}. 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% fig. 2
\begin{figure}[b]
\vspace{-1\Cvs}
\begin{center}
\includegraphics{29-4ia7f2.pdf}
\end{center}
\hangcaption{Interface launching {\tt AKKHARA}. Four scripts are listed: Khmer, Laos, Myanmar (selected), and Thai.}
\label{fig:ime}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% fig. 3
\begin{figure}[b]
\begin{center}
\includegraphics{29-4ia7f3.pdf}
\end{center}
\hangcaption{Input interface. Pressing the {\tt space} bar inputs the bottom converted Myanmar script. Pressing the {\tt enter} key inputs the top original string.}
\label{fig:input}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Format}

In the background, an input method is defined using a text file named {\tt *.akkhara}, where the symbol {\tt *} denotes the name of the input method. Each line of the file is organized in the following format.
\pagebreak
\begin{equation}
\tt input \ ||| \ output \ ||| \ priority \ ||| \  status,
\label{rule:format}
\end{equation}
where, $\tt input$ and $\tt output$ are the Unicode strings before and after a rewriting operation, respectively. $\tt priority$ is a non-negative integer, and rules with smaller values are always applied before rules with larger values. These rules are for local operations and applied ad-hoc after each keystroke. $\tt priority$ can also take a value of $\tt -1$ for a global final normalization after all other operations have been conducted. $\tt status$ is assigned a value of $\tt 0$, $\tt 1$, or $\tt -1$. The values of $\tt 1$~and~$\tt -1$ are flags for the rules enabled and disabled by customization, respectively, and $\tt 0$ denotes rules that are always applied.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% fig. 4
\begin{figure}[t]
\begin{center}
\includegraphics{29-4ia7f4.pdf}
\end{center}
\hangcaption{Interface showing details of the input method selected. The left screen shows a customization wherein specific rules are enabled/disabled; the right screen lists all of rules enabled. 
}
\label{fig:rule}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

The rewriting operations can actually describe a regular language because they always rewrite one side of a string with the input processing.\footnote{Rules with a {\tt priority} of {\tt -1} conduct an overall rewriting on a string, which is a more powerful operation than a regular language. This is provided only to handle certain intrinsic encoding problems in Unicode, which should not bother users.} Therefore, {\tt AKKHARA} can realize any input method as long as the required conversions can be formulated by a regular language. Note that {\tt priority} is unnecessary if the rules are deliberately organized and strictly operated in a predefined order. {\tt priority} can help users group rules for editing and maintenance. Rules that do not require explicit orders can be assigned with identical {\tt priority}.

An {\tt akkhara} file can be created and edited by a general text editor, such as {\tt Notepad} on {\tt Windows}. For the $\tt input$ and $\tt output$ fields in a rule, ASCII characters\footnote{ASCII characters here are letters and marks that can be directly input by keystrokes on a {\tt US} keyboard.} can be used directly; other characters should be represented using hexadecimal Unicode. The rules should be integrated by the increasing values of $\tt priority$ from $\tt 0$, ending with those with a $\tt priority$ of $-1$. A reboot is required to reload an {\tt akkhara} file after modification.

The following subsections provide general descriptions of editing the rules for realizing alternations, substitutions, and normalizations of character strings. The descriptions omit the {\tt status} of the rules as this depends on user preference.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Simple Mapping}
\label{sec:simplemapping}

For basic key-character mapping, simple rules can be described, as follows.
\begin{equation}
\tt a_1 \ ||| \ u_1\ \cdots\  u_n \ ||| \ 0 \ |||,
\label{rule:simplemapping}
\end{equation}
where $ \tt a_1$ is an ASCII character available on a general US keyboard; and $\tt \ u_1\ \cdots\  u_n $ is a Unicode string composed of one or more characters to be input by the keystroke of $ \tt a_1$. 

For these basic mappings that directly use ASCII characters, $\tt priority$ is generally set to $0$, because no other prior rules are applied.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Simple Conversion}
\label{sec:simpleconversion}

Rules (\ref{rule:k})--(\ref{rule:K}) provide a typical example for realizing a simple conversion function. Using two keystrokes, $\tt a_1$ and $\tt a_2$, $\tt u_3$ can be input. Note that the keystrokes of $\tt a_1$ and $\tt a_2$ have their own input functions and that $\tt u_3$ is generated by a rule with a $\tt priority$ of $\tt 1$. This guarantees that Rule (\ref{rule:K}) executes after Rule (\ref{rule:h}).
\begin{gather}
\tt a_1\ |||\ u_1\ |||\ 0 \ |||,
\label{rule:k} \\
\tt a_2\ |||\ u_2\ |||\ 0\ |||,
\label{rule:h} \\
\tt u_1\  u_2\ |||\ u_3 \ |||\ 1 \ |||,
\label{rule:K}
\end{gather}

This type of rule is suitable for characters with stable digraph Latin transcriptions, such as using $\tt h$ for aspiration in many systems. In cases where a digraph may cause ambiguities or where users may intentionally disable the conversion, the following rules can be added as solutions.
\begin{gather}
\tt a_0\ |||\ 200B\ |||\ 0\ |||, 
\label{rule:q} \\
\tt 200B\ u_2\ |||\ u_2\ |||\ -1\ |||,
\label{rule:spacenorm-h}
\end{gather}

Here, $\tt a_0$ inputs an invisible separator by Rule~(\ref{rule:q}), and the zero-width space of {\tt 200B} is deleted by Rule~(\ref{rule:spacenorm-h}) as a final normalization with a $\tt priority$ of $\tt -1$. Subsequently, a sequence of keystrokes $\tt a_1\ a_0\ a_2$ forcibly inputs the sequence $\tt u_1\ u_2$.

In practice, the conversion key $\tt a_2$ and separator key $\tt a_0$ can be customized based on the Romanization preference, frequency of ambiguities, and keystroke distributions.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Conversion by Multiple Keystrokes}
\label{sec:conversionbymultiplekeystroke}

As a natural extension of simple conversion, a conversion key can be used multiple times to convert characters through a series. Generally, Rules (\ref{rule:k})--(\ref{rule:K}) can be further extended using the following rules. Using these rules, $\tt u_{k+1}$ can be converted by one keystroke of $\tt a_1$, followed by $k-1$ keystrokes of $\tt a_2$.
\begin{gather}
\tt u_3\ u_2\ ||| \ u_4 \ ||| \ 1 \ |||,
\label{rule:ng} \\
\tt \cdots \nonumber \\
\tt u_{k}\ u_{2}\ ||| \ u_{k+1} \ ||| \ 1 \ |||,
\label{rule:nggg} \\
\tt \cdots \nonumber
\end{gather}

Note that the $\tt priority$ values from Rule (\ref{rule:ng}) can be set to $1$. As the rewrite is implemented after each keystroke, the order of these rules does not need to be distinguished. When one is applied, the previous rewrite has already been completed.

Conversion using multiple keystrokes is suitable for a series of redundant characters for the same phoneme in a specific writing system, where only one or two of them are frequently used. Therefore, the inputs of remaining obscure ones can be grouped by the sequential conversion.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Looped Conversion}
\label{sec:loopedconversion}

As another type of conversion, a single keystroke can be repeated to input a group of characters in a looped manner. Rules (\ref{rule:i})--(\ref{rule:iii}) realize a function in which a series of keystrokes $\tt a_1$, $\tt u_1$ and $\tt u_2$ can be converted in a looped manner. That is, an odd number of keystroke(s) of $\tt a_1$ can input $\tt u_1$, and even number for $\tt u_2$.
\begin{gather}
\tt a_1\ |||\ u_1\ |||\ 0\ |||,
\label{rule:i} \\
\tt u_1\ u_1\ |||\ u_2\ |||\ 1\ |||,
\label{rule:ii} \\
\tt u_2\ u_1\ |||\ u_1\ |||\ 1\ |||,
\label{rule:iii}
\end{gather}

Similarly, by replacing Rule (\ref{rule:iii}) with the following rules, 
\pagebreak
looping can be extended to an arbitrary number of characters. 
\begin{gather}
\tt u_2\ u_1\ ||| \ u_3 \ ||| \ 1 \ |||,
\label{rule:iiii} \\
\tt \cdots \nonumber \\
\tt u_{k-1}\ u_{1}\ ||| \ u_{k} \ ||| \ 1 \ |||,
\label{rule:ik} \\
\tt u_{k}\ u_{1}\ ||| \ u_{1} \ ||| \ 1 \ |||,
\label{rule:ikk}
\end{gather}

This type of looped conversion can be used for a set of symbols (mostly two or three in practice) that share identical Romanization by one letter, such that they can be quickly converted using identical keystrokes. 


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Normalization of Variants}
\label{sec:normalizationonvariants}

In some writing systems, context-dependent variants of specific symbols are used. If $\tt u_1$ and $\tt u_1'$ are two variants of one character, while encoded separately by Unicode, then the following rules realize an example of context-dependent conversions.
\begin{gather}
\tt u_2\ u_1\ ||| \ u_2 \ u_1'||| \ 2 \ |||,
\label{rule:pa} \\
\tt u_3 \ u_2\ u_1'\ ||| \ u_3 \ u_2 \ u_1 \ ||| \ 3 \ |||,
\label{rule:ppa}
\end{gather}

By Rule (\ref{rule:pa}), when $\tt u_1$ comes after $\tt u_2$, it is substituted by $\tt u_1'$. When $\tt u_1$ comes after a string of $\tt u_3 \ u_2$, it is kept as it is, which is further supported by Rule (\ref{rule:ppa}). Note that the $\tt priority$ of such normalization rules begins from $\tt 2$ to distinguish them from general input and conversion operations. The longer the context, the larger the $\tt priority$ assigned. In the most extreme case, certain obscure variants may appear only in a few specific words. For such rules, a large constant of $\tt priority$ can be set for convenience.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Case Study}
\label{sec:my-akkhara}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{General Issues and a Myanmar Input Method}

In general, the following issues are required to design a minimum scheme to input a writing system with medium complexity.

\begin{itemize}
    \item The arrangement of some common characters. These characters should be input by simple keystrokes.
    \item The arrangement of other characters that require alternation keys. The alternation key is primarily the {\tt shift}-key, or a second alternation key is required if characters remain.
\end{itemize}

The original work of \citeA{ding-etal-2019-akkhara} focused primarily on these two issues, thus providing a basic interface for inputting the specific set of characters. Their work extended the use of alternation key(s) for more efficient conversion operations. The instruction of the input method can be printed by users on {\tt A4} paper (Fig. \ref{fig:mlc-d}, i.e., Fig. 4 in the original paper). The conventionally accepted Romanization, frequency of characters, and keystroke distribution on a {\tt QWERTY} keyboard are considered in the design for efficiency.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% fig. 5
\begin{figure}[p]
\setlength{\captionwidth}{571pt}
\begin{center}
\rotatebox{90}{%
\begin{minipage}{571pt}
\includegraphics{29-4ia7f5.pdf}
\hangcaption{Each cell provides the Unicode, Myanmar character, and input manner top to bottom. For Myanmar characters with more than one input method, a vertical bar is used to separate the different input manners.}
\label{fig:mlc-d}
\end{minipage}
}%
\end{center}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

In brief, the Myanmar Language Commission (MLC) Transcription System \cite{medic} was applied. Because the MLC system is rigid and academic, it is simplified for input purposes. For example, aspirated consonants are denoted by a preceding {\tt h} in the MLC system such as {\tt hk} or {\tt hp}, for historical reasons. This is adjusted to succeeding {\tt h}, such as {\tt kh} and {\tt ph} to input the corresponding letters. Compared with the MLC system, this design is based on general use of Latin letters to address the conversion function using {\tt h} in the aforementioned example. In addition, vowel systems are simplified such that more than one letters with similar phonetic values are arranged on one key, and obscure letters can be input using multiple keystrokes of the same key. For other diacritic marks, those frequently used are arranged in the middle area of the keyboard (e.g., on the {\tt f} and {\tt j} keys) for easy keystrokes. More details about the design, as well as about the keystroke distribution compared with traditional keyboard layout, can be found in the original paper \cite{ding-etal-2019-akkhara}.

For further convenience, an input method should consider orthographic and encoding issues because:

\begin{itemize}
    \item Some redundant characters are context-dependent. In some cases, they are encoded as one character by Unicode and the variants are accommodated by font design. In other cases, they are treated as different characters that require manual selection.
    \item The combination of some complex glyphs can be realized in more than one manner; the order of component characters is not strictly defined. Similarly, specific fonts may be sensitive or insensitive to diversity. 
\end{itemize}

These issues require detailed normalization operations,  which require users to have a good understanding of the encoding and fonts when everything is performed manually. The original Myanmar input method was formulated using a finite-state automaton \cite{auto} and hard-coded to satisfy the minimum input requirements. More sophisticated operations are not explicitly mentioned as these functions are, although possible, difficult to realize using a vanilla automaton. Therefore, the original implementation is more illustrative than practical.

The following subsection discusses the realization of the input method using a generalized {\tt AKKHARA} with basic extended normalization operations.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Realization Using {\textbf {\texttt {AKKHARA}}}}

An \texttt{akkhara} file that realizes the aforementioned input method was released with the \texttt{AKKHARA} binary files. The Appendix lists rules organized in Tables \ref{tab:my-akkhara-0}, \ref{tab:my-akkhara-1}, \ref{tab:my-akkhara-2}, \ref{tab:my-akkhara-3}, and \ref{tab:my-akkhara--1}, according to their $\tt priority$ of $\tt 0$, $\tt 1$, $\tt 2$, $\tt 3$, and $\tt -1$, respectively. The leading number is the line number in the released file.

Table \ref{tab:my-akkhara-0} includes the basic mapping described in Sec.~\ref{sec:simplemapping} for two punctuation marks, $10$ digits,\footnote{\citeA{ding-etal-2019-akkhara} did not include these.} and $26$ lower/uppercase Latin letters. The three letters $\tt a$, $\tt o$, and $\tt x$ have a one-to-many mapping. Table~\ref{tab:my-akkhara-1} lists further conversions. The table is divided into three blocks from top to bottom and from left to right. The first block (lines $65$--$95$) contains simple conversions (mainly by $\tt 103E$ and $\tt 1002$, and by $\tt 103B$ and $\tt103C$), as described in Sec.~\ref{sec:simpleconversion}; the second block (lines $96$--$105$) contains looped conversions for five pairs ($\tt 102D/102E$, $\tt 102F/1030$, $\tt 1031/1032$, $\tt 1038/1037$, and $\tt 103A/1039$), as described in Sec.~\ref{sec:loopedconversion}; and the third block (lines $106$--$110$) contains five conversions implemented using multiple keystrokes, as described in Sec.~\ref{sec:conversionbymultiplekeystroke}. Tables \ref{tab:my-akkhara-0} and \ref{tab:my-akkhara-1} cover the scheme in Fig. \ref{fig:mlc-d}, which realizes the minimum requirements for basic character conversion. 

From Table \ref{tab:my-akkhara-2}, the normalization functions in Sec.~\ref{sec:normalizationonvariants} are applied. Tables \ref{tab:my-akkhara-2} and \ref{tab:my-akkhara-3} concern the normalization of the variants of $\tt 102C/102B$. Character sequences that require alternation are listed. Some rules, such as lines $125$ and $126$, are prepared for obscure cases that require a context of up to three characters to decide the variants. This is inconveniently to be represented by an automaton, where the status of the tri-grams should be prepared.  

Table \ref{tab:my-akkhara--1} lists the final normalization rules. Sec. \ref{sec:simpleconversion} mentions the upper two rules related to $\tt 200B$ in terms of cleaning the invisible separator to avoid ambiguities. The lower three rules are concern the Unicode scheme for the recommended encoding. An issue related to the final normalization is the use of the {\tt backspace} key for deletion while inputting. Because the appending and converting operations are uniform in {\tt AKKHARA}, a {\tt backspace} keystroke actually cancels the previous rule application, regardless of the specific operation. Figure~\ref{fig:backspace} shows examples of canceling appending and converting operations. To hide such encoding details from users, normalization substitutions are conducted after all other conversions are performed. This operation exceeds the capability of an automaton, but is a general rewriting regardless of the previous status.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% fig. 6
\begin{figure}[t]
\begin{center}
\includegraphics{29-4ia7f6.pdf}
\end{center}
\hangcaption{(a) Using $\tt k$ and $\tt K$ to input $\tt 1000$ and $\tt 1001$, with a {\tt backspace} keystroke deleting character $\tt 1001$. (b) Using $\tt k$ and $\tt kh$ to input the two characters and a {\tt backspace} keystroke to cancel the conversion caused by $\tt h$. (c) During the input process, $\tt 1037$ (the lower circle, which is input by an upper case {\tt J}) and $\tt 103A$ (the upper arc, which is the end of the string input by {\tt x}) are not normalized (by line $133$ in Table \ref{tab:my-akkhara--1}) such that a {\tt backspace} keystroke deletes $\tt 1037$.}
\label{fig:backspace}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

These $133$ rules realize a basic Myanmar input method that can generate well formed Unicode character sequences. Users can add more customized rules. As mentioned, {\tt priority} is convenient to group rules, and more sophisticated context dependent conversions can be assigned a {\tt priority} from $\tt 4$. These black-boxes are the core functions of the input method, and all user-added rules are applied after the basic operations.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Conclusion and Future Work}
\label{sec:conclusion}

This paper has described the {\tt AKKHARA}, a general input method editor that can accommodate writing systems of medium complexity. A realization of a Romanization-based Myanmar input method is illustrated as an application case for {\tt AKKHARA}. {\tt AKKHARA} is more powerful than a key-character mapper, but simpler than the input methods for Chinese and Japanese. Therefore, {\tt AKKHARA} is easy to maintain and suitable for realizing customized input methods. 

Future engineering developments include: 1) developing {\tt AKKHARA} for other OSs in addtion to \mbox{{\tt Windows}}, 2) improving the rule editing interface, and 3) integrating corpora for prediction functions. The input methods of more abugida and syllablic systems will be further investigated and edited using {\tt AKKHARA} for efficient input and normalized digitization.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibliographystyle{jnlpbbl_1.6}
\bibliography{07refs}


\clearpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Appendix}

　　　　　　　　　　　　　　　\par



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% table 2
\begin{table}[h]
\input{07table02.tex}
\caption{Sixty-four rules with a $\tt priority$ of $\tt 0$.}
\label{tab:my-akkhara-0}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\clearpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% table 3
\begin{table}[t]
\input{07table03.tex}
\caption{Forty-six rules with a $\tt priority$ of $\tt 1$.}
\label{tab:my-akkhara-1}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% table 4
\begin{table}[t]
\input{07table04.tex}
\caption{Sixteen rules with a $\tt priority$ of $\tt 2$.}
\label{tab:my-akkhara-2}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\clearpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% table 5
\begin{table}[t]
\input{07table05.tex}
\caption{Two rules with a $\tt priority$ of $\tt 3$.}
\label{tab:my-akkhara-3}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% table 6
\begin{table}[t]
\input{07table06.tex}
\caption{Five rules with a $\tt priority$ of $\tt -1$.}
\label{tab:my-akkhara--1}
\vspace{-1\Cvs}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{biography}

\bioauthor[:]{Chenchen Ding}{%
received an M.E. degree in computer science from the University of Tsukuba, Japan, in 2012, and a Ph.D. degree in engineering from the University of Tsukuba, Japan, in 2015. He is currently a senior researcher with the National Institute of Information and Communications Technology, Japan. His research interests include computational linguistics and natural language processing.
}

\bioauthor[:]{Masao Utiyama}{%
received a B.S. in Computer Science from the University of Tsukuba, Japan, in 1992, an M.S. in Computer Science from the University of Tsukuba, Japan, in 1994, a Ph.D. in Engineering from the University of Tsukuba, Japan, in 1997. From 1997 to 1999, he was a Research Associate at Shinshu University, Japan. He has been a member of the National Institute of Information and Communications Technology, Japan, since 1999, and is currently an Executive Researcher at NICT.
}

\bioauthor[:]{Eiichiro Sumita}{%
received his Ph.D. in Engineering from Kyoto University in 1999, and a master's and bachelor's in Computer Science from the University of Electro-Communications in 1982 and 1980, respectively. He is now in the National Institute of Information and Communication Technology (NICT), its fellow and the associate director-general of Advanced Speech Translation Research and Development Promotion Center (ASTREC). His research interests cover machine translation and e-learning. He is a co-recipient of the Maejima Hisoka Prize in 2013, the Commendation for Science and Technology by the Minister of Education, Culture, Sports, Science and Technology, Prizes for Science and Technology in 2010, and the AAMT Nagao Award in 2007.
}

\end{biography}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\biodate


\end{document}

