Abstract:
In one aspect, the present invention comprises an apparatus for character entry on an electronic device, comprising: a keyboard with one row of keys; and an electronic display device in communication with the keyboard; wherein one or more keys on the keyboard has a correspondence with a plurality of characters, and wherein the correspondence enables QWERTY-based typing. In another aspect, the invention comprises an apparatus for character entry on an electronic device, comprising: a keyboard with a plurality of keys; and an electronic display device in communication with the keyboard; wherein one or more keys on the keyboard has a correspondence with a plurality of characters, and wherein, for each of the one or more keys, the plurality of characters comprises: (a) a home row character associated with a particular finger when touch typing; and (b) a non-home-row character associated with the particular finger when touch typing.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application claims priority to the U.S. provisional patent application No. 60/601,224, entitled Method and Software for Improved Text Entry, filed on Aug. 13, 2004. The entire contents of that provisional application are incorporated herein by reference. 
     
    
     BACKGROUND 
       [0002]    It is fascinating to reflect on the great impact of the PC on society. The PC is clearly capable of doing a whole lot more than what we use it for. Essentially, for many the PC became a replacement for the typewriter, and it is still largely a word processor. The other initial application that drove PC adoption was the spreadsheet. Then it also became a presentation creation tool. Over time, email was introduced and, even more recently, Web browsing. Web browsing, in turn, is giving rise to online shopping and replacing encyclopedias as our primary information resource. But, overall, there are still very few uses for these powerful machines by the average user. 
         [0003]    We are now going through a phase where the capabilities of different types of devices are converging. Devices rely on common protocols and are often connected via the Internet, and the services offered are becoming more portable and accessible wherever we are and whenever we need them. We now have PCs, cellphones, TVs, iPods, PDAs, and camera phones relying on the Internet, complemented by communication networks such as the cellular networks, Bluetooth, and Wi-Fi. Services range from unified messaging and VOIP to entertainment. 
         [0004]    With these trends toward greater connectedness and mobility, perhaps the most central problem is how to make text entry possible on small, portable devices. The success of email, SMS, and instant messaging on portable devices and user patterns already established on the PC make an efficient text-entry system a must for broad adoption of smaller, mobile devices. 
         [0005]    In this direction, the RIM pagers (the Blackberry devices) are prime examples of a well-designed portable device. It is simply an excellent email machine, and for many this immediate access to email becomes highly addictive. A great deal of the success of this type of device relies on its small keyboard, which allows for two-thumb typing. This typing is quick and easy to learn since it relies on the same basic organization as the regular typewriter/PC keyboard. 
         [0006]    For cellphones there is the T9 method by Tegic (U.S. Pat. No. 5,818,437 and other pending patents; T9 text input software Copyright 1999-2002; Tegic Communications, Inc.); cf. [22], [23]. 
         [0007]    For PDAs, the preferred method for text entry seems to be using a touch screen combined with “graffiti” entered using a stylus or tapping a keyboard with the stylus. Recognition of handwriting is also widely used. 
         [0008]    A solution to the text entry problem for small portable devices should ideally address the following capabilities:
       support touch-typing and rapid text entry;   easy-to-learn and consistent with standard keyboards;   easily extensible to include new words and new contexts;   small enough for portability and easy integration with mobile devices;   easy corrections of typos and minor mistakes; and   support auto-completion.       
 
         [0015]    These goals are addressed by the invention described herein. 
       SUMMARY 
       [0016]    In one aspect, the invention comprises an apparatus for character entry on an electronic device, comprising: a keyboard with one row of keys; and an electronic display device in communication with the keyboard; wherein one or more keys on the keyboard has a correspondence with a plurality of characters, and wherein the correspondence enables QWERTY-based typing. 
         [0017]    In another aspect, the invention comprises an apparatus for character entry on an electronic device, comprising: a keyboard with a plurality of keys; and an electronic display device in communication with the keyboard; wherein one or more keys on the keyboard has a correspondence with a plurality of characters, and wherein, for each of the one or more keys, the plurality of characters comprises: (a) a home row character associated with a particular finger when touch typing; and (b) a non-home-row character associated with the particular finger when touch typing. 
         [0018]    In various embodiments: (1) the apparatus is operable to apply natural language processing and approximate typing algorithms to increase accuracy of recognition and display of typed words and other valid character combinations; (2) the apparatus is operable to apply natural language processing and approximate typing algorithms to reduce average typing ambiguity by more than 5% over T9; (3) the apparatus is operable to identify words and other valid character combinations typed by users based on modeling character and symbol combinations as paths on N-ary trees; (4) the apparatus is operable to identify words and other valid character combinations typed by users based on a dictionary modeled as a set of valid paths on an N-ary tree; (5) the apparatus is operable to identify words and other valid character combinations typed by a user based on a signature dictionary; (6) the apparatus is operable to: receive ambiguous keyboard input; disambiguate the input; and provide predictions based on the input; (7) the predictions are based on identifying a maximum likelihood of a word or other valid character combinations intended to be typed; and (8) the maximum likelihood is identified based on calculating one or more products of probabilities, wherein each of the products comprises: a probability of a character combination, given an intended signature; and a probability for a signature being the intended one, given actual input; (9) the apparatus is operable to display a likely valid character combination based on keystrokes entered by a user; (10) the likely valid character combination is identified based at least in part on parts of speech classification; (11) the likely valid character combination is identified based at least in part on context-based disambiguation; (12) the likely valid character combination is identified based at least in part on natural language processing techniques; (13) the likely valid character combination is identified based at least in part on ordering with respect to one or more cost functions; (14) the likely valid character combination is identified based at least in part on auto-completion and auto-correction software; and (15) the keyboard is a virtual keyboard displayed on the display device. 
         [0019]    In another aspect, the invention comprises an apparatus for character entry on an electronic device, comprising: a keyboard with a plurality of keys; and an electronic display device in communication with the keyboard; wherein each of one or more keys represents an equivalence class of characters, and wherein characters are assigned to equivalence classes according to touch typing assignments to fingers. 
         [0020]    In various embodiments: (1) the apparatus is operable to identify typed words and other valid character combinations based on approximate typing algorithms comprising pattern recognition algorithms; (2) the apparatus is operable to identify typed words and other valid character combinations based on one or more cost functions, similarity measures, probability models, or combinations thereof that measure how well typed character sequences approximate intended character sequences; and (3) at least one cost function is based on an edit distance that provides a coarse model of a user&#39;s typing and errors. 
         [0021]    In another aspect, the invention comprises a method for disambiguation of human input for text entry, comprising: receiving a plurality of discrete input signals; and dynamically mapping the input signals to output signals; wherein one or more of the input signals represents an equivalence class of characters, and wherein the output signals are determined based on approximate typing algorithms comprising pattern recognition algorithms. 
         [0022]    In another aspect, the invention comprises a method for disambiguation of human input for text entry, comprising: receiving a plurality of discrete input signals; and dynamically mapping the input signals to output signals; wherein one or more of the input signals represents an equivalence class of characters, and wherein the output signals are determined based on one or more cost functions, similarity measures, probability models, or combinations thereof that measure how well input character sequences approximate intended character sequences. 
         [0023]    In one embodiment, at least one cost function is based on an edit distance that provides a coarse model of a user&#39;s input process and errors. 
         [0024]    In another aspect, the invention comprises a method for disambiguation of human input for text entry, comprising: receiving a plurality of discrete input signals; and dynamically mapping the input signals to output signals; wherein one or more of the input signals represents an equivalence class of characters, wherein the output signals include a likely valid character combination, and wherein the likely valid character combination is identified based at least in part on parts of speech classification. 
         [0025]    In another aspect, the invention comprises a method for disambiguation of human input for text entry, comprising: receiving a plurality of discrete input signals; and dynamically mapping the input signals to output signals; wherein one or more of the input signals represents an equivalence class of characters, wherein the output signals include a likely valid character combination, and wherein the likely valid character combination is identified based at least in part on context-based disambiguation. 
         [0026]    In another aspect, the invention comprises a method for disambiguation of human input for text entry, comprising: receiving a plurality of discrete input signals; and dynamically mapping the input signals to output signals; wherein one or more of the input signals represents an equivalence class of characters, wherein the output signals include a likely valid character combination, and wherein the likely valid character combination is identified based at least in part on natural language processing techniques. 
         [0027]    In another aspect, the invention comprises a method for disambiguation of human input for text entry, comprising: receiving a plurality of discrete input signals; and dynamically mapping the input signals to output signals; wherein one or more of the input signals represents an equivalence class of characters, wherein the output signals include a likely valid character combination, and wherein the likely valid character combination is identified based at least in part on ordering with respect to one or more cost functions. 
         [0028]    In another aspect, the invention comprises a method for disambiguation of human input for text entry, comprising: receiving a plurality of discrete input signals; and dynamically mapping the input signals to output signals; wherein one or more of the input signals represents an equivalence class of characters, wherein the output signals include a likely valid character combination, and wherein the likely valid character combination is identified based at least in part on auto-completion and auto-correction software. 
         [0029]    A solution to the text entry problem for small portable devices should ideally address the following capabilities:
       support touch-typing and rapid text entry;   easy-to-learn and consistent with standard keyboards;   easily extensible to include new words and new contexts;   small enough for portability and easy integration with mobile devices;   easy corrections of typos and minor mistakes; and   support auto-completion.       
 
         [0036]    The One-Row Keyboard (ORK) is a solution to this problem. Here are some of the key components of this solution, how each contributes to the solution, and how these are different than the commonly used T9.
       1. The ORK uses a mapping of the standard QWERTY keyboard onto a small set of keys in such a way that the user&#39;s previous experience and training with the QWERTY keyboard can be re-used. In particular, this mapping allows for rapid touch-typing of regular text (including both letters and punctuation marks), using all fingers, with virtually no additional training. Difference from T9: T9 requires a slow entry process that is not consistent with the QWERTY keyboard. In particular, the T9 input process is hard to learn, the typing speed is slow, a careful aim must be used for the few fingers utilized, and touch-typing is not supported. Hence, the input process requires considerable attention.       
 
         [0038]    2. Both ORK and T9 use a smaller set of keys than the regular QWERTY keyboard. Hence, a certain set of keystrokes on either one may not have a unique interpretation in terms of regular letters or words. In such cases, the user may have to choose among alternatives, which requires attention and interrupts typing flow. The ORK is optimized to reduce this ambiguity in several ways:
       (a) Without extra optimization, the ORK creates about 2-3 times less ambiguity than T9.   (b) The ORK integrates the punctuation marks into the predictive typing.   (c) Using Natural Language Processing (NLP) techniques, the ambiguity, and hence user attention, is reduced further. (These techniques can also be used to improve T9&#39;s performance.)   (d) As data is input, changes occur on the screen. If such changes are not consistent with user expectation, this may cause user distraction. The ORK uses algorithms to smooth the changes on the screen.   (e) The ORK uses a Beginning Of Word (BOW) organization of the dictionary to display the character combinations that will result in little change on the screen. Difference from T9: T9 uses a linked tree structure. (These techniques can also be used to improve T9&#39;s performance.)   (f) The ORK also uses cost functions for the display process that increase the cost for changes on the screen. Hence, by minimizing these cost functions, a smoother display results. (These techniques can also be used to improve T9&#39;s performance.)
           (g) Another reason for interruption of the user&#39;s typing flow is the occasional need to add new entries to the dictionary. T9 uses a “spell mode” for this: when a character combination is not recognized, the user is asked to start from the beginning and enter the word unambiguously using multi-tap. This is quite frustrating for the user and is a serious interruption in the entry process. ORK uses a simplified spell mode. This simplification re-uses the information the user has already entered and, hence, only a small amount of extra information is necessary to uniquely identify the new word. The interface for the input of this extra information also requires much less attention on behalf of the user. (These techniques can also be used to improve T9&#39;s performance.)   
           (h) Another significant cause of user interruption is typing errors and other incorrect entries. Because of the ambiguity created by reduced keyboards, such errors are harder to fix. The ORK allows the user to use “approximate typing.” The reduced keyboard entry process is integrated with a correction process, which can either be automatic or designed to minimize user intervention. The correction process is based on statistical techniques used by NLP, voice recognition and speech processing, as well as machine translation. (These techniques can also be used to improve T9&#39;s performance.)   3. The ORK uses both the NLP and approximate typing techniques to improve the auto-completion capability. This allows the user to enter only part of a word or character combination, and when a reasonable prediction of the remaining characters have been obtained, these characters are entered or presented to the user for possible acceptance. (These techniques can also be used to improve T9&#39;s performance.)   4. The ORK also reduces the need for user attention and supports the uninterrupted typing process by allowing a combination of ambiguous and non-ambiguous typing. This allows the entry of symbols and numbers to be integrated with prediction based on the entered letters and punctuation marks.       
 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0049]      FIG. 1 : Depicts an embodiment of the ORK. 
           [0050]      FIG. 2 : The two-dimensional grid representation of words and valid character combinations. 
           [0051]      FIG. 3 : Communication system for character input/output. 
           [0052]      FIG. 4 : The states based on the current and previous character, and some representative state transitions. 
           [0053]      FIG. 5 : One possible set of states and operators to generate σ a =5512334 from σ v =1234. 
           [0054]      FIG. 6 : One possible set of states and operators to generate σ a =1243 from σ v =12234. 
           [0055]      FIG. 7 : Building exhaustive tag context information. 
           [0056]      FIG. 8 : Trellis for one disambiguation group with N number of words. 
           [0057]      FIG. 9 : Disambiguation using tag context information. 
           [0058]      FIG. 10 : Training using tag context information to generate a sparse trellis for compact tag-based disambiguation. 
           [0059]      FIG. 11 : Building exhaustive tag context information. 
           [0060]      FIG. 12 : Tag record for one disambiguation group with N number of words. 
           [0061]      FIG. 13 : Disambiguation using previous tag information. 
           [0062]      FIG. 14 : Training using previous tag information to generate a sparse record for compact tag-based disambiguation. 
           [0063]      FIGS. 15-30 :  FIGS. 15-30  depict various embodiments of the ORK and its integration with portable devices. 
       
    
    
     DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS 
       [0064]    1 a Preferred Embodiment of the Present Invention Comprises the One-Row Keyboard. 
       1.1 The Basic Set-Up 
       [0065]    A regular “QWERTY” keyboard consists of the letters of the alphabet in lower case and then an additional set of characters and control keys. To be specific, we shall assume that the “regular” keyboard for touch-typing consists of 30 symbols arranged in three rows: 
         [0000]                                                    Row 1   qwert   yuiop           Row 2   asdfg   hjkl;           Row 3   zxcvb   nm,./                        
It will be convenient to assign a specific number α, i≦α≦30, to each of the letters and symbols of this regular keyboard. Starting with the upper left and going row-wise, the letters on the first row obtain numbers a with 1≦α≦10, and so on. For example, the letter v is assigned the number α=α(v)=24. We also assign the space character (used when we reach the end of a word, for instance) the number α=0.
 
         [0066]    For the One-Row Keyboard (ORK), we collapse these symbols into one row by grouping three symbols, one from each row, into a single group; see  FIG. 1  and  FIGS. 15-30 . Each one of these groups then corresponds to one key on the One-Row Keyboard: the first key on the One-Row Keyboard corresponds to {qaz}, the second to {wsx}, etc. The One-Row Keyboard thus has ten keys: 
         [0000]    One-row, left: {qaz}, {wsx}, {edc}, {rfv}, {tgb} One-row, right: {yhn}, {ujm}, {ik, }, {ol.}, {p;/}
 
Just as in the case of the regular keyboard, various additional keys, extra symbols, and commands may be added to the One-Row Keyboard. Perhaps the most notable of these is the space bar.
 
         [0067]    The One-Row Keyboard still allows the user to touch-type: for each letter of a specific word, the key corresponding to the group of letters containing the letter is typed. In this way, the signature corresponding to the word is typed, rather than the word. 
         [0068]    Suppose we identify each of the keys of the basic One-Row Keyboard with a number σ, 1≦α≦10, starting from left and going to the right. So, for example, each of the three letters r, f and v corresponds to the number σ=σ(r)=σ(f)=σ(v)=4. As for regular keys, we also add the space character as σ=0. Now, with this convention, the signature of a word with N letters becomes a sequence of non-zero numbers σ 1 σ 2  . . . σ N . 
         [0069]    Similarly, suppose we identify the row of the regular keyboard to which a letter belongs by a number τ, 1≦τ≦3, starting with the top row. For example, since the letter i belongs to the top row of the regular keyboard, it has τ=τ(i)=1. The dual signature of a word is the sequence of these τ&#39;s, one for each letter. A word with N letters thus has a dual signature which is a sequence of numbers τ 1 τ 2  . . . τ N . Again, it is convenient to have τ=0 correspond to the “space” symbol. 
         [0070]    Each specific letter can thus be specified exactly either through the number a or through the pair σ, τ. More generally, an N-letter word w is specified exactly through the sequence 
         [0000]      α=α( w )=α 1 α 2  . . . α N ,  (1) 
         [0000]    or, alternatively, through the signature 
         [0000]      σ=σ( w )=σ 1 σ 2  . . . σ N   (2) 
         [0000]    and the dual signature 
         [0000]      τ=τ( w )=τ 1 τ 2  . . . τ N .  (3) 
         [0000]    As we use the One-Row Keyboard to type in the sequence of a word, we lose (exactly) the information in the word&#39;s dual signature. 
         [0071]    There is another type of representation of the sequences α, σ, and τ that is also useful. Let us assume that we have a 31-ary infinite tree A=A 30 , starting from the root and with each node having 31 children. As above, each given word w can be identified with a sequence α=α(w), and now we can identify a in turn with a path α 1 α 2  . . . α N  in this tree: starting from the root, the value of al means that on the first level (below the root) the node corresponding to the value α 1  is traversed, and then on the next level, level  2 , the node corresponding to the value α 2  is traversed, etc. The path of a N letter word thus has N+1 levels if we count the root level. (Whenever convenient, we may also add a space symbol, or several, to the end of the sequence; in that case, the path involves additional levels.) 
         [0072]    Similarly, the signature σ=σ(w) of word w with N letters can be identified with a path of length N+1 in a 11-ary tree, with 11 choices on each level. The dual signature τ=τ(w) is a path in a 4-ary tree. 
         [0073]    Clearly, very few of the possible paths in these trees correspond to real words, signatures, and dual signatures, respectively. 
         [0074]    The 31-ary tree, used for the words and sequences α, factors precisely into the two trees for the signatures σ and dual signatures τ. 
         [0075]    We can also visualize each sequence α and its corresponding σ, τ as a path through the infinite block in  FIG. 2  (note that only four levels are shown): on the first level, the unique block with “coordinates” (σ 1 , τ 1 ) is traversed, on the second (σ 2 , τ 2 ), etc. The signatures, and hence what the ten keys of the One-Row Keyboard produce, is obtained by the projection of the α i &#39;s onto the σ i &#39;s and ignoring the τ i &#39;s. 
         [0000]    Comment 1.1 Both T9 and the ORK are examples of a reduced keyboard. A reduced keyboard R is a collection R={S i } i  of sets (or equivalence classes) of characters S i ={T j   i } j  of letters and symbols. The entire collection {T j   i } i,j  is the alphabet of the keyboard R. With a physical implementation of the reduced keyboard R, we associate each S i  with a key, a location on the screen, or in any other manner through which the user can select the intended set. We have used the notation σ i  to identify this input, and this is the signature corresponding to the equivalence class in question. The dual signature is intended to exactly capture the remaining information necessary to pinpoint a character in the alphabet. If we are given a character T j   i , and we already know that its signature is σ i  (and hence we know S i ), then the dual signature will contain the extra information to obtain Y j   i . For example, we may list the elements in the equivalence class S i , and then, by giving a number to each of the elements in this list, we may identify the exact character T j   i  by this number. This is then the dual signature τ j ; the character T j   i  is identified with the pair σ i , τ j . 
         [0076]    This representation of an alphabet in terms of signature and dual signature has many benefits. One is a simplified approach to spelling a word or, more generally, identifying a legal character combination for a reduced keyboard; see below. The representation also simplifies the quantitative treatment and analysis of reduced keyboards. Comment 1.2 There is an immediate extension of the “signature, dual signature” representation to higher dimensions: a unique object is identified by the n+1-tuple (τ 0 ,τ 1  . . . , τ n ). (With n=1 and τ 0 =σ, τ 1 =τ we are back to the “signature, dual signature”.) If we require that there is a subordination among the tau&#39;s, say τ 0 →τ 1 → . . . τ n , then we have a tree structure. The object corresponding to a specific n+1-tuple (τ 0 ,τ 1 , . . . , τ n ) is identified by the path {τ 0 =τ 0 }→{τ 1 =τ 1 }→ . . . {τ n =τ n }. This points out that in certain circumstances, as in the case of menu systems, the objects in these representations may not be characters (for menus, they are “files” and “folders”). 
       1.2 Dictionaries for Words, Signatures, and Dual Signatures 
       [0077]    Most paths α in the global 31-ary word tree do not correspond to valid words in English (if that is the language we are trying to type). This is immediately clear just by looking at the number of possible combinations. Suppose we consider words with at most six letters. Ignoring the “space” symbol at the end of words, there are 30 6 =729 million possible paths using six levels (or seven including the root) in the tree. This number should be compared to the approximately 300 words that correspond to 60 percent of all the printed text or to the approximately 10 words that correspond to 25 percent of the printed text. Hence, we only use one in about 2.4 million of the possible paths 60 percent of the time. Some paths we thus travel often, and most we do not travel at all. 
         [0078]    A dictionary is one way to identify this small subset of valid paths. Initially, this is a useful way to view the dictionary: it is the collection of valid paths. Later we shall worry about the size of the dictionary, and then it becomes of interest to avoid some repetitions and not to include standard modifications of basic words (like adding “s” for the plural of a noun, etc.). We shall use the notation D for the particular dictionary we use. The standard way of organizing D is alphabetically, and when we use this we shall use the subscript w: D w . 
         [0079]    There are several other views that are useful as well. For example, we may instead consider D as consisting of the sequences α corresponding to valid key combinations. We order these sequences as if the sequences represented a fractional 31-ary expansion, in increasing order. In other words, the word w with α(w)=α 1 α 2  . . . thus corresponds to the number 0.α 1 α 2  . . . , and these fractional expansions, corresponding to valid words, are entered in ascending order. (With any number of spaces added to the end of the α sequence, we identify the same word and the same fractional expansion.) This view of the dictionary is indicated by the subscript α: D α . The ordering between the sequences makes it possible to compare two sequences α 1 , α 2 εD α : we say that 
         [0000]      α 1 &lt; α α 2   (4) 
         [0000]    if the sequence α 1  comes before α 2  in D α , i.e. if 
         [0000]        0 .α 1   1 α 2   1 α 3   1  . . . &lt;0.α 1   2 α 2   2 α 3   2   (5) 
         [0080]    Not all signatures a correspond to words either, and some a&#39;s correspond to more than one word. The collection of valid a&#39;s, each entered only once, is called the signature dictionary and is denoted by S. The signature dictionary S can also be viewed in different ways. When we view it in a way analogous to D α , then we use the notation S σ . More explicitly, each σ=σ 1 σ 2  . . . , corresponding to one or more words, is identified with the 11-ary fractional expansion 0.σ 1 σ 2  . . . , and these are entered in an ascending order into S σ . This ordering is denoted by &lt; σ . The unique dual signatures are collected in the dual signature dictionary T, and one view of T is T τ ;, defined in the obvious, analogous way. The notation for this ordering is &lt; τ . 
         [0081]    With the orderings &lt; σ  and &lt; τ  in S σ  and T τ , respectively, we may define several additional views of D. If we have two words w 1 , w 2  E D with corresponding signatures and dual signatures (σ 1 , τ 1 ), (σ 2 , τ 2 ), then 
         [0000]    
       
         
           
             
               
                 
                   
                     ( 
                     
                       
                         σ 
                         1 
                       
                       , 
                       
                         τ 
                         1 
                       
                     
                     ) 
                   
                    
                   
                     &lt; 
                     
                       σ 
                       , 
                       τ 
                     
                   
                    
                   
                     
                       ( 
                       
                         
                           σ 
                           2 
                         
                         , 
                         
                           τ 
                           2 
                         
                       
                       ) 
                     
                      
                     
                       { 
                       
                         
                           
                             
                                 
                                
                               
                                 
                                   σ 
                                   1 
                                 
                                  
                                 
                                   &lt; 
                                   σ 
                                 
                                  
                                 
                                   σ 
                                   2 
                                 
                               
                             
                           
                         
                         
                           
                             
                                 
                                
                               
                                 
                                   σ 
                                   1 
                                 
                                 = 
                                 
                                   
                                     
                                       σ 
                                       2 
                                     
                                      
                                     
                                         
                                     
                                      
                                     and 
                                      
                                     
                                         
                                     
                                      
                                     
                                       τ 
                                       1 
                                     
                                   
                                    
                                   
                                     &lt; 
                                     τ 
                                   
                                    
                                   
                                     
                                       τ 
                                       2 
                                     
                                     . 
                                   
                                 
                               
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   6 
                   ) 
                 
               
             
           
         
       
     
         [0000]    We shall write D σ,τ  for D with this ordering. We may also write D=S σ (T τ ) to indicate this ordering. If we switch the two orderings and instead start by ordering with respect to the dual signatures, then we similarly have the ordering &lt; τ,σ  and this gives us the view D σ,τ =T τ (S σ ). 
         [0082]    For us probably the view that is most interesting is the following. It is based on interleaving the signature and dual signature sequences. More specifically, if wεD has the signature σ=σ 1 σ 2  . . . and the dual signature τ=τ 1 τ 2  . . . then we form the expansion 0.σ 1 τ 1 σ 2 τ 2  . . . . This is the basis for the order &lt; σxτ : words are identified with their interleaved expansions and entered into D in ascending order. To indicate this view, we write D σxτ . Of course, there is similarly an ordering &lt; τxσ , and the view using this is D τ×σ . 
         [0083]    Let us illustrate with a small dictionary. 
       Example 1.1 
       [0084]    Suppose we have a word dictionary D tiny =D w   tiny  containing the ten words, alphabetically ordered, “and”, “cat”, “do”, “go”, “is”, “it”, “say,” “the”, “to”, and “way”. The corresponding α sequences and signatures and dual signatures are the ones in Table 1. Some of the different orderings of these words are given in Table 2. 
         [0085]    Obviously, the different views of the dictionary do not correspond very closely to how our brains store words. The intent is to make it easier to find the word as we type using the regular keyboard or the One-Row Keyboard. How our brains have the information stored is complicated, but it is probably true that the beginning letter of the word is very important as well as the length of the word; see [18]. 
         [0000]    
       
         
               
             
               
               
               
               
               
             
           
               
                 TABLE 1 
               
             
             
               
                   
               
               
                 D tiny  and associated sequences in alphabetical order. 
               
             
          
           
               
                   
                 Word 
                 α 
                 σ 
                 τ 
               
               
                   
                   
               
               
                   
                 and 
                 11 26 13 
                 1 7 3 
                 2 3 2 
               
               
                   
                 cat 
                 23 11 05 
                 3 1 5 
                 3 2 1 
               
               
                   
                 do 
                 13 08 
                 3 9 
                 2 1 
               
               
                   
                 go 
                 15 09 
                 5 9 
                 2 1 
               
               
                   
                 is 
                 08 12 
                 8 2 
                 1 2 
               
               
                   
                 it 
                 08 05 
                 8 5 
                 1 1 
               
               
                   
                 say 
                 12 11 06 
                 2 1 6 
                 2 2 1 
               
               
                   
                 the 
                 05 16 03 
                 5 6 3 
                 1 2 1 
               
               
                   
                 to 
                 05 09 
                 5 9 
                 1 1 
               
               
                   
                 way 
                 02 11 06 
                 2 1 6 
                 1 2 1 
               
               
                   
                   
               
             
          
         
       
     
         [0000]    
       
         
               
             
               
               
               
               
               
               
               
               
               
               
               
               
             
           
               
                 TABLE 2 
               
             
             
               
                   
               
               
                 D tiny  in increasing &lt; α  order (left), increasing &lt; σ,τ  order (center), and increasing 
               
               
                 &lt; σ×τ  order (right). 
               
             
          
           
               
                 Word 
                 α 
                 σ 
                 τ 
                 Word 
                 α 
                 σ 
                 τ 
                 Word 
                 α 
                 σ 
                 τ 
               
               
                   
               
               
                 way 
                 02 11 06 
                 2 1 6 
                 1 2 1 
                 and 
                 11 26 13 
                 1 7 3 
                 2 3 2 
                 and 
                 11 26 13 
                 1 7 3 
                 2 3 2 
               
               
                 to 
                 05 09 
                 5 9 
                 1 1 
                 way 
                 02 11 06 
                 2 1 6 
                 1 2 1 
                 way 
                 02 11 06 
                 2 1 6 
                 1 2 1 
               
               
                 the 
                 05 16 03 
                 5 6 3 
                 1 2 1 
                 say 
                 12 11 06 
                 2 1 6 
                 2 2 1 
                 say 
                 12 11 06 
                 2 1 6 
                 2 2 1 
               
               
                 it 
                 08 05 
                 8 5 
                 1 1 
                 cat 
                 23 11 05 
                 3 1 5 
                 3 2 1 
                 do 
                 13 08 
                 3 9 
                 2 1 
               
               
                 is 
                 08 12 
                 8 2 
                 1 2 
                 do 
                 13 08 
                 3 9 
                 2 1 
                 cat 
                 23 11 05 
                 3 1 5 
                 3 2 1 
               
               
                 and 
                 11 26 13 
                 1 7 3 
                 2 3 2 
                 the 
                 05 16 03 
                 5 6 3 
                 1 2 1 
                 the 
                 05 16 03 
                 5 6 3 
                 1 2 1 
               
               
                 say 
                 12 11 06 
                 2 1 6 
                 2 2 1 
                 to 
                 05 09 
                 5 9 
                 1 1 
                 to 
                 05 09 
                 5 9 
                 1 1 
               
               
                 do 
                 13 08 
                 3 9 
                 2 1 
                 go 
                 15 09 
                 5 9 
                 2 1 
                 go 
                 15 09 
                 5 9 
                 2 1 
               
               
                 go 
                 15 09 
                 5 9 
                 2 1 
                 is 
                 08 12 
                 8 2 
                 1 2 
                 is 
                 08 12 
                 8 2 
                 1 2 
               
               
                 cat 
                 23 11 05 
                 3 1 5 
                 3 2 1 
                 it 
                 08 05 
                 8 5 
                 1 1 
                 it 
                 08 05 
                 8 5 
                 1 1 
               
               
                   
               
             
          
         
       
     
       1.3 Exploiting Sparsity 
       [0086]    Very few paths in the different dictionaries are used, and this sparsity can be exploited in several ways. With the One-Row Keyboard, we only supply the signature of the word; however, in most cases this reduced information is sufficient to uniquely identify not just the exact signature but also the exact word in the dictionary. In relatively few cases, however, there are several words with the same signature. 
         [0087]    This sparsity also means that after a few keystrokes using a regular keyboard, a word can be identified without having to type in the remaining letters. The rest can then be added automatically, without typing. This “auto-completion” can also be taken advantage of when we use the One-Row Keyboard and the signature of the word. Of course, we expect to type more keystrokes before the exact signature has been pinpointed. Very often, however, the great sparsity in the signature dictionary means that we will have identified a unique signature before reaching the signature&#39;s end. 
         [0088]    Then, if we decide to use these dictionaries to look up what a typed signature corresponds to, there are several questions that arise. For example: 
         [0089]    1. How do we provide feedback to the user concerning the progress of the typing process? 
         [0090]    2. How do we report and correct typing mistakes? 
         [0091]    3. How do we best resolve ambiguities between words with similar signatures? 
         [0092]    4. How do we best support auto-completion? 
         [0093]    5. How do we automatically fix typos? 
         [0094]    6. How do we quickly look up signatures, dual signatures, and words? 
         [0095]    7. What makes a good dictionary? 
         [0096]    8. How do we add words to a dictionary? 
         [0097]    9. How do we customize dictionaries depending on contexts and on the user? 
         [0000]    We address these in the next discussion below. 
       1.4 Reaching Beyond the Dictionaries 
       [0098]    Punctuation marks and other standard symbols form an important part of written text. For a fast and seamless typing experience, it is essential that such characters can be typed in the same manner as letters, without a break in the typing flow. If one needs to bring up a special punctuation/character menu from which the correct mark can be selected, then delays are induced and loss of typing flow results. 
         [0099]    Further, with respect to the QWERTY (or equivalent) keyboards that have common punctuation marks and extra characters adjacent to the letter keys, the experienced user already has an established pattern and existing “wiring” for such keys. To capitalize on the familiarity of this pre-wiring, for improved typing speed and ease of learning, a reduced keyboard may place such characters in more or less the same relative location as the standard QWERTY keyboard. For a preferred embodiment of the ORK, where we collapse the three rows into one, this translates into, for example, placing the period on the same key as 0 and L (or, more precisely, in the same equivalence class). The disambiguation engine then has to carry out the disambiguation such that an equivalence class may contain both letters used in the dictionary as well as other additional symbols. This can be achieved in several ways. One is to utilize a set of rules to create varied disambiguation results from pre-existing dictionary entries or other intermediate disambiguation results. Note that the application of such rules may be nested. 
         [0100]    Here are a couple of specific instances of such possible rules: 
         [0101]    Append a punctuation (such as : ; , ? ! or .) at the end of an entry so as to generate a match to the complete entered signature. For instance, the signature 6920 may be disambiguated as “How?” (Note how this further uses the Shift key to differentiate among a set of signatures: We use Shift to distinguish ? and &#39; from each other, just as we use Shift to distinguish ‘H’ from ‘h’. For this example, we have made the assumption that &#39; replaces / on the QWERTY keyboard.) 
         [0102]    In the same manner, 0069200 may be disambiguated as “how” if we assume that two consecutive instances of a single quote are to be taken as a double quote. Note that the opening and closing double quotes may be disambiguated independently of each other so that the double quotes may apply to words as well as to sentences. (This assumes that &#39; replaces / on the QWERTY keyboard.) 
         [0103]    As an example of nesting, the sequence 00692000 may be disambiguated as “How?”. 
         [0104]    For reduced keyboards it is thus quite beneficial to support extended character sets. The legal character combinations are then not just those found in dictionaries, but also include combinations of a predefined set of legal combinations (as, for instance, given by a collection of dictionaries) with sets of other symbols. In terms of notations used in Section 1, we may include the extended set of characters as separate dual signatures corresponding to existing signatures, or we may extend the signature set as well. In the former case, we may then end up with keys as in the examples above, where there is a mixture of letters and symbols occurring in the dictionary together with symbols from the extended sets. In the latter case, for those extended characters that are assigned new signature(s), we can identify these as part of the extended character sets, and the treatment of such characters is simpler. For example, the standard solution for including symbols in the context of reduced keyboards is to put the extra symbols on separate keys (i.e., separate signatures) and then require an explicit choice of the symbol (i.e., specifying the dual signature), and then the choice of character is unique. In that particular case, what we add here is only to allow for predictive techniques to be used for symbols outside the set of legal combinations as prescribed by dictionaries. 
         [0105]    Similarly, it is possible to extend the entire class of valid character combinations outside the combinations defined by each dictionary and specific sets of characters. For example, one dictionary may contain the constituent words of character combinations, and legal combinations are obtained by these words combined according to specific rules. If the simple dictionary consists of three words {print, queue, driver}, and it is agreed that words in this dictionary can be combined with the underline symbol ‘_’, and still obtain a legal combination, then we see that combinations like print_queue, print_driver, etc., are valid. In general, a set of dictionaries and a set of character sets can be combined, using specific rules, to obtain an extended set of legal combinations. 
         [0106]    A spell procedure is a standard aspect of a reduced keyboard. If a particular signature sequence is entered, and it cannot be found in the dictionary, the spell procedure allows the user to provide the extra information to identify a new legal character combination (and possibly add this combination to the dictionary). The standard spell procedure, used by T9, for example, is to use a separate process if the signature is not found. In the case of T9, this is usually done through “multitap”: the key corresponding to the equivalance class of letters is typed repeatedly, and each letter in the class is uniquely associated with a specific number of taps. For example, for the standard cellphone implementation of T9, the number “2” corresponds to the letters “abc”, and one press on “2” then identifies “a”, two presses on “2” is “b”, and three is “c”. In terms of the representation using signature and dual signature, we may identify the number of key presses with the dual signature. With this, the letter “c”, say, is given by (2, 3) (sits on the key “2” and requires “3” presses). The “number of key presses” may then be specified independently of the signature, using other keys or in any other manner that allows the user to indicate his choice of the dual signatures. In case the signature has already been entered, for example, only the dual signatures then need to be provided. To spell the word “act”, for instance, we may press the keys “2”, “2”, and “8” to specify the signature. To now identify “act” among all the possible combinations with this signature, we may identify the sequence “1”, “3”, and “1” in some fashion. In this case, we may, for instance, have the keys for dual signatures “1”, “2”, “3”, and “4” separate from the signature keys, and then the dual signatures can be provided at other times during the input process, not just after the signature has been entered. 
         [0107]    More generally, for any reduced keyboard, the dual signatures can be entered independently of the signatures. Hence, if the signatures have been entered, the dual signatures can all be entered by allowing the user to identify the possible dual signatures one by one. If there is only one possibility for the dual signature, then that choice may be omitted. Additionally, the order in which the dual signatures are entered is also flexible; often we assume that the entry process goes in some predetermined order (typically from left to right or the other way around), but this is not necessary. 
         [0108]    Further, different prediction techniques can be used to simplify the required user interaction as the spell process proceeds. 
         [0109]    Notice that the independence of signature and dual signature is what allows the same key to be reused for specifying the dual signature once the signature is given. For example, by overloading “up/down” to pinpoint the dual signature in a list of possible interpretations, for each of the signature entries, is an example of the “signature, dual signature” representation of a character. 
         [0000]    Comment 1.3 In the following discussion, we will describe various methods of carrying out various operations on a set of dictionary entries, sometimes utilizing the user feedback and input in the process. These methods will have as output possibly a second set of entries and, hence, are equivalent to mapping one set of entries onto another. More importantly, these methods can be used in stages such that the combined output of one or more stages can serve as input for another method. Various arrangements are possible of such combined mappings. For instance, punctuated endings from original dictionary entries may serve as input entries for an approximate typing stage which takes into account user typing errors. Thus, it is important to realize that when we talk of dictionary entries henceforth, these should be understood not only as the original dictionary entries, but also as any permutation and combination of a constructed set of entries arising from any of these methods. 
         [0110]    Similarly, in the following, we will refer to duals of a signature sequence as valid alternatives. It is important to realize that these valid alternatives may actually be a result of an approximate matching process or a rule-based dictionary mapping or for that matter any mapping produced by such a method. Thus, these duals that we refer to may not be exact duals of the entered or dictionary entry signatures, but simply a mapping. A specific instance we will discuss later, is how a set of auto-completion alternatives may be generated for each of the valid duals of an entered signature sequence that is being typed. In that case, the valid dual may actually arise from the approximate matching method and thus may not be an exact dual of the signature entered by the user. 
         [0111]    2 Approximate Typing 
       2.1 User Input and Reduced Keyboards 
       [0112]    One of the drawbacks of using a reduced keyboard is the fact that when the user has entered a set of keystrokes and the feedback from the device does not coincide with the user&#39;s intentions, it is often hard to identify the underlying reason. Sometimes the unexpected behavior is a consequence of the intended character combination not being in a dictionary. Probably much more frequently, however, the explanation is a typing mistake. It is often hard for the user to decide exactly at what point a mistake was made since the entered key sequence is not in one-to-one correspondence with a character sequence. Rather than trying to understand where the error occurred, the user then often ends up erasing the entire combination and starting again. This is particularly frustrating when the input sequence is long, and, unfortunately, this is also when typing errors frequently occur. 
         [0113]    A similar problem is encountered when the user is not quite sure how to spell a certain word or only knows parts of the word or character combination. With a standard keyboard, one way to handle such a situation is to enter an approximation of the intended word, and the meaning is still likely to be communicated to the reader. With a reduced keyboard, this approach is rarely available since the character combination on the screen is typically quite different than that of the intended word. To remedy this, the user may then try to experiment with different potential spellings to reach the correct one, and, if he fails, he may experience not just a sense of interruption of typing flow, but of actually being stuck. This is a serious drawback of any reduced keyboard and should be addressed. 
         [0114]    In the following, we consider the case when the input from the user is not quite correct or at least the entered signature sequence is not matching that of the word the user intended. The basic assumption we shall make is that the entered signature sequence is approximately correct and, hence, there is a similarity between the intended signature sequence and the one entered. 
         [0115]    The user intends to input a sequence of words (or other character combinations) w i , i=0, . . . , N, often collected in a sentence s: 
         [0000]      s=w 0 w 1  . . . w N .  (7) 
         [0116]    (What constitutes the appropriate delimiter for the different character combinations w i  and for the sentences s is of no real significance for the current discussion.) Using a reduced keyboard R (see Comment 1.1 above), the user provides input to the system, and based on this input, the system provides feedback to the user; see  FIG. 3 . In the case of a reduced keyboard, the input is typically ambiguous, so part of the task for the system is to disambiguate the different interpretations and provide possible predictions based on the user input. The user can then provide more input to the system by selecting between different possibilities for the character combination w i  under consideration. 
         [0117]    The user input is of course assumed to be a reflection of the user&#39;s intentions. For a reduced keyboard, the normal assumption is that the signature is the correct one; however, if we add the complication that the user may have mistyped, then the signature sequence may not be the intended or desired one and, hence, the system cannot rely on the accuracy of the signature for its predictions. 
         [0118]    The signature will still serve as an important indication of the user&#39;s intent, but the ambiguity may increase if we allow the user to only provide an approximation of the intended input. 
         [0119]    More specifically, in the case of a reduced keyboard, each keystroke by the user represents an equivalence class of unique characters. Hence, with a certain sequence of keystrokes, a unique set of character combinations, consistent with the equivalence classes of each key, is generated. Let us call this set of character combinations the “input set.” The reduced keyboard then works with a disambiguation process to prioritize among the character combinations in the input set in order to provide the user with feedback for possible further interaction. 
         [0120]    In the case of approximate typing on a reduced keyboard, the user&#39;s keystrokes generate a larger class of possible character combinations and the disambiguation process operates on this larger class. For example, besides the input set of character combinations corresponding to the exact keystrokes, there may be other possible keystrokes, each with its own set of character combinations, that enter into the disambiguation process, and different rules and methods may be used by the disambiguation process for determining how all of these should be weighed. The regular approach for typing on a reduced keyboard is when only one set of character combinations (the input set) enters into the disambiguation process, and, at the opposite end of the spectrum, we have the situation when the disambiguation process uses all possible keystrokes and weighs these based on the actual user input. 
       2.2 A Probabilistic Analysis 
       [0121]    To illustrate some of the issues involved and to gain some further insights into effective disambiguation processes for approximate typing on reduced keyboards, we shall consider a maximum likelihood approach. 
         [0122]    Let us for now consider just the single character combination w in isolation and ignore that some of the probabilistic information may be obtained from context and other parts of this or other sentences. It will be convenient to simplify the discussion to a real-time, on-the-fly type of processing where there is a specified order, say left to right. We assume further that the user has in mind the character combination v=c 0  . . . c I , and, in the process of entering input corresponding to this target, he enters certain keystrokes. The user&#39;s actual keystrokes correspond to the signature σ a =σ 0   a  . . . σ J   a , and his target signature is σ v =σ 0   v  . . . σ I   v . (Notice, in particular, that the number J+1 of actual keystrokes may not be the same as the intended number I.) 
         [0123]    From a maximum likelihood point of view, we are interested in finding the best solution 
         [0000]      {circumflex over ( v )}=arg max v  Prob( v|σ   a ),  (8) 
         [0000]    where the maximum is taken over all the intended words v. More generally, we may also consider the N-best solutions 
         [0000]        {right arrow over (v)}={right arrow over (v)}   (N)   =N −arg max v  Prob( v|σ   a ).  (9) 
         [0124]    In order to solve (8) (the same argument applies to (9)), we notice that by the definition of conditional probability and since the keystrokes actually entered do not change, the right-hand side equals 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           arg 
                            
                           
                               
                           
                            
                           
                             
                               max 
                               υ 
                             
                              
                             
                               Prob 
                                
                               
                                 ( 
                                 
                                   υ 
                                   | 
                                   
                                     σ 
                                     α 
                                   
                                 
                                 ) 
                               
                             
                           
                         
                         = 
                           
                          
                         
                           arg 
                            
                           
                               
                           
                            
                           
                             
                               max 
                               υ 
                             
                              
                             
                               Prob 
                                
                               
                                 ( 
                                 
                                   υ 
                                   , 
                                   
                                     σ 
                                     α 
                                   
                                 
                                 ) 
                               
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                           
                          
                         
                           arg 
                            
                           
                               
                           
                            
                           
                             
                               max 
                               υ 
                             
                              
                             
                               Prob 
                                
                               
                                 ( 
                                 
                                   υ 
                                   , 
                                   
                                     σ 
                                     υ 
                                   
                                   , 
                                   
                                     σ 
                                     α 
                                   
                                 
                                 ) 
                               
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                           
                          
                         
                           arg 
                            
                           
                               
                           
                            
                           
                             
                               max 
                               υ 
                             
                              
                             
                               Prob 
                                
                               
                                 ( 
                                 
                                   
                                     υ 
                                     | 
                                     
                                       σ 
                                       υ 
                                     
                                   
                                   , 
                                   
                                     σ 
                                     α 
                                   
                                 
                                 ) 
                               
                             
                           
                         
                       
                     
                   
                   
                     
                       
                           
                          
                         
                           Prob 
                            
                           
                             ( 
                             
                               
                                 σ 
                                 υ 
                               
                               | 
                               
                                 σ 
                                 α 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   10 
                   ) 
                 
               
             
           
         
       
     
         [0125]    It is a reasonable approximation to say that the first factor here, Prob(v|σ v , σ a , is independent of σ a . (In other words, learning the value of al does not provide any additional information about v once we know σ v ; v and σ a  are conditionally independent given σ v ; cf. [48].) If we accept that, we get 
         [0000]      {circumflex over ( v )}≈arg max v  Prob( v|σ   v )Prob(σ v |σ a )  (11) 
         [0000]    (It is easy to come up with examples that suggest that the approximation sometimes is not very precise. Some typing errors are probably more likely to occur for certain specific letter combinations in a group of combinations with the same signature.) This factorization is easy to understand. The first factor corresponds to, the maximum likelihood prediction of the regular reduced keyboard, disregarding typing errors. The second factor depends on the probabilities of typing errors as the user keys in a certain signature. For the optimal solution, the product is formed between the probability of a character combination, given an intended signature, and the probability for a signature being the intended one, given the actual input, and then the largest such product is found. 
         [0126]    It is not entirely obvious how to estimate the second factor Prob(σ v |σ a ) in (11) based on some specific sampling statistics. In contrast, the probability Prob(σ a |σ v ) is easy to obtain; for example, just start typing the intended word v over and over, and then observe the actual signatures typed. With this in mind, we shall rewrite (11) using Bayes formula: 
         [0000]    
       
         
           
             
               
                 
                   
                     Prob 
                      
                     
                       ( 
                       
                         
                           σ 
                           υ 
                         
                         | 
                         
                           σ 
                           α 
                         
                       
                       ) 
                     
                   
                   = 
                   
                     
                       
                         Prob 
                          
                         
                           ( 
                           
                             
                               σ 
                               α 
                             
                             | 
                             
                               σ 
                               υ 
                             
                           
                           ) 
                         
                       
                        
                       
                         Prob 
                          
                         
                           ( 
                           
                             σ 
                             υ 
                           
                           ) 
                         
                       
                     
                     
                       Prob 
                        
                       
                         ( 
                         
                           σ 
                           α 
                         
                         ) 
                       
                     
                   
                 
               
               
                 
                   ( 
                   12 
                   ) 
                 
               
             
           
         
       
     
         [0127]    Inserting this into (11) we find 
         [0000]      {circumflex over ( v )}≈arg max v  Prob( v|σ   v )Prob(σ a |σ v )Prob(σ v ).  (13) 
       Example 2.1 
       [0128]    The signatures of the character combinations “wondr” and “slyer” are the same. Let w call the signature σ a . Only the latter of these combinations is an English word. Hence, if the user enters this signature σ a , a disambiguation system based on exact signature entry will display “slyer.” However, let us look at probabilities: 
         [0000]      Prob(wonder)≈6.5·10 −5  Prob(slyer)≦2.7·10 −7   (14) 
         [0000]    (These are estimates using Corpus 1 and Corpus 2; there are approximately 240 occurrences of “wonder” and no occurrences of “slyer” among the approximately 3.7 million words in these two corpora.) In addition, we notice that it is very easy to misspell “wonder” since the two letters “d” and “e” sit on the same key and the letter “r” is next to them. Hence, the probability is quite high for entering the signature of “wondr”/“slyer” when we intend to enter the signature of “wonder.” 
         [0129]    Let us assume that “wonder” is the only valid character combination corresponding to the signature of that word and similarly for “slyer.” Then the disambiguation system should favor “wonder” ahead of “slyer” (if it is based on the maximum likelihood estimation and the approximation (11) as long as 
         [0000]      Prob(σ v     (1)   |σ a )&gt;Prob(σ v     (2)   | 94   a )  (15) 
         [0000]    with v (1) =wonder and v (2) =slyer. Equivalently, using (13) instead, this happens exactly when 
         [0000]      Prob(σ a |σ v     (1)   )Prob(σ v     (1)   )&gt;Prob(σ a |σ v     (2)   )Prob(σ v     (2)   ).  (16) 
         [0000]    Since we are assuming that there is only one word with the signature σ v     (1)    and one with σ v     (2)   , by the sampling estimate above we have 
         [0000]      Prob(σ v     (1)   )=Prob(wonder)≈6.5·10 −5  Prob(σ v     (2)   )=Prob(slyer)≦2.7·10 −7   (17) 
         [0000]    Hence, inserting this into the inequality (16), we see that the criterion is essentially 
         [0000]      Prob(σ a |σ v     (1)   )&gt;Prob(σ a | v     (2)   )/250.  (18) 
         [0000]    In other words, unless the user is approximately 250 times more likely to type the signature of “slyer” correctly compared to his likelihood of entering the signature of “wondr” when he had “wonder” in mind, the disambiguation system should favor “wonder” instead of “slyer”. (In fact, the actual number may be considerably higher than 250 times since there were no occurrences of “slyer” in the corpora while there were 240 occurrences of “wonder”.) For User 1, a small sample experiment indicates that the actual probabilities are 
         [0000]      Prob(σ a |σ v     (1)   )≈0.05 
         [0000]      Prob(σ a |σ v     (2)   )≈0.97.  (19) 
         [0000]    Hence, we have 
         [0000]      Prob(σ a |σ v     (1)   )Prob(σ v     (1)   )≈3.2510 −6    
         [0000]      Prob(σ a |σ v     (2)   )Prob(σ v     (2)   )≦2.710 −7 .  (20) 
         [0000]    So, at least for User 1, it is more than 10 times as likely that he has mistyped “wonder” than intending to type “slyer.” 
         [0130]    This probabilistic analysis makes it clear that we may obtain a significantly better prediction of the user&#39;s intentions with an approximate typing system compared with the normal assumption of exact typing. In particular, we may improve the user&#39;s overall typing experience. In spite of this, there still may be reasons to assume that the keystrokes exactly reflect the user&#39;s intentions. For example, this assumption may result in a lower complexity of the disambiguation system and less expensive searches since the set of valid alternatives is smaller. It may also be hard to find the probabilities for different typing errors: the typing errors may not only be highly dependent on the user, but also the context and the typing speed (transpositions are good examples of errors highly dependent on the speed). And, the user may operate in a mode of making absolutely certain that no typing errors are entered. 
         [0131]    However, a user typing on a reduced keyboard is especially prone to some typing errors. So it may be argued that it is particularly important to allow for approximate typing on these keyboards. If there are drawbacks of an approximate typing system, then there are often different methods to alleviate these. For example, in order to reduce the set of possible interpretations of entered signatures, we may consider a threshold based on probability of occurrence of certain errors or character combinations. A similar thresholding technique is implicitly already built into the typical approaches for “exact typing,” since there is always the possibility that the user enters a character combination that does not correspond to anything generated by the dictionary. (To handle this, the reduced keyboard uses a “spell” mode.) 
         [0132]    There are a number of additional ways to reduce the extra complexity of approximate typing. The disambiguation system may use the basic assumption that the entered signature is correct, and then have an associated set of alternative character combinations consistent with the signature, and then have a second set relying on approximations of the entered signature. This second set can then be used, for instance, if the user indicates with a key press (or some other way) that the first displayed alternatives are insufficient. 
         [0133]    A probabilistic assessment of different alternatives may be unnecessary if we are willing to let the user decide between the alternatives that the disambiguation system generates. 
         [0134]    In other situations, even rather crude estimations are satisfactory for finding character combinations to present to the user. In the case of long words, for example, it is more likely that the entered character combination singles out the intended word with great certainty and that most of the other combinations are quite improbable. Since it is particularly frustrating for the user to enter a large number of characters and then to not obtain the intended word, this case alone means that even a rather crude approximate typing system may have a great impact on the user&#39;s experience. 
         [0135]    Approximate typing does not have to rely on probabilistic analysis at all. Fundamentally, approximate typing relies on pattern recognition for its predictions. In this setting, the registered pattern is the actual keystrokes σ a , and the objective is to find the label σ v  of the intended signature word v. As a consequence there are many different methods that we may use. For example, there are different types of rule-based approaches, neural networks, entropy-based methods, etc., and then combinations of all of these. Next we shall look at a simple way of measuring the similarities of the entered signature with that of other character combinations. 
       2.3 The Standard Edit Distance 
       [0136]    To measure the similarity between the entered signature and that of other combinations, there are many possible approaches. One is to use different similarity measures. For example, we may introduce a cost function to measure how well the entered sequence approximates the intended sequence. As a special case of this, we may look for different (pseudo-)distance functions with the basic property that an increase in distance corresponds to less similarity. A commonly used distance function or, more precisely, family of distance functions is based on the so-called edit distance. 
         [0137]    The edit distance is typically used with the common alphabet and symbols (including the empty symbol ε); cf. [27], [60], [21]. Here we shall use it with the ORK and with signature sequences. For now, we shall assume that each keystroke on the ORK is identified with a unique number σ=0, . . . 9, and each signature sequence is given by a string 
         [0000]      σ=σ 1 σ 2  . . . σ N .  (21) 
         [0000]    The empty string is denoted by ε. The basic idea behind the edit distance is to have a set of elementary transformations T={T i } and a set of costs C={C i } for applying each one of these. Then the edit distance ed(σ A , σ B ) from the sequence σ A  to σ B  is the minimal cost of any sequence of transformations, applied one after the other, that transforms σ A  into σ B . Typically, it is assumed that the overall cost is additive and, hence, is obtained from each of the individual costs by adding them. 
         [0138]    The standard, most basic edit distance uses the transformations insertion (ε→σ, where σ is a symbol in the alphabet used), deletion (σ→ε), and substitution (σ 1 →σ 2 ), and each is assigned a cost of 1. Notice that insertion and deletion axe converse to each other, and that insertion has the effect of replacing two consecutive symbols σ 1  σ 2  by the triplet σ 1 σ 3  σ 2  (remember the empty symbol ε is allowed, so this allows us to insert a symbol at the beginning or the end of a string of symbols). 
         [0139]    With the edit distance, the approximate string matching is viewed as an alignment problem. A couple of examples will illustrate this (the examples come from [21]). 
       Example 2.2 
       [0140]    The edit distance from ‘food’ to “money” is at most four. A sequence of transformations is given by 
         [0000]      food→mood→mon ̂ d→moned→money 
         [0000]    A more instructive way to display this is to put one word on top of the other with a gap in the top one for every insertion and a gap in the bottom one for every deletion. In this way, columns with different symbols correspond to substations, and the number of editing steps and the total editing cost is the number of columns with non-equal entries. For the example above we have
       f oo d   mo n e y
 
So, ed(food, money)≦4, and in this case it is not hard to see that it is exactly four. With longer words it is not as clear when we have obtained the optimal set of transformations. For example, here is a more complex situation.
   algor i thm   al truitic       
 
         [0145]    Clearly, the ed(algorithm, altruistic)≦6, but it is not obvious whether there is a better set of transformations, with a lower total cost. 
         [0146]    Using the notation from the above example, the key observation in order to efficiently find the optimal set of transformations is the following: if we remove the last column for an optimal set of transformations, the remaining columns must represent the shortest edit sequence for the remaining substrings. Otherwise, if the substrings had a shorter edit sequence, we could just append the last column and get an overall shorter edit sequence. 
         [0147]    Using this observation, it is easy to obtain a recursive algorithm for obtaining the edit distance between two strings. Let us introduce the function E(i,j)=E(i,j,σ A ,σ B ) for i=0, . . . , #σ A  and j=0, . . . , #σ B  defined as the minimal cost (or effort) to transform the subsequence σ i  of the i first characters in σ A  into the subsequence σ i  of the j first characters in σ B . Obviously, E(0,0)=0 and E(i, 0)=i since the optimal way to convert a sequence with i characters into the empty string is with i deletions. Similarly, E(0,j)=j and the optimal transformations are just j insertions. With this we have the necessary initialization to get the recursion going as long as we find a way to express how to add the last column in the editing process. If both rows of the last column contain a character, then the optimal, last editing step is a substitution and the total cost becomes E(i−1, j−1)+[σ i   A ≠σ j   B ](where [σ i   A ≠σ j   B ]=0 if the i:th character of σ A  is the same as the j:th character of σ B  and 1 otherwise). On the other hand, if the top row contains an empty character and the bottom one a non-empty one, then we have an insertion, and the total cost is E(i,j−1)+1. If we have a non-empty character on the top row and an empty one on the bottom, then the corresponding operation is a deletion and the total cost is E(i−1,j)+1. The optimal choice is the minimum of these three alternatives: 
         [0000]        E ( i,j )=min { E ( i− 1, j− 1)+[σ i   A ≈σ j   B   ],E ( i,j− 1)+1, E ( i− 1, j )+1}  (22) 
         [0000]    With the initialization 
         [0000]        E (0 ,j )= j   (23) 
         [0000]        E ( i, 0)= i,   (24) 
         [0000]    we may recursively go through the equation (22) and obtain the 
         [0000]        ed (σ A ,σ B )= E ( m,n ) with m=#σ A  and n=#σ B .  (25) 
         [0148]    More general transformations are often quite easy to add. For example, if we also want to allow for transpositions of adjacent characters, then it is not enough to just consider the last column, since this type of transposition affects two characters. Instead, we have to consider the last two columns. The total cost for the transposition is then E(i−2,j−2)+1+[σ i−1   A ≠σ j   B ]+[σ i   A ≠σ j−1   B ] (when i,j≧2) and 
         [0000]    
       
         
           
             
               
                 
                   
                     E 
                      
                     
                       ( 
                       
                         i 
                         , 
                         j 
                       
                       ) 
                     
                   
                   = 
                   
                     min 
                      
                     
                       { 
                       
                         
                           
                             
                                 
                                
                               
                                 
                                   
                                     E 
                                      
                                     
                                       ( 
                                       
                                         
                                           i 
                                           - 
                                           1 
                                         
                                         , 
                                         
                                           j 
                                           - 
                                           1 
                                         
                                       
                                       ) 
                                     
                                   
                                   + 
                                   
                                     [ 
                                     
                                       
                                         σ 
                                         i 
                                         A 
                                       
                                       ≠ 
                                       
                                         σ 
                                         j 
                                         B 
                                       
                                     
                                     ] 
                                   
                                 
                                 , 
                               
                             
                           
                         
                         
                           
                             
                                 
                                
                               
                                 
                                   
                                     E 
                                      
                                     
                                       ( 
                                       
                                         i 
                                         , 
                                         
                                           j 
                                           - 
                                           1 
                                         
                                       
                                       ) 
                                     
                                   
                                   + 
                                   1 
                                 
                                 , 
                               
                             
                           
                         
                         
                           
                             
                                 
                                
                               
                                 
                                   
                                     E 
                                      
                                     
                                       ( 
                                       
                                         
                                           i 
                                           - 
                                           1 
                                         
                                         , 
                                         j 
                                       
                                       ) 
                                     
                                   
                                   + 
                                   1 
                                 
                                 , 
                               
                             
                           
                         
                         
                           
                             
                                 
                                
                               
                                 
                                   
                                     
                                       
                                         E 
                                          
                                         
                                           ( 
                                           
                                             
                                               i 
                                               - 
                                               2 
                                             
                                             , 
                                             
                                               j 
                                               - 
                                               2 
                                             
                                           
                                           ) 
                                         
                                       
                                       + 
                                       1 
                                       + 
                                     
                                   
                                 
                                 
                                   
                                     
                                       
                                         [ 
                                         
                                           
                                             σ 
                                             
                                               i 
                                               - 
                                               1 
                                             
                                             A 
                                           
                                           ≠ 
                                           
                                             σ 
                                             j 
                                             B 
                                           
                                         
                                         ] 
                                       
                                       + 
                                       
                                         
                                           [ 
                                           
                                             
                                               σ 
                                               i 
                                               A 
                                             
                                             ≠ 
                                             
                                               σ 
                                               
                                                 j 
                                                 - 
                                                 1 
                                               
                                               B 
                                             
                                           
                                           ] 
                                         
                                         . 
                                       
                                     
                                   
                                 
                               
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   26 
                   ) 
                 
               
             
           
         
       
     
       2.4 Some Sample Errors Using the ORK 
       [0149]    In this section, we shall start by collecting some hopefully representative typing errors. 
         [0000]    
       
         
               
             
               
               
               
               
               
               
             
               
               
               
               
               
               
             
           
               
                   
               
               
                 Some sample typing errors 
               
             
          
           
               
                 # 
                 Intended 
                 Signature 
                 Typed 
                 Signature 
                 Last in dict. 
               
               
                   
               
             
          
           
               
                 1. 
                 catalogue 
                 2040884628 
                 catalbmc 
                 204084628 
                 catal 
               
               
                 2. 
                 out 
                 864 
                 oms 
                 861 
                 lux 
               
               
                 3. 
                 reference 
                 323232522 
                 reverycc 
                 32323522 
                 revery 
               
               
                 4. 
                 while 
                 15782 
                 shille 
                 157882 
                 shille 
               
               
                 5. 
                 encyclopedia, 
                 2525288922707 
                 ench. 
                 25258 
                 ench 
               
               
                 6. 
                 large 
                 80342 
                 laveb 
                 80324 
                 lave 
               
               
                 7. 
                 girls. 
                 473818 
                 give.s 
                 473281 
                 tirel 
               
               
                 8. 
                 catalogue. 
                 2040884628 
                 catalombc 
                 204088642 
                 catalo 
               
               
                 9. 
                 order 
                 83223 
                 over 
                 8323 
                 over 
               
               
                 10. 
                 answer, 
                 0511237 
                 ansccv 
                 051223 
                 ans 
               
               
                 11. 
                 which 
                 15725 
                 winkeh 
                 175725 
                 winke 
               
               
                 12. 
                 following 
                 388881754 
                 followibh 
                 388881745 
                 followi 
               
               
                 13. 
                 idea 
                 7220 
                 kea 
                 720 
                 ke 
               
               
                 14. 
                 enjoy 
                 25685 
                 chun.h 
                 256585 
                 chun 
               
               
                 15. 
                 suggestions 
                 16442147851 
                 suggestins 
                 1644214751 
                 suggestin 
               
               
                 16. 
                 magazines. 
                 6040075218 
                 magazins 
                 60400751 
                 magazin 
               
               
                 17. 
                 title 
                 47482 
                 titilc 
                 474782 
                 titil 
               
               
                 18. 
                 school 
                 125888 
                 schooi 
                 125887 
                 schoo 
               
               
                 19. 
                 chairs. 
                 2507318 
                 chaires. 
                 25073218 
                 chaire 
               
               
                 20. 
                 classroom 
                 280113886 
                 classrom 
                 28011386 
                 classro 
               
               
                 21. 
                 aim 
                 076 
                 ainm 
                 0756 
                 ain 
               
               
                 22. 
                 such 
                 1625 
                 sush 
                 1615 
                 sush 
               
               
                 23. 
                 these 
                 45212 
                 byes 
                 4521 
                 thes 
               
               
                 24. 
                 conveniently? 
                 2853257254859 
                 confidhc 
                 28537252 
                 confid 
               
               
                 25. 
                 bulletin 
                 46882475 
                 gulleybih 
                 468825475 
                 gulley 
               
               
                 26. 
                 decide 
                 222722 
                 deceicc 
                 2222722 
                 decei 
               
               
                 27. 
                 shelves, 
                 15283217 
                 she.c 
                 15282 
                 shel 
               
               
                 28. 
                 letter 
                 824423 
                 lege 
                 8242 
                 lege 
               
               
                 29. 
                 labels 
                 804281 
                 labos 
                 80481 
                 labo 
               
               
                 30. 
                 something. 
                 1862457548 
                 somethinc. 
                 1862457528 
                 somethin 
               
               
                 31. 
                 slogans. 
                 18840518 
                 sobahs. 
                 1840518 
                 sob 
               
               
                 32. 
                 giving 
                 473754 
                 biting 
                 474754 
                 biting 
               
               
                 33. 
                 thought 
                 4586454 
                 though 
                 458645 
                 though 
               
               
                 34. 
                 business 
                 46175211 
                 guishcs 
                 4671521 
                 guis 
               
               
                 35. 
                 opposite. 
                 899817428 
                 opposit. 
                 89981748 
                 opposit 
               
               
                 36. 
                 these 
                 45212 
                 ther 
                 4523 
                 ther 
               
               
                 37. 
                 followed? 
                 388881229 
                 rolls.cc 
                 38881822 
                 rolls 
               
               
                 38. 
                 request 
                 3206214 
                 reamsb 
                 320614 
                 reams 
               
               
                 39. 
                 expressed 
                 219321122 
                 exprescc 
                 21932122 
                 expres 
               
               
                 40. 
                 correct? 
                 28332249 
                 corvet? 
                 2833249 
                 corvet 
               
               
                 41. 
                 followed? 
                 388881229 
                 foolsccc? 
                 388812229 
                 foolsc 
               
               
                 42. 
                 checking 
                 25227754 
                 endiiihb 
                 25277754 
                 endi 
               
               
                 43. 
                 necessary 
                 522211035 
                 neessavh 
                 52211035 
                 nee 
               
               
                 44. 
                 which 
                 15725 
                 wien 
                 1725 
                 wien 
               
               
                 45. 
                 conservation 
                 285123304785 
                 consera 
                 2851230 
                 conser 
               
               
                 46. 
                 holds 
                 58821 
                 nod 
                 582 
                 nod 
               
               
                 47. 
                 muddy? 
                 662259 
                 muddch? 
                 6622259 
                 mudd 
               
               
                 48. 
                 topic 
                 48972 
                 bloke 
                 48872 
                 booke 
               
               
                 49. 
                 language 
                 80546042 
                 languavc 
                 80546032 
                 langua 
               
               
                 50. 
                 topic 
                 48972 
                 topicc 
                 489722 
                 topic 
               
               
                   
               
             
          
         
       
     
         [0150]    Let us look a little closer at these errors. First of all, the first three signatures are correct for all entries except for errors 2, 11, 13, 21, 22, 32, 34, 44, 46, and 48. The first four signatures are correct except for these errors and, additionally, errors 6, 7, 9, 10, 14, 26, 28, 29, 31, 36, 42, and 43. In many cases, the error causes the signature sequence not to be in the dictionary. Two common errors are transposition and “double-typing” a signature that should only occur once or, vice versa, “single-typing” when it should be “double-typed.” This seems particularly common for signatures  8 ,  1 , and  2 . In the next table we have collected various observations. In the column “Leaving dict.” we have recorded whether the error is causing the typed signature not to be in the dictionary; “Desired transf.” is an attempt to see what transformation is needed to correct the error or get the user back on track in typing after an error has occurred, and “Unique compl. before” indicates whether the error could have been avoided by just using a uniqueness-based auto-completion before the error occurred. The underscore in the “Typed signature” column indicates where the signature leaves the dictionary. If we count the relative position of a character with respect to this underscore, letting the first character after the underscore correspond to 0 and the one to the left of the underscore (hence still corresponding to something in the dictionary) be −1, then we may identify the first character to be changed. This then gives us information up to what point the edit distance (in the recursive formulation we just went through) is 0. This location of the first character impacted by the typing error is recorded in the column “1st character loc.” 
         [0000]    
       
         
               
             
               
               
               
               
               
               
               
             
               
               
               
               
               
               
               
             
           
               
                   
               
               
                 Some observations for sample typing errors 
               
             
          
           
               
                 # 
                 Leaving dict. 
                 Desired transf. 
                 Unique compl. before 
                 Intended signature 
                 Typed signature 
                 1st character loc. 
               
               
                   
               
             
          
           
               
                 1. 
                 y 
                  8 → 88 
                 n 
                 2040884628 
                 20408_4628 
                  0 
               
               
                 2. 
                 ? 
                 1 → 4 
                 n 
                 864 
                 861 
                 — 
               
               
                 3. 
                 y 
                  3 → 32 
                 n 
                 323232522 
                 323235_22 
                 −1 
               
               
                 4. 
                 y 
                 88 → 8  
                 n 
                 15782 
                 157882 (?) 
                 — 
               
               
                 5. 
                 y 
                  8 → 28 
                 n 
                 2525288922707 
                 25258 —   
                 −1 
               
               
                 6. 
                 y 
                 24 → 42 
                 n 
                 80342 
                 8032_4 
                 −1 
               
               
                 7. 
                 y 
                 32 → 3  
                 n 
                 473818 
                 47328_1 
                 −2 
               
               
                 8. 
                 y 
                 64 → 46 
                 n 
                 2040884628 
                 204088_642 
                  0 
               
               
                 9. 
                 n 
                  2 → 22 
                 n 
                 83223 
                 8323 
                 — 
               
               
                 10. 
                 y 
                 2 → 1 
                 n 
                 0511237 
                 051_223 
                  0 
               
               
                 11. 
                 y 
                 757 → 57  
                 n 
                 15725 
                 17572_5 
                 −4 
               
               
                 12. 
                 y 
                 45 → 54 
                 n 
                 388881754 
                 3888817_45 
                  0 
               
               
                 13. 
                 y 
                  2 → 22 
                 n 
                 7220 
                 72_0 
                  0 
               
               
                 14. 
                 y 
                 58 → 85 
                 n 
                 25685 
                 2565_85 
                  0 
               
               
                 15. 
                 y 
                  7 → 78 
                 n 
                 16442147851 
                 164421475_1 
                 −1 
               
               
                 16. 
                 y 
                  1 → 21 
                 y 
                 6040075218 
                 6040075_1 
                  0 
               
               
                 17. 
                 y 
                 7 → ε 
                 n 
                 474827 
                 47478_2 
                 −2 
               
               
                 18. 
                 y 
                 87 → 88 
                 y 
                 125888 
                 12588_7 
                  0 
               
               
                 19. 
                 y 
                 21 → 1  
                 n 
                 2507318 
                 250732_18 
                 −1 
               
               
                 20. 
                 y 
                  8 → 88 
                 y 
                 280113886 
                 2801138_6 
                  0 
               
               
                 21. 
                 y 
                 56 → 6  
                 n 
                 076 
                 075_6 
                 −1 
               
               
                 22. 
                 y 
                 2 → 1 
                 n 
                 1625 
                 1615 —   
                 −2 
               
               
                 23. 
                 n 
                  1 → 12 
                 n 
                 45212 
                 4521 
                 ? 
               
               
                 24. 
                 y 
                 7 → 2 
                 n 
                 2853257254859 
                 285372_52 
                 +1 
               
               
                 25. 
                 y 
                 54 → 4  
                 n 
                 46882475 
                 468825_475 
                 −1 
               
               
                 26. 
                 y 
                 22 → 2  
                 n 
                 222722 
                 22227_22 
                 −2 
               
               
                 27. 
                 y 
                  2 → 32 
                 n 
                 15283217 
                 1528_2 
                  0 
               
               
                 28. 
                 y 
                  4 → 44 
                 n 
                 824423 
                 8242_(?) 
                 −1 
               
               
                 29. 
                 y 
                  4 → 42 
                 n 
                 804281 
                 8048_1 
                 −1 
               
               
                 30. 
                 y 
                 2 → 4 
                 y 
                 1862457548 
                 18624575_28 
                  0 
               
               
                 31. 
                 y 
                  8 → 88 
                 n 
                 18840518 
                 184_0518 
                 −1 
               
               
                 32. 
                 n 
                 4 → 3 
                 n 
                 473754 
                 474754 
                 — 
               
               
                 33. 
                 n 
                 ε→ 4 
                 n 
                 4586454 
                 458645 
                 — 
               
               
                 34. 
                 y 
                 71 → 17 
                 n 
                 46175211 
                 4671_521 
                 −2 
               
               
                 35. 
                 y 
                  4 → 42 
                 n 
                 899817428 
                 8998174_8 
                  0 
               
               
                 36. 
                 n 
                 3 → 1 
                 n 
                 45212 
                 4523 
                 — 
               
               
                 37. 
                 y 
                  8 → 88 
                 n 
                 388881229 
                 38881_822 
                 −1 
               
               
                 38. 
                 y 
                  1 → 21 
                 n 
                 3206214 
                 32061_4 
                 −1 
               
               
                 39. 
                 y 
                  1 → 11 
                 n 
                 219321122 
                 219321_22 
                  0 
               
               
                 40. 
                 y 
                  2 → 22 
                 n 
                 28332249 
                 283324_9 
                 −1 
               
               
                 41. 
                 y 
                  8 → 88 
                 n 
                 388881229 
                 388812_229 
                 −2 
               
               
                 42. 
                 y 
                 27 → 22 
                 n 
                 25227754 
                 2527_7754 
                 −1 
               
               
                 43. 
                 y 
                  2 → 22 
                 n 
                 522211035 
                 522_11035 
                  0 
               
               
                 44. 
                 n 
                 ε→ 5 
                 n 
                 15725 
                 1725 
                 — 
               
               
                 45. 
                 y 
                  3 → 33 
                 n 
                 285123304785 
                 285123_0 
                  0 
               
               
                 46. 
                 n 
                  8 → 88 
                 n 
                 58821 
                 582 
                 — 
               
               
                 47. 
                 y 
                 22 → 2  
                 n 
                 662259 
                 6622_259 
                  0 
               
               
                 48. 
                 n 
                 88 → 89 
                 n 
                 48972 
                 48872 
                 — 
               
               
                 49. 
                 y 
                 3 → 4 
                 y 
                 80546042 
                 805460_32 
                  0 
               
               
                 50. 
                 y 
                 22 → 2  
                 n 
                 48972 
                 48972_2 
                  0 
               
               
                   
               
             
          
         
       
     
         [0151]    There seem to be four different types of errors that we may identify in these tables. 
         [0152]    1. Errors with the user continuing to perceived end of the word; 
         [0153]    2. Same as previous but with punctuation marks; 
         [0154]    3. Errors for which the user stopped typing before reaching the end; and 
         [0155]    4. Errors that result in a different legal word. 
         [0156]    For the two first types, of errors, the error distance probably provides a good approach. For the third type, a Beginning Of Word (BOW) based edit distance is probably better. Also, for these types of errors, the detection typically happens at the beginning of the word when an intelligent backspace may provide a good solution. The last type seems to require another approach using the alternatives that are presented to the user. 
         [0157]    So, for now let us focus on errors of the first type. First, we consider the complexity of using the edit distance to identify candidate words corresponding to the signature sequence the user has input. We identify candidate sequences by calculating the edit distance (we shall use the edit distance with four basic operations, i.e., include transpositions). To calculate the edit distance, we use dynamic programming and obtain the edit distance by calculating the cost (effort) matrix. Hence, for each candidate sequence, the complexity is proportional to the number of entries in this matrix we have to calculate. This means that if we make the assumption that the four first characters of the input sequence axe correct, then the number of entries we need to calculate is significantly reduced. For example, say that the cost matrix is of dimensions 8×8. Then, by the assumption about the first four keystrokes being correct, the resulting number of calculations is reduced from approximately 8×8 to 4×4, i.e, about a quarter. This effect is then further amplified by the fact that the number of candidate words that we have to consider decay essentially exponentially with the number of keystrokes we assume to be correct. 
         [0158]    In addition, we see from the tables above that the typing error typically occurs close to the point of leaving the dictionary. In fact, in most cases the error occurs within two characters of the exit point. In terms of the calculation of the cost matrix, this means that only a submatrix of size 4×4 needs to be considered. However, the overall savings in not having to calculate the cost matrix for each candidate towards the end of the signature sequence is less since there are fewer and fewer words that are candidates towards the end of the input sequence. 
         [0159]    Now, if we use the edit distance to identify candidate words that may correspond to the intended input sequence, it often happens that there are several candidates within, say, an edit distance  1 . Then there are several criteria we may use to further refine the selection of such candidates. The simplest is to order these candidates according to probability of use, but there are many other ways as well. For instance, we may introduce different costs for different types of errors. If we choose that approach, transpositions should probably have a low cost (see the tables above) and so should the errors 88→8, 8→88, 22→2 and 2→22. Also, errors that occur close to the exit point compared to errors far from this point (of leaving the dictionary) should have a lower cost. However, these more refined considerations may not be necessary, since the edit distance combined with frequency ordering is remarkably accurate. 
         [0000]    
       
         
               
             
               
               
               
               
               
               
               
               
               
             
               
               
               
               
               
               
               
               
               
             
           
               
                   
               
               
                 Candidate words within a small edit distance from typed signature 
               
             
          
           
               
                 # 
                 Intended 
                 Signature 
                 Typed 
                 Signature 
                 Candidate 
                 Signature 
                 Edit distance 
                 Rel. frequency 
               
               
                   
               
             
          
           
               
                 1. 
                 catalogue 
                 2040884628 
                 catalbmc 
                 204084628 
                 catalogue 
                 2040884628 
                 1 
                 2317 
               
               
                 3. 
                 reference 
                 323232522 
                 reverycc 
                 32323522 
                 reference 
                 323232522 
                 1 
                 7496 
               
               
                   
                   
                   
                   
                   
                 referred 
                 32323322 
                 1 
                 5834 
               
               
                   
                   
                   
                   
                   
                 refercc 
                 3232322 
                 1 
                 1100 
               
               
                   
                   
                   
                   
                   
                 reversed 
                 32323122 
                 1 
                 1096 
               
               
                   
                   
                   
                   
                   
                 reverend 
                 32323252 
                 1 
                 561 
               
               
                   
                   
                   
                   
                   
                 reverted 
                 32323422 
                 1 
                 284 
               
               
                   
                   
                   
                   
                   
                 reverence 
                 323232522 
                 1 
                 248 
               
               
                   
                   
                   
                   
                   
                 revered 
                 3232322 
                 1 
                 183 
               
               
                   
                   
                   
                   
                   
                 fevered 
                 3232322 
                 1 
                 65 
               
               
                   
                   
                   
                   
                   
                 refereed 
                 32323222 
                 1 
                 23 
               
               
                 12. 
                 following 
                 388881754 
                 followibh 
                 388881745 
                 following 
                 388881754 
                 1 
                 26288 
               
               
                 15. 
                 suggestions 
                 16442147851 
                 suggestins 
                 1644214751 
                 suggesting 
                 1644214754 
                 1 
                 2233 
               
               
                   
                   
                   
                   
                   
                 suggestions 
                 16442147851 
                 1 
                 1899 
               
               
                 16. 
                 magazines 
                 604007521 
                 magazins 
                 604007 
                 magazine 
                 60400752 
                 1 
                 4456 
               
               
                   
                   
                   
                   
                   
                 magazines 
                 604007521 
                 1 
                 1589 
               
               
                 20. 
                 classroom 
                 280113886 
                 classrom 
                 28011386 
                 classroom 
                 280113886 
                 1 
                 2111 
               
               
                 35. 
                 opposite 
                 89981742 
                 opposit 
                 8998174 
                 opposite 
                 89981742 
                 1 
                 5492 
               
               
                   
                   
                   
                   
                   
                 opposing 
                 89981754 
                 1 
                 913 
               
               
                 37. 
                 followed 
                 38888122 
                 rolls.cc 
                 388818 
                 followed 
                 38888122 
                 1 
                 14592 
               
               
                 39. 
                 expressed 
                 219321122 
                 exprescc 
                 21932122 
                 expressed 
                 219321122 
                 1 
                 6994 
               
               
                 40. 
                 correct 
                 2833224 
                 corvet 
                 283324 
                 correct 
                 2833224 
                 1 
                 6046 
               
               
                   
                   
                   
                   
                   
                 coffee 
                 283322 
                 1 
                 5724 
               
               
                   
                   
                   
                   
                   
                 coffer 
                 283323 
                 1 
                 23 
               
               
                   
                   
                   
                   
                   
                 doffed 
                 283322 
                 1 
                 17 
               
               
                 47. 
                 muddy 
                 66225 
                 muddch 
                 662225 
                 muddy 
                 66225 
                 1 
                 603 
               
               
                 49. 
                 language 
                 80546042 
                 languavc 
                 80546032 
                 language 
                 80546042 
                 1 
                 17960 
               
               
                 50. 
                 topic 
                 48972 
                 topicc 
                 489722 
                 topic 
                 48972 
                 1 
                 2297 
               
               
                   
                   
                   
                   
                   
                 topica 
                 489721 
                 1 
                 1838 
               
               
                   
               
             
          
         
       
     
       2.5 Modifying the Edit Distance 
       [0160]    One of our basic goals in this section is to describe an effective disambiguation system for approximate typing using a reduced keyboard. We have used the maximum likelihood approach to illustrate some of the issues, cf. Subsection 2.2. If we base our design on this approach and equation (11) or (13), then we are faced with the problem of finding estimates for Prob(σ v |σ a ) (in the case of equation (11)) or Prob(σ a |σ v ) (in the case of equation (13)). These expressions reflect the probabilities for typing errors, and one possibility is to experimentally go ahead and type a lot and obtain estimates for either of these and then store these approximations. This is in principle quite straightforward, but the storage requirements may easily make this impractical. Another possibility is to instead establish a model for these probabilities, and then use the model to calculate the required conditional probabilities at runtime by comparing the entered signature against valid character combinations. The challenge with this may be the search time. The modelling approach is what we shall consider more closely in this and the next couple of subsections. As a general observation, the problems and challenges are quite similar to those encountered in connection with machine translation from one language to another; cf. [34], p. 219, [31], p. 576, [41], p. 589, [8], and [47]. 
         [0161]    The models we shall explore here use the edit distance. The standard edit distance works surprisingly well as a similarity measure in order to identify possible interpretations of the user&#39;s intentions based on the actual entered signature. Heuristically, we would expect alternatives with a larger edit distance to be less likely than signatures with a smaller distance. This type of reasoning is often sufficient to order the alternatives for the user to choose from; however, identifying more precise connection between probabilities and the edit distance requires some further analysis. 
         [0162]    We start with a general observation concerning measures of similarity and probabilities. Suppose we, have a measure C that measures similarity in such a way that a small value of C(σ v , σ a ) corresponds to the signatures σ v  and σ a  being similar or close. Suppose the user intends to type the signature σ v . Suppose further that he sometimes enters σ a     1    and sometimes σ a     2   . Now, if the user is more likely to enter σ a     1    than σ a     2   , then it seems that, at least for this user, σ a     1    is closer to σ v . In other words, it seems desirable to require 
         [0000]      Prob(σ a     2   |σ v )≦Prob(σ a     1   |σ v )           C (σ v ,σ a     2   )≧ C (σ v σ a     1   )  (27) 
         [0000]    Similarly, it is reasonable to expect that C should satisfy 
         [0000]      Prob(σ v |σ a     2   )≦Prob(σ v |σ a     1   )           C (σ a     2   ,σ v )≧ C (σ a     1   ,σ v )  (28) 
         [0000]    Assuming now that C is defined on all pairs of signatures (including those not necessarily corresponding to valid signatures) these two equations (27) and (28) are consequences of the monotonicity property 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       1 
                       
                         Prob 
                          
                         
                           ( 
                           
                             
                               σ 
                               A 
                             
                             | 
                             
                               σ 
                               B 
                             
                           
                           ) 
                         
                       
                     
                     ↑ 
                   
                   ⇒ 
                   
                     
                       
                          
                          
                         
                           ( 
                           
                             
                               σ 
                               A 
                             
                             , 
                             
                               σ 
                               B 
                             
                           
                           ) 
                         
                       
                       ↑ 
                     
                     . 
                   
                 
               
               
                 
                   ( 
                   29 
                   ) 
                 
               
             
           
         
       
     
         [0163]    In order to guarantee the property (29), we must have access to the actual conditional probabilities. As we noted above, this may sometimes be infeasible and so we are now instead looking for a model of these conditional probabilities. Let us call these model probabilities p(σ B |σ A ). So, for modelling purposes we may look for similarity measures with the property 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       1 
                       
                         p 
                          
                         
                           ( 
                           
                             
                               σ 
                               A 
                             
                             | 
                             
                               σ 
                               B 
                             
                           
                           ) 
                         
                       
                     
                     ↑ 
                   
                   ⇒ 
                   
                     
                       
                          
                          
                         
                           ( 
                           
                             
                               σ 
                               A 
                             
                             , 
                             
                               σ 
                               B 
                             
                           
                           ) 
                         
                       
                       ↑ 
                     
                     . 
                   
                 
               
               
                 
                   ( 
                   30 
                   ) 
                 
               
             
           
         
       
     
         [0164]    With this, let us go back to the standard edit distance C=ed based on the four nontrivial transformations substitution, insertion, deletion, and transposition (in addition to the trivial identity); cf. (26). It does not necessarily satisfy (29), and this can be traced back to the cost 1 used for each of the elementary transformations. (Generally speaking, if, say, transpositions are much more likely to occur than any of the other nontrivial transformations, then ed will assign too much distance between a pair of signatures that differ by transpositions for (29) to hold.) 
         [0165]    So, the problem we want to solve is then to find a reasonable class of models and a corresponding set of similarity measures for which the monotonicity property (30) holds. 
         [0166]    Since the costs of the elementary transformations caused the standard edit distance to fail the property (29), we shall go ahead and modify these costs. To simplify the notations a little, we first number the elementary transformations from 0 to 5: T 0  is the trivial identity transformation, T 1  substitution, T 2  insertion, T 3  deletion, and T 4  transposition. We let {right arrow over (T)}={T i } i=0   4 . We also introduce the notation ed(σ A , σ B , {right arrow over (c)}) for the edit distance based on certain costs {right arrow over (c)}={c i } i=0   4 , with one c i  for each of the operations T i , i=0, . . . 4. In case we choose 
         [0000]      c 0 =0, c i =1, i=1, . . . , 4,  (31) 
         [0000]    we obtain the standard edit distance (based on the four nontrivial transformations). 
         [0167]    Suppose we let p i , i=0, . . . , 4, be the actual probabilities of each of the elementary transformations. We then set {right arrow over (c)} * ={c i *} i  with 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       c 
                       i 
                       * 
                     
                     = 
                     
                       ln 
                        
                       
                         1 
                         
                           p 
                           i 
                         
                       
                     
                   
                   , 
                   
                       
                   
                    
                   
                     i 
                     = 
                     0 
                   
                   , 
                   … 
                    
                   
                       
                   
                   , 
                   4 
                   , 
                   
                     
 
                   
                    
                   
                     and 
                      
                     
                         
                     
                      
                     also 
                   
                 
               
               
                 
                   ( 
                   32 
                   ) 
                 
               
             
             
               
                 
                   
                     ed 
                     * 
                     
                       ( 
                       
                         
                           σ 
                           A 
                         
                         , 
                         
                           σ 
                           B 
                         
                       
                       ) 
                     
                   
                   = 
                   
                     
                       ed 
                        
                       
                         ( 
                         
                           
                             σ 
                             A 
                           
                           , 
                           
                             σ 
                             B 
                           
                           , 
                           
                             c 
                             * 
                           
                         
                         ) 
                       
                     
                     . 
                   
                 
               
               
                 
                   ( 
                   33 
                   ) 
                 
               
             
           
         
       
     
         [0168]    We can now define a preliminary model for the actual conditional probabilities. We simply let 
         [0000]        p   * (σ A |σ B )=exp(− ed   * (σ A ,σ B )).  (34) 
         [0000]    Clearly, the monotonicity (30) is built into this definition. We also remark that if we let #T i =#T i (σ A , σ B ) denote the number of times the transform T i  is used in the calculation of ed *  when transforming σ A  into σ B , then (34) can be rewritten as 
         [0000]    
       
         
           
             
               
                 
                   
                     p 
                     * 
                     
                       ( 
                       
                         
                           σ 
                           A 
                         
                         | 
                         
                           σ 
                           B 
                         
                       
                       ) 
                     
                   
                   = 
                   
                     
                       ∏ 
                       
                         i 
                         = 
                         0 
                       
                       4 
                     
                      
                     
                         
                     
                      
                     
                       p 
                       i 
                       
                         # 
                          
                         
                           T 
                           i 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   35 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Hence, this looks as if the application of each of the different transforms are independent events, each with probability p i . 
         [0169]    Now, there are several problems with (35). Perhaps most obvious is the fact that the expressions p * (σ B |σ A ) are not necessarily probability distributions. This can be fixed, however, with an appropriate normalization. Much more seriously, we have not compared and verified these “conditional probabilities” against the experimental data. In the next subsection, we shall carry this out rigorously. 
       2.6 Maximum Entropy Modeling 
       [0170]    Our objective is to find a model for the probabilities p(σ v |σ a ), σ v εS v , σ a εS a  that we may use in, for instance, the maximum likelihood approach and equation (11). We shall accomplish this in steps, starting in this subsection and then continuing in the next. 
         [0171]    Here is the setup for the more rigorous modeling we are going to consider. We let S v  be the space of labels (of valid signatures) and SI the space of unlabeled examples (of all possible signatures). 
         [0172]    To establish an appropriate model, we use a training set (σ l   a , σ l   v ), l=1, . . . , L. To ensure consistency between the observations provided through the training set and the model, we use the expectations of certain features φ i , i=0 . . . , I. We let E   π   [φ i ] represent the expectation of feature φ i  in the training data and E π [φ i ] be the expectation with respect to the model π being estimated. Here {tilde over (π)} is the observed, empirical distribution over S a ×S v , and π=π(σ v |σ a ) is a model distribution over S a ×S v . Specifically, 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       E 
                       
                         π 
                         ~ 
                       
                     
                      
                     
                       [ 
                       
                         φ 
                         j 
                       
                       ] 
                     
                   
                   = 
                   
                     
                       
                         ∑ 
                         
                           
                             σ 
                             a 
                           
                           , 
                           
                             σ 
                             υ 
                           
                         
                       
                        
                       
                         
                           
                             π 
                             ~ 
                           
                            
                           
                             ( 
                             
                               
                                 σ 
                                 a 
                               
                               , 
                               
                                 σ 
                                 υ 
                               
                             
                             ) 
                           
                         
                          
                         
                           
                             φ 
                             j 
                           
                            
                           
                             ( 
                             
                               
                                 σ 
                                 a 
                               
                               , 
                               
                                 σ 
                                 υ 
                               
                             
                             ) 
                           
                         
                       
                     
                     = 
                     
                       
                         1 
                         L 
                       
                        
                       
                         
                           ∑ 
                           
                             l 
                             = 
                             1 
                           
                           L 
                         
                          
                         
                           
                             φ 
                             j 
                           
                            
                           
                             ( 
                             
                               
                                 σ 
                                 l 
                                 a 
                               
                               , 
                               
                                 σ 
                                 l 
                                 υ 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   36 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         
                           
                             E 
                             π 
                           
                            
                           
                             [ 
                             
                               φ 
                               j 
                             
                             ] 
                           
                         
                         = 
                         
                           
                             ∑ 
                             
                               σ 
                               a 
                             
                           
                            
                           
                             
                               
                                 π 
                                 ~ 
                               
                                
                               
                                 ( 
                                 
                                   σ 
                                   a 
                                 
                                 ) 
                               
                             
                              
                             
                               
                                 ∑ 
                                 
                                   σ 
                                   υ 
                                 
                               
                                
                               
                                 
                                   π 
                                    
                                   
                                     ( 
                                     
                                       
                                         σ 
                                         υ 
                                       
                                       | 
                                       
                                         σ 
                                         a 
                                       
                                     
                                     ) 
                                   
                                 
                                  
                                 
                                   
                                     φ 
                                     j 
                                   
                                    
                                   
                                     ( 
                                     
                                       
                                         σ 
                                         a 
                                       
                                       , 
                                       
                                         σ 
                                         υ 
                                       
                                     
                                     ) 
                                   
                                 
                               
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                         
                           
                             1 
                             L 
                           
                            
                           
                             
                               ∑ 
                               
                                 l 
                                 = 
                                 1 
                               
                               L 
                             
                              
                             
                               
                                 ∑ 
                                 
                                   σ 
                                   υ 
                                 
                               
                                
                               
                                 
                                   π 
                                    
                                   
                                     ( 
                                     
                                       
                                         σ 
                                         υ 
                                       
                                       | 
                                       
                                         σ 
                                         l 
                                         a 
                                       
                                     
                                     ) 
                                   
                                 
                                  
                                 
                                   
                                     φ 
                                     j 
                                   
                                    
                                   
                                     ( 
                                     
                                       
                                         σ 
                                         l 
                                         a 
                                       
                                       , 
                                       
                                         σ 
                                         υ 
                                       
                                     
                                     ) 
                                   
                                 
                               
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   37 
                   ) 
                 
               
             
           
         
       
     
         [0173]    To find the model σ(σ v |σ a ), σ a , σ v εS a ×S v , we use a maximum entropy approach; cf. [8], [41], [34]. We let H be the average (conditional) entropy given by 
         [0000]    
       
         
           
             
               
                 
                   
                     H 
                      
                     
                       ( 
                       
                         π 
                          
                         
                           ( 
                           
                             · 
                             
                               , 
                               
                                 σ 
                                 a 
                               
                             
                           
                           ) 
                         
                       
                       ) 
                     
                   
                   = 
                   
                     
                       ∑ 
                       
                         σ 
                         υ 
                       
                     
                      
                     
                       
                         π 
                          
                         
                           ( 
                           
                             
                               σ 
                               υ 
                             
                             | 
                             
                               σ 
                               a 
                             
                           
                           ) 
                         
                       
                        
                       ln 
                        
                       
                         1 
                         
                           π 
                            
                           
                             ( 
                             
                               
                                 σ 
                                 υ 
                               
                               | 
                               
                                 σ 
                                 a 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   38 
                   ) 
                 
               
             
           
         
       
     
         [0174]    We then look for the solution {circumflex over (π)}(σ v |σ a ) of the following constrained maximization problem; cf. [36], [8]. 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       maximize 
                       π 
                     
                      
                     
                       
                         
                             
                         
                         ∑ 
                       
                       
                         σ 
                         a 
                       
                     
                      
                     
                       
                         π 
                         ~ 
                       
                        
                       
                         ( 
                         
                           σ 
                           a 
                         
                         ) 
                       
                     
                      
                     
                       H 
                        
                       
                         ( 
                         
                           π 
                            
                           
                             ( 
                             
                               · 
                               
                                 , 
                                 
                                   σ 
                                   a 
                                 
                               
                             
                             ) 
                           
                         
                         ) 
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       subject 
                        
                       
                           
                       
                        
                       to 
                        
                       
                           
                       
                        
                       
                         
                           E 
                           
                             π 
                             ~ 
                           
                         
                          
                         
                           [ 
                           
                             φ 
                             j 
                           
                           ] 
                         
                       
                     
                     = 
                     
                       
                         
                           E 
                           π 
                         
                          
                         
                           [ 
                           
                             φ 
                             j 
                           
                           ] 
                         
                       
                        
                       
                         ∀ 
                         j 
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         
                           ∑ 
                           
                             σ 
                             υ 
                           
                         
                          
                         
                           π 
                            
                           
                             ( 
                             
                               
                                 σ 
                                 υ 
                               
                               | 
                               
                                 σ 
                                 a 
                               
                             
                             ) 
                           
                         
                       
                       = 
                       1 
                     
                     , 
                     
                         
                     
                      
                     
                       ∀ 
                       
                           
                       
                        
                       
                         σ 
                         a 
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         π 
                          
                         
                           ( 
                           
                             
                               σ 
                               υ 
                             
                             | 
                             
                               σ 
                               a 
                             
                           
                           ) 
                         
                       
                       ≥ 
                       0 
                     
                     , 
                     
                         
                     
                      
                     
                       ∀ 
                       
                           
                       
                        
                       
                         σ 
                         υ 
                       
                     
                     , 
                     
                       σ 
                       a 
                     
                   
                 
               
               
                 
                   ( 
                   39 
                   ) 
                 
               
             
           
         
       
     
         [0175]    Using Lagrange multipliers, we find that the solution to this constrained maximization problem is of the form 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         π 
                         
                           λ 
                           → 
                         
                       
                        
                       
                         ( 
                         
                           
                             σ 
                             υ 
                           
                           | 
                           
                             σ 
                             a 
                           
                         
                         ) 
                       
                     
                     = 
                     
                       
                         1 
                         
                           Z 
                            
                           
                             ( 
                             
                               σ 
                               a 
                             
                             ) 
                           
                         
                       
                        
                       
                         exp 
                          
                         
                           ( 
                           
                             
                               ∑ 
                               
                                 i 
                                 = 
                                 0 
                               
                               I 
                             
                              
                             
                               
                                 λ 
                                 i 
                               
                                
                               
                                 
                                   φ 
                                   i 
                                 
                                  
                                 
                                   ( 
                                   
                                     
                                       σ 
                                       a 
                                     
                                     , 
                                     
                                       σ 
                                       υ 
                                     
                                   
                                   ) 
                                 
                               
                             
                           
                           ) 
                         
                       
                     
                   
                   , 
                   
                       
                   
                    
                   
                     
                       λ 
                       → 
                     
                     = 
                     
                       
                         { 
                         
                           λ 
                           i 
                         
                         } 
                       
                       
                         i 
                         = 
                         0 
                       
                       I 
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   40 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where Z(σ a )=Z {right arrow over (λ)} (σ a ) is the so-called partition function 
         [0000]    
       
         
           
             
               
                 
                   
                     Z 
                      
                     
                       ( 
                       
                         σ 
                         a 
                       
                       ) 
                     
                   
                   = 
                   
                     
                       ∑ 
                       
                         σ 
                         υ 
                       
                     
                      
                     
                       
                         exp 
                          
                         
                           ( 
                           
                             
                               ∑ 
                               
                                 i 
                                 = 
                                 0 
                               
                               I 
                             
                              
                             
                               
                                 λ 
                                 i 
                               
                                
                               
                                 
                                   φ 
                                   i 
                                 
                                  
                                 
                                   ( 
                                   
                                     
                                       σ 
                                       a 
                                     
                                     , 
                                     
                                       σ 
                                       υ 
                                     
                                   
                                   ) 
                                 
                               
                             
                           
                           ) 
                         
                       
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   41 
                   ) 
                 
               
             
           
         
       
     
         [0000]    In other words, the solution to the maximization problem belongs to a family of loglinear models parameterized by the vector {right arrow over (λ)} of constants. 
         [0176]    The dual objective function          ({right arrow over (λ)}) associated with (39) is given by 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           ℒ 
                            
                           
                             ( 
                             
                               λ 
                               → 
                             
                             ) 
                           
                         
                         = 
                           
                          
                         
                           
                             ∑ 
                             
                               
                                 σ 
                                 a 
                               
                               , 
                               
                                 σ 
                                 υ 
                               
                             
                           
                            
                           
                             
                               
                                 π 
                                 ~ 
                               
                                
                               
                                 ( 
                                 
                                   
                                     σ 
                                     a 
                                   
                                   , 
                                   
                                     σ 
                                     υ 
                                   
                                 
                                 ) 
                               
                             
                              
                             ln 
                              
                             
                               1 
                               
                                 
                                   π 
                                   
                                     λ 
                                     → 
                                   
                                 
                                  
                                 
                                   ( 
                                   
                                     
                                       σ 
                                       a 
                                     
                                     , 
                                     
                                       σ 
                                       υ 
                                     
                                   
                                   ) 
                                 
                               
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                           
                          
                         
                           
                             1 
                             L 
                           
                            
                           
                             ( 
                             
                               
                                 
                                   ∑ 
                                   
                                     l 
                                     = 
                                     1 
                                   
                                   L 
                                 
                                  
                                 
                                   
                                     ∑ 
                                     
                                       i 
                                       = 
                                       0 
                                     
                                     I 
                                   
                                    
                                   
                                     
                                       λ 
                                       i 
                                     
                                      
                                     
                                       
                                         φ 
                                         i 
                                       
                                        
                                       
                                         ( 
                                         
                                           
                                             σ 
                                             l 
                                             a 
                                           
                                           , 
                                           
                                             σ 
                                             l 
                                             υ 
                                           
                                         
                                         ) 
                                       
                                     
                                   
                                 
                               
                               - 
                               
                                 
                                   ∑ 
                                   
                                     l 
                                     = 
                                     1 
                                   
                                   L 
                                 
                                  
                                 
                                   ln 
                                    
                                   
                                     
                                       ∑ 
                                       
                                         σ 
                                         υ 
                                       
                                     
                                      
                                     
                                       exp 
                                        
                                         
                                       ( 
                                       
                                         
                                           ∑ 
                                           
                                             j 
                                             = 
                                             0 
                                           
                                           I 
                                         
                                          
                                         
                                           
                                             λ 
                                             j 
                                           
                                            
                                           
                                             
                                               φ 
                                               j 
                                             
                                              
                                             
                                               ( 
                                               
                                                 
                                                   σ 
                                                   l 
                                                   a 
                                                 
                                                 , 
                                                 
                                                   σ 
                                                   υ 
                                                 
                                               
                                               ) 
                                             
                                           
                                         
                                       
                                       ) 
                                     
                                   
                                 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                 
               
               
                 
                   
                     
                       
                         ( 
                         42 
                         ) 
                       
                     
                   
                   
                     
                       
                           
                       
                     
                   
                   
                     
                       
                           
                       
                     
                   
                   
                     
                       
                         ( 
                         43 
                         ) 
                       
                     
                   
                   
                     
                       
                           
                       
                     
                   
                 
               
             
           
         
       
     
         [0000]    (see [53], pp. 67 for details). 
         [0177]    Solving the maximum entropy problem (39) is then equivalent to maximizing the dual objective function          ({right arrow over (λ)}) to find the optimal {right arrow over (λ)}: 
         [0000]      {right arrow over (λ)} * =arg max {right arrow over (λ)}           ({right arrow over (λ)}).  (44) 
         [0000]    Once we obtain this vector, then the solution to (39) is the probability distribution π {right arrow over (λ)}   * (σ v |σ a ), cf. (40). 
         [0178]    We also remark that the maximization of the dual objective function is equivalent to the maximization of the log-likelihood function 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       LL 
                        
                       
                         ( 
                         
                           λ 
                           → 
                         
                         ) 
                       
                     
                     = 
                     
                       ln 
                        
                       
                         
                           ∏ 
                           
                             
                               σ 
                               a 
                             
                             , 
                             
                               σ 
                               υ 
                             
                           
                           
                               
                           
                         
                          
                         
                             
                         
                          
                         
                           
                             
                               π 
                               
                                 λ 
                                 → 
                               
                             
                              
                             
                               ( 
                               
                                 
                                   σ 
                                   υ 
                                 
                                 | 
                                 
                                   σ 
                                   a 
                                 
                               
                               ) 
                             
                           
                           
                             
                               π 
                               ~ 
                             
                              
                             
                               ( 
                               
                                 
                                   σ 
                                   a 
                                 
                                 , 
                                 
                                   σ 
                                   υ 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                   ; 
                 
               
               
                 
                   ( 
                   45 
                   ) 
                 
               
             
           
         
       
     
         [0000]    (see [8], p. 47, for details). 
         [0179]    To solve ( 44 ) and hence find the optimal {right arrow over (λ)} * , we may use standard iterative techniques. In [40], there is a comparison of different numerical methods for maximum entropy problems. Typically, the partial derivatives of          ({right arrow over (λ)}) are needed. These are given by 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             
                               ∂ 
                               ℒ 
                             
                             
                               ∂ 
                               
                                 λ 
                                 i 
                               
                             
                           
                           = 
                             
                            
                           
                             
                               
                                 E 
                                 
                                   π 
                                   ~ 
                                 
                               
                                
                               
                                 [ 
                                 
                                   φ 
                                   i 
                                 
                                 ] 
                               
                             
                             - 
                             
                               
                                 E 
                                 
                                   π 
                                   
                                     λ 
                                     → 
                                   
                                 
                               
                                
                               
                                 [ 
                                 
                                   φ 
                                   i 
                                 
                                 ] 
                               
                             
                           
                         
                       
                     
                     
                       
                         
                           = 
                             
                            
                           
                             
                               1 
                               L 
                             
                              
                             
                               
                                 ∑ 
                                 
                                   l 
                                   = 
                                   1 
                                 
                                 L 
                               
                                
                               
                                 ( 
                                 
                                   
                                     
                                       φ 
                                       i 
                                     
                                      
                                     
                                       ( 
                                       
                                         
                                           σ 
                                           l 
                                           a 
                                         
                                         , 
                                         
                                           σ 
                                           l 
                                           υ 
                                         
                                       
                                       ) 
                                     
                                   
                                   - 
                                   
                                     
                                       ∑ 
                                       
                                         σ 
                                         υ 
                                       
                                     
                                      
                                     
                                       
                                         
                                           π 
                                           
                                             λ 
                                             → 
                                           
                                         
                                          
                                         
                                           ( 
                                           
                                             
                                               σ 
                                               υ 
                                             
                                             | 
                                             
                                               σ 
                                               l 
                                               a 
                                             
                                           
                                           ) 
                                         
                                       
                                        
                                       
                                         
                                           φ 
                                           i 
                                         
                                          
                                         
                                           ( 
                                           
                                             
                                               σ 
                                               l 
                                               a 
                                             
                                             , 
                                             
                                               σ 
                                               υ 
                                             
                                           
                                           ) 
                                         
                                       
                                     
                                   
                                 
                                 ) 
                               
                             
                           
                         
                       
                     
                     
                       
                         
                           = 
                             
                            
                           
                             
                               1 
                               L 
                             
                              
                             
                               
                                 ∑ 
                                 
                                   l 
                                   = 
                                   1 
                                 
                                 L 
                               
                                
                               
                                 ( 
                                 
                                   
                                     
                                       
                                         φ 
                                         i 
                                       
                                        
                                       
                                         ( 
                                         
                                           
                                             σ 
                                             l 
                                             a 
                                           
                                           , 
                                           
                                             σ 
                                             l 
                                             υ 
                                           
                                         
                                         ) 
                                       
                                     
                                     - 
                                     
                                       
                                         E 
                                         
                                           
                                             π 
                                             
                                               λ 
                                               → 
                                             
                                           
                                            
                                           
                                             ( 
                                             
                                               · 
                                               
                                                 | 
                                                 
                                                   σ 
                                                   l 
                                                   a 
                                                 
                                               
                                             
                                             ) 
                                           
                                         
                                       
                                        
                                       
                                         ( 
                                         
                                           
                                             φ 
                                             i 
                                           
                                            
                                           
                                             ( 
                                             
                                               
                                                 σ 
                                                 l 
                                                 a 
                                               
                                               , 
                                               · 
                                             
                                             ) 
                                           
                                         
                                         ) 
                                       
                                     
                                   
                                   , 
                                 
                                  
                                 
                                     
                                 
                               
                             
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       i 
                       = 
                       0 
                     
                     , 
                     … 
                      
                     
                         
                     
                     , 
                     
                       I 
                       . 
                     
                   
                 
               
               
                 
                   
                     
                       
                         ( 
                         46 
                         ) 
                       
                     
                   
                   
                     
                       
                           
                       
                     
                   
                   
                     
                       
                           
                       
                     
                   
                   
                     
                       
                         ( 
                         47 
                         ) 
                       
                     
                   
                   
                     
                       
                           
                       
                     
                   
                   
                     
                       
                         ( 
                         48 
                         ) 
                       
                     
                   
                 
               
             
           
         
       
     
         [0000]    It is also interesting to note that the second derivatives are given by the covariance matrix of the features: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         ∂ 
                         2 
                       
                        
                       ℒ 
                     
                     
                       
                         ∂ 
                         
                           λ 
                           j 
                         
                       
                        
                       
                         λ 
                         k 
                       
                     
                   
                   = 
                   
                     - 
                     
                       
                         ∑ 
                         
                           l 
                           = 
                           1 
                         
                         L 
                       
                        
                       
                         
                           cov 
                           
                             
                                 
                             
                             
                               
                                 π 
                                 
                                   λ 
                                   → 
                                 
                               
                                
                               
                                 ( 
                                 
                                   · 
                                   
                                     | 
                                     
                                       σ 
                                       l 
                                       a 
                                     
                                   
                                 
                                 ) 
                               
                             
                           
                         
                          
                         
                           ( 
                           
                             
                               
                                 φ 
                                 j 
                               
                                
                               
                                 ( 
                                 
                                   
                                     σ 
                                     l 
                                     a 
                                   
                                   , 
                                   · 
                                 
                                 ) 
                               
                             
                             , 
                             
                               
                                 φ 
                                 k 
                               
                                
                               
                                 ( 
                                 
                                   
                                     σ 
                                     l 
                                     a 
                                   
                                   , 
                                   · 
                                 
                                 ) 
                               
                             
                           
                           ) 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   49 
                   ) 
                 
               
             
           
         
       
     
         [0180]    Before applying the maximum entropy modelling to our current situation, we make the following remark. Note that by replacing φ i (σ a , σ v ) by −φ i (σ a ,σ v ), we may always assume that the λ i *≦0, i=0, . . . , I. For any {right arrow over (λ)}≦0 (i.e., λ i ≦0 for each i=0, . . . , I), we define the generalized edit distance ed associated with the features {right arrow over (φ)}(σ a ,σ v ) by 
         [0000]    
       
         
           
             
               
                 
                   
                     ed 
                      
                     
                       ( 
                       
                         
                           σ 
                           a 
                         
                         , 
                         
                           
                             σ 
                             υ 
                           
                           ; 
                           
                             λ 
                             → 
                           
                         
                       
                       ) 
                     
                   
                   = 
                   
                     - 
                     
                       
                         ∑ 
                         
                           i 
                           = 
                           0 
                         
                         I 
                       
                        
                       
                         
                           λ 
                           i 
                         
                          
                         
                           
                             
                               φ 
                               i 
                             
                              
                             
                               ( 
                               
                                 
                                   σ 
                                   a 
                                 
                                 , 
                                 
                                   σ 
                                   υ 
                                 
                               
                               ) 
                             
                           
                           . 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   50 
                   ) 
                 
               
             
           
         
       
     
         [0181]    (We let the associated cost functions c be defined by {right arrow over (c)}=−{right arrow over (λ)}.) The conditional probabilities may then be written as 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       π 
                       
                         
                           λ 
                           → 
                         
                         * 
                       
                     
                      
                     
                       ( 
                       
                         
                           σ 
                           υ 
                         
                         | 
                         
                           σ 
                           a 
                         
                       
                       ) 
                     
                   
                   = 
                   
                     
                       1 
                       
                         Z 
                          
                         
                           ( 
                           
                             σ 
                             a 
                           
                           ) 
                         
                       
                     
                      
                     
                       
                         exp 
                          
                         
                           ( 
                           
                             - 
                             
                               ed 
                                
                               
                                 ( 
                                 
                                   
                                     σ 
                                     a 
                                   
                                   , 
                                   
                                     
                                       σ 
                                       υ 
                                     
                                     ; 
                                     
                                       
                                         λ 
                                         → 
                                       
                                       * 
                                     
                                   
                                 
                                 ) 
                               
                             
                           
                           ) 
                         
                       
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   51 
                   ) 
                 
               
             
           
         
       
     
         [0182]    The maximum entropy approach is quite general in nature. To apply it to our particular situation, we need to define a set of features. We shall base these features on the edit distance ed(σ A ,σ B ,{right arrow over (c)}) for some given cost functions {right arrow over (c)}={c i } i=0   4 . We let 
         [0000]      φ i (σ v ,σ a )=# T   i , i=0, . . . , 4,  (52) 
         [0000]    where #T i  denotes the number of occurrences of the ith transformation T i  in the (optimal) calculation of the edit distance ed(σ a , σ v , {right arrow over (c)}). These features φ i (σ v , σ a ) obviously may depend on the particular choice of the cost functions {right arrow over (c)}. 
         [0183]    Suppose then that we have obtained the solution {right arrow over (λ)} * ={λ i *} i=0   4  and let 
         [0000]      Λ i *=exp λ i *.  (53) 
         [0000]    According to (40), the corresponding model probabilities are given by 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             
                               π 
                               
                                 
                                   λ 
                                   → 
                                 
                                 * 
                               
                             
                              
                             
                               ( 
                               
                                 
                                   σ 
                                   υ 
                                 
                                 | 
                                 
                                   σ 
                                   a 
                                 
                               
                               ) 
                             
                           
                           = 
                           
                             
                               1 
                               
                                 Z 
                                  
                                 
                                   ( 
                                   
                                     σ 
                                     a 
                                   
                                   ) 
                                 
                               
                             
                              
                             
                               exp 
                                
                               
                                 ( 
                                 
                                   
                                     ∑ 
                                     
                                       i 
                                       = 
                                       0 
                                     
                                     4 
                                   
                                    
                                   
                                     
                                       λ 
                                       i 
                                       * 
                                     
                                      
                                     
                                       
                                         φ 
                                         i 
                                       
                                        
                                       
                                         ( 
                                         
                                           
                                             σ 
                                             a 
                                           
                                           , 
                                           
                                             σ 
                                             υ 
                                           
                                         
                                         ) 
                                       
                                     
                                   
                                 
                                 ) 
                               
                             
                           
                         
                         , 
                       
                     
                   
                   
                     
                       
                         = 
                         
                           
                             1 
                             
                               Z 
                                
                               
                                 ( 
                                 
                                   σ 
                                   a 
                                 
                                 ) 
                               
                             
                           
                            
                           
                             
                               ∏ 
                               
                                 i 
                                 = 
                                 0 
                               
                               4 
                             
                              
                             
                                 
                             
                              
                             
                               
                                 ( 
                                 
                                   Λ 
                                   i 
                                   * 
                                 
                                 ) 
                               
                               
                                 
                                   φ 
                                   i 
                                 
                                  
                                 
                                   ( 
                                   
                                     
                                       σ 
                                       a 
                                     
                                     , 
                                     
                                       σ 
                                       υ 
                                     
                                   
                                   ) 
                                 
                               
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   
                     
                       
                         ( 
                         54 
                         ) 
                       
                     
                   
                   
                     
                       
                           
                       
                     
                   
                   
                     
                       
                           
                       
                     
                   
                   
                     
                       
                         ( 
                         55 
                         ) 
                       
                     
                   
                   
                     
                       
                         ( 
                         56 
                         ) 
                       
                     
                   
                 
               
             
           
         
       
     
         [0184]    Notice that at least for these features given by (52), our notations here are somewhat misleading: We have defined the φ i :s with respect to an edit distance with a starting cost function {right arrow over (c)}. We then obtain a new (generalized) edit distance via the equation (50), associated with the optimal {right arrow over (λ)} * . This new edit distance now potentially results in different choices of the number of elementary transformations #T i =#T i (σ a ,σ v ) and a new optimal {right arrow over (λ)} * . And this can then be repeated forever unless the iteration process converges (i.e., the numbers #T i  stabilize from iteration to iteration). 
         [0185]    We also experimented with a “normalized” set of features 
         [0000]    
       
         
           
             
               
                 
                   
                     φ 
                     i 
                   
                   = 
                   
                     
                       
                         φ 
                         i 
                       
                        
                       
                         ( 
                         
                           
                             σ 
                             a 
                           
                           , 
                           
                             σ 
                             υ 
                           
                         
                         ) 
                       
                     
                     = 
                     
                       
                         
                           # 
                            
                           
                             T 
                             i 
                           
                         
                         
                           
                             ∑ 
                             
                               j 
                               = 
                               0 
                             
                             I 
                           
                            
                           
                             # 
                              
                             
                               T 
                               j 
                             
                           
                         
                       
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   57 
                   ) 
                 
               
             
           
         
       
     
         [0186]    The edit distance, with the appropriate cost functions, provides a coarse model of a user&#39;s typing and errors. By introducing more transforms, this model can be refined. For example, we have seen in the Subsection 2.4 that certain insertions and deletions are particularly common. Hence, we may introduce insertion and deletion transforms depending on neighboring characters. 
       Example 2.3 
       [0187]    Based on several users&#39; typing errors, it seems that the following transforms may provide a better explanation of their typing than the standard set:
       in 22  insertion of extra  2     in 88  insertion of extra  8     in 88  insertion of extra symbol after same symbol (where symbol is not 2 or 8)   in 8  insertion of symbol without resulting duplication   de 22  deletion of extra  2     de 88  deletion of extra  8     de 88  deletion of extra symbol in a duplication (where symbol is not 2 or 8)   de 8  deletion of symbol not from a duplication
 
Transposition tr, identity id, and substitution su as before.
       
 
       2.7 The Resulting Bayesian Model 
       [0196]    Let us now see how we can establish a model that we can use in equations (11) and (13) in Subsection 2.2. First, we observe that the maximum entropy models from the previous Subsection axe not exactly what we need. The reason is the following. 
         [0197]    The probability distributions p {right arrow over (λ)} (σ v |σ a ) we obtained are defined in terms of the appropriate edit distance in such a way that if two signatures σ 1   v  and σ 2   v  have the same edit distance from the typed σ a , then p {right arrow over (λ)} (σ v     1   |σ a )=p {right arrow over (λ)} (σ v     2   |σ a ). If one of these two intended signatures σ i   v , i=1, 2, is much more common than the other, then it seems that we should favor this signature instead of the other in, say, (11). But clearly our model distributions p {right arrow over (λ)} (σ v     1   |σ a ) will not form the basis for such assessments, at least not directly, since they only depend on the edit distance. (And this, of course, also means that the analysis in an example like Example 2.1 is out of reach.) 
         [0198]    We can of course go back to the maximum entropy models and instead model p {right arrow over (λ)} (σ a |σ v ) using those techniques. If we do that in a straightforward manner, we are likely to end up with a partition function Z that depends on v, Z(v). This is problematic from a complexity point of view since it is expensive to calculate it, and it does not vanish when we want to compare several different v:s. 
         [0199]    Another possibility is to introduce more constraints in the basic maximization ( 39 ). For example, we may add a constraint for each σ v  so that we guarantee through this constraint that the probability (obtained from a standard corpus perhaps) of each σ v  ends up being the right one. The calculations necessary for this do not appear to be easy, or at least from a complexity point of view it does not seem that they can be used in our setting. 
         [0200]    A third possibility is to introduce more features into the definition of the edit distance so that the modified edit distance becomes more sensitive. With carefully chosen features, it may be possible to make the edit distance reflect the probability of the different σ v . If we succeed in that, then on the other hand the modified edit distance probably will not accurately reflect the user&#39;s typing patterns. 
         [0201]    The problems we are encountering here are due to the fact that we are mixing the impact from two different sources on our data. On one hand, we have the user&#39;s intended distribution of character combinations; and then, on the other hand, we have his typing and typing errors, cf.  FIG. 3 . 
         [0202]    To sort this out, let us consider the input process as consisting of two parts: one process corresponding to units of characters σ v  (like signatures corresponding to words) followed by another process corresponding to the user&#39;s typing and outputting a σ a  for each σ v . Let us for simplicity also assume that the first of these processes is 0th order and can be described by the distribution of the σ v :s and that the second outputs a σ a  according to another distribution after each σ v . (Neither of these assumptions is really necessary, but they make the discussion simpler.) In other words, suppose the user&#39;s context of character combinations is described by the probability distribution P(σ v ), σ v εS v  (for instance, P may be the probabilities of words in a big corpus), and that there are probability distributions π(σ a |σ v ) for the data entered σ a εS a  given each intended σ v εS v . Together these distributions determine a joint distribution p(σ v , σ a ) on S v ×S a  defined by 
         [0000]        p (σ v ,σ a )= P (σ v )π(σ a |σ v ), σ v εS v ,σ a εS a .  (58) 
         [0000]    So, p(σ v , σ a ) describes the probability that σ v  is the intended signature when σ a  is entered. This is then the basic description of the combined input system. We remark that we are thus led to a description that follows a path widely used in image analysis and pattern recognition to handle prior knowledge and empirical data, see [26], [58], [27]. 
         [0203]    Both P(σ v ) and the family π(σ a σ v ) may easily be recovered from the joint distribution p(σ v , σ a ). To see this, we note that we clearly have 
         [0000]    
       
         
           
             
               
                 
                   
                     P 
                      
                     
                       ( 
                       
                         σ 
                         υ 
                       
                       ) 
                     
                   
                   = 
                   
                     
                       ∑ 
                       
                         σ 
                         a 
                       
                       
                           
                       
                     
                      
                     
                       
                         p 
                          
                         
                           ( 
                           
                             
                               σ 
                               υ 
                             
                             , 
                             
                               σ 
                               a 
                             
                           
                           ) 
                         
                       
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   59 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Further, by using the definition of conditional probability and the definition (58), we see that 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           p 
                            
                           
                             ( 
                             
                               
                                 σ 
                                 a 
                               
                                
                               
                                 σ 
                                 υ 
                               
                             
                             ) 
                           
                         
                         = 
                           
                          
                         
                           
                             p 
                              
                             
                               ( 
                               
                                 
                                   σ 
                                   υ 
                                 
                                 , 
                                 
                                   σ 
                                   a 
                                 
                               
                               ) 
                             
                           
                           
                             P 
                              
                             
                               ( 
                               
                                 σ 
                                 υ 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                           
                          
                         
                           
                             
                               P 
                                
                               
                                 ( 
                                 
                                   σ 
                                   υ 
                                 
                                 ) 
                               
                             
                              
                             
                               π 
                                
                               
                                 ( 
                                 
                                   
                                     σ 
                                     a 
                                   
                                    
                                   
                                     σ 
                                     υ 
                                   
                                 
                                 ) 
                               
                             
                           
                           
                             P 
                              
                             
                               ( 
                               
                                 σ 
                                 υ 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                           
                          
                         
                           
                             π 
                              
                             
                               ( 
                               
                                 
                                   σ 
                                   a 
                                 
                                  
                                 
                                   σ 
                                   υ 
                                 
                               
                               ) 
                             
                           
                           . 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   60 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Hence, we may recover π(σ a |σ v ) by first obtaining P from the joint distribution and then use the joint distribution again to get p(σ a |σ v ). This also tells us that the conditional probabilities p(σ a |σ v ) of the combined input system only depend on the conditional probabilities describing the user&#39;s typing and have nothing to do with the distribution of the intended signatures σ v . 
         [0204]    We introduce the notation Q(σ a ), σ a εS a , for the other marginal distribution associated with the joint distribution p(σ v ,σ a ): 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       Q 
                        
                       
                         ( 
                         
                           σ 
                           a 
                         
                         ) 
                       
                     
                     = 
                     
                       
                         
                           ∑ 
                           
                             
                               σ 
                               υ 
                             
                             ∈ 
                             
                               S 
                               υ 
                             
                           
                           
                               
                           
                         
                          
                         
                           p 
                            
                           
                             ( 
                             
                               
                                 σ 
                                 υ 
                               
                               , 
                               
                                 σ 
                                 a 
                               
                             
                             ) 
                           
                         
                       
                       = 
                       
                         
                           ∑ 
                           
                             
                               σ 
                               υ 
                             
                             ∈ 
                             
                               S 
                               υ 
                             
                           
                           
                               
                           
                         
                          
                         
                           
                             P 
                              
                             
                               ( 
                               
                                 σ 
                                 υ 
                               
                               ) 
                             
                           
                            
                           
                             π 
                              
                             
                               ( 
                               
                                 
                                   σ 
                                   a 
                                 
                                  
                                 
                                   σ 
                                   υ 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                   , 
                   
                     
                       σ 
                       a 
                     
                     ∈ 
                     
                       
                         S 
                         a 
                       
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   61 
                   ) 
                 
               
             
           
         
       
     
         [0205]    Assume now that we are given the typed σ a  and are asking for the distribution of the σ v :s. Once again, simply by using the definition of conditional probability we get 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           p 
                            
                           
                             ( 
                             
                               
                                 σ 
                                 υ 
                               
                                
                               
                                 σ 
                                 a 
                               
                             
                             ) 
                           
                         
                         = 
                           
                          
                         
                           
                             p 
                              
                             
                               ( 
                               
                                 
                                   σ 
                                   υ 
                                 
                                 , 
                                 
                                   σ 
                                   a 
                                 
                               
                               ) 
                             
                           
                           
                             p 
                              
                             
                               ( 
                               
                                 
                                   
                                     σ 
                                     υ 
                                   
                                   ∈ 
                                   
                                     S 
                                     υ 
                                   
                                 
                                 , 
                                 
                                   σ 
                                   a 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         
                           = 
                             
                            
                           
                             
                               
                                 P 
                                  
                                 
                                   ( 
                                   
                                     σ 
                                     υ 
                                   
                                   ) 
                                 
                               
                                
                               
                                 π 
                                  
                                 
                                   ( 
                                   
                                     
                                       σ 
                                       a 
                                     
                                      
                                     
                                       σ 
                                       υ 
                                     
                                   
                                   ) 
                                 
                               
                             
                             
                               Q 
                                
                               
                                 ( 
                                 
                                   σ 
                                   a 
                                 
                                 ) 
                               
                             
                           
                         
                         , 
                       
                     
                   
                 
               
               
                 
                   ( 
                   62 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where we of course assume that the denominator Q(σ a ) does not vanish. One way to interpret this relationship is like this: We started with a distribution P(σ v ) of the signatures σ v εS v . Once we obtain the σ a , then this distribution is adjusted and modified by the factor 
         [0000]    
       
         
           
             
               
                 π 
                  
                 
                   ( 
                   
                     
                       σ 
                       a 
                     
                      
                     
                       σ 
                       υ 
                     
                   
                   ) 
                 
               
               
                 Q 
                  
                 
                   ( 
                   
                     σ 
                     a 
                   
                   ) 
                 
               
             
             . 
           
         
       
     
         [0000]    We refer to P(σ v ) as the prior distribution and p(σ v |σ a ) as the posterior distribution of σ v  given σ a . 
         [0206]    Note that to describe the joint distribution p(σ v ,σ a ) and the input process, we only need the “transition” probability distributions π(·|σ v ) as far as the typing goes. Sometimes it will be convenient to have access to a joint distribution, so we shall go ahead and define π(σ v ,σ a ) on S v ×S a . We let 
         [0000]    
       
         
           
             
               
                 
                   
                     π 
                      
                     
                       ( 
                       
                         
                           σ 
                           υ 
                         
                         , 
                         
                           σ 
                           a 
                         
                       
                       ) 
                     
                   
                   = 
                   
                     
                       π 
                        
                       
                         ( 
                         
                           
                             σ 
                             a 
                           
                            
                           
                             σ 
                             υ 
                           
                         
                         ) 
                       
                     
                     
                       # 
                        
                       
                         S 
                         υ 
                       
                     
                   
                 
               
               
                 
                   ( 
                   63 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where #S v  is the number of signatures in S′ (which we assume is finite). We then have two corresponding marginal distributions: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         Π 
                          
                         
                           ( 
                           
                             σ 
                             a 
                           
                           ) 
                         
                       
                       = 
                       
                         
                           
                             ∑ 
                             
                               
                                 σ 
                                 υ 
                               
                               ∈ 
                               
                                 S 
                                 υ 
                               
                             
                             
                                 
                             
                           
                            
                           
                             π 
                              
                             
                               ( 
                               
                                 
                                   σ 
                                   υ 
                                 
                                 , 
                                 
                                   σ 
                                   a 
                                 
                               
                               ) 
                             
                           
                         
                         = 
                         
                           
                             1 
                             
                               # 
                                
                               
                                 S 
                                 υ 
                               
                             
                           
                            
                           
                             
                               ∑ 
                               
                                 
                                   σ 
                                   υ 
                                 
                                 ∈ 
                                 
                                   S 
                                   υ 
                                 
                               
                               
                                   
                               
                             
                              
                             
                               π 
                                
                               
                                 ( 
                                 
                                   
                                     σ 
                                     a 
                                   
                                    
                                   
                                     σ 
                                     υ 
                                   
                                 
                                 ) 
                               
                             
                           
                         
                       
                     
                     , 
                     
                       
                         σ 
                         a 
                       
                       ∈ 
                       
                         S 
                         a 
                       
                     
                   
                    
                   
                     
 
                   
                    
                   and 
                 
               
               
                 
                   ( 
                   64 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       Ω 
                        
                       
                         ( 
                         
                           σ 
                           υ 
                         
                         ) 
                       
                     
                     = 
                     
                       1 
                       
                         # 
                          
                         
                           S 
                           υ 
                         
                       
                     
                   
                   , 
                   
                     
                       σ 
                       υ 
                     
                     ∈ 
                     
                       
                         S 
                         υ 
                       
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   65 
                   ) 
                 
               
             
           
         
       
     
         [0000]    (Equivalently, we may have defined π(σ v ,σ a ) by first picking the uniform distribution Ω(σ v ), S v , and then requiring π(σ v , σ a )=Ω(σ v )π(σ a |σ v ).) 
         [0207]    For our purposes, we typically want to compare different σ v :s given the same user input σ a . With this in mind, we observe that by (60) and (62) 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       p 
                        
                       
                         ( 
                         
                           
                             σ 
                             
                               υ 
                               1 
                             
                           
                            
                           
                             σ 
                             a 
                           
                         
                         ) 
                       
                     
                     
                       p 
                        
                       
                         ( 
                         
                           
                             σ 
                             
                               υ 
                               2 
                             
                           
                            
                           
                             σ 
                             a 
                           
                         
                         ) 
                       
                     
                   
                   = 
                   
                     
                       
                         P 
                          
                         
                           ( 
                           
                             σ 
                             
                               υ 
                               1 
                             
                           
                           ) 
                         
                       
                       
                         P 
                          
                         
                           ( 
                           
                             σ 
                             
                               υ 
                               2 
                             
                           
                           ) 
                         
                       
                     
                      
                     
                       
                         
                           p 
                            
                           
                             ( 
                             
                               
                                 σ 
                                 a 
                               
                                
                               
                                 σ 
                                 
                                   υ 
                                   1 
                                 
                               
                             
                             ) 
                           
                         
                         
                           p 
                            
                           
                             ( 
                             
                               
                                 σ 
                                 a 
                               
                                
                               
                                 σ 
                                 
                                   υ 
                                   2 
                                 
                               
                             
                             ) 
                           
                         
                       
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   66 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Similarly, using the definition (63), 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       π 
                        
                       
                         ( 
                         
                           
                             σ 
                             
                               υ 
                               1 
                             
                           
                            
                           
                             σ 
                             a 
                           
                         
                         ) 
                       
                     
                     
                       π 
                        
                       
                         ( 
                         
                           
                             σ 
                             
                               υ 
                               2 
                             
                           
                            
                           
                             σ 
                             a 
                           
                         
                         ) 
                       
                     
                   
                   = 
                   
                     
                       
                         π 
                          
                         
                           ( 
                           
                             
                               σ 
                               a 
                             
                              
                             
                               σ 
                               
                                 υ 
                                 1 
                               
                             
                           
                           ) 
                         
                       
                       
                         π 
                          
                         
                           ( 
                           
                             
                               σ 
                               a 
                             
                              
                             
                               σ 
                               
                                 υ 
                                 2 
                               
                             
                           
                           ) 
                         
                       
                     
                     . 
                   
                 
               
               
                 
                   ( 
                   67 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Combining these equations (66) and (67) and once again using (60), we find that 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       p 
                        
                       
                         ( 
                         
                           
                             σ 
                             
                               υ 
                               1 
                             
                           
                            
                           
                             σ 
                             a 
                           
                         
                         ) 
                       
                     
                     
                       p 
                        
                       
                         ( 
                         
                           
                             σ 
                             
                               υ 
                               2 
                             
                           
                            
                           
                             σ 
                             a 
                           
                         
                         ) 
                       
                     
                   
                   = 
                   
                     
                       
                         P 
                          
                         
                           ( 
                           
                             σ 
                             
                               υ 
                               1 
                             
                           
                           ) 
                         
                       
                       
                         P 
                          
                         
                           ( 
                           
                             σ 
                             
                               υ 
                               2 
                             
                           
                           ) 
                         
                       
                     
                      
                     
                       
                         
                           π 
                            
                           
                             ( 
                             
                               
                                 σ 
                                 
                                   υ 
                                   1 
                                 
                               
                                
                               
                                 σ 
                                 a 
                               
                             
                             ) 
                           
                         
                         
                           π 
                            
                           
                             ( 
                             
                               
                                 σ 
                                 
                                   υ 
                                   2 
                                 
                               
                                
                               
                                 σ 
                                 a 
                               
                             
                             ) 
                           
                         
                       
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   68 
                   ) 
                 
               
             
           
         
       
     
         [0208]    So if we model P(σ v ) and π(σ a |σ v ), then through (58) we obtain a corresponding model for the joint distribution p(σ v ,σ a ). In particular, let us use the maximum entropy model π {right arrow over (λ)}     *   (σ v |σ a ) from the previous subsection to model π(σ v |σ a ). Let us also use some reasonable approximation P 0 (σ v ) of the distribution P(σ v ) (for instance, the probabilities generated from a large corpus of some kind). Then we obtain a corresponding model 
         [0000]        p   {right arrow over (λ)}     *   (σ v ,σ a )= P   0 (σ v )π {right arrow over (λ)}     *   (σ a |σ v ), σ v εS v ,σ a εS v .  (69) 
         [0000]    For this model, the various identities above are valid. For example, equation (68) now reads 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         p 
                         
                           
                             λ 
                             -&gt; 
                           
                           * 
                         
                       
                        
                       
                         ( 
                         
                           
                             σ 
                             
                               υ 
                               1 
                             
                           
                            
                           
                             σ 
                             a 
                           
                         
                         ) 
                       
                     
                     
                       
                         p 
                         
                           
                             λ 
                             -&gt; 
                           
                           * 
                         
                       
                        
                       
                         ( 
                         
                           
                             σ 
                             
                               υ 
                               2 
                             
                           
                            
                           
                             σ 
                             a 
                           
                         
                         ) 
                       
                     
                   
                   = 
                   
                     
                       
                         
                           P 
                           0 
                         
                          
                         
                           ( 
                           
                             σ 
                             
                               υ 
                               1 
                             
                           
                           ) 
                         
                       
                       
                         
                           P 
                           0 
                         
                          
                         
                           ( 
                           
                             σ 
                             
                               υ 
                               2 
                             
                           
                           ) 
                         
                       
                     
                      
                     
                       
                         
                           
                             π 
                             
                               
                                 λ 
                                 -&gt; 
                               
                               * 
                             
                           
                            
                           
                             ( 
                             
                               
                                 σ 
                                 
                                   υ 
                                   1 
                                 
                               
                                
                               
                                 σ 
                                 a 
                               
                             
                             ) 
                           
                         
                         
                           
                             π 
                             
                               
                                 λ 
                                 -&gt; 
                               
                               * 
                             
                           
                            
                           
                             ( 
                             
                               
                                 σ 
                                 
                                   υ 
                                   2 
                                 
                               
                                
                               
                                 σ 
                                 a 
                               
                             
                             ) 
                           
                         
                       
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   70 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Using the explicit description of π {right arrow over (λ)}     *    given by (51), we may equivalently write 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             
                               
                                 
                                   p 
                                   
                                     
                                       λ 
                                       -&gt; 
                                     
                                     * 
                                   
                                 
                                  
                                 
                                   ( 
                                   
                                     
                                       σ 
                                       
                                         υ 
                                         1 
                                       
                                     
                                      
                                     
                                       σ 
                                       a 
                                     
                                   
                                   ) 
                                 
                               
                               
                                 
                                   p 
                                   
                                     
                                       λ 
                                       -&gt; 
                                     
                                     * 
                                   
                                 
                                  
                                 
                                   ( 
                                   
                                     
                                       σ 
                                       
                                         υ 
                                         2 
                                       
                                     
                                      
                                     
                                       σ 
                                       a 
                                     
                                   
                                   ) 
                                 
                               
                             
                             = 
                             
                               
                                 
                                   
                                     P 
                                     0 
                                   
                                    
                                   
                                     ( 
                                     
                                       σ 
                                       
                                         υ 
                                         1 
                                       
                                     
                                     ) 
                                   
                                 
                                 
                                   
                                     P 
                                     0 
                                   
                                    
                                   
                                     ( 
                                     
                                       σ 
                                       
                                         υ 
                                         2 
                                       
                                     
                                     ) 
                                   
                                 
                               
                                
                               
                                 exp 
                                 ( 
                                 
                                   ed 
                                   ( 
                                   
                                     
                                       σ 
                                       a 
                                     
                                     , 
                                     
                                       
                                         σ 
                                         
                                           υ 
                                           2 
                                         
                                       
                                       ; 
                                       
                                         λ 
                                         -&gt; 
                                       
                                     
                                   
                                 
                               
                             
                           
                            
                           
                             * 
                             ) 
                           
                         
                         - 
                         
                           ed 
                           ( 
                           
                             
                               σ 
                               a 
                             
                             , 
                             
                               
                                 σ 
                                 
                                   υ 
                                   1 
                                 
                               
                               ; 
                               
                                 λ 
                                 -&gt; 
                               
                             
                           
                         
                       
                        
                       
                         * 
                         ) 
                       
                     
                     ) 
                   
                   . 
                 
               
               
                 
                   ( 
                   71 
                   ) 
                 
               
             
           
         
       
     
       2.8 Another Typing Model 
       [0209]    Let us once again go back to the basic model (58). With it, we are treating the typing model for a user (or set of users) as “noise” on top of the exact entry of the intended units of characters (“words”). To establish such a typing model, we have used maximum entropy modeling. The equation (35) can also serve as inspiration for another approach, and this is what we shall go through in this subsection. 
         [0210]    One possibility is to view the typed characters as outcomes of an appropriate stochastic process. For example, if the typed character coincides with that of the intended signature, then we may record that as “no error”; and if an error occurs, we may characterize this by recording what transform is required to adjust the intended keystroke to coincide with the typed one. For the error/no-error process, we may then use a Poisson-type process, and, in addition, use a separate distribution to characterize the possible outcomes when an error occurs; cf. [30]. This is similar to what we shall study here. 
         [0211]    Let us consider a fixed unit σ v  of intended character combinations (a “word”) with individual characters σ n   v : 
         [0000]      σ v =σ 1   v  . . . σ N−1   v ,  (72) 
         [0000]    where N=#σ v  is the length of σ v . (We note that we are using a left-to-right ordering, but the particular ordering is not important.) Each unit σ v  is input by the user, resulting in the signature σ a  with characters σ m   a : 
         [0000]      σ a =σ 1   a  . . . σ M−1   a ,  (73) 
         [0000]    where M=#σ a . It will be convenient to set 
         [0000]      σ n   v =b, n≦0  (74) 
         [0000]      σ n   v =e, n≧N,  (75) 
         [0000]    and, similarly, 
         [0000]      σ m   a =b, m≦0  (76) 
         [0000]      σ σ   m   a =e, m≧M,  (77) 
         [0000]        (78) 
         [0212]    to take care of the beginning and the end of these units. The typing model we shall study here uses a sequence of transforms T==T(σ v , σ a )={T k } to explain the typed entries σ a  given the intended ones σ v . Each transform acts on a set of characters in the intended signature and outputs some characters in the typed signature, and the transforms axe ordered sequentially, just as the input process, so we shall also write 
         [0000]        T= . . . T   −1   T   0   T   1  . . .  (79) 
         [0000]    as well as 
         [0000]      Tσ v =σ a .  (80) 
         [0213]    Each of the transforms T k  acts on a character σ n     k     v  and outputs either the empty character or a character in σ a . The idea is to choose the transforms so that the probability Prob(T) becomes an approximation of the typing model π(σ a |σ v ). 
         [0214]    Let us illustrate the procedure in terms of the family of five basic transforms (including the identity) used for the standard edit distance {id, in, de, su, tr}, cf. Subsection 2.3 as well as Example 2.3 in Subsection 2.6. We shall view each of the transforms T k  as being chosen independently from the family of transforms {id, in, de, su, tr} and assume that the particular transform is drawn from the family of transforms with a probability that only depends on the current position that the transform is acting upon, the position before the current position (for a first-order model), what particular transform that is picked, and what output symbol it must generate to match the typed signature. So, the action of each transform T k  can be completely characterized by the character curr=σ i     k     v  at the current position, the previous character prev=σ i     k     −1   v , the type type of the transform, and the output character out. So, we may in general describe T k  by the input-output relationship (prev, curr)→(type, out). We note that sometimes a different choice of relevant context (here the position before the current one) is more appropriate. For example, a user inserting an extra “s” onto nouns is probably quite common. In that case, a better context for the insertion transform may be the character after the current position so that the end of the unit will be recognized. 
       Example 2.4 
       [0215]    Suppose the intended signature is σ v =1234 and the typed signature is σ a =5512334. A reasonable guess as to what happened during the user&#39;s input process is given by the sequence of transforms T={in, in, id, id, id, in, id}. In more detail, we have the following sequence of transforms: 
         [0000]      (b,b)→(in,5) (b,b)→(in,5) (b,1)→(id,1) (1,2)→(id,2) 
         [0000]      (2,3)→(id,3) (2,3)→(in,3) (3,4)→(id,4).  (81) 
         [0000]    Similarly, let us assume the intended signature is σ v =12234 and the typed signature is σ a =1243. Then the typos may possibly be explained by the sequence T={id, id, de, id, tr}, or, more precisely, by the sequence 
         [0000]      (b,1)→(id,1) (1,2)→(id,2) (2,2)→(de,ε) 
         [0000]      (2,3)→(id,3) (3,4)→( tr ,(4,3)).  (82) 
         [0000]    (Obviously, there is redundancy in the notation here; for example, the transpose of (3, 4) is clearly known without specifying (4, 3).) 
         [0216]    Once we have the sequence of transforms in place or, equivalently, the input-output relationships, and if the transforms are picked independently with probabilities depending on the two input parameters, then the following is a reasonable approximation of a typing model: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           π 
                            
                           
                             ( 
                             
                               
                                 σ 
                                 v 
                               
                               | 
                               
                                 σ 
                                 a 
                               
                             
                             ) 
                           
                         
                         ≈ 
                           
                          
                         
                           
                             ∏ 
                             k 
                           
                            
                           
                             Prob 
                              
                             
                               ( 
                               
                                 T 
                                 k 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                           
                          
                         
                           
                             ∏ 
                             k 
                           
                            
                           
                             
                               Prob 
                                
                               
                                 ( 
                                 
                                   
                                     ( 
                                     
                                       
                                         prev 
                                         k 
                                       
                                       , 
                                       
                                         curr 
                                         k 
                                       
                                     
                                     ) 
                                   
                                   → 
                                   
                                     ( 
                                     
                                       
                                         type 
                                         k 
                                       
                                       , 
                                       
                                         out 
                                         k 
                                       
                                     
                                     ) 
                                   
                                 
                                 ) 
                               
                             
                             . 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   83 
                   ) 
                 
               
             
           
         
       
     
         [0000]    The transition probabilities Prob((prev k , curr k )→(type k , out k )) can be estimated from sample data (for a given user or a set of users). Since each of the labels (prev, curr) and (type, out) only take finitely many values, it is convenient to collect all these probabilities in a transition matrix with, say, a row corresponding to a specific input label (prev, curr) and each column to a specific output label (type, out). 
         [0217]    Let us make two comments related to the estimation of this transition matrix. In our example with the small set of basic transforms, there are not very many entries in the matrix, and still there may be entries that are very infrequently visited as the user types. This sparsity of data makes it harder to obtain reliable estimates for some of the entries. There are many techniques for other applications that have been developed to address this (cf. [34], [31], [41]). For example, sometimes we may omit the dependency on the prev label and collect all the samples corresponding to a certain curr, type, out in a larger bin, and then assume that the distribution over the prev label is uniform (so called “back-off” from a first order model to a 0:th one). More generally, we may define other equivalence classes of labels that we expect to behave similarly as far as typing error, and then distribute the frequency counts evenly over the equivalence class. 
         [0218]    The other comment relates to finding the appropriate transform sequences. Since the typing model is intended to explain the typical typing process, including common errors, the transform sequence should reflect these explanations. The assignment of the appropriate transforms to obtain the approximation of the transition matrix from samples at first seems to require a careful, case-by-case choice; however, it turns out that the transforms obtained from the calculation of the edit distance in most instances work quite well and few special cases need “hand-coding.” 
       2.9 Reducing Search Complexity 
       [0219]    The edit distance can be calculated very quickly even for general cost functions and larger sets of basic transforms. For instance, we do not need to calculate the entire cost matrix E(i,j) in the dynamic programming approach (26). In Subsection 2.4, we have mentioned that by making the assumption that a certain number of the initial characters are entered correctly, we obtain a significant reduction in complexity. In addition, there are several well-known techniques to reduce the complexity of the distance calculation. Suppose, for example, that we are only interested in edit distances smaller than a certain value. Then we may stop the calculation when we get too far off the diagonal in the cost matrix since we know that the cost will only increase after that. There are techniques for carrying out the distance calculations in parallel. We refer to [33] and [44] for recent references and related approaches (the trick to only consider elements in the cost matrix close to the diagonal goes back to [39], [57]). 
         [0220]    Our goal in this Subsection is to find techniques that allow us to expand the collection of possible typing errors that we may consider within a reasonable response time. The assumption that the first four characters are correctly entered is often much too restrictive. For example, in Table 3 we have collected the probability of up to the first four characters being typed correctly for signatures of length at least 5 that contain errors. This data relies on statistics from eight users as they typed about 6,800 words. 
         [0221]    There are at least two basic approaches to reduce the search complexity to quickly find the potential signatures we need to consider. The first approach is to improve how we predict the signature that the user probably had intended. The second approach is to find a better indexing structure for the dictionary. In [6], [7], and [16] the indexing is based on the metric structure of the edit distance. 
         [0222]    The exact typing model of a user depends on the system within which the typing occurs. 
         [0000]    
       
         
               
             
               
               
               
               
             
           
               
                 TABLE 3 
               
             
             
               
                   
               
               
                 The error probability for the initial characters 
               
               
                 among errors by three users for character combinations 
               
               
                 of length 5 and more. 
               
             
          
           
               
                 First i 
                   
                   
                   
               
               
                 characters correct 
                 User 1 prob. % 
                 User 2 prob. % 
                 User 3 prob. % 
               
               
                   
               
               
                 1 
                 95.2 
                 91.9 
                 98.6 
               
               
                 2 
                 85.7 
                 83.2 
                 89.9 
               
               
                 3 
                 78.6 
                 63.4 
                 77.0 
               
               
                 4 
                 61.9 
                 41.0 
                 60.4 
               
               
                   
               
             
          
         
       
     
         [0223]    In other words, the capabilities of the typing environment will impact the user&#39;s typing habits. As we mentioned earlier, it is probably particularly important for the user if longer words do not have to be retyped or edited. On the other hand, shorter words are typically more frequent, and it is easier to erase a few characters and to keep track of what has already been entered, etc. Hence, we may expect that an accurate typing model will distinguish between different lengths of signatures entered. 
         [0224]    To approximate this difference in the dependence of the user&#39;s experience and typing model on the length of the signatures entered, we shall separate signatures of length, say, four or less, from those longer than four. 
         [0225]    For character combinations that are four characters long or less, it is more feasible to obtain an approximation of the typing model directly from experimental data. For now, we shall simply incorporate a few specific transforms for these combinations. For example, from our experimental data it seems that transpositions at the end of combinations are particularly common. For these shorter combinations, it is also easier to establish a look-up table for combinations that are particularly prone to certain errors and then list the appropriate corrections for these. 
         [0226]    Here we shall now focus on character combinations that are at least five characters long. There are several considerations to keep in mind: response time, storage, typing order, user characteristics, etc. In order to reduce search time, we may use different prediction techniques, taking into account the particular data structure of the stored information. These predications may use a number of features. For example, the approximate length of a character combination seems to be quite stable under the entry process. With a storage premium, we may also add word endings and other shorter combinations. 
         [0227]    The following will illustrate some of the issues involved. If we assume that the four initial characters are correct, then we have significantly narrowed down the number of potential signatures we have to consider. However, as we have seen in Table 3, this assumption is quite restrictive and removes a significant portion of the intended signatures. We can improve the situation by relaxing the assumption and only assume that the first three characters are correct. To avoid increasing the search space too much, we can then use these three to predict a fourth character and let these predicted four-character combinations form the basis for our search of potential, additional alternatives to present to the user. (These are in addition to the alternatives obtained using the default assumption that all four are correct.) 
         [0228]    One such prediction method is to use the maximum likelihood prediction for the fourth entry based on the probability of all legal combinations of length four with the given, initial three characters. These predictions can be established off line and stored in a small table for quick retrieval. 
         [0229]    We may also add different models for the typing to improve the prediction accuracy. For example, as we mentioned in Subsection 2.6 (see Example 2.3) it is easy to type too few of the character 8 on the ORK, and hence it makes sense to incorporate these types of facts when predicting likely errors and intended entries. 
         [0230]    To illustrate this, let us consider the ORK as the entry device and let us further make the assumption that only the first two out of the initial four characters are correct, and that we want to use all four characters for our initial search of likely alternatives (as before). Hence, this leaves us with having to predict the two remaining characters. So, there are potentially one hundred possibilities for each one of the ten thousand possible initial σ a :s with four characters (since we are assuming that the first two characters are correct). So, if we decide to use a maximum likelihood approach, we are interested in ordering the probabilities Prob(σ v |σ a ) for each one of the σ a :s. The σ v :s we are considering here correspond to legal combinations of length four that are part of the character combinations of length at least five. Instead of experimentally estimating these, we go back to the basic Bayesian model (58) in Subsection 2.7. For the ordering, we may then use equation (68). The factor P(σ v ) can be estimated from sample data (like a large corpus or dynamically). This means that as soon as we have a typing model π(σ v |σ a ), then we have the basis for selecting the most likely four combinations al s for each fixed σ a . 
         [0231]    In the next example, we shall compare the performance of the two approaches outlined above. The first uses the assumption that the first three characters entered are correct and then predicts three possible choices for the fourth character based on the frequency of occurrence derived from a standard corpus. The second uses the typing model described in Subsection 2.8. For this approach, we shall only assume that the first two characters are correct. 
       Example 2.5 
       [0232]    In this example, we shall compare the two prediction methods described above. For the first prediction method, we assume that the first three characters entered are correct. As a consequence, the highest percentages we can reach are 78.6%, 63.4%, and 77.0% for the three users, cf. Table 3. 
         [0000]                                      TABLE 4                   The probability of having the first four characters       among the top 2 and 3 alternatives, respectively,       for the prediction method without typing model. (Using       character combinations of length 5 and more.)            Among i top                   alternatives   User 1 prob. %   User 2 prob. %   User 3 prob. %               2   71.4   52.8   68.3       3   78.6   59.0   74.1                    
For the second prediction method, we only assume that the first two characters entered are correct. Hence, the highest percentages we can reach now are 87.7%, 81.3%, and 80.5% for the three users, cf. Table 3.
 
         [0000]                                      TABLE 5                   The probability of having the first four characters       among the top 2 and 3 alternatives, respectively, for       the prediction method with typing model. (Using character       combinations of length 5 and more.)            Among i top                   alternatives   User 1 prob. %   User 2 prob. %   User 3 prob. %               2   76.3   64.0   73.9       3   79.1   68.3   76.2                    
Let us also record the percentage of the error signatures whose first four or five characters are among the top 3 alternatives when we only assume that the first character is correct.
 
         [0000]    
       
         
               
             
               
               
               
             
           
               
                 TABLE 6 
               
             
             
               
                   
               
               
                 The probability of having the first four or five 
               
               
                 characters among the top 3 alternatives, respectively, for 
               
               
                 the prediction method with typing model under the assumption 
               
               
                 the first character is correct. (Using character 
               
               
                 combinations of length 5 and more.) 
               
             
          
           
               
                   
                 First j characters of top 3 alternatives 
                 Overall % of all errors 
               
               
                   
                   
               
               
                   
                 4 
                 67.6 
               
               
                   
                 5 
                 71.5 
               
               
                   
                   
               
             
          
         
       
     
         [0233]    3 NLP-Based Considerations 
       3.1 The Substitution Test 
       [0234]    To explain the basic underlying idea in this section, let us start by considering some groups of words with the same signature, see Table 7. With the objective of reducing the collisions, we observe that the words in each of the groups are often of very different in nature, some are nouns, some are verbs and adjectives, etc. This means that although they have the same signature, they often play different roles in building a sentence. 
         [0000]    
       
         
               
             
               
               
               
             
               
               
               
             
           
               
                 TABLE 7 
               
             
             
               
                   
               
               
                 Groups of words with the same signature and 
               
               
                 corresponding frequencies 
               
             
          
           
               
                 # 
                 Words 
                 Frequencies 
               
               
                   
               
             
          
           
               
                 1 
                 to 
                 2332410 
               
               
                   
                 go 
                 59270 
               
               
                 2 
                 sixth 
                 2128 
               
               
                   
                 sixty 
                 1304 
               
               
                 3 
                 slang 
                 174 
               
               
                   
                 slant 
                 124 
               
               
                 4 
                 safe 
                 6541 
               
               
                   
                 save 
                 6209 
               
               
                   
                 wave 
                 3407 
               
               
                   
                 ward 
                 3323 
               
               
                   
                 ware 
                 225 
               
               
                 5 
                 basis 
                 13464 
               
               
                   
                 tasks 
                 3598 
               
               
                   
                 taxis 
                 284 
               
               
                   
                 basks 
                 16 
               
               
                   
                 gawks 
                 0 
               
               
                 6 
                 show 
                 24459 
               
               
                   
                 snow 
                 3263 
               
               
                 7 
                 signs 
                 4724 
               
               
                   
                 sighs 
                 203 
               
               
                 8 
                 sorry 
                 6968 
               
               
                   
                 worry 
                 4516 
               
               
                 9 
                 sold 
                 7820 
               
               
                   
                 wood 
                 6792 
               
               
                   
                 sole 
                 2358 
               
               
                   
                 wold 
                 83 
               
               
                   
                 sloe 
                 7 
               
               
                 10 
                 now 
                 108301 
               
               
                   
                 how 
                 81957 
               
               
                   
                 nos 
                 185 
               
               
                   
                 yow 
                 77 
               
               
                   
                 hos 
                 0 
               
               
                   
               
             
          
         
       
     
         [0235]    To further elaborate on this, let us consider a couple of sample sentences (in this case from  Alice In Wonderland ).
       1. ‘I&#39;m very sorry you&#39;ve been annoyed,’ said Alice, who was beginning to see its meaning.   2. How puzzling all these changes are!   3. Mind now!   4. So she set the little creature down, and felt quite relieved to see it trot away quietly into the wood.       
 
         [0240]    If we substitute the word “sorry” with “worry”, the other word in the same collision group, then sentence 1 no longer makes sense. It is certainly grammatically incorrect. Similarly, in sentence 2, none of the other words in the same collision group work as a substitute for “now”; grammatically, the resulting sentence would be incorrect. Sentence 3 is a little more challenging: “how” can be substituted for “now” and we still have a meaningful sentence. Perhaps it is a little more unusual, but it is grammatically correct. In sentence 4, the word “wood” can be replaced by the noun “sole”, but not when this word is used as an adjective. Hence, in that case, we need to refine the frequency information about this particular word to incorporate the counts when the word is used a noun and when it is used as an adjective. So, after such a such a refinement, we have been able to reduce the number of colliding words of any real consequence to two (“wood” and “sole”), and we have also been able to adjust the probabilities to more accurately reflect the situation. 
         [0241]    One way to consider the input of characters and the feedback is as a communication process between the user and the device. The device is attempting to extract the intended words and sentences. As the substitution test indicates, the meaning of the words and the sentence is an important component for the understanding of spoken, as well as written, language between two users, and it seems to be a potentially powerful mechanism to help determine the best choices of words with the same signature. 
         [0242]    To find the exact meaning of a word and a sentence is difficult, since it is hard to even quantify the problem and the terms involved. The meaning of a word is, for example, highly context sensitive. In general, the problem of automatically extracting the meaning from words and sentences is related to a number of interesting and very active research areas in Natural Language Processing (NLP), cf. [46], [4], [41], [32], [20]. 
         [0243]    However, it is possible to carry out a substitution test, similar to the one above, in any sentence by inserting each of the words corresponding to a given signature and decide which ones can be discarded on grammatical and syntactical grounds. In this section, we discuss how such a substitution test can be automated and how it can be used to improve the user&#39;s experience using the One-Row Keyboard and similar reduced keyboards. 
       3.2 Some Statistics 
       [0244]    Let us start by looking at some statistics related to the effectiveness of the input process, without the support of syntactical information or any other way of utilizing the meaning of the sentence being created. In Table 8 below, we have collected some statistics from the following texts: 
       Book 1  Alice in Wonderland  (by Lewis Carroll) 
     Book 2  Memoirs of Aaron Burr  (by Matthew L. Davis) 
     Book 3  Crime and Punishment  (by Fyodor Dostojevsky) 
       [0245]    Book 4  Edison, his life and inventions  (by Frank Lewis Dyer) 
       Book 5  Complete Poems of Emily Dickinson    
     Book 6  The Forgotten King  (by Jonathan Dunn) 
       [0246]    Articles Sampling of articles from recent editions of  Time  
 
In particular, we notice that the signature is ambiguous for about 30% of the words, but that about 90% of those are in fact displayed correctly. This results in approximately 96-98% of all words being displayed correctly “the first time” on the display. (We have assumed that word initially displayed is simply the most probable word for a given signature, i.e., we have used the path-frequency ordering.)
 
         [0247]    So there are approximately 3% of words that are incorrectly displayed the first time they are displayed. Although this number seems to be quite low, it is helpful to keep in mind that the average number of words in a sentence is quite large. For example, in  The Wall Street Journal  corpus (cf. [51], [1], [42]), the average sentence length is approximately 23 words. Hence, if we were typing  The Wall Street Journal  with the One-Row Keyboard, we would 
         [0000]                                                                                        TABLE 8                   Collision statistics for sample texts.            Item   Book 1   Book 2   Book 3   Book 4   Book 5   Book 6   Articles                    # words   26686   283057   207084   261462   94299   155997   17837       # collisions   7557   90685   66809   89011   28796   36268   3013       % collisions   28.3   32.0   32.3   34.0   30.5   23.2   16.9       % correct display   96.86   97.54   97.33   97.83   96.04   97.81   97.95                    
expect to have to change one word on the screen at least once in about 70% of the sentences (since 23×0.03≈0.7).
 
         [0248]    Let us then investigate a little further where the problems are originating. The ten most frequent collision groups account for about 60% of the collisions, and the 50 most frequent ones represent about 90%, cf. Table 9. 
         [0000]    
       
         
               
             
               
               
               
               
               
               
               
               
             
               
               
               
               
               
               
               
               
             
           
               
                 TABLE 9 
               
             
             
               
                   
               
               
                 The percentage of the collisions in the most 
               
               
                 frequently occuring collision groups. 
               
               
                 % of Collisions 
               
             
          
           
               
                 # most 
                   
                   
                   
                   
                   
                   
                   
               
               
                 frequent 
                 Book 
               
               
                 groups 
                 1 
                 Book 2 
                 Book 3 
                 Book 4 
                 Book 5 
                 Book 6 
                 Articles 
               
               
                   
               
             
          
           
               
                 10 
                 65.1 
                 52.6 
                 58.6 
                 66.1 
                 54.7 
                 52.7 
                 63.5 
               
               
                 25 
                 83.7 
                 74.7 
                 77.0 
                 78.7 
                 70.4 
                 72.3 
                 83.2 
               
               
                 50 
                 94.5 
                 86.3 
                 88.6 
                 86.2 
                 80.6 
                 84.2 
                 93.7 
               
               
                 100 
                 99.8 
                 94.2 
                 95.5 
                 92.5 
                 89.0 
                 93.1 
                 100 
               
               
                   
               
             
          
         
       
     
         [0249]    As we noted, in most cases the right word is initially displayed on the screen. Hence, to measure the problematic collisions it is interesting to look at what signatures are the ones causing most of the incorrectly displayed words. Rather than doing that exactly, we have collected in Table 10 how much of the approximately 3% of the incorrectly displayed words we could avoid if we were able to correctly handle the two most frequent words in certain specific collision groups. These specific groups are selected based on the frequency of the first alternative. Assuming that we correctly resolve the two words in ten of the collision groups, we reduce the 3% to approximately 1.4%. And if we take care of 25 groups and the corresponding two words of the highest frequency in each of those, then as a result approximately 0.7% of the words axe being incorrectly displayed. Assuming that the average sentence is about 23 words long, we would then expect to find only one incorrectly displayed word in one out of six or seven sentences (23×0.007=0.161). 
         [0000]    
       
         
               
             
               
               
               
               
               
               
               
               
             
               
               
               
               
               
               
               
               
             
           
               
                 TABLE 10 
               
             
             
               
                   
               
               
                 The effect of resolving the two 
               
               
                 most frequent words in specific sets of collision 
               
               
                 groups. 
               
               
                 % Correctly Displayed 
               
             
          
           
               
                 # groups 
                 Book 
                 Book 
                   
                   
                   
                   
                   
               
               
                 fixed 
                 1 
                 2 
                 Book 3 
                 Book 4 
                 Book 5 
                 Book 6 
                 Articles 
               
               
                   
               
             
          
           
               
                 10 
                 98.78 
                 98.95 
                 98.87 
                 98.83 
                 97.81 
                 98.84 
                 99.01 
               
               
                 25 
                 99.35 
                 99.30 
                 99.33 
                 99.14 
                 98.39 
                 99.18 
                 99.36 
               
               
                 50 
                 99.67 
                 99.5 
                 99.55 
                 99.38 
                 98.76 
                 99.45 
                 99.63 
               
               
                 100 
                 99.91 
                 99.67 
                 99.72 
                 99.56 
                 99.12 
                 99.67 
                 99.89 
               
               
                   
               
             
          
         
       
     
         [0250]    On the other hand, if we could resolve all the words in some specific collision groups, not just the two most frequent, then the effect would be slightly different. In that case, we should select the collision groups based on the total frequency of all the alternatives (thus not counting the frequency of the displayed words). This is what we have in Table 11, assuming that we display all the words in the specific collision groups exactly when they should be. 
         [0251]    As we see, when we completely resolve ten collision groups, the collision probability goes down to approximately 1.2%. If we handle 50 groups perfectly, then only about 0.5% of the words would be incorrectly displayed. This means that on average only one word would be incorrect in a little more than nine sentences. 
         [0252]    The words that make up these groups are quite consistent across the different sample texts. For example, in Table 12 are some of the details about the ten groups used in Table 11 for Book 1, Book 2, and Articles. 
         [0000]    
       
         
               
             
               
               
               
               
               
               
               
               
             
               
               
               
               
               
               
               
               
             
           
               
                 TABLE 11 
               
             
             
               
                   
               
               
                 The effect of resolving the entire group for a 
               
               
                 specific number of collision groups. 
               
               
                 % Correctly Displayed 
               
             
          
           
               
                 # groups 
                 Book 
                 Book 
                   
                   
                   
                   
                   
               
               
                 fixed 
                 1 
                 2 
                 Book 3 
                 Book 4 
                 Book 5 
                 Book 6 
                 Articles 
               
               
                   
               
             
          
           
               
                 10 
                 98.82 
                 98.99 
                 98.87 
                 98.89 
                 97.84 
                 98.84 
                 99.07 
               
               
                 25 
                 99.40 
                 99.36 
                 99.39 
                 99.25 
                 98.53 
                 99.21 
                 99.44 
               
               
                 50 
                 99.73 
                 99.58 
                 99.63 
                 99.51 
                 98.96 
                 99.51 
                 99.74 
               
               
                 100 
                 99.97 
                 99.77 
                 99.81 
                 99.72 
                 99.36 
                 99.74 
                 100 
               
               
                   
               
             
          
         
       
     
         [0000]    
       
         
               
             
               
               
               
             
               
               
               
               
               
               
               
               
               
             
               
               
               
               
               
               
               
               
               
             
           
               
                 TABLE 12 
               
             
             
               
                   
               
               
                 The percent of the collisions in the most 
               
               
                 frequently occuring collisions groups for sample texts. 
               
             
          
           
               
                 Book 1 
                 Book 2 
                 Articles 
               
             
          
           
               
                   
                   
                 % of 
                   
                   
                 % of 
                   
                   
                 % of 
               
               
                 # 
                 Word 
                 Collisions 
                 # 
                 Word 
                 Collisions 
                 # 
                 Word 
                 Collisions 
               
               
                   
               
             
          
           
               
                 1 
                 they 
                 1.733 
                 1 
                 of 
                 12.478 
                 1 
                 of 
                 15.267 
               
               
                   
                 then 
                 1.244 
                   
                 or 
                 1.595 
                   
                 or 
                 2.124 
               
               
                 2 
                 of 
                 6.802 
                 2 
                 by 
                 1.967 
                 2 
                 they 
                 3.485 
               
               
                   
                 or 
                 1.019 
                   
                 th 
                 0.815 
                   
                 then 
                 0.797 
               
               
                 3 
                 how 
                 0.900 
                 3 
                 can 
                 0.475 
                 3 
                 say 
                 0.664 
               
               
                   
                 now 
                 0.794 
                   
                 day 
                 0.471 
                   
                 way 
                 0.597 
               
               
                 4 
                 way 
                 0.741 
                 4 
                 they 
                 0.850 
                   
                 san 
                 0.199 
               
               
                   
                 say 
                 0.675 
                   
                 then 
                 0.346 
                 4 
                 how 
                 1.162 
               
               
                 5 
                 to 
                 9.647 
                 5 
                 now 
                 0.455 
                   
                 now 
                 0.730 
               
               
                   
                 go 
                 0.662 
                   
                 how 
                 0.288 
                 5 
                 have 
                 3.186 
               
               
                 6 
                 on 
                 2.554 
                 6 
                 may 
                 0.810 
                   
                 hard 
                 0.498 
               
               
                   
                 oh 
                 0.595 
                   
                 man 
                 0.214 
                   
                 yard 
                 0.033 
               
               
                 7 
                 just 
                 0.688 
                   
                 jay 
                 0.033 
                 6 
                 to 
                 17.624 
               
               
                   
                 must 
                 0.582 
                 7 
                 year 
                 0.160 
                   
                 go 
                 0.465 
               
               
                 8 
                 have 
                 1.059 
                   
                 hear 
                 0.120 
                 7 
                 can 
                 1.228 
               
               
                   
                 hare 
                 0.410 
                   
                 near 
                 0.087 
                   
                 day 
                 0.365 
               
               
                   
                 hard 
                 0.106 
                 8 
                 c 
                 0.223 
                 8 
                 good 
                 0.398 
               
               
                   
                 yard 
                 0.013 
                   
                 d 
                 0.190 
                   
                 told 
                 0.199 
               
               
                 9 
                 round 
                 0.543 
                   
                 e 
                 0.009 
                   
                 gold 
                 0.066 
               
               
                   
                 found 
                 0.423 
                 9 
                 to 
                 10.761 
                   
                 bold 
                 0.066 
               
               
                 10 
                 can 
                 0.463 
                   
                 go 
                 0.195 
                 9 
                 just 
                 1.128 
               
               
                   
                 day 
                 0.384 
                 10 
                 say 
                 0.193 
                   
                 must 
                 0.266 
               
               
                   
                   
                   
                   
                 way 
                 0.179 
                 10 
                 may 
                 0.697 
               
               
                   
                   
                   
                   
                 wan 
                 0.001 
                   
                 man 
                 0.199 
               
               
                   
                   
                   
                   
                   
                   
                   
                 jan 
                 0.033 
               
               
                   
                   
                   
                   
                   
                   
                   
                 jay 
                 0.033 
               
               
                   
               
             
          
         
       
     
       3.3 Modeling the User—Device Interaction 
       [0253]    The type of considerations involved in automating a substitution test fall in the area of NLP techniques, and for us a good starting point is to consider parsing methods. These methods automate and extend the diagramming of sentences learned in high school. By using grammar rules and Part-Of-Speech (POS) tags, like those in Table 13, they create trees, or more generally graphs, that allow us to understand the construction of sentences and to assess whether these are grammatically correct. Two of the basic, now standard parsing techniques are the so-called Earley parser and the CYK parser, cf. [4], [41], [37], [43]. There are many other parsers, including probabilistic parsers, cf. [28], [54], [35], [15], [14]. 
         [0000]    
       
         
               
             
               
               
               
             
           
               
                 TABLE 13 
               
             
             
               
                   
               
               
                 A standard POS tag set 
               
             
          
           
               
                 Tag 
                 Explanation 
                 Examples 
               
               
                   
               
               
                 at0 
                 article 
                 the, a, an, no, every 
               
               
                 nn0 
                 noun 
                 time, way, people, man, head, day, house, aircraft, data, committee 
               
               
                 vb0 
                 verb 
                 is, have, be, are, do, can, would, forget, send, live, return 
               
               
                 vbd 
                 past-tense-verb 
                 was, had, said, were, did, been, got, forgot, sent, lived, returned 
               
               
                 aj0 
                 adjective 
                 other, good, new, different, old, little, nice, better, best 
               
               
                 rb0 
                 adverb 
                 so, then, up, out, well, how, now, when, why 
               
               
                 pp0 
                 object pronoun 
                 you, I, it, he, she, they, that, them 
               
               
                 pp$ 
                 possessive pronoun 
                 his, her, their, your, my, its, our, ours, theirs 
               
               
                 cd0 
                 cardinal 
                 one, two, three, five, four, six, hundred 
               
               
                 ord 
                 ordinal 
                 first, last, next, second, third, fourth, twentieth 
               
               
                 cj0 
                 conjunction 
                 and, but, that, or, if, as, when 
               
               
                 inj 
                 interjection 
                 oh, yeah, no, yes, ah, ooh, hello 
               
               
                 not 
                 negative particle 
                 not 
               
               
                 prp 
                 preposition 
                 of, in, to, for, with, on, at 
               
               
                 to0 
                 infinitive marker 
                 to 
               
               
                   
               
             
          
         
       
     
         [0254]    Slightly lower down in the hierarchy of NLP methods are the so-called partial parsers and chunking algorithms, cf. [3], [2], [56]. Parsers like the one above aim at recovering complete, exact parses of the sentences. Partial parsing, on the other hand, only tries to recover syntactic information and may, for instance, just focus on noun phrases. Since general text is noisy and since it is hard to guarantee grammatical rules that cover all the constructions used in a text, partial parsing sacrifices completeness in favor of robustness. 
         [0255]    The POS taggers restrict the ambition even further: they intend to simply put the right POS tags on the words in a sentence. So, rather than attempting to solve the very ambitious problem of language understanding and the like, taggers are simply designed to disambiguate between the different roles a given word plays in a sentence. As it turns out, this can be done with impressive accuracy. A state-of-the-art tagger achieves about 97% accuracy in this POS-tagging process. See [12], [11], [13], [45], [9], [5], [17], [52], [49], [50], [24], [25]. 
         [0256]    The complexity of these three different types of NLP techniques reflects the ambitions of each: that of a standard (full) parser is proportional to n 3 , where n is the number of words in the sentence, and a POS tagger is linear in n. This indicates that parsers are probably better suited for offline, batch-type processing, while POS taggers are good candidates for streaming-type processing. Typically, the parsers generate a large set of possible parse trees, and even if a probabilistic parser is used and the probabilities are used to differentiate between these trees, this adds to complexity and memory requirements. 
         [0257]    To start modeling the user-device interaction, it is instructive to consider the following (see (84) below) from [55].
       The goal of POS tagging is to assign to each word in a sentence the most appropriate so called morphosyntactic category. This presumes first of all a predefined tag set which can contain from 10 up to 1000 different tags. These could for example be “VERB”, “NOUN”, ADJECTIVE”, etc., or they can be more detailed, like “AUXILIARY VERB”, “TRANSITIVE VERB”, “VERB IN PRESENT TENSE, THIRD PERSON SINGULAR” . . . . A tag set must form a partition, in the sense that a certain word in a certain sense can only be assigned exactly one tag . . . . A notorious (English) example of a sentence where the POS tags disambiguate the meaning is the following:       
 
         [0000]      “Time flies like an arrow but fruit flies like a banana”,  (84) 
         [0000]    which has the POS tag assignment: NOUN VERB PREP ART NOUN CONJ ADJ NOUN VERB ART NOUN 
         [0259]    The tagging of (84) then demonstrates how we may think of the word together with the tag as a simplified model for carrying the intended meaning of a word. In a written text, the reader has to decode the meaning through the context since the tag is “lost.” With speech, the model is different: the meaning of a word is carried through intonation, pauses, and other effects, and the word itself may not be communicated with absolute certainty. 
         [0260]    Let us start by modeling the interaction between the user and the device as a basic communication system with an information source (the user) and an information sink (the device) connected via a communication channel of some-kind, see  FIG. 3 . We further assume that the input is divided up into segments s (typically sentences) that are identified through some means (usually through a period) and that these segments in turn are formed by concatenating basic input units w (typically words). A sentence s with N words is then represented by 
         [0000]      s=w 0 w 1  . . . w N .  (85) 
         [0261]    Now it seems to make sense to distinguish two types of processing: batch and on-the-fly. 
         [0262]    In the batch-type, offline processing mode, there is only limited feedback as the units are entered; the user may at least to some extent just enter the input without completely fixing it as he goes. Hence, we may assume that some of the input is correct while other parts may not be quite right. In  FIG. 3 , this means that the feedback path may not be used very heavily. It also means that the device decoder can operate on the entire sentence or even the entire message in trying to resolve ambiguities and the meaning of the transmitted information. 
         [0263]    For the on-the-fly, real-time processing, we assume that the user corrects each of the words and his input as he goes, before he continues to the next word. So, the feedback loop in  FIG. 3  is more heavily used. For the device decoder, this means that it has access to the signature of an entered word (or other unit) as well as the previous words. The channel thus drops not just the meaning of the words that the user intended but also the dual signature of the current word. 
         [0264]    Let us introduce some notation to make this more explicit and easier to refer to. Let us assume that we are given a sentence s. Then a word w in this sentence carries a certain meaning μ. We also write 
         [0000]      μ=(κ,λ)  (86) 
         [0000]    where κ is the tag of the word (as a member of s) and λ is whatever remains of μ. Exactly how to characterize λ or how to get to it will not be of any great concern to us. Note, however, that μ=μ(s). As before, we let σ and τ be the signature and dual signature, respectively, of w. 
         [0265]    So, to model the communication processes as communication systems, we have the following. For regular written text, the user intends to communicate {w, μ} and the channel only transmits w. The meaning s must be deduced from the context. 
         [0266]    The POS automatic taggers start from a sentence s: 
         [0000]      s=w 0  . . . w N .  (87) 
         [0000]    The goal of the tagger is to find κ i  for each word w i  and obtain {w i , κ i , }. As we mentioned before, a state-of-the-art tagger achieves 96-97% accuracy. In this sense, the sequence of words contains most of the information in the tags and the sequence {w i , κ i , }. 
         [0267]    In the case of a reduced keyboard, the user still wants to transmit {w, μ}={(σ, τ), (κ,λ)}, but the channel drops τ, κ, and λ, and only the signature σ makes it through. In the case of the on-the-fly processing, which is the most interesting case for us, the user is assumed to use the feedback loop to make sure that the device decoder has access to all the words prior to the current one. Hence, the decoder can access 
         [0000]      . . . w i−2 w i−1 σ i .  (88) 
         [0000]    The challenge is for the decoder to provide τ i  or, equivalently, w i . A possibility we shall consider here is to use a POS tagger (or really any NLP tool) to obtain 
         [0000]      . . . {w i−2 , (κ i−2 ,)}; {w i−1 ,(κ i−1 ,)}, {(σ i ,0), (κ i ,)},   (89) 
         [0000]    or the full 
         [0000]      . . . {w i−2 , (κ i−2 ,)}; {w i−1 ,(κ i−1 ,)}, {(σ i ,τ i ), (κ i ,)},   (90) 
         [0268]    There are essentially two observations motivating this approach for finding the missing dual signatures (also called the disambiguation problem for a reduced keyboard). 
         [0269]    To explain our first motivation, let us pick the One-Row Keyboard as a specific example and consider some examples of collision groups and the POS tags for the words inside the groups. We shall use a standard tag set (see Appendix A.1) and pick some collision groups that seem at least somewhat important, see Table 14. Now, it is interesting to note that for most groups, the tags for the different words within the group overlap very little. More specifically, the frequencies in the table indicate that if we are given a tag and the signature, then with a good probability we can pinpoint the word (and the dual signature). 
         [0000]    
       
         
               
             
               
               
               
               
             
               
               
               
               
             
           
               
                 TABLE 14 
               
             
             
               
                   
               
               
                 Groups of words with the same 
               
               
                 signature and corresponding frequencies 
               
             
          
           
               
                 # 
                 Words 
                 Tag 
                 Frequencies 
               
               
                   
               
             
          
           
               
                 1 
                 to 
                 total 
                 2560346 
               
               
                   
                   
                 to0 
                 1620850 
               
               
                   
                   
                 prp 
                 917579 
               
               
                   
                   
                 avp-prp 
                 15488 
               
               
                   
                   
                 avp 
                 6245 
               
               
                   
                   
                 unc 
                 182 
               
               
                   
                   
                 av0 
                 1 
               
               
                   
                 go 
                 total 
                 90542 
               
               
                   
                   
                 vvi 
                 59772 
               
               
                   
                   
                 vvb 
                 28605 
               
               
                   
                   
                 nn1 
                 1462 
               
               
                   
                   
                 nn1-vvb 
                 381 
               
               
                   
                   
                 unc 
                 320 
               
               
                   
                   
                 np0 
                 2 
               
               
                 2 
                 they 
                 total 
                 433475 
               
               
                   
                   
                 pnp 
                 433441 
               
               
                   
                   
                 unc 
                 34 
               
               
                   
                   
                 ad0-av0 
                 1 
               
               
                   
                   
                 aj0 
                 1 
               
               
                   
                   
                 cjc 
                 1 
               
               
                   
                 then 
                 total 
                 160826 
               
               
                   
                   
                 av0 
                 160652 
               
               
                   
                   
                 cjs 
                 171 
               
               
                 3 
                 now 
                 total 
                 137814 
               
               
                   
                   
                 av0 
                 137801 
               
               
                   
                   
                 cjs 
                 11 
               
               
                   
                   
                 nn1 
                 1 
               
               
                   
                   
                 unc 
                 1 
               
               
                   
                 how 
                 total 
                 101517 
               
               
                   
                   
                 avq 
                 101508 
               
               
                   
                   
                 unc 
                 4 
               
               
                   
                   
                 nn1 
                 3 
               
               
                   
                   
                 av0 
                 1 
               
               
                   
                   
                 np0 
                 1 
               
               
                 4 
                 can 
                 total 
                 236321 
               
               
                   
                   
                 vm0 
                 234386 
               
               
                   
                   
                 nn1 
                 1019 
               
               
                   
                   
                 vvb 
                 734 
               
               
                   
                   
                 nn1-vvb 
                 153 
               
               
                   
                   
                 unc 
                 13 
               
               
                   
                   
                 vvi 
                 9 
               
               
                   
                   
                 aj0-nn1 
                 3 
               
               
                   
                   
                 aj0 
                 2 
               
               
                   
                   
                 np0 
                 2 
               
               
                   
                 day 
                 total 
                 62256 
               
               
                   
                   
                 nn1 
                 58863 
               
               
                   
                   
                 np0 
                 1812 
               
               
                   
                   
                 nn1-np0 
                 1576 
               
               
                   
                   
                 unc 
                 5 
               
               
                   
                   
                 unc 
                 5 
               
               
                 5 
                 went 
                 total 
                 48338 
               
               
                   
                   
                 vvd 
                 48028 
               
               
                   
                   
                 vvn 
                 310 
               
               
                   
                 sent 
                 total 
                 13715 
               
               
                   
                   
                 vvn 
                 6915 
               
               
                   
                   
                 vvd-vvn 
                 3594 
               
               
                   
                   
                 vvd 
                 3155 
               
               
                   
                   
                 aj0-vvd 
                 21 
               
               
                   
                   
                 aj0-vvn 
                 21 
               
               
                   
                   
                 aj0 
                 8 
               
               
                   
                   
                 unc 
                 1 
               
               
                 6 
                 of 
                 total 
                 2941790 
               
               
                   
                   
                 prf 
                 2941444 
               
               
                   
                   
                 prp 
                 276 
               
               
                   
                   
                 unc 
                 28 
               
               
                   
                   
                 av0 
                 27 
               
               
                   
                   
                 cjc 
                 11 
               
               
                   
                   
                 cjs 
                 3 
               
               
                   
                   
                 vhi 
                 1 
               
               
                   
                 or 
                 total 
                 370855 
               
               
                   
                   
                 cjc 
                 370808 
               
               
                   
                   
                 unc 
                 47 
               
               
                 7 
                 give 
                 total 
                 45117 
               
               
                   
                   
                 vvi 
                 32016 
               
               
                   
                   
                 vvb 
                 12997 
               
               
                   
                   
                 nn1-vvb 
                 75 
               
               
                   
                   
                 nn1 
                 23 
               
               
                   
                   
                 unc 
                 3 
               
               
                   
                   
                 np0 
                 3 
               
               
                   
                 bird 
                 total 
                 3955 
               
               
                   
                   
                 nn1 
                 3443 
               
               
                   
                   
                 np0 
                 356 
               
               
                   
                   
                 nn1-np0 
                 156 
               
               
                 8 
                 have 
                 total 
                 473693 
               
               
                   
                   
                 vhb 
                 268490 
               
               
                   
                   
                 vhi 
                 205195 
               
               
                   
                   
                 unc 
                 6 
               
               
                   
                   
                 vvb 
                 1 
               
               
                   
                   
                 vvi 
                 1 
               
               
                   
                 hard 
                 total 
                 22935 
               
               
                   
                   
                 aj0 
                 9890 
               
               
                   
                   
                 av0 
                 6652 
               
               
                   
                   
                 aj0-av0 
                 6383 
               
               
                   
                   
                 unc 
                 4 
               
               
                   
                   
                 aj0-nn1 
                 3 
               
               
                   
                   
                 np0 
                 3 
               
               
                   
                 yard 
                 total 
                 3267 
               
               
                   
                   
                 nn1 
                 2600 
               
               
                   
                   
                 np0 
                 477 
               
               
                   
                   
                 nn1-np0 
                 190 
               
               
                   
               
             
          
         
       
     
         [0270]    To study this somewhat more systematically, we shall pick the top ten collision groups when we have ordered the different groups based on the total frequencies of all the words in the group take away the highest frequency (the exact ordering method here is not very important for us). This is what we have collected in Appendix B.1, Table 18. Ignoring the “total” rows, we observe that if the other conditional probabilities were either 1 or 0, then it would show that the POS tag would perfectly pinpoint the word or, equivalently, the dual signature. Hence, our first observation is that the dual signature and the POS tags are almost interchangeable: if we have the full words, then with great accuracy we can find the POS tags, and, conversely, if we know the POS tags, then we can find the dual signatures with a good probability, see Subsection B.2. 
         [0271]    If dual signatures and POS tags are almost interchangeable, then one may wonder why it is helpful to look for the POS tags in order to improve the prediction of the dual signatures. Our second observation concerns the reasoning behind that. 
         [0272]    Suppose, for instance, that we tried to predict the current word in a text of some kind based on the history of previous words in the same sentence, and, to be specific, suppose we tried to use the two preceding words. To understand the dependencies between the three words, we may then consider all the possible word combinations based on three words in our dictionary. If the dictionary is one of rather modest size, say 100,000 words, that means we would have to consider (100,000) 3 =10 15  possibilities. The vast majority of these possible combinations would never occur or be rarely used. Hence, to extract meaningful statistics from this would be very hard, and, from the implementation point of view, it would also be virtually impossible to use the information in a meaningful way. In trying to improve the situation, probably the first thing that comes to mind is to start grouping similar words in the dictionary together and not distinguish between so many different combinations. The POS tags do exactly that: the tags group words together that serve similar roles, from a syntactical point of view, in building a sentence. 
         [0273]    The same type of insight can be reached if we consider how we use speech to communicate. The speed of communication can be maintained between two people since the rate of understanding of what is being said is essentially the same as that of speaking. If the person who listened had to go through a huge set of possible interpretations for each word, then it is hard to see how the speed could be maintained. Instead, it is likely that the listener is able to predict what roughly comes next or at least fit the words in established patterns that help the understanding. These general patterns probably rely on the syntactical structure of the language in question. 
         [0274]    So, the second observation is that POS tagging and extracting syntactical structure are attempts to establish predictable patterns in our language. 
         [0275]    To summarize then, our two basic observations concerning how to find the dual signatures when using a reduced keyboard are the following.
       1. Dual-signatures and POS tags contain information that to some extent is interchangeable and which can be used to pinpoint the intended words.   2. POS tags and syntactical structure rely on patterns that are predictable and, hence, can form the basis for predictions.       
 
         [0278]    It is instructive to compare the challenge here with that of speech recognition, see [34]. Speech recognition is a comparatively harder problem. In that case, we are presented with some auditory “evidence” a of the intended words w and sentences s, and the task is to reconstruct w and s with high accuracy. If we let P(s|a) be the conditional probability that the sentence s was spoken given the auditory evidence a, and we use a maximum likelihood estimate to reconstruct the sentence, then the problem is to find 
         [0000]      {circumflex over ( s )}=arg max s   P ( s|a ).  (91) 
         [0000]    Language modeling plays a prominent part in many of the current approaches to speech recognition. 
       3.4 A Markov Model Approach 
       [0279]    In this subsection, we shall start investigating the use of Markov models and POS tagging to reduce the number of words that are incorrectly displayed when using a reduced keyboard. 
         [0280]    Once again, we shall use the One-Row Keyboard as a specific example. We shall also follow the exposition in [4] quite closely (cf. pages 1897209); cf. also [41] (cf pages 317-380), [29]. In particular, we shall start by exploring a bigram model, which is simpler than higher order models. For the time being, we shall also restrict ourselves to the on-the-fly processing outlined above. 
         [0281]    We assume that we are given a sentence 
         [0000]      s=w 0  . . . e N .  (92) 
         [0000]    For now, we shall mostly ignore how to treat the period and other punctuation marks and special symbols. We shall often view the sentence s simply as a sequence {w i } i=0   N  of words w i , i=0, . . . , N. For each word w i , there is a unique signature σ i  and a dual signature τ i . There are potentially several tags κ i , each implying a potentially different meaning for the word and the sentence s. Most often, there is one unique tag sequence for all the words of the sentence that reflects the user&#39;s intentions. 
         [0282]    At the point when the user starts inputting the information for word w M  (0≦M≦N), the user is assumed to have made sure that the words w 0 , . . . , w M−1  are all correct. After inputting the signature σ M , the device decoder is then left with the task of finding the sequence of tags κ i , i=0, . . . , M and the dual signature τ M , ideally corresponding to the user&#39;s intended meaning. For example, if we decide to use a maximum likelihood estimate to assess the optimality of the tag sequence κ i  and the dual signature τ M , then we are interested in finding 
         [0000]      {circumflex over (κ)} 0 , . . . {circumflex over (κ)} M ,{circumflex over (τ)} M =arg max κ     0     , . . . , κ     M     ,τ     M    Prob(κ 0 , . . . , κ M ,τ M   |w   0 , . . . ,  w   M−1 ,σ M ).  (93) 
         [0000]    Using the definition of conditional probability, the probability on the right-hand side equals 
         [0000]    
       
         
           
             
               
                 Prob 
                  
                 
                   ( 
                   
                     
                       κ 
                       0 
                     
                     , 
                     … 
                      
                     
                         
                     
                     , 
                     
                       κ 
                       M 
                     
                     , 
                     
                       τ 
                       M 
                     
                     , 
                     
                       w 
                       0 
                     
                     , 
                     … 
                      
                     
                         
                     
                     , 
                     
                       w 
                       
                         M 
                         - 
                         1 
                       
                     
                     , 
                     
                       σ 
                       M 
                     
                   
                   ) 
                 
               
               
                 P 
                  
                 
                   ( 
                   
                     
                       w 
                       0 
                     
                     , 
                     … 
                      
                     
                         
                     
                     , 
                     
                       w 
                       
                         M 
                         - 
                         1 
                       
                     
                     , 
                     
                       σ 
                       M 
                     
                   
                   ) 
                 
               
             
             . 
           
         
       
     
         [0000]    Now, w 0 , . . . , w M−1 , and σ M  are given and fixed while we maximize the quantity in (93). Hence, the denominator here is also fixed, and we have 
         [0000]      {circumflex over (κ)} 0 , . . . {circumflex over (κ)} M ,{circumflex over (τ)} M =arg max κ     0     , . . . , κ     M     ,τ     M    Prob(κ 0 , . . . , κ M ,τ M   ,w   0 , . . . ,  w   M−1 ,σ M ). 
         [0000]    Note that there is a unique word w M  with w M =(σ M ,τ M ) for each τ M . As a consequence 
         [0000]      {circumflex over (κ)} 0 , . . . {circumflex over (κ)} M ,{circumflex over (τ)} M =arg max τ     M   max κ     0     , . . . , κ     M   {Prob(κ 0 , . . . , κ M   ,w   0 , . . . ,  w   M−1   ,w   M ): w   M =(σ M ,τ M )}.  (94) 
         [0000]    In other words, finding the optimal tag sequence and dual signature is simply a family of tagging problems, one for each possible value of τ M  (with σ M  fixed). This is one precise formulation of the “substitution test.” This also means that we can immediately use the solution methods for POS tagging to find approximate solutions of (93). The expositions in [4] and [41] use a Hidden Markov Model (HMM) approach based on a bigram model to illustrate the general approach. Here we shall use the same basic illustration, but provide more details concerning our particular problem (93). 
         [0283]    Using the definition of conditional probability again, we may rewrite the probability on the right-hand side as follows: 
         [0000]      Prob(κ 0 , . . . , κ M   ,w   0   , . . . , w   M−1   ,w   M )=Prob(κ 0 , . . . , κ M )×Prob( w   0   , . . . , w   M−1   ,w   M |κ 0 , . . . , κ M ).  (95) 
         [0000]    Each of these two factors are then approximated by simpler ones that are easier to collect. 
         [0284]    For the first factor, we first use the “Chain rule” to see that 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           Prob 
                            
                           
                             ( 
                             
                               
                                 κ 
                                 0 
                               
                               , 
                               … 
                                
                               
                                   
                               
                               , 
                               
                                 κ 
                                 M 
                               
                             
                             ) 
                           
                         
                         = 
                           
                          
                         
                           
                             Prob 
                              
                             
                               ( 
                               
                                 
                                   
                                     κ 
                                     M 
                                   
                                   | 
                                   
                                     κ 
                                     0 
                                   
                                 
                                 , 
                                 … 
                                  
                                 
                                     
                                 
                                 , 
                                 
                                   κ 
                                   
                                     M 
                                     - 
                                     1 
                                   
                                 
                               
                               ) 
                             
                           
                           × 
                         
                       
                     
                   
                   
                     
                       
                           
                          
                         
                           Prob 
                            
                           
                             ( 
                             
                               
                                 κ 
                                 0 
                               
                               , 
                               … 
                                
                               
                                   
                               
                               , 
                               
                                 κ 
                                 
                                   M 
                                   - 
                                   1 
                                 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                           
                          
                         
                           
                             ∏ 
                             
                               m 
                               = 
                               0 
                             
                             M 
                           
                            
                           
                             
                               Prob 
                                
                               
                                 ( 
                                 
                                   
                                     
                                       κ 
                                       m 
                                     
                                     | 
                                     
                                       κ 
                                       0 
                                     
                                   
                                   , 
                                   … 
                                    
                                   
                                       
                                   
                                   , 
                                   
                                     κ 
                                     
                                       m 
                                       - 
                                       1 
                                     
                                   
                                 
                                 ) 
                               
                             
                             . 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   96 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Here κ −1  is defined to be a starting tag so that Prob(κ 0 |κ −1 )=Prob(κ 0 ) (i.e. the transition from the starting tag to the first one κ 0  of the sentence). To simplify the calculations of these quantities, we introduce the appropriate independence assumptions. For example, in the case of the trigram model, we assume that a tag κ m  only depends on the two preceding tags κ m−1 , κ m−2 , and in the case of the bigram model, which we shall use for illustration here, we simply assume that κ m  depends on κ m−1 . Hence, with this approximation we obtain 
         [0000]    
       
         
           
             
               
                 
                   
                     Prob 
                      
                     
                       ( 
                       
                         
                           κ 
                           0 
                         
                         , 
                         … 
                          
                         
                             
                         
                         , 
                         
                           κ 
                           M 
                         
                       
                       ) 
                     
                   
                   ≈ 
                   
                     
                       ∏ 
                       
                         m 
                         = 
                         0 
                       
                       M 
                     
                      
                     
                       
                         Prob 
                          
                         
                           ( 
                           
                             
                               κ 
                               m 
                             
                             | 
                             
                               κ 
                               
                                 m 
                                 - 
                                 1 
                               
                             
                           
                           ) 
                         
                       
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   97 
                   ) 
                 
               
             
           
         
       
     
         [0285]    For the second factor in (95), it seems reasonable to assume that there is the following type of independence, at least approximately: 
         [0000]    
       
         
           
             
               
                 
                   
                     Prob 
                      
                     
                       ( 
                       
                         
                           w 
                           0 
                         
                         , 
                         … 
                          
                         
                             
                         
                         , 
                         
                           w 
                           
                             M 
                             - 
                             1 
                           
                         
                         , 
                         
                           
                             w 
                             M 
                           
                           | 
                           
                             κ 
                             0 
                           
                         
                         , 
                         … 
                          
                         
                             
                         
                         , 
                         
                           κ 
                           M 
                         
                       
                       ) 
                     
                   
                   ≈ 
                   
                     
                       ∏ 
                       0 
                       M 
                     
                      
                     
                       
                         Prob 
                          
                         
                           ( 
                           
                             
                               w 
                               m 
                             
                             | 
                             
                               κ 
                               m 
                             
                           
                           ) 
                         
                       
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   98 
                   ) 
                 
               
             
           
         
       
     
         [0286]    With these approximations, we obtain 
         [0000]    
       
         
           
             
               
                 
                   
                     Prob 
                      
                     
                       ( 
                       
                         
                           κ 
                           0 
                         
                         , 
                         … 
                          
                         
                             
                         
                         , 
                         
                           κ 
                           M 
                         
                         , 
                         
                           w 
                           0 
                         
                         , 
                         … 
                          
                         
                             
                         
                         , 
                         
                           w 
                           
                             M 
                             - 
                             1 
                           
                         
                         , 
                         
                           w 
                           M 
                         
                       
                       ) 
                     
                   
                   ≈ 
                   
                     
                       ∏ 
                       0 
                       M 
                     
                      
                     
                       
                         Prob 
                          
                         
                           ( 
                           
                             
                               κ 
                               m 
                             
                             | 
                             
                               κ 
                               
                                 m 
                                 - 
                                 1 
                               
                             
                           
                           ) 
                         
                       
                        
                       
                         
                           Prob 
                            
                           
                             ( 
                             
                               
                                 w 
                                 m 
                               
                               | 
                               
                                 κ 
                                 m 
                               
                             
                             ) 
                           
                         
                         . 
                       
                     
                   
                 
               
               
                 
                   ( 
                   99 
                   ) 
                 
               
             
           
         
       
     
         [0000]    The solution of the optimization problem (93) is then 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       κ 
                       ^ 
                     
                     0 
                   
                   , 
                   
                     … 
                      
                     
                         
                     
                      
                     
                       
                         κ 
                         ^ 
                       
                       M 
                     
                   
                   , 
                   
                     
                       
                         τ 
                         ^ 
                       
                       M 
                     
                     ≈ 
                     
                       arg 
                        
                       
                           
                       
                        
                       
                         
                           max 
                           
                             τ 
                             M 
                           
                         
                          
                         
                             
                         
                          
                         
                           
                             max 
                             
                               
                                 k 
                                 0 
                               
                               , 
                               
                                   
                               
                                
                               … 
                                
                               
                                   
                               
                               , 
                               
                                 k 
                                 M 
                               
                             
                           
                            
                           
                             
                               { 
                               
                                 
                                   
                                     
                                       
                                         ∏ 
                                         M 
                                       
                                       0 
                                     
                                      
                                     
                                       
                                         Prob 
                                          
                                         
                                           ( 
                                           
                                             
                                               κ 
                                               m 
                                             
                                             | 
                                             
                                               κ 
                                               
                                                 m 
                                                 - 
                                                 1 
                                               
                                             
                                           
                                           ) 
                                         
                                       
                                        
                                       
                                         Prob 
                                          
                                         
                                           ( 
                                           
                                             
                                               w 
                                               m 
                                             
                                             | 
                                             
                                               κ 
                                               m 
                                             
                                           
                                           ) 
                                         
                                       
                                     
                                   
                                   : 
                                   
                                     w 
                                     M 
                                   
                                 
                                 = 
                                 
                                   ( 
                                   
                                     
                                       σ 
                                       M 
                                     
                                     , 
                                     
                                       τ 
                                       M 
                                     
                                   
                                   ) 
                                 
                               
                               } 
                             
                             . 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   100 
                   ) 
                 
               
             
           
         
       
     
       Example 3.1 
       [0287]    Let us first fix a tagset, see Table 13, and let us assume that the transition probabilities are given by Table 15. We shall also assume that we are given a dictionary with all the probabilities we need to calculate (100). 
         [0000]    
       
         
               
             
               
               
             
               
               
               
               
               
               
               
               
               
               
               
               
               
               
               
               
               
             
               
               
               
               
               
               
               
               
               
               
               
               
               
               
               
               
               
             
           
               
                 TABLE 15 
               
             
             
               
                   
               
               
                 A sample transition matrix (cf. [19]) for 
               
               
                 standard tags. 
               
             
          
           
               
                   
                 Out 
               
             
          
           
               
                 In 
                 aj0 
                 at0 
                 cd0 
                 cj0 
                 inj 
                 nn0 
                 not 
                 ord 
                 pp$ 
                 pp0 
                 prp 
                 rb0 
                 to0 
                 vb0 
                 vbd 
                 . 
               
               
                   
               
             
          
           
               
                 start 
                 1.92 
                 11.74 
                 0.83 
                 8.90 
                 1.31 
                 13.85 
                 0.40 
                 0.19 
                 1.93 
                 38.30 
                 4.82 
                 9.02 
                 0.27 
                 5.45 
                 1.08 
                 0.00 
               
               
                 aj0 
                 5.09 
                 0.51 
                 0.16 
                 7.19 
                 0.01 
                 63.42 
                 0.11 
                 0.08 
                 0.10 
                 2.06 
                 6.85 
                 1.40 
                 3.41 
                 0.81 
                 0.45 
                 8.35 
               
               
                 at0 
                 23.89 
                 0.01 
                 0.70 
                 0.01 
                 0.00 
                 69.98 
                 0.00 
                 1.86 
                 0.00 
                 1.64 
                 0.01 
                 1.81 
                 0.00 
                 0.06 
                 0.03 
                 0.01 
               
               
                 cd0 
                 9.54 
                 0.57 
                 2.30 
                 4.43 
                 0.05 
                 54.12 
                 0.00 
                 0.38 
                 0.03 
                 2.24 
                 18.51 
                 1.15 
                 0.27 
                 1.56 
                 1.39 
                 3.45 
               
               
                 cj0 
                 6.76 
                 12.47 
                 0.82 
                 2.06 
                 0.07 
                 16.86 
                 0.89 
                 0.10 
                 2.70 
                 29.67 
                 3.67 
                 6.96 
                 0.63 
                 8.11 
                 8.04 
                 0.20 
               
               
                 inj 
                 0.94 
                 1.77 
                 0.42 
                 4.91 
                 8.35 
                 14.72 
                 1.04 
                 0.00 
                 1.88 
                 33.40 
                 1.36 
                 4.28 
                 0.10 
                 6.78 
                 11.90 
                 8.14 
               
               
                 nn0 
                 0.90 
                 1.64 
                 0.19 
                 9.69 
                 0.03 
                 13.00 
                 0.13 
                 0.14 
                 0.24 
                 5.34 
                 21.54 
                 3.70 
                 1.73 
                 11.55 
                 10.90 
                 19.28 
               
               
                 not 
                 8.31 
                 6.33 
                 0.30 
                 2.05 
                 0.00 
                 2.05 
                 0.00 
                 0.00 
                 0.75 
                 3.28 
                 4.33 
                 15.19 
                 4.78 
                 40.65 
                 9.06 
                 2.90 
               
               
                 ord 
                 4.12 
                 1.39 
                 3.42 
                 2.41 
                 0.00 
                 69.34 
                 0.00 
                 0.21 
                 0.11 
                 5.62 
                 3.48 
                 0.70 
                 0.75 
                 2.09 
                 2.25 
                 4.12 
               
               
                 pp$ 
                 10.93 
                 0.00 
                 0.34 
                 0.06 
                 0.00 
                 81.88 
                 0.00 
                 1.10 
                 0.01 
                 5.03 
                 0.02 
                 0.40 
                 0.00 
                 0.20 
                 0.01 
                 0.03 
               
               
                 pp0 
                 2.72 
                 2.01 
                 0.25 
                 2.24 
                 0.02 
                 11.29 
                 0.13 
                 0.10 
                 0.33 
                 4.30 
                 4.71 
                 5.17 
                 1.15 
                 29.81 
                 28.66 
                 7.09 
               
               
                 prp 
                 8.12 
                 36.32 
                 1.21 
                 0.19 
                 0.00 
                 26.72 
                 0.04 
                 0.09 
                 7.08 
                 15.35 
                 0.19 
                 1.22 
                 0.02 
                 2.96 
                 0.05 
                 0.45 
               
               
                 rb0 
                 12.66 
                 6.27 
                 0.82 
                 5.98 
                 0.05 
                 3.25 
                 0.36 
                 0.11 
                 1.15 
                 10.84 
                 12.35 
                 8.10 
                 1.92 
                 12.14 
                 10.46 
                 13.53 
               
               
                 to0 
                 0.01 
                 0.02 
                 0.00 
                 0.03 
                 0.00 
                 0.09 
                 0.01 
                 0.00 
                 0.01 
                 0.03 
                 0.01 
                 0.14 
                 0.00 
                 99.32 
                 0.03 
                 0.31 
               
               
                 vb0 
                 6.29 
                 12.67 
                 0.47 
                 3.08 
                 0.07 
                 5.37 
                 2.56 
                 0.07 
                 2.83 
                 15.01 
                 8.04 
                 12.21 
                 4.10 
                 12.77 
                 9.40 
                 5.05 
               
               
                 vbd 
                 5.19 
                 11.14 
                 0.69 
                 3.74 
                 0.08 
                 5.38 
                 1.74 
                 0.17 
                 3.51 
                 11.75 
                 15.70 
                 14.60 
                 4.18 
                 4.13 
                 9.44 
                 8.54 
               
               
                   
               
             
          
         
       
     
         [0288]    We shall consider the sentence 
         [0000]      The man still saw her.  (101) 
         [0000]    With the One-Row Keyboard, there are several ambiguities since the following words have the same signature:
       bye, the   man, may   saw, was.
 
Hence, for the first position we have to separately consider the following two cases:
       
 
         [0000]      Prob(the|κ 0 )Prob(κ 0 |κ −1 )  (102) 
         [0000]      and 
         [0000]      Prob(bye|κ 0 )Prob(κ 0 |κ −1 )  (103) 
         [0292]    For each word we then need to look at the set of tags with nonzero probability, cf. Table 16. For the word “the”, we have κ 0 ε{AT, PPO}. For the probabilities, we see that Prob(the|AT) # 0.6639 and Prob(the|PPO)≈0.00001, and according to Table 15, Prob(AT|start)≈0.0756 while Prob(PPO|start)≈0.3507. Hence, the products corresponding to (102) are approximately 
         [0000]      5.020·10 −2  and 2.670·10 −6 , 
         [0000]    cf. Table 16. 
         [0000]    
       
         
               
             
               
               
               
               
               
               
               
             
               
               
               
               
               
               
               
             
           
               
                 TABLE 16 
               
             
             
               
                   
               
               
                 Tags and probabilities. 
               
               
                 The man still saw her. 
               
             
          
           
               
                 i 
                 w i   
                 k i   
                 k i−1   
                 Prob(w i |k i ) · 100 
                 Prob(k i |k i−1 ) · 100 
                 Prob(w i |k i ) · Prob(k i |k i−1 ) 
               
               
                   
               
             
          
           
               
                 0 
                 the 
                 at0 
                 {2} 
                 68.246 
                 11.735 
                 8.009 · 10 −2   
               
               
                   
                   
                 pp0 
                 {2} 
                 0.001 
                 38.305 
                 5.085 · 10 −6   
               
               
                   
                 bye 
                 inj 
                 {2} 
                 0.104 
                 1.309 
                 1.367 · 10 −5   
               
               
                   
                   
                 nn0 
                 {2} 
                 0.001 
                 13.850 
                 9.649 · 10 −7   
               
               
                 1 
                 man 
                 nn0 
                 at0 
                 0.442 
                 69.977 
                 3.091 · 10 −3   
               
               
                   
                   
                 nn0 
                 inj 
                 0.442 
                 14.718 
                 6.501 · 10 −4   
               
               
                   
                   
                 nn0 
                 nn0 
                 0.442 
                 13.000 
                 5.742 · 10 −4   
               
               
                   
                   
                 nn0 
                 pp0 
                 0.442 
                 11.291 
                 4.987 · 10 −4   
               
               
                   
                 may 
                 nn0 
                 at0 
                 0.013 
                 69.977 
                 8.775 · 10 −5   
               
               
                   
                   
                 nn0 
                 inj 
                 0.013 
                 14.718 
                 1.846 · 10 −5   
               
               
                   
                   
                 nn0 
                 nn0 
                 0.013 
                 13.000 
                 1.630 · 10 −5   
               
               
                   
                   
                 nn0 
                 pp0 
                 0.013 
                 11.291 
                 1.416 · 10 −5   
               
               
                   
                   
                 vb0 
                 at0 
                 0.979 
                 0.056 
                 5.441 · 10 −6   
               
               
                   
                   
                 vb0 
                 inj 
                 0.979 
                 6.785 
                 6.644 · 10 −4   
               
               
                   
                   
                 vb0 
                 nn0 
                 0.979 
                 11.552 
                 1.131 · 10 −3   
               
               
                   
                   
                 vb0 
                 pp0 
                 0.979 
                 29.810 
                 2.919 · 10 −3   
               
               
                 2 
                 still 
                 aj0 
                 nn0 
                 0.060 
                 0.905 
                 5.387 · 10 −6   
               
               
                   
                   
                 aj0 
                 vb0 
                 0.060 
                 6.293 
                 3.746 · 10 −5   
               
               
                   
                   
                 rb0 
                 nn0 
                 1.463 
                 3.698 
                 5.409 · 10 −4   
               
               
                   
                   
                 rb0 
                 vb0 
                 1.463 
                 12.212 
                 1.786 · 10 −3   
               
               
                 3 
                 saw 
                 nn0 
                 aj0 
                 0.003 
                 63.421 
                 2.209 · 10 −5   
               
               
                   
                   
                 nn0 
                 rb0 
                 0.003 
                 3.248 
                 1.131 · 10 −6   
               
               
                   
                   
                 vbd 
                 aj0 
                 0.544 
                 0.450 
                 2.449 · 10 −5   
               
               
                   
                   
                 vbd 
                 rb0 
                 0.544 
                 10.457 
                 5.690 · 10 −4   
               
               
                   
                 was 
                 vb0 
                 aj0 
                 0.001 
                 0.807 
                 1.046 · 10 −7   
               
               
                   
                   
                 vb0 
                 rb0 
                 0.001 
                 12.145 
                 1.573 · 10 −6   
               
               
                   
                   
                 vbd 
                 aj0 
                 15.118 
                 0.450 
                 6.804 · 10 −4   
               
               
                   
                   
                 vbd 
                 rb0 
                 15.118 
                 10.457 
                 1.581 · 10 −2   
               
               
                 4 
                 her 
                 pp$ 
                 nn0 
                 19.125 
                 0.238 
                 4.557 · 10 −4   
               
               
                   
                   
                 pp$ 
                 vbd 
                 19.125 
                 3.513 
                 6.718 · 10 −3   
               
               
                   
                   
                 pp0 
                 nn0 
                 1.917 
                 5.345 
                 1.024 · 10 −3   
               
               
                   
                   
                 pp0 
                 vbd 
                 1.917 
                 11.754 
                 2.253 · 10 −3   
               
               
                   
               
             
          
         
       
     
         [0293]    Similarly, for the word “bye”, κ 0 ε{I N J, N N}, and the two corresponding probabilities are Prob(bye|I N J)≈0.00400 and Prob(bye|N N)≈0.00001. In Table 15 we find Prob(I N J|start)≈0.0542 and Prob(N N|start)≈0.1120. The products in (103) are then 
         [0000]      2.169·10 −4  and 6.121·10 −7 . 
         [0294]    The largest of all four numbers is clearly the one corresponding to “the” and κ 0 =AT. 
         [0295]    Now, for the second position we have two competing words, “may” and “man”. Since we are assuming that the user adjusts the input as the process proceeds, we only need to consider the previous tags of “the”, and for simplicity we shall ignore the PPO tag, leaving just one, AT. The three competing products are then 
         [0000]      Prob(man| NN )Prob( NN|AT )Prob(the| AT )Prob( AT |start)≈1.5552·10 −4    
         [0000]      Prob(may| NN )Prob( NN|AT )Prob(the| AT )Prob( AT |start)≈3.9121·10 −6    
         [0000]      Prob(may| VB )Prob( VB|AT )Prob(the| AT )Prob( AT |start)≈4.2414·10 −7    
         [0000]    Of course, the largest corresponds to “man” with tag N N, and “the” with tag AT. 
         [0296]    In the third position, we only have the word “still” but it has three possible tags (see Table 16): N N, AJ, and RB. We must then choose between the following: 
         [0000]      Prob(still|NN) Prob(NN|NN) Prob(man|NN) Prob(NN|AT) Prob(the|AT)Prob(AT|start) 
         [0000]      Prob(still|AJ)Prob(AJ|NN)Prob(man|NN)Prob(NN|AT)Prob(the|AT) Prob(AT|start) 
         [0000]      Prob(still|RB)Prob(RB|NN)Prob(man|NN) Prob(NN|AT) Prob(the|AT)Prob(AT|start) 
         [0000]    These products approximately equal 1.0928·10 −10 , 9.7775·10 −10 , and 8.3623·10 −8 . Hence, the largest is the last one, which corresponds to 
         [0000]      &lt;The,AT&gt;&lt;man,NN&gt;&lt;still,RB&gt;. 
         [0297]    In the next position we have either “saw”, with three tags (N N, V B, and V B D), or “was” with essentially one tag (V B D). As long as we do our search exhaustively (like above), then there are 9 products to consider for “saw” and 6 for “was”, and, hence, we need to compare 15 products. The largest one of these is 
         [0000]      &lt;the,AT&gt;&lt;man, NN&gt;&lt;still,RB&gt;&lt;was,VBD&gt; with probability 1.24908·10 −9    
         [0000]    Hence, in this particular instance we would select the wrong word based on these probabilities. 
         [0298]    Finally, we have the word “her” with two tags (PPO and PP$). Hence, we need to calculate 18 products. There are two possibilities with significantly larger probabilities than the rest: 2.788·10 −13 , 1.02836·10 −13 . The largest one of these corresponds to the “correct” one: 
         [0000]      &lt;The,AT&gt;&lt;man,NN&gt;&lt;still,RB&gt;&lt;saw,VBD&gt;&lt;her,PPO&gt; 
         [0000]    Remark 3.1 There is one useful remark to make concerning the calculation and normalization of the probabilities of a transition matrix (like the one used in the previous example). Suppose we have a transition matrix T={T i,j } i,j=0   n−1  of transition probabilities T i,j =Prob(j|i) from state i to state j, 0≦i,j≦n−1. Then clearly, the column sums must be one: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         ∑ 
                         j 
                       
                        
                       
                         T 
                         
                           i 
                           , 
                           j 
                         
                       
                     
                     = 
                     1 
                   
                   , 
                   
                     i 
                     = 
                     0 
                   
                   , 
                   … 
                    
                   
                       
                   
                   , 
                   
                     n 
                     - 
                     1. 
                   
                 
               
               
                 
                   ( 
                   104 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Further, it is convenient if we can rely on the following relationship for the probabilities of the different states P i : 
         [0000]    
       
         
           
             
               
                 
                   
                     P 
                     j 
                   
                   = 
                   
                     
                       ∑ 
                       i 
                     
                      
                     
                       
                         T 
                         
                           i 
                           , 
                           j 
                         
                       
                        
                       
                         
                           P 
                           i 
                         
                         . 
                       
                     
                   
                 
               
               
                 
                   ( 
                   105 
                   ) 
                 
               
             
           
         
       
     
         [0000]    This expression captures the fact that the collection of states i exhausts all the possibilities for ending up in state j. Now, if we want (104) and (105) to hold and, in addition, to be able to treat each sentence as a separate entity, then we have to be a little careful with how we introduce the start and end symbols. There are a couple of ways to do this. For example, one can introduce an infinite number of start states and end states. Another way, which we follow here, is to make the assumption that the end state transitions into the start state with probability 1. Since the probability of the start symbol is the same as that of the end symbol, the expression (105) will then still hold. For the bigram model, this “periodization” also makes it possible to treat sentences separately since the probability of the transition into the start symbol of a new sentence does not depend on any of the tags of the previous sentence except the end tag. Note that for a higher order model, we need to have more start and end symbols for this to be the case. We observe that the equation (105) shows that the probabilities P i  are eigenvectors of the transition matrix T corresponding to the eigenvalue 1. 
         [0299]    Let us now return to the general case and equation (100). To calculate this quantity and hence an approximate solution of the optimization problem (94) we can, of course, do it exhaustively; however, as we saw in the example, there is then a very quickly growing number of possibilities to consider. Instead, the standard approach is to use the Viterbi algorithm. It uses the recursive nature of the right-hand side of (100). More specifically, let us introduce the notation 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         V 
                         L 
                       
                        
                       
                         ( 
                         
                           κ 
                           L 
                         
                         ) 
                       
                     
                     = 
                     
                       
                         max 
                         
                           
                             κ 
                             0 
                           
                           , 
                           
                               
                           
                            
                           … 
                            
                           
                               
                           
                           , 
                           
                             κ 
                             
                               L 
                               - 
                               1 
                             
                           
                         
                       
                        
                       
                         
                           ∏ 
                           0 
                           L 
                         
                          
                         
                           
                             Prob 
                              
                             
                               ( 
                               
                                 
                                   κ 
                                   m 
                                 
                                 | 
                                 
                                   κ 
                                   
                                     m 
                                     - 
                                     1 
                                   
                                 
                               
                               ) 
                             
                           
                            
                           
                             Prob 
                              
                             
                               ( 
                               
                                 
                                   w 
                                   m 
                                 
                                 | 
                                 
                                   κ 
                                   m 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                   , 
                   
                     
 
                   
                    
                   
                     0 
                     ≤ 
                     L 
                     ≤ 
                     M 
                   
                 
               
               
                 
                   ( 
                   106 
                   ) 
                 
               
             
             
               
                 
                   and 
                    
                   
                     
 
                   
                    
                   
                     
                       
                         V 
                         
                           - 
                           1 
                         
                       
                        
                       
                         ( 
                         
                           κ 
                           
                             - 
                             1 
                           
                         
                         ) 
                       
                     
                     = 
                     1. 
                   
                 
               
               
                 
                   ( 
                   107 
                   ) 
                 
               
             
             
               
                 
                   
                     Then 
                      
                     
                         
                     
                      
                     obviously 
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         
                           max 
                           
                             
                               κ 
                               0 
                             
                             , 
                             
                                 
                             
                              
                             … 
                              
                             
                                 
                             
                             , 
                             
                               κ 
                               M 
                             
                           
                         
                          
                         
                           
                             ∏ 
                             0 
                             M 
                           
                            
                           
                             
                               Prob 
                                
                               
                                 ( 
                                 
                                   
                                     κ 
                                     m 
                                   
                                   | 
                                   
                                     κ 
                                     
                                       m 
                                       - 
                                       1 
                                     
                                   
                                 
                                 ) 
                               
                             
                              
                             
                               Prob 
                                
                               
                                 ( 
                                 
                                   
                                     w 
                                     m 
                                   
                                   | 
                                   
                                     κ 
                                     m 
                                   
                                 
                                 ) 
                               
                             
                           
                         
                       
                       = 
                       
                         
                           max 
                           
                             κ 
                             M 
                           
                         
                          
                         
                           
                             V 
                             M 
                           
                            
                           
                             ( 
                             
                               κ 
                               M 
                             
                             ) 
                           
                         
                       
                     
                     , 
                   
                 
               
               
                 
                   ( 
                   108 
                   ) 
                 
               
             
           
         
       
     
         [0000]    which is part of what we need for (100). Notice that V L (κ L ) is the (approximation of the) largest probability Prob(κ 0 , . . . , κ L−1 , κ L , w 0 , . . . , w L−1 , w L ) with the side-condition that the last tag κ L  is fixed (and the words w 0 , . . . , w L  fixed). 
         [0300]    On the other hand, by separating out the factor corresponding to m=L from the product in the definition (106) and noticing that this factor is constant while we take the maximum over κ 0 , . . . , κ L−2 , we see that V L  satisfies the recursive relation 
         [0000]        V   L (κ L )=max κ     L−1    Prob( w   L |κ L )Prob(κ L |κ L−1 ) V   L−1 (κ L−1 ), 0≦L≦M.  (109) 
         [0000]    Note that the K L−1  for which the maximum is attained on the right-hand side here is a function of κ L . We shall denote this function by B L (κ L ): 
         [0000]        B   L (κ L )=arg max κ     L−1    Prob( w   L |κ L )Prob(κ L |κ L−1 ) V   L−1 (κ L−1 ), 1≦L≦M,  (110) 
         [0000]      and 
         [0000]        B   0 (κ 0 )=κ −1 .  (111) 
         [0000]    Since Prob(w L |κ L ) is independent of κ L−1 , 
         [0000]        B   L (κ L )=arg max κ     L−1    Prob(κ L |κ L−1 ) V   L−1 (κ L−1 ), 1≦L≦M.  (112) 
         [0301]    Now, let us review how we can go about solving (100). We consider each κ M  separately. We obtain {circumflex over (K)} M  from (108): 
         [0000]      κ M =arg max κ     M     V   M (κ M ).  (113) 
         [0302]    This is easy if we have V M (κ M ) for all possible tags κ M , and for this we use the recursive relation (109). At each step 0≦L≦M, it gives us V L (κ L ) for all possible tags κ L . Once we have {circumflex over (κ)} M , then we can use the recursive relation for B L  to obtain the other {circumflex over (κ)} L , 0≦L≦M−1: 
         [0000]      {circumflex over (κ)} L−1   =B   L ({circumflex over (κ)} L ), 1≦L≦M.  (114) 
         [0000]    This is possible as long as we know B L (κ L ) for all possible tags κ L  at each step L, 1≦L≦M. This, in turn, simply means that we record for which tag κ L−1  the maximum is attained as we calculate V L (κ L ) using (109). 
         [0303]    We have now derived and explained the Viterbi algorithm; cf. [4], [41], and especially [31] (and perhaps some reference on dynamic programming like [59]). We also remark that the multiplicative nature of most of the quantities involved in (100) and its solution make it particularly attractive to use the logarithm of the different quantities. Of course, since log x is an increasing function, it is equivalent to maximize (100) and the logarithm of the expression. 
       Example 3.1 Cont&#39;d 
       [0304]    As an illustration, let us calculate the quantities V L , B L , 0≦L≦4 for the sentence (101): “The man still saw her.” 
         [0000]    
       
         
           
             We 
              
             
                 
             
              
             have 
           
         
       
       
         
           
             
               
                 
                   
                     
                       V 
                       0 
                     
                      
                     
                       ( 
                       
                         k 
                         0 
                       
                       ) 
                     
                   
                   = 
                     
                    
                   
                     
                       Prob 
                        
                       
                         ( 
                         
                           The 
                           | 
                           
                             κ 
                             0 
                           
                         
                         ) 
                       
                     
                      
                     
                       Prob 
                        
                       
                         ( 
                         
                           
                             κ 
                             0 
                           
                           | 
                           
                             κ 
                             
                               - 
                               1 
                             
                           
                         
                         ) 
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   
                     { 
                     
                       
                         
                           
                             5.02 
                             · 
                             
                               10 
                               
                                 - 
                                 2 
                               
                             
                           
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               
                                 κ 
                                 0 
                               
                             
                             = 
                             AT 
                           
                         
                       
                       
                         
                           0 
                         
                         
                           
                             otherwise 
                             , 
                           
                         
                       
                     
                   
                 
               
             
           
         
       
       
         
           and 
         
       
       
         
           
             
               
                 
                   B 
                   0 
                 
                  
                 
                   ( 
                   
                     κ 
                     0 
                   
                   ) 
                 
               
               = 
               start 
             
             , 
             
               for 
                
               
                   
               
                
               all 
                
               
                   
               
                
               
                 
                   κ 
                   0 
                 
                 . 
                 
                   
 
                 
                  
                 For 
               
                
               
                   
               
                
               
                 V 
                 1 
               
                
               
                   
               
                
               we 
                
               
                   
               
                
               have 
             
           
         
       
       
         
           
             
               
                 
                   
                     
                       V 
                       1 
                     
                      
                     
                       ( 
                       
                         κ 
                         1 
                       
                       ) 
                     
                   
                   = 
                     
                    
                   
                     
                       Prob 
                        
                       
                         ( 
                         
                           man 
                           | 
                           
                             κ 
                             1 
                           
                         
                         ) 
                       
                     
                      
                     
                       Prob 
                        
                       
                         ( 
                         
                           
                             κ 
                             1 
                           
                           | 
                           AT 
                         
                         ) 
                       
                     
                      
                     
                       
                         V 
                         0 
                       
                        
                       
                         ( 
                         AT 
                         ) 
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   
                     { 
                     
                       
                         
                           
                             1.55 
                             · 
                             
                               10 
                               
                                 - 
                                 4 
                               
                             
                           
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               
                                 κ 
                                 1 
                               
                             
                             = 
                             NN 
                           
                         
                       
                       
                         
                           0 
                         
                         
                           
                             otherwise 
                             , 
                           
                         
                       
                     
                   
                 
               
             
           
         
       
       
         
           
             and 
              
             
                 
             
              
             
               B 
               1 
             
              
             
                 
             
              
             is 
              
             
                 
             
              
             simply 
           
         
       
       
         
           
             
               
                 B 
                 1 
               
                
               
                 ( 
                 
                   κ 
                   1 
                 
                 ) 
               
             
             = 
             
               AT 
                
               
                   
               
                
               for 
                
               
                   
               
                
               all 
                
               
                   
               
                
               
                 
                   κ 
                   1 
                 
                 . 
                 
                   
 
                 
                  
                 
                   V 
                   2 
                 
               
                
               
                   
               
                
               is 
                
               
                   
               
                
               given 
                
               
                   
               
                
               by 
             
           
         
       
       
         
           
             
               
                 
                   
                     
                       V 
                       2 
                     
                      
                     
                       ( 
                       
                         κ 
                         2 
                       
                       ) 
                     
                   
                   = 
                     
                    
                   
                     
                       max 
                       
                         k 
                         1 
                       
                     
                      
                     
                       
                         Prob 
                          
                         
                           ( 
                           
                             still 
                             | 
                             
                               κ 
                               2 
                             
                           
                           ) 
                         
                       
                        
                       
                         Prob 
                          
                         
                           ( 
                           
                             
                               κ 
                               2 
                             
                             | 
                             
                               κ 
                               1 
                             
                           
                           ) 
                         
                       
                        
                       
                         
                           V 
                           1 
                         
                          
                         
                           ( 
                           
                             κ 
                             1 
                           
                           ) 
                         
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   
                     { 
                     
                       
                         
                           
                             1.09 
                              
                             
                               · 
                               
                                 - 
                                 10 
                               
                             
                           
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               
                                 κ 
                                 2 
                               
                             
                             = 
                             NN 
                           
                         
                       
                       
                         
                           
                             8.36 
                             · 
                             
                               10 
                               
                                 - 
                                 8 
                               
                             
                           
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               
                                 κ 
                                 2 
                               
                             
                             = 
                             RB 
                           
                         
                       
                       
                         
                           
                             9.77 
                             · 
                             
                               10 
                               
                                 - 
                                 10 
                               
                             
                           
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               
                                 κ 
                                 2 
                               
                             
                             = 
                             AJ 
                           
                         
                       
                       
                         
                           0 
                         
                         
                           
                             otherwise 
                             , 
                           
                         
                       
                     
                   
                 
               
             
           
         
       
       
         
           
             and 
              
             
                 
             
              
             
               B 
               2 
             
              
             
                 
             
              
             is 
           
         
       
       
         
           
             
               
                 B 
                 2 
               
                
               
                 ( 
                 
                   κ 
                   2 
                 
                 ) 
               
             
             = 
             
               NN 
                
               
                   
               
                
               for 
                
               
                   
               
                
               all 
                
               
                   
               
                
               
                 
                   κ 
                   2 
                 
                 . 
                 
                   
 
                 
                  
                 The 
               
                
               
                   
               
                
               function 
                
               
                   
               
                
               
                 V 
                 3 
               
                
               
                   
               
                
               is 
                
               
                   
               
                
               then 
             
           
         
       
       
         
           
             
               
                 
                   
                     
                       V 
                       3 
                     
                      
                     
                       ( 
                       
                         κ 
                         3 
                       
                       ) 
                     
                   
                   = 
                     
                    
                   
                     
                       max 
                       
                         κ 
                         2 
                       
                     
                      
                     
                       
                         Prob 
                          
                         
                           ( 
                           
                             saw 
                             | 
                             
                               κ 
                               3 
                             
                           
                           ) 
                         
                       
                        
                       
                         Prob 
                          
                         
                           ( 
                           
                             
                               κ 
                               3 
                             
                             | 
                             
                               κ 
                               2 
                             
                           
                           ) 
                         
                       
                        
                       
                         
                           V 
                           2 
                         
                          
                         
                           ( 
                           
                             κ 
                             2 
                           
                           ) 
                         
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   
                     { 
                     
                       
                         
                           
                             6.74 
                             · 
                             
                               10 
                               
                                 - 
                                 14 
                               
                             
                           
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               
                                 κ 
                                 3 
                               
                             
                             = 
                             NN 
                           
                         
                       
                       
                         
                           
                             8.55 
                             · 
                             
                               10 
                               
                                 - 
                                 14 
                               
                             
                           
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               
                                 κ 
                                 3 
                               
                             
                             = 
                             VB 
                           
                         
                       
                       
                         
                           
                             4.69 
                             · 
                             
                               10 
                               
                                 - 
                                 11 
                               
                             
                           
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               
                                 κ 
                                 3 
                               
                             
                             = 
                             VBD 
                           
                         
                       
                       
                         
                           0 
                         
                         
                           
                             otherwise 
                             , 
                           
                         
                       
                     
                   
                 
               
             
           
         
       
       
         
           
             and 
              
             
                 
             
              
             
               B 
               3 
             
              
             
                 
             
              
             is 
           
         
       
       
         
           
             
               
                 
                   B 
                   3 
                 
                  
                 
                   ( 
                   
                     κ 
                     3 
                   
                   ) 
                 
               
               = 
               
                 RB 
                  
                 
                     
                 
                  
                 for 
                  
                 
                     
                 
                  
                 all 
                  
                 
                     
                 
                  
                 
                   
                     κ 
                     3 
                   
                   . 
                   
                     
 
                   
                    
                   Finally 
                 
               
             
             , 
             
               
 
             
              
             
               
                 
                   
                     
                       
                         
                           V 
                           4 
                         
                          
                         
                           ( 
                           
                             κ 
                             4 
                           
                           ) 
                         
                       
                       = 
                         
                        
                       
                         
                           max 
                           
                             κ 
                             3 
                           
                         
                          
                         
                           
                             Prob 
                              
                             
                               ( 
                               
                                 her 
                                 | 
                                 
                                   κ 
                                   4 
                                 
                               
                               ) 
                             
                           
                            
                           
                             Prob 
                              
                             
                               ( 
                               
                                 
                                   κ 
                                   4 
                                 
                                 | 
                                 
                                   κ 
                                   3 
                                 
                               
                               ) 
                             
                           
                            
                           
                             
                               V 
                               3 
                             
                              
                             
                               ( 
                               
                                 κ 
                                 3 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                 
                 
                   
                     
                       = 
                         
                        
                       
                         { 
                         
                           
                             
                               
                                 2.79 
                                 · 
                                 
                                   10 
                                   13 
                                 
                               
                             
                             
                               
                                 
                                   if 
                                    
                                   
                                       
                                   
                                    
                                   
                                     κ 
                                     4 
                                   
                                 
                                 = 
                                 
                                   PP 
                                    
                                   
                                       
                                   
                                    
                                   $ 
                                 
                               
                             
                           
                           
                             
                               
                                 1.03 
                                 · 
                                 
                                   10 
                                   
                                     - 
                                     13 
                                   
                                 
                               
                             
                             
                               
                                 
                                   if 
                                    
                                   
                                       
                                   
                                    
                                   
                                     κ 
                                     4 
                                   
                                 
                                 = 
                                 PPO 
                               
                             
                           
                           
                             
                               0 
                             
                             
                               
                                 otherwise 
                                 , 
                               
                             
                           
                         
                       
                     
                   
                 
               
                
               
                 
 
               
                
               and 
                
               
                   
               
                
               
                 B 
                 4 
               
                
               
                   
               
                
               is 
             
           
         
       
       
         
           
             
               
                 B 
                 4 
               
                
               
                 ( 
                 
                   κ 
                   4 
                 
                 ) 
               
             
             = 
             
               V 
                
               
                   
               
                
               B 
                
               
                   
               
                
               D 
                
               
                   
               
                
               for 
                
               
                   
               
                
               all 
                
               
                   
               
                
               
                 
                   κ 
                   4 
                 
                 . 
               
             
           
         
       
     
         [0305]    Now, using the expression for V 4 , we see that {circumflex over (κ)} 4 =arg max κ   4 V 4 (κ 4 )=PPO. Then using the different B L &#39;s to backtrack, we find {circumflex over (κ)} 3 =VBD, {circumflex over (κ)} 2 =RB, {circumflex over (κ)} 1 =NN, and {circumflex over (κ)} 0 =AT. This corresponds to the following sequence 
         [0000]      &lt;The,AT&gt;&lt;man,NN&gt;&lt;still,RB&gt;&lt;saw,VBD&gt;&lt;her,PPO&gt;. 
         [0000]    Next we shall go through the changes necessary for a trigram model. The basic problem is still the same of course, see (93) and (94). Starting with the expression (96), a consequence of the “Chain Rule”, (96), the trigram model means that 
         [0000]    
       
         
           
             
               
                 
                   
                     Prob 
                      
                     
                       ( 
                       
                         
                           κ 
                           0 
                         
                         , 
                         … 
                          
                         
                             
                         
                         , 
                         
                           κ 
                           M 
                         
                       
                       ) 
                     
                   
                   ≈ 
                   
                     
                       ∏ 
                       
                         m 
                         = 
                         0 
                       
                       M 
                     
                      
                     
                       
                         Prob 
                          
                         
                           ( 
                           
                             
                               
                                 κ 
                                 m 
                               
                               | 
                               
                                 κ 
                                 
                                   m 
                                   - 
                                   1 
                                 
                               
                             
                             , 
                             
                               κ 
                               
                                 m 
                                 - 
                                 2 
                               
                             
                           
                           ) 
                         
                       
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   115 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Here we define κ −1 =κ −2  both as starting tags. In particular, Prob(κ 0 |κ −1 , κ −2 ) is the probability that the sequence of words (or more generally character combinations) start with a κ 0  tag. Similarly, Prob(κ 1 |κ 0 , κ −1 ) is the probability that κ 1  comes as the second tag after a κ 0 . Sometimes it may be reasonable to approximate these simply by Prob(κ 0 ) and Prob(κ 1 |κ 0 ), respectively. The definition of the basic quantity V L  is now 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         V 
                         L 
                       
                        
                       
                         ( 
                         
                           
                             κ 
                             L 
                           
                           , 
                           
                             κ 
                             
                               L 
                               - 
                               1 
                             
                           
                         
                         ) 
                       
                     
                     = 
                     
                       
                         max 
                         
                           
                             κ 
                             0 
                           
                           , 
                           
                               
                           
                            
                           … 
                            
                           
                               
                           
                           , 
                           
                             κ 
                             
                               L 
                               - 
                               2 
                             
                           
                         
                       
                        
                       
                         
                           
                             ∏ 
                             0 
                           
                           L 
                         
                          
                         
                           
                             Prob 
                              
                             
                               ( 
                               
                                 
                                   
                                     κ 
                                     m 
                                   
                                   | 
                                   
                                     κ 
                                     
                                       m 
                                       - 
                                       1 
                                     
                                   
                                 
                                 , 
                                 
                                   κ 
                                   
                                     m 
                                     - 
                                     2 
                                   
                                 
                               
                               ) 
                             
                           
                            
                           
                             Prob 
                              
                             
                               ( 
                               
                                 
                                   w 
                                   m 
                                 
                                 | 
                                 
                                   κ 
                                   m 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   116 
                   ) 
                 
               
             
             
               
                 and 
               
               
                 
                     
                 
               
             
             
               
                 
                   
                     
                       V 
                       
                         - 
                         1 
                       
                     
                      
                     
                       ( 
                       
                         
                           κ 
                           
                             - 
                             1 
                           
                         
                         , 
                         
                           κ 
                           
                             - 
                             2 
                           
                         
                       
                       ) 
                     
                   
                   = 
                   1. 
                 
               
               
                 
                   ( 
                   117 
                   ) 
                 
               
             
           
         
       
     
         [0000]    With this, the recursive relation replacing (109) is 
         [0000]        V   L (κ L ,κ L−1 )=max κ     L−2    Prob(w L |κ L )Prob(κ L |κ L−1 ,κ L−2 ) V   L−1 (κ L−1 ,κ L−2 ), 0≦L≦M.  (118) 
         [0000]    The corresponding function B L (κ L ,κ L−1 ) is defined by 
         [0000]        B   L (κ L ,κ L−1 )=arg max κ     L−2    Prob( w   L |κ L )Prob(κ L |κ L−1 ,κ L−2 ) V   L−1 (κ L−1 ,κ L−2 ), 1≦L≦M,  (119) 
         [0000]      and 
         [0000]        B   0 (κ 0 ,κ −1 )=κ −2   (120) 
         [0000]    Since Prob(w L |κ L ) is independent of κ L−2 , 
         [0000]        B   L ,κ L−1 )=arg max κ     L−2    Prob(κ L |κ L−1 ,κ L−2 ) V   L−1 (κ L−1,κ   L−2 ), 1≦L≦M.  (121) 
         [0000]    With these modifications, the Viterbi algorithm works as before.
 
Remark 3.2 A similar remark as Remark 3.1 applies to higher order models as well. For example, in the trigram case we have a transition “matrix” T={T i,j,k } i,j,k=0   n−1  of transition probabilities T i,j,k =Prob(k|j, i) from states i followed by j into state k, 0≦i, j, k≦n−1. Then clearly, the column sums must be one:
 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         ∑ 
                         k 
                       
                        
                       
                         T 
                         
                           i 
                           , 
                           j 
                           , 
                           k 
                         
                       
                     
                     = 
                     1 
                   
                   , 
                   i 
                   , 
                   
                     j 
                     = 
                     0 
                   
                   , 
                   … 
                    
                   
                       
                   
                   , 
                   
                     n 
                     - 
                     1. 
                   
                 
               
               
                 
                   ( 
                   122 
                   ) 
                 
               
             
             
               
                 
                   Also 
                   , 
                 
               
               
                 
                     
                 
               
             
             
               
                 
                   
                     
                       
                         T 
                         
                           j 
                           , 
                           k 
                         
                       
                        
                       
                         P 
                         j 
                       
                     
                     = 
                     
                       
                         ∑ 
                         i 
                       
                        
                       
                         
                           T 
                           
                             i 
                             , 
                             j 
                             , 
                             k 
                           
                         
                          
                         
                           T 
                           
                             i 
                             , 
                             j 
                           
                         
                          
                         
                           P 
                           i 
                         
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   123 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where T j,k =Prob(k|j) is the bigram transition matrix. Hence, for each fixed j, {T i,j P i } i  is an eigenvector of {T i,j,k } i,k  corresponding to the eigenvalue 1. To be able to treat each sentence separately in the analogous manner to the bigram case, we now need at least as many symbols for the start and end as the order of the model. So for the trigram we need at least three symbols. However, in many of our experiments we work with two end symbols and two start symbols (all with the same probability). Of course, for the periodization to work, either way is satisfactory. 
         [0306]    We remark that the above changes for the trigram model, and analogous modifications for other higher order models, can easily be derived directly from the bigram model by adopting a “vector” notation for the states, just like a higher order Markov model can be viewed as a first order one by changing the definition of the states. For example, to derive the trigram model we may introduce the notation 
         [0000]      {right arrow over (κ)} i =(κ i ,κ i−1 ),  (124) 
         [0000]    and then the derivation used for the bigram model produces the above formulas (with some trivial, mostly notational differences) for the trigram case. 
         [0307]    With this understanding, we now go back to the bigram case since it illustrates sufficiently well the general case and is a little simpler from a notation point of view. 
         [0308]    Let us once again consider the approximate solution (100). Until now, we have treated the different words with a given signature σ M  and different dual signatures κ M  separately, obtaining the maximum over κ M  by repeating the same basic process for each separate word and, afterwards, comparing and taking the maximum. This is also how we have approached the discussion of the Viterbi algorithm, see (113) and (114) and the text there. There is another way to handle the dual signatures τ which is more useful in several ways. 
         [0309]    The maximums in (100) can, of course, be taken in any order. Instead of leaving the maximum over τ M  until last, let us start with it. The only factor that depends on τ M  in the product is Prob(w M |κ M ). So the maximum is obtained by maximizing just this factor over τ M . Suppose we let ŵ denote the maximum likelihood estimator of a word, given the tag κ and the signature σ: 
         [0000]        ŵ=ŵ (σ,κ)=arg max w  Prob( w |σ,κ).  (125) 
         [0000]    Then the maximum over τ M  in (100) is obtained for 
         [0000]      {circumflex over ( w )} M ={circumflex over ( w )} M (σ M , κ M ),  (126) 
         [0000]    and the maximum value of the factor Prob(w M |κ M ) is Prob(ŵ M |κ M ). This follows, for instance, from the fact that 
         [0000]      Prob( w |κ)=Prob(σ|κ)Prob( w |σ,κ) 
         [0000]    and, hence, 
         [0000]      arg max τ Prob( w |κ)=arg max τ Prob(σ|κ)Prob( w |σ,κ)=arg max τ Prob( w |σ,κ). 
         [0310]    We have briefly touched upon the quantity (126) earlier in connection with the discussion of our first motivation for our approach, back in Subsection 3.3, and then more fully in Appendix Appendix B, subsection B.2. As we observed in Subsection 3.3, the tags for the different words within a “collision group” (the group of words with a certain signature) overlap very little. In fact, in Appendix Appendix B, subsection B.2 we saw that with 99.6% probability (on the average) this maximum likelihood estimator pinpoints the right word, as long as the tag κ M  is correct. Hence, with very little error, we may think of the tag sets for the different words within a collision group as being disjoint, without overlap. 
         [0311]    Similarly, the maximum over τ M  is easily incorporated directly into the Viterbi algorithm. We simply replace the quantity V M  in (106) by 
         [0000]        {circumflex over (V)}   M (κ M )=max τ     M     V   M (κ M ).  (127) 
         [0000]    Then the maximum on the right-hand side of (100) is given by 
         [0000]    
       
         
           
             
               
                 
                   
                     max 
                     
                       κ 
                       M 
                     
                   
                    
                   
                       
                   
                    
                   
                     
                       
                         
                           V 
                           ^ 
                         
                         M 
                       
                        
                       
                         ( 
                         
                           κ 
                           M 
                         
                         ) 
                       
                     
                     . 
                   
                 
               
               
                 
                   ( 
                   128 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Only the last term L=M needs to be modified in the recursive relation (109): 
         [0000]        {circumflex over (V)}   M (κ M )=max κ     M−1    Prob( ŵ   M |κ M )Prob(κ M |κ M−1 ) V   M−1 (κ M−1 ).  (129) 
         [0000]    The functions B L , 0≦L≦M are not affected, cf. equation (112). Instead of equation (113), we now obtain both {circumflex over (κ)} M  and {circumflex over (τ)} M  from 
         [0000]      {circumflex over (κ)} M ,{circumflex over (τ)} M =arg max κ     M     ,τ     M     V   M (κ M )=arg τ     M    arg max κ     M     {circumflex over (V)}   M (κ M ).  (130) 
         [0312]    This change in the handling of τ M  also suggests a different interpretation of the underlying Hidden Markov Model. As long as we treat the different τ M &#39;s separately, we are considering several different Hidden Markov Models, one for each τ M , and each producing a word w M  with the output probability Prob(w M |κ M ). The hiddens states, however, are the same for all of these models. Alternatively, by moving the maximum over τ M , we may think of the process as one “Hidden Markov Model” that outputs the maximum likelihood estimator ŵ M  in the Mth step with probability Prob(ŵ M |κ M ). Note, however, that the process just described is strictly speaking not a Hidden Markov Model since the sum of all the probabilities Prob(ŵ M |κ M ) for each fixed κ M  is in general strictly less than one. 
         [0313]    Let us now also take a closer look at the recursive relation (109) for V M . We write 
         [0000]        V   M   =V   M (κ M ,τ M )=Prob( w   M |κ M ) Q   M−1 (κ M )  (131) 
         [0000]      with 
         [0000]        Q   M−1 (κ M )=max κ     M−1    Prob(κ M |κ M−1 ) V   M−1 (κ M−1 ).  (132) 
         [0314]    The function Q M−1  is the probability of the path up to the M−1th step. In order to obtain the (approximate) solution of the optimization problem (93), given by the right-hand side of (100), we just take the maximum over κ M  and τ M  of V M . More generally, if we are interested in finding the K most likely words and tags, we just have to pick the K largest ones of the numbers {V M (κ M , τ M )} κ     M     ,τ     M   . We shall say that the probabilities {Prob(w M |κ M )} κ     M     ,τ     M    have been Q-ordered when the sequence {V M (κ M , τ M )} κ     M     ,τ     M    is rearranged in nonincreasing order. 
         [0315]    We may want to use these numbers {V M (κ M , τ M )} κ     M     ,τ     M    to decide in what order to display the different possible alternatives. The solution to the maximum likelihood problem is then the word that goes on the screen in the input area. The other words correspond to the different alternatives. Notice that V M (κ M ,τ M )&#39;s corresponding to different τ&#39;s will result in different words. So, for display purposes we are in effect using a slightly different ordering than the Q ordering: starting from the sequence {V M (κ M ,τ M )} κ     M     ,τ     M   , we generate the new sequence {V M *(τ M )} τ     M    by letting 
         [0000]        V   M *(τ M )=max κ     M     V   M (κ M ,τ M )  (133) 
         [0000]    We shall say that the words w M  for the different r&#39;s (and a fixed) have been Q*-ordered when the corresponding sequence {V M *(τ M )} τ     M    has been rearranged in a nonincreasing fashion. 
         [0316]    It is now clear how to refine the results from the previous sections to incorporate the considerations in this one. Given a dictionary D we let D(κ) be the collection of all words with tag κ. 
         [0317]    Similarly, if  D  is the collection of all valid character combinations, then for each κ we let  D (κ) be the valid character combinations corresponding to the entities in D(κ). Also,  D (σ,κ) are generated by the character combinations of elements in D with signature σ and tag κ. 
         [0318]    Clearly, 
         [0000]          D =∪   κ     D   (κ)=∪ σ,κ     D   (σ,κ).  (134) 
         [0319]    Now we can work with character combinations wε  D  instead of just the complete words wεD. For example, in connection with the Viterbi algorithm and equation (131) we use the quantity 
         [0000]          V     M   =  V     M (κ M   ,w   M )=Prob( w   M |κ M ) Q   M−1 (κ M ), w M ε  D   (135) 
         [0000]    in the last step, as the user is entering characters. These valid letter combinations can now also be Q*-ordered, using the function  V   M  instead of V M . For display purposes we can choose to display the character combinations with that order or we can also use a cost function, see Section 5. For example, the analog of the maximum likelihood solution ( 175 ) is now 
         [0000]    
       
         
           
             
               
                 
                   
                     min 
                     
                       u 
                       ∈ 
                       
                         
                           D 
                           _ 
                         
                          
                         
                           ( 
                           σ 
                           ) 
                         
                       
                     
                   
                    
                   
                     
                       ∑ 
                       κ 
                     
                      
                     
                       
                         ∑ 
                         
                           w 
                           ∈ 
                           
                             
                               D 
                               _ 
                             
                              
                             
                               ( 
                               
                                 σ 
                                 , 
                                 κ 
                               
                               ) 
                             
                           
                         
                       
                        
                       
                         
                           
                             C 
                             i 
                           
                            
                           
                             ( 
                             
                               w 
                               , 
                               u 
                             
                             ) 
                           
                         
                          
                         
                           
                             
                               
                                 V 
                                 _ 
                               
                               M 
                             
                              
                             
                               ( 
                               
                                 κ 
                                 , 
                                 w 
                               
                               ) 
                             
                           
                           . 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   136 
                   ) 
                 
               
             
           
         
       
     
         [0320]    The starting point for our discussion of the Markov model approach has been equation (93). The underlying assumption is that we are interested in finding the maximum likelihood estimation of both the dual signature of the M:th word as well as the tag sequence that is most likely to capture the user&#39;s intended meaning. Next, we shall outline how the same basic arguments and models also provide an approximation of the maximum likelihood solution 
         [0000]      {circumflex over (τ)} M =arg max τ     M    Prob(τ M   |w   0   , . . . , w   M−1 ,σ M ),  (137) 
         [0000]    as well as an analog of the Viterbi algorithm. Both of the problems (93) and (137) are interesting for the disambiguation of the input from a reduced keyboard. The first one provides us with a way of trying to understand and predict the user&#39;s intention, while the second ignores this aspect (modulo the basic underlying model) and simply asks for the most likely dual signature, no matter what the particular tag sequence is. 
         [0321]    Now, with the same argument as before, we have 
         [0000]      {circumflex over (τ)} M =arg max τ     M   {Prob( w   0   , . . . , w   M−1   ,w   M =(σ M ,τ M )}.  (138) 
         [0000]    By considering all possible state sequences, we may rewrite this as 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       τ 
                       ^ 
                     
                     M 
                   
                   = 
                   
                     arg 
                      
                     
                       
                           
                       
                        
                       
                           
                       
                     
                      
                     
                       
                         max 
                         
                           τ 
                           M 
                         
                       
                        
                       
                         
                           ∑ 
                           
                             
                               κ 
                               0 
                             
                             , 
                             
                                 
                             
                              
                             … 
                              
                             
                                 
                             
                             , 
                             
                               κ 
                               M 
                             
                           
                         
                          
                         
                           
                             { 
                             
                                 
                             
                              
                             
                               
                                 
                                   
                                     
                                       Prob 
                                        
                                       
                                         ( 
                                         
                                           
                                             
                                               
                                                 
                                                   κ 
                                                   0 
                                                 
                                                 , 
                                                 … 
                                                  
                                                 
                                                     
                                                 
                                                 , 
                                                 
                                                   κ 
                                                   M 
                                                 
                                                 , 
                                               
                                             
                                           
                                           
                                             
                                               
                                                 
                                                   w 
                                                   0 
                                                 
                                                 , 
                                                 … 
                                                  
                                                 
                                                     
                                                 
                                                 , 
                                                 
                                                   w 
                                                   
                                                     M 
                                                     - 
                                                     1 
                                                   
                                                 
                                                 , 
                                                 
                                                   w 
                                                   M 
                                                 
                                               
                                             
                                           
                                         
                                         ) 
                                       
                                     
                                      
                                     
                                         
                                     
                                      
                                     
                                       : 
                                     
                                   
                                 
                               
                               
                                 
                                   
                                     
                                       w 
                                       M 
                                     
                                     = 
                                     
                                       ( 
                                       
                                         
                                           σ 
                                           M 
                                         
                                         , 
                                         
                                             
                                         
                                          
                                         
                                           τ 
                                           M 
                                         
                                       
                                       ) 
                                     
                                   
                                 
                               
                             
                              
                             
                                 
                             
                             } 
                           
                           . 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   139 
                   ) 
                 
               
             
           
         
       
     
         [0000]    This replaces (94) in the earlier argument. With the conditions (97) (the Markov condition) and (98) (the independence condition) we obtain 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       τ 
                       ^ 
                     
                     M 
                   
                   ≈ 
                   
                     arg 
                      
                     
                         
                     
                      
                     
                       
                         max 
                         
                           τ 
                           M 
                         
                       
                        
                       
                         
                           ∑ 
                           
                             
                               κ 
                               0 
                             
                             , 
                             
                                 
                             
                              
                             … 
                              
                             
                                 
                             
                             , 
                             
                               κ 
                               M 
                             
                           
                         
                          
                         
                           
                             { 
                             
                                 
                             
                              
                             
                               
                                 
                                   
                                     
                                       ∏ 
                                       0 
                                       M 
                                     
                                      
                                     
                                         
                                     
                                      
                                     
                                       Prob 
                                        
                                       
                                         ( 
                                         
                                           
                                             κ 
                                             m 
                                           
                                           | 
                                           
                                             κ 
                                             
                                               m 
                                               - 
                                               1 
                                             
                                           
                                         
                                         ) 
                                       
                                     
                                   
                                 
                               
                               
                                 
                                   
                                     Prob 
                                      
                                     
                                       ( 
                                       
                                         
                                           w 
                                           m 
                                         
                                         | 
                                         
                                           κ 
                                           m 
                                         
                                       
                                       ) 
                                     
                                      
                                     
                                       : 
                                     
                                   
                                 
                               
                               
                                 
                                   
                                     
                                       w 
                                       M 
                                     
                                     = 
                                     
                                         
                                       
                                         ( 
                                         
                                           
                                             σ 
                                             M 
                                           
                                           , 
                                           
                                             τ 
                                             M 
                                           
                                         
                                         ) 
                                       
                                     
                                   
                                 
                               
                             
                             } 
                           
                           . 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   140 
                   ) 
                 
               
             
           
         
       
     
         [0000]    This is thus the replacement for equation (100), which was our starting point for the discussion of the Viterbi algorithm. Note that the difference between the two equations (100) and (140) is that the maximum over the tags in the former is replaced by the sum in the latter. 
         [0322]    The analog of the Viterbi algorithm is just as easy. Let us introduce 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       U 
                       L 
                     
                      
                     
                       ( 
                       
                         κ 
                         L 
                       
                       ) 
                     
                   
                   = 
                   
                     
                       ∑ 
                       
                         
                           κ 
                           0 
                         
                         , 
                         
                             
                         
                          
                         … 
                          
                         
                             
                         
                         , 
                         
                           κ 
                           
                             L 
                             - 
                             1 
                           
                         
                       
                     
                      
                     
                       
                         ∏ 
                         0 
                         L 
                       
                        
                       
                           
                       
                        
                       
                         
                           Prob 
                            
                           
                             ( 
                             
                               
                                 κ 
                                 m 
                               
                               | 
                               
                                 κ 
                                 
                                   m 
                                   - 
                                   1 
                                 
                               
                             
                             ) 
                           
                         
                          
                         
                           ( 
                           
                             
                               Prob 
                                
                               
                                 ( 
                                 
                                   
                                     w 
                                     m 
                                   
                                   | 
                                   
                                     κ 
                                     m 
                                   
                                 
                                 ) 
                               
                             
                             , 
                             
                               
 
                             
                              
                             
                               0 
                               ≤ 
                               L 
                               ≤ 
                               
                                 M 
                                  
                                 
                                   
 
                                 
                                  
                                 and 
                               
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   141 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         U 
                         
                           - 
                           1 
                         
                       
                        
                       
                         ( 
                         
                           κ 
                           
                             - 
                             1 
                           
                         
                         ) 
                       
                     
                     = 
                     1. 
                   
                    
                   
                     
 
                   
                    
                   Then 
                 
               
               
                 
                   ( 
                   142 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         ∑ 
                         
                           
                             κ 
                             0 
                           
                           , 
                           
                               
                           
                            
                           … 
                            
                           
                               
                           
                           , 
                           
                             κ 
                             M 
                           
                         
                       
                        
                       
                         
                           ∏ 
                           0 
                           M 
                         
                          
                         
                             
                         
                          
                         
                           
                             Prob 
                              
                             
                               ( 
                               
                                 
                                   κ 
                                   m 
                                 
                                 | 
                                 
                                   κ 
                                   
                                     m 
                                     - 
                                     1 
                                   
                                 
                               
                               ) 
                             
                           
                            
                           
                             Prob 
                              
                             
                               ( 
                               
                                 
                                   w 
                                   m 
                                 
                                 | 
                                 
                                   κ 
                                   m 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                     = 
                     
                       
                         ∑ 
                         
                           κ 
                           M 
                         
                       
                        
                       
                         
                           U 
                           M 
                         
                          
                         
                           ( 
                           
                             κ 
                             M 
                           
                           ) 
                         
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   143 
                   ) 
                 
               
             
           
         
       
     
         [0000]    and the approximate solution needed in (140) is then obtained by taking the maximum over τ M  on the right-hand side. The recursive relation for U L  is 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         U 
                         L 
                       
                        
                       
                         ( 
                         
                           κ 
                           L 
                         
                         ) 
                       
                     
                     = 
                     
                       
                         ∑ 
                         
                           κ 
                           
                             L 
                             - 
                             1 
                           
                         
                       
                        
                       
                         
                           Prob 
                            
                           
                             ( 
                             
                               
                                 w 
                                 L 
                               
                               | 
                               
                                 κ 
                                 L 
                               
                             
                             ) 
                           
                         
                          
                         
                           Prob 
                            
                           
                             ( 
                             
                               
                                 κ 
                                 L 
                               
                               | 
                               
                                 κ 
                                 
                                   L 
                                   - 
                                   1 
                                 
                               
                             
                             ) 
                           
                         
                          
                         
                           U 
                           
                             L 
                             - 
                             1 
                           
                         
                          
                         
                           ( 
                           
                             κ 
                             
                               L 
                               - 
                               1 
                             
                           
                           ) 
                         
                       
                     
                   
                   , 
                   
                     
 
                   
                    
                   
                     0 
                     ≤ 
                     L 
                     ≤ 
                     
                       M 
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   144 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Given this expression it is now clear how to modify the other equations and definitions above, including the definitions of the Q and Q*-orderings. 
         [0323]    We shall refer to the modification of the Viterbi algorithm outlined above as the “Forward” algorithm. 
       3.5 Evaluation of the Markov Model Approach 
       [0324]    We have evaluated various versions of the Markov model approach, using Corpus 1. 
         [0325]    Now, using the bigram Viterbi algorithm, as well as the bigram Forward algorithm, a significant improvement of the “most frequent word algorithm” (i.e., using the most probable word as the prediction within each collision group) is achieved. Specifically, we have found that the overall improvement is approximately 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             
                               # 
                                
                               
                                   
                               
                                
                               errors 
                                
                               
                                   
                               
                                
                               using 
                                
                               
                                   
                               
                                
                               most 
                                
                               
                                   
                               
                                
                               frequent 
                             
                             - 
                           
                         
                       
                       
                         
                           
                             # 
                              
                             
                                 
                             
                              
                             errors 
                              
                             
                                 
                             
                              
                             using 
                              
                             
                                 
                             
                              
                             bigram 
                              
                             
                                 
                             
                              
                             Viterbi 
                           
                         
                       
                     
                     
                       # 
                        
                       
                           
                       
                        
                       errors 
                        
                       
                           
                       
                        
                       using 
                        
                       
                           
                       
                        
                       most 
                        
                       
                           
                       
                        
                       frequent 
                     
                   
                   ≈ 
                   
                     33 
                      
                     % 
                   
                 
               
               
                 
                   ( 
                   145 
                   ) 
                 
               
             
           
         
       
     
         [0326]    We have also investigated the corresponding improvement within each collision group. In the table 17 we have collected the results for the ten collision groups for which the “most frequent algorithm” produces the most errors. 
         [0000]    
       
         
               
             
               
               
               
               
               
             
               
               
               
               
               
             
           
               
                 TABLE 17 
               
             
             
               
                   
               
               
                 The impact on the ten collision groups with 
               
               
                 largest number of errors. (#errors mf/bigram = number 
               
               
                 of errors using “the most frequent algorithm”/bigram 
               
               
                 Viterbi) 
               
               
                 Most frequent vs. bigram Viterbi. 
               
             
          
           
               
                 # 
                 Words 
                 # errors mf 
                 # errors bigram 
                 % improvement 
               
               
                   
               
             
          
           
               
                 0 
                 Total 
                 1802 
                 1631 
                 9.49 
               
               
                   
                 of 
                 0 
                 138 
                 −100 
               
               
                   
                 or 
                 1801 
                 1492 
                 17.16 
               
               
                   
                 lr 
                 1 
                 1 
                 0.00 
               
               
                 1 
                 Total 
                 1210 
                 1174 
                 2.98 
               
               
                   
                 they 
                 0 
                 104 
                 −100 
               
               
                   
                 then 
                 1210 
                 1070 
                 11.57 
               
               
                 2 
                 Total 
                 965 
                 746 
                 22.69 
               
               
                   
                 now 
                 0 
                 518 
                 −100 
               
               
                   
                 how 
                 965 
                 228 
                 76.37 
               
               
                 3 
                 Total 
                 758 
                 303 
                 60.03 
               
               
                   
                 must 
                 0 
                 64 
                 −100 
               
               
                   
                 just 
                 758 
                 239 
                 68.47 
               
               
                 4 
                 Total 
                 652 
                 426 
                 34.66 
               
               
                   
                 to 
                 0 
                 4 
                 −100 
               
               
                   
                 go 
                 652 
                 422 
                 35.28 
               
               
                 5 
                 Total 
                 636 
                 126 
                 80.19 
               
               
                   
                 may 
                 0 
                 67 
                 −100 
               
               
                   
                 man 
                 634 
                 57 
                 91.01 
               
               
                   
                 jay 
                 1 
                 1 
                 0.00 
               
               
                   
                 jan 
                 1 
                 1 
                 0.00 
               
               
                 6 
                 Total 
                 542 
                 52 
                 90.41 
               
               
                   
                 way 
                 0 
                 6 
                 −100 
               
               
                   
                 say 
                 538 
                 42 
                 92.19 
               
               
                   
                 san 
                 2 
                 2 
                 0.00 
               
               
                   
                 wan 
                 2 
                 2 
                 0.00 
               
               
                 7 
                 Total 
                 461 
                 149 
                 67.68 
               
               
                   
                 good 
                 0 
                 45 
                 −100 
               
               
                   
                 told 
                 433 
                 76 
                 82.45 
               
               
                   
                 gold 
                 20 
                 20 
                 0.00 
               
               
                   
                 bold 
                 5 
                 5 
                 0.00 
               
               
                   
                 bloc 
                 1 
                 1 
                 0.00 
               
               
                   
                 bole 
                 1 
                 1 
                 0.00 
               
               
                   
                 tood 
                 1 
                 1 
                 0.00 
               
               
                 8 
                 Total 
                 414 
                 154 
                 62.80 
               
               
                   
                 can 
                 0 
                 29 
                 −100 
               
               
                   
                 day 
                 413 
                 124 
                 69.98 
               
               
                   
                 dan 
                 1 
                 1 
                 0.00 
               
               
                 9 
                 Total 
                 325 
                 322 
                 0.92 
               
               
                   
                 was 
                 0 
                 2 
                 −100 
               
               
                   
                 saw 
                 321 
                 316 
                 1.56 
               
               
                   
                 sas 
                 3 
                 3 
                 0.00 
               
               
                   
                 wax 
                 1 
                 1 
                 0.00 
               
               
                   
               
             
          
         
       
     
       3.6 Approximate Typing and Typing Models Revisited 
       [0327]    In the previous section we considered approximate typing and typing models. For example, for finding the most likely character combination(s) to present to the user as he provides his input, we have by (11) 
         [0000]      {circumflex over ( v )}≈arg max v  Prob( v |σ v )Prob(σ v |σ a )=arg max v  Prob( v |σ v )Prob(σ v , σ a )  (146) 
         [0328]    To estimate Prob(all a), or equivalently, Prob(σ v , σ a ), we also discussed the need for modeling. For example, we suggested the basic model given by equation (58), p(σ v ,σ a )=P(σ v )π(σ a |σ v ), σ v εS v , σ a εS a . 
         [0329]    We also illustrated the use of similar arguments involving typing models in connection with speeding up searches. In that case, we may be interested in the most likely valid signature σ v  given a certain typed combination σ a : 
         [0000]      {circumflex over (σ)} v =arg max v  Prob(σ v |σ a )=arg max v  Prob(σ v ,σ a ).  (147) 
         [0330]    These equations are similar to (94),and in this subsection we shall describe how the Hidden Markov Model techniques we have discussed relate to the results about approximate typing. 
         [0331]    We assume that the intended signature σ v  and the typed signature σ a  are given by the individual characters σ i   v  and σ j   a , respectively: 
         [0000]      σ v =σ 0   v σ 1   v  . . . σ M   v , σ a =σ 0   a σ 1   a  . . . σ N   a .  (148) 
         [0332]    Hence, for problems like (146) and (147), we need to estimate 
         [0000]      Prob(σ v σ a )=Prob(σ 0   v , . . . , σ M   v ,σ 0   a , . . . , σ N   a ).  (149) 
         [0000]    If each intended character corresponded to a keystroke, then we could argue as in the derivation of equation (99) and obtain an estimate. However, the user may sometimes type extra characters or omit intended characters, so such a correspondence is not quite available to us. 
         [0333]    While we take a closer look at this, we shall also make the connection with the edit distance more explicit. 
         [0334]    As in Subsections 2.8 and 2.9, we shall use the characters of σ v  at the current and previous positions to define our states (this corresponds to the bigrams above); see  FIG. 4 . For each state, we have versions of the basic operators {id, Su, de, in, tr} we have used for the edit distance. And as we step along the characters of σ v , these operators are applied to produce the output characters of σ a ; see  FIGS. 5 and 6 . 
         [0335]    So, corresponding to the basic states in  FIG. 4 , we have the following basic operators: 
         [0000]    
       
                 
         
             
             
         
       
     
         [0000]    Here we have used the notation          σ i  to denote any of the symbols in the output alphabet besides σ i ; * is any one of the symbols; and ε is the empty symbol. Note that the transposition operator corresponds to three mutually exclusive possibilities (similar to the fact that substitution breaks up into two separate cases, one corresponding to the identity, and then those that change the character from a into something else). 
         [0336]    Compared to the setting for the NLP-processing, there are two significant differences to note: there are transitions that do not generate any output, and there are outputs that are generated while there is not state transition. The first corresponds to applying the deletion de operator, and the latter to the insertion operator in; cf.  FIGS. 5 and 6 . Now, in the context of HMM modeling, both of the differences are part of the well understood modifications of standard HMM:s; the first correspond to so-called null-transitions, and the second involves time-duration modeling when the system may remain in the same state for more than one time unit and the outputs are generated at each clock-tick; cf. [34], p. 23 and [31], p. 406. 
         [0337]    With κ 0 , . . . , κ M , w 0 , . . . , w M  corresponding to σ v =σ 0   v  . . . σ M   v  and σ a =σ 0   a  . . . σ N   a , respectively, the analog of equation (95) is Prob(σ v ,σ a )=Prob(σ v )×Prob(σ a |σ v ) or, with our basic model (58), Prob(σ v ,σ a )≈p(σ v ,σ a )=P(σ v )π(σ a |σ v ). The basic independence assumption, corresponding to equation (98), is now that each character of σ a  is independent of the others once we are given the underlying, intended σ v : 
         [0000]    
       
         
           
             
               
                 
                   
                     Prob 
                      
                     
                       ( 
                       
                         
                           σ 
                           v 
                         
                         , 
                         
                           σ 
                           a 
                         
                       
                       ) 
                     
                   
                   ≈ 
                   
                     
                       ∏ 
                       0 
                       M 
                     
                      
                     
                         
                     
                      
                     
                       
                         π 
                          
                         
                           ( 
                           
                             
                               σ 
                               i 
                               a 
                             
                             | 
                             
                               σ 
                               v 
                             
                           
                           ) 
                         
                       
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   152 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Further, at only depends on the two characters of σ v  that define the state the system is in when the character is output. 
         [0338]    The Markov assumption (97) is here replaced by P(σ v ), which is obtained from an appropriate context or corpus. Hence, the analog of equation (99) is simply 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       Prob 
                        
                       
                         ( 
                         
                           
                             σ 
                             v 
                           
                           , 
                           
                             σ 
                             a 
                           
                         
                         ) 
                       
                     
                     ≈ 
                     
                       
                         P 
                          
                         
                           ( 
                           
                             σ 
                             v 
                           
                           ) 
                         
                       
                        
                       
                         
                           ∏ 
                           0 
                           M 
                         
                          
                         
                             
                         
                          
                         
                           π 
                            
                           
                             ( 
                             
                               
                                 σ 
                                 i 
                                 a 
                               
                               | 
                               
                                 σ 
                                 v 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   153 
                   ) 
                 
               
             
           
         
       
     
         [0000]    and this is essentially the approximation we used in Subsections 2.8 and 2.9. 
         [0339]    Also, it is clear that the Viterbi algorithm yields essentially the “transform paths” we used back in those subsections as well (there we used the edit distance to obtain these), and that the standard edit distance can also be obtained as a special case of the considerations here. 
         [0340]    The Markov assumption (97) may still be quite useful when the probabilities P(al) are difficult to obtain. 
         [0341]    There is a final comment we want to make about the intersection between the methods in this subsection and approximate typing. In this section, we have assumed that the input process does not involve any input errors. However, it is also clear that the same considerations, relying on POS tags and tagging, can be used in the context of approximate typing. In fact, in the case of the input process with errors, these NLP-type methods work very well to reduce the search for the best alternatives to present to the user. 
         [0342]    4 An Implementation of Compact, Tag-Based Disambiguation 
       4.1 Context-Based Disambiguation 
       [0343]    The context of a word that has been ambiguously entered has much information that can be used to disambiguate the input to arrive at the actual word. Context can range from context-based dictionaries to words located around the word being typed. The following are some instances:
       Target audience: A dictionary adapted to a Wall Street Journal editor will perform better for the corresponding target audience than a general one.   Function/style of text entry: A dictionary adapted to writing SMS messages will perform better for that function than a general one.   Grammatical information: A set of grammatical rules with comparison to actual entry can aid disambiguation.       
 
         [0347]    In general, the information needs to be specialized and ideally adapted to the particular individual using it. In this chapter, a disambiguation mechanism, using word tag information, is suggested that can be applied to text input disambiguation for reduced keyboards and mobile input mechanisms such as T9 and the ORK. 
       4.2 Use of Tags 
       [0348]    Ideally, one would like to use prior information of entire corpora captured in terms of word information. However, it is quite impractical to describe word relations when the solution is aimed at a compact, portable computing system such as a cell phone. For instance, for a Markov-based stochastic model, one would like to have prior probabilities of a word conditioned on the words surrounding it. However, it is virtually impossible to fit all such probability values into a small memory. Hence, a common approach is to figure out common rules that can be applied to groups of words. Grammatical information allows us to derive common strains from varied words and collect these in equivalence classes. The corresponding class can be referred to by a tag. Typically, a word (or other appropriate character unit) can have several tags associated with corresponding probabilities. 
         [0349]    For grammatical tags, it is known that the most frequent tag of a word is accurate more than 90% of the time. This is an important piece of information that we will use later to reduce computational complexity and storage, by assuming that the tag of a contextual word is more or less deterministic. 
         [0350]    It should be noted that while we intend to apply this method of utilizing tags for representing prior grammatical information, it is equally useful for other word groups also. 
       4.3 Markov and Rule-Based Approaches 
       [0351]    Tagging of words is a well explored area of natural language processing; see the previous section. The process of word disambiguation can be broken down into two parts: first, tagging of the input words/signatures and, second, choosing the word with the maximum probability of the given tag within the set of words with the given signature. Ideally, one has to solve both simultaneously by summing over various possible tags for a given word that is being disambiguated to maximize the likelihood of the word being selected and not the tag. This can be a rather computationally intensive problem to solve with the Markov approach. 
         [0352]    Rule-based approaches, such as that for grammatical tagging by [11], [10], avoid storage of conditional probabilities and require going through the corpora several times to determine rules that lead to a general reduction in prediction error, starting from a base model that works most of the time. For text input disambiguation, simply selecting the most frequent word alternative for a given signature is known to be correct approximately 95% of the time. Thus, rule-based approaches are attractive for improving upon that figure without worrying about loss of accuracy elsewhere, especially given that they have a compact representation. However, a direct method to apply the rule-based technique to rule learning during actual run-time usage is not readily available. This is an important observation since it can be anticipated that it will be necessary to adapt to several individualistic writing styles, presumably following varied grammatical rules. A method that uses a common approach to offline training as well as real-time learning is all the more desirable. 
       4.4 Simplifying Assumptions 
       [0353]    We shall make the following assumptions.
       Since we are primarily concerned with progressive text entry, it is reasonable to assume that, in most cases, the word context information is from previous words only and that no word typed to the right of the current word being disambiguated is used.   We have indicated that we will be assigning deterministic tags to contextual words. This means that the words to the left of a given word will be assigned the most probable tag (in a purely deterministic fashion). Note that this does not compromise the assignment of tags to the group of words being disambiguated for the current signature, since we will effectively be conditioning the probability of the current word on previous tags, and we will not be concerned with probable tags of the current word.   We will restrict our contextual memory to two words to the left of the current word, i.e., we will effectively use trigram probabilities. (We will break at phrase delimiters such as the period or the semi-colon.)       
 
       4.5 Collecting Prior Tag Information 
       [0357]    Our attempt here is to build on the −95% accuracy that we have by simple assignment of the most frequent word as the selection of the disambiguation group. We will thus begin with the following set of information prior to training:
       The frequency of each word.   The most likely tag for each word.   For assigning a tag to an unknown word, we will apply commonly used techniques, e.g., described by Brill [11], [10] using word endings and other parameters.       
 
         [0361]    Next, we shall go through the mechanism to build the necessary information database to enable us to make better judgments. Later, we will describe how this database can be dynamically reduced in size by applying several restrictions without seriously compromising the performance. 
         [0362]    The training procedure is to scan through an untagged corpus word by word, using the flowchart in  FIG. 7  to record information as each word is scanned. Note that infinite precision is assumed to be available for the reference count, and the storage memory is also assumed not to be a constraint in this preliminary training model. The result of the training process will be a trellis of the type shown in  FIG. 8 . Note that the word corresponding to each entry is indicated on the branch connecting the two previous tags, instead of generating a third vertical level of the trigram. This method of storage seems expensive (memory-wise). It is only when we apply the limiting assumptions that the sparseness of the trellis and the table of reference counts will be fully exploited. 
         [0363]    Note that the empty tag in the second column of the trellis will not be connected with the method outlined thus fax. Its use will become clear in the following subsections. 
       4.6 Disambiguation 
       [0364]    We will now discuss how the information compiled may be used in run-time to improve upon disambiguation accuracy. Typically, we will need to divide the existing trellis into possibly more meaningful information that we will call “rules,” and then we will use a criterion to determine which rule should be applied in case we have multiple rules being satisfied in a given context. The following information needs to be derived (adapted from Brill):
       Previous word tag count: This may be calculated per the previous tag and per word as a reference count measure by summing up the reference counts of corresponding branches coming into the tag in the trellis.   One before previous word count: This may similarly be calculated by summing up all branches going out of a particular tag in the trellis on a per-word basis.   One of two before: This may be calculated by summing up the above two values per tag per word and then subtracting from it the reference count per word of the branch originating from the same tag and also going into the same.       
 
         [0368]    The flowchart in  FIG. 9  may be used to carry out the actual disambiguation. Choosing the word with the maximum ratio 
         [0000]    
       
         
           
             
               
                 
                   r 
                   = 
                   
                     
                       
                         
                           
                             Highest 
                              
                             
                                 
                             
                              
                             reference 
                              
                             
                                 
                             
                              
                             count 
                              
                             
                                 
                             
                              
                             excluding 
                           
                         
                       
                       
                         
                           
                             that 
                              
                             
                                 
                             
                              
                             of 
                              
                             
                                 
                             
                              
                             the 
                              
                             
                                 
                             
                              
                             most 
                              
                             
                                 
                             
                              
                             frequent 
                              
                             
                                 
                             
                              
                             word 
                           
                         
                       
                     
                     
                       
                         Reference 
                          
                         
                             
                         
                          
                         count 
                          
                         
                             
                         
                          
                         of 
                          
                         
                             
                         
                          
                         the 
                          
                         
                             
                         
                          
                         most 
                          
                         
                             
                         
                          
                         frequent 
                          
                         
                             
                         
                          
                         word 
                       
                        
                       
                           
                       
                     
                   
                 
               
               
                 
                   ( 
                   154 
                   ) 
                 
               
             
           
         
       
     
         [0000]    such that r&gt;1, ensures that we choose an alternative to the highest frequency word only if the context indicates that an alternative selection is more likely. (If we need to delay immediate application of run-time training, we may have a criterion r&gt;R such that R&gt;1.) In case of ties between various words for a given ratio r, we may choose the one with the highest frequency. 
         [0369]    Note that in most cases the check for R can be applied before comparison of ratios to eliminate the greatest number of possibilities. 
         [0370]    When the reference count of the most frequent word is zero, r will be infinity. This may incorrectly favor rules that do not have enough training data. To counter this, we redefine r as: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             ( 
                             
                               Highest 
                                
                               
                                   
                               
                                
                               reference 
                                
                               
                                   
                               
                                
                               count 
                                
                               
                                   
                               
                                
                               excluding 
                             
                           
                         
                       
                       
                         
                           
                             that 
                              
                             
                                 
                             
                              
                             of 
                              
                             
                                 
                             
                              
                             the 
                              
                             
                                 
                             
                              
                             most 
                              
                             
                                 
                             
                              
                             frequent 
                              
                             
                                 
                             
                              
                             word 
                           
                         
                       
                     
                     
                       
                         
                           Greater 
                         
                       
                       
                         
                           
                             ( 
                             
                               1 
                               , 
                               
                                 Reference 
                                  
                                 
                                     
                                 
                                  
                                 count 
                                  
                                 
                                     
                                 
                                  
                                 of 
                                  
                                 
                                     
                                 
                                  
                                 the 
                                  
                                 
                                     
                                 
                                  
                                 most 
                                  
                                 
                                     
                                 
                                  
                                 frequent 
                                  
                                 
                                     
                                 
                                  
                                 word 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                   . 
                 
               
               
                 
                   ( 
                   155 
                   ) 
                 
               
             
           
         
       
     
         [0000]    The generated run-time values for rules for a disambiguation group may be kept in memory so as to avoid re-computation for frequent use. These may be deleted on end of program or updated when a branch count is updated. 
       4.7 Keeping the Trellis Sparse 
       [0371]    Several observations and assumptions can be made to obtain a sparse trellis, cf.  FIG. 10 :
       1. Do not store words with branches with reference count zero and branches with no words.   2. Since the value of a reference count is useful only within a disambiguation group, normalization may be occasionally applied when any particular value exceeds the precision bits allocated. This will lead to several counts becoming zero during the normalization, which is a further source of sparseness. For example, we may reserve 4 bits for the reference count, and whenever a particular count exceeds 15 in a disambiguation group, we divide each of the counts in the group by, say 8, and then drop the counts that become 0. Clearly, there is a tradeoff between performance and memory requirements here, and the two parameters controlling it are the bits reserved for storage and the factor by which a count is normalized. However, this tradeoff need not be the same for all disambiguation groups. For offline training, one may identify several “highly ambiguous” groups and assign greater precision to them for a much improved performance level. These parameters need to be determined heuristically for offline training, while they may be fixed arbitrarily for real-time processing. (Note that normalization may not only be applied within a branch, as several derived rule counts are derived from multiple branch information.)   3. The most effective means of gaining sparseness is perhaps the following. We know that approximately 95% of the time the most frequent word in a disambiguation group is the right choice. Working from an assumption that we only need to use tag information to improve on this performance level, the basic aim of the compiled information is to determine whether a particular other word is more likely than the most frequent word of the disambiguation group in the given tag context. Thus, we do not need information of branches that have reference counts that indicate that the most frequent word is likely. A relatively conservative way of ensuring this is to remove branches for which the following is satisfied for all words in a disambiguation group (calculated per branch):       
 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         Ref 
                         . 
                         
                             
                         
                          
                         ct 
                         . 
                         
                             
                         
                          
                         of 
                       
                        
                       
                           
                       
                        
                       most 
                        
                       
                           
                       
                        
                       frequent 
                        
                       
                           
                       
                        
                       word 
                     
                     
                       
                         Ref 
                         . 
                         
                             
                         
                          
                         ct 
                         . 
                         
                             
                         
                          
                         of 
                       
                        
                       
                           
                       
                        
                       word 
                     
                   
                   ≥ 
                   
                     
                       
                         Freq 
                         . 
                         
                             
                         
                          
                         of 
                       
                        
                       
                           
                       
                        
                       most 
                        
                       
                           
                       
                        
                       frequent 
                        
                       
                           
                       
                        
                       word 
                     
                     
                       
                         Freq 
                         . 
                         
                             
                         
                          
                         of 
                       
                        
                       
                           
                       
                        
                       word 
                     
                   
                 
               
               
                 
                   ( 
                   156 
                   ) 
                 
               
             
           
         
       
     
         [0375]    4. The above has a very important implication. We do not need to carry a branch for a scanned word that does not already exist in the trellis if the scanned word is the one with the highest frequency in the disambiguation group. Thus, for 95% of the words scanned, we will not be generating new branches. Note, however, that for every such word scanned, we will have to check if a branch already exists, and, in that case, increment the corresponding reference count for that branch.
       5. Note that scanning of words with the highest frequency in a group will also lead to situations where the condition ( 156 ) will be true and thus further sparseness will result.   6. Furthermore, we may apply a limiting restriction to the maximum number of branches (or, alternatively, maximum memory) that a disambiguation group might have. This is determined on the basis of the ambiguity of a group and will in general be proportional to the number of words in a group. To carry out such “trimming” of the trellis, one must give preference to new branches that have information greater than or equal to other branches that leads to choosing an alternative to the most frequent word. This calculation may be simplified by comparing the following ratio for two branches:       
 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             Highest 
                              
                             
                                 
                             
                              
                             reference 
                              
                             
                                 
                             
                              
                             count 
                              
                             
                                 
                             
                              
                             excluding 
                           
                         
                       
                       
                         
                           
                             that 
                              
                             
                                 
                             
                              
                             of 
                              
                             
                                 
                             
                              
                             the 
                              
                             
                                 
                             
                              
                             most 
                              
                             
                                 
                             
                              
                             frequent 
                              
                             
                                 
                             
                              
                             word 
                           
                         
                       
                     
                     
                       
                         
                           Greater 
                         
                       
                       
                         
                           
                             ( 
                             
                               1 
                               , 
                               
                                 Reference 
                                  
                                 
                                     
                                 
                                  
                                 count 
                                  
                                 
                                     
                                 
                                  
                                 of 
                                  
                                 
                                     
                                 
                                  
                                 the 
                                  
                                 
                                     
                                 
                                  
                                 most 
                                  
                                 
                                     
                                 
                                  
                                 frequent 
                                  
                                 
                                     
                                 
                                  
                                 word 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                   . 
                 
               
               
                 
                   ( 
                   157 
                   ) 
                 
               
             
           
         
       
       
         
           
             7. Note that if we have to carry out trimming when we are adding a new branch, then we simply need to remove a branch with the lowest ratio provided it is less than or equal to 1. 
             8. When we trim a branch we are also taking away information that may actually lead to a useful derived rule. To keep this information, we use the empty tags. Whenever we remove a branch, say (t1 to t2), with both tags non-empty, we must create or increment the counts of branches (t1 to empty) and (empty to t2) by the same amounts removed. 
           
         
       
     
       4.8 Benefits 
       [0380]    The following are some of the benefits of the approach described above.
       Fast run-time disambiguation.   Limited storage requirements. Storage limits can be arbitrarily specified.   Very flexible approach. Extensive manual/automatic customization and rule setting depending on ambiguity of the group possible.   Finite precision handling included and used to promote greater sparseness.   Non-Markov rules are seamlessly applied.   Conditioning word probability over previous tags is more efficient than conditioning tag probabilities over previous tags and then summing up.   Common approach to offline and run-time training.       
 
       4.9 Modification 
       [0388]    From experimental results, it seems that a compact disambiguation system that uses tag information may get most of its error reduction from the previous word tag information. If only this information is to be stored as part of the prior statistics then tremendous simplifications are entailed, both in storage and computation. This subsection outlines the method for that simplified system. Apart from that, the following additional changes are made.
       Words scanned in training with no previous words are designated with the “empty” previous word tag.
 
 FIGS. 11 ,  12 ,  13 , and  14  are analogous to  FIGS. 7 ,  8 ,  9 ,  10 .
       
 
       4.10 Automatic Tag Grouping 
       [0390]    There are also other NLP techniques, used previously for speech processing, that are applicable to text input disambiguation, cf. [38]. In particular, decision trees that minimize the entropy of disambiguation can be very useful in automatic tag grouping. It is clear from experiments that different groupings can be favorable for different collision groups. A method to automatically identify these groups will lead to a more compact representation per given error reduction. 
         [0391]    For our purpose, we can apply the basic principle of trying to reduce the uncertainty in disambiguation output while seeking a more compact representation. Starting from the most granular tags, we may tackle the representation problem when data storage exceeds a specified value. Then, we can work through an inverted decision tree and combine finer tag groups into coarser ones until the data storage requirement is achieved. The selection of tag groups to combine should be one that leads to a least overall gain in entropy of the disambiguation output conditioned on the prior model. We can easily work through a constrained inverted tree that only allows-grouping of specified tag groups into coarser ones, e.g., combination of all AJ* groups into AJ, combination of NN1 and NN2 into NN, etc. 
         [0392]    5 Display Optimization and Cost Functions 
       5.1 An Outline of the Display Optimization Problem 
       [0393]    When using a reduced keyboard like the One-Row Keyboard, the user does not obtain perfect feedback about the progress of the input process. The visual feedback may not produce the letter or symbol that the user has in mind and the screen may keep changing, some times displaying the intended symbol and some times not. A major challenge for these reduced keyboards is then to provide feedback to the user that to the greatest extent possible will allow the user to keep the input process in the background and minimize the amount of focus of attention that the input process requires. Here we shall consider the aspect of this problem involving the visual feedback and what to display on the screen of the device as the input process proceeds. 
       5.2 Cost Function Heuristics 
       [0394]    There is probably no way to establish a cost function that quantifies the user experience exactly. However, let us try to quantify some heuristics for how the input experience of a reduced keyboard compares with the input process using the regular, full keyboard. As the user inputs characters on the regular keyboard, the screen “immediately” displays the letters or symbols that have been keyed in. Similarly, if a certain key is hit on the reduced keyboard and results in the intended letters (assuming that the user always hits the intended key and that there is no “typo”) being displayed, the associated cost is defined to be 0. On the other hand, if the last key entry results in one of the displayed letters or symbols being different than the intended combination, then it may be reasonable to assume that the associated cost is 1 and this cost is then added to the cost of the input process before reaching the current position. As the user hits the space bar to indicate that the signature input has reached the intended end (or any other key used for that purpose), we obtain a total cost. This generates a total cost function C 1  defined for each legal entry. 
         [0395]    There are several other cost functions that seem reasonable as well. For example, suppose we only check if the, last entered character results in a display that coincides with the intended symbol, and we assign a cost of 1 if it is not and 0 if it is. In particular, we do not look at the entire expression obtained so far, only the last entered character. Adding up all those costs as we reach the end for a given valid combination defines another total cost function C 2  also defined on the collection of legal entries. 
         [0396]    Both C 1  and C 2  satisfy that the cost of the input process for the regular keyboard is always 0. It seems that C 2  is a little simpler, but that C 1  probably more accurately reflects the user experience. 
         [0397]    Perhaps the user experience is such that if there is a character combination on the screen and this combination differs from the intended one in n places, then the anxiety or concern that it causes is more adequately reflected by a (differential) cost of n, then we may define yet another total cost function C 3  obtained by summing up these differential costs. Another possibility is to not go through these differential cost functions at all. For example, suppose the cost for a given valid combination of n characters is simply if this combination shows up after the n:th keystroke (without the space character or whatever is used to indicate completion of the input process for that valid character combination). Then we have yet another cost function C 4 . This cost function is perhaps appropriate for the user who knows what he is inputting and trusts the application. So, he is not going to seriously consider the visual feedback and be alarmed by it until he has reached the end of the word. 
         [0398]    Suppose we go back to the definition of the cost function C 1 . If the user keeps on typing and the intended symbol is not displayed, then the cost goes up with 1 each time this happens. So, if the desired character combination fails to show up say three times in a row, then the cost goes up by 3. More generally if the incorrect display is obtained n times in a row, then the added cost is n. In this sense, this cost function is linear as a function of the “delay.” It may be more accurate to model the user&#39;s experience by some other dependency on this n. For example, we may assume a quadratic dependency so that the differential cost after n incorrect displays is n 2 , and then as soon as the intended combination shows up on the screen the differential cost is set back to 0. This defines yet another cost function C 1,(2)  (where the (2) indicates the quadratic nature of the cost&#39;s dependency on the “delay”). Similar modifications of the other cost functions can also be defined. 
         [0399]    Another type of modification of these cost functions is the following. To be specific, let us consider C 1  again. Suppose we now distinguish two types of costs. In addition to the cost of 1 each time the intended character combination fails to show up, we can also assign a cost a (with a≧0) for each user action to display another character combination, consistent with the signature up to that point. Then if it takes k such actions (perhaps key clicks or down arrows), then the additional differential cost is ka. In this way, we obtain a more general class of cost functions C 1 (a) with C 1 (0)=C 1 . By adjusting the value of a, we can model how much we believe the effort to adjust the displayed character combinations impacts the user&#39;s experience. 
         [0400]    Similar modifications of the other cost functions are also possible. 
         [0401]    There are certainly other aspects that may be interesting to take into consideration when defining a cost function. Different words and letter combinations have different probabilities for being mistyped. This can also easily be incorporated into the definition of a cost function. Another related effect that may be interesting to model is that with a reduced keyboard it becomes particularly challenging to keep track of the number of times in a row a certain key has been hit. So, when the signature remains the same even when the intended letter changes it is easy to introduce a typo. Hence, one would expect the user to have to allocate more attention to those situations unless the feedback is accurate. With this in mind, we can, for instance, assign a quadratic differential cost function not to a general delay as in the definition of C 1,(2) , but rather only when the signature remains the same in consecutive key strokes. The total cost function with this modification is denoted by C 1   (2) . 
         [0000]    5.3 Beginning of Words with Path Ordering is not Optimal 
         [0402]    Let us assume that we are using a standard dictionary with frequency of use information for each word. This makes it possible to calculate the path probabilities for any given signature sequence and for any beginning of word or legal combination. Hence, it becomes possible to order each of the character combinations in order of most likely to least likely interpretation of a given (partial) signature. If the decision of what to display on the screen and in a possible alternatives region is based on that order (with the most likely appearing on the screen, say, and alternatives possibly displayed consistently with the ordering), then we shall say we are using the path ordered Beginning of Words (BOW/po) approach. (Note that this is a misnomer since a BOW may not actually be the beginning of a word, just a valid combination of characters.) 
         [0403]    Although the BOW/po seems like an efficient procedure for the display, we shall next show that it is in fact sub-optimal for the cost function C 3 . The example will make it clear that BOW/po is quite often sub-optimal. 
         [0404]    We start by observing that the values of the different cost functions also depend on the dictionary used, not just the display routines (and of course the combination the cost function is being evaluated for). We shall proceed by finding a small dictionary for which BOW/po is sub-optimal when the cost function C 3  is used. We shall not be concerned with the interpretation of the dictionary entries as words in any natural language. We are interested in understanding the underlying phenomena that cause a display procedure to be an optimal solution or not. 
       Example 5.1 
       [0405]    Let the dictionary consist of three words, each one with two letters. Let the three words be 
         [0000]      aa bb bc  (158) 
         [0000]    Suppose the keyboard has all three letters on one key: [abc]. Let us further assume that the probabilities of the words are as follows: 
         [0000]        P ( aa )=0.4 P ( bb )=0.39 P ( bc )=0.21.  (159) 
         [0000]    Then the BOW/po results in “b” first being displayed as the user hits the key, and then as the user hits it a second time “aa” is displayed, and finally as he hits the space bar “aa” remains on the screen. The average total cost  C   3 (BOW/po) for this three-word based dictionary is 
         [0000]      0.4×1+0.4×0+0.6×0+0.39×2+0.21×2+0.4×0+0.39×2+0.21×2=2.8  (160) 
         [0000]    On the other hand, if we use a different display algorithm, we can achieve a lower cost. More specifically, suppose we first display “b” as before, then “bb”, and let “bb” remain on the screen when the space bar is hit. Then the average total cost  C   3 (BOW/mod) is 
         [0000]      0.4×1+0.6×0+0.4×2+0.39×0+0.21×1+0.4×2+0.39×0+0.21×1=2.42.  (161) 
       5.4 A General Class of Display Algorithms 
       [0406]    In this subsection, we shall identify a useful, general class of display procedures that includes BOW/po as well as many others. The rationale behind this class is based on the assumption that the user inputs key by key, moving from the left to the right of the signature corresponding to the intended character combination. Eventually he reaches the end of the intended combination, and at that point we assume that he hits a space bar. If we are really trying hard to avoid changes on the screen, we may decide to suppress updating the screen every second time or something similar. However, our class of display algorithms will not allow this, and we shall assume that the screen is updated with a new combination after each keystroke. 
         [0407]    It is certainly possible to introduce display procedures that take sophisticated considerations like grammar, previous words, etc., into account. Here we shall not do that, but we shall only assume that the display depends on the keystrokes (i.e., the signature) and the dictionary of valid combinations, and that we update the screen after each keystroke with a combination. The input process ends, and a new one starts, after the space bar is hit. These considerations are behind the definition of display algorithm we shall consider here. We shall use the notation B for this class, and a specific procedure is denoted by B. 
         [0408]    To be more precise, we shall look more carefully at BOW, and introduce some appropriate definitions and notation. 
         [0409]    Let the dictionary D of valid character combinations be fixed, and assume that each such combination ends with a space character (the exact delimiter is of no importance). From the dictionary D we derive the collection of beginnings of valid character combinations, and this collection is denoted by  D , BOW(D), or, as we have done up until now, BOW. Because of the step-by-step assumption about the input process, the classes of truncated character combinations are useful: We let #w be the length of the character combination wε  D , i.e., the number of characters in w. We also let #  D =max{#w:wε  D } be the length of the longest character combination in  D . We define  D   i  to be the collection of all character combinations from  D  of length i, i=1, . . . , #  D . In this way, 
         [0000]        D =∪ i   D   i , and  D   i , Ω  D   i     2   =, i 1 ≠i 2 .  (162) 
         [0410]    We denote the collection of all valid signatures, corresponding to combinations in  D , by  S . Similarly, all valid signatures of length i are collected in  S   i , i.e.,  S   i  consists of all signature of the combinations in  D   i , i=1, . . . , #  D . If we also let  D (σ) be all the combinations in  D  with signature σ, then we have 
         [0000]          D =∪   i ∪ σε  S       i       D   (σ) 
         [0000]          D     i =∪ σε  S       i       D   (σ) 
         [0000]          D   (σ 1 )∩    D   (σ 2 )=, σ 1 ≠σ 2 .  (163) 
         [0000]    The classes  D (σ) are interesting since each contains the “collisions” we have for the corresponding signature σ. 
         [0411]    Now, a display algorithm is simply a mapping B:  S →  D  that filters these classes in the sense that 
         [0000]      B  S   i ⊂  D   i , i=1, . . . , #  D .  (164) 
         [0000]      Hence, 
         [0000]      B(σ)ε  D   i , for each σε  S   i , i=1, . . . , #  D .  (165) 
         [0412]    The collection of all display algorithms is denoted by  B . With B=BOW/po we certainly have Bε  B . 
         [0413]    As the user keeps entering the signature sequence corresponding to the intended word, he receives feedback on the screen. Using a display algorithm from the general class B, he receives this feedback after each keystroke, and the displayed character combination has as many characters as keystrokes (note that we are including the space bar, mostly for convenience). Hence, if the intended word has N+1 characters, counting the space character (or equivalent), we obtain a sequence of N+1 displayed character combinations, b i , i=1, . . . , N+1. Furthermore, 
         [0000]      #b i =i,  i= 1 , . . . , N+ 1.  (166) 
       5.5 A General Class of Cost Functions 
       [0414]    The class of cost functions we shall consider is also quite general. At this point the ambition we have with these cost functions is to quantify the user experience as he (correctly) types in the different keystrokes corresponding to the intended word. For example, we could also try to measure how easy it is to detect common typos, or how easy it is to correct such mistakes, but that is not our goal at present. 
         [0415]    Essentially, we are trying to capture the user&#39;s experience of the difference between what appears on the screen and what he ideally wants to see on the screen after each keystroke. With this in mind, it makes sense to first define what we mean by a differential (or incremental) cost function C i  at step i. The idea is for C i  to measure the cost of the difference after the i:th keystroke. So, if the user intends to type the valid letter combination w, and he after keystroke i, i=1, . . . , N+1, sees the character combination b i , then C i (w, b i ) somehow should ideally reflect the user&#39;s experience at that point; a larger value of C i  (w, b i ) should hopefully correspond to a worse user experience. 
         [0416]    A differential cost function at step i is now simply a non-negative function C i :  D   i ×  D   i →[0,+∞) defined on pairs (u,v) of valid character combinations of length i: 
         [0000]        C   i ( u,v )≧0, (u,v)ε  D   i ×  D   i .  (167) 
         [0417]    For a valid character combination wεD with signature σ, we let w (i)  be the i first characters and, similarly, σ (i)  be the signature of w (i) , i=1, . . . , #w. Now, a total cost function is a non-negative function C:D×  B →[0, +∞) that is defined through a collection of differential cost functions C i , i=1, . . . , #D by letting 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           C 
                            
                           
                             ( 
                             
                               w 
                               , 
                               B 
                             
                             ) 
                           
                         
                         = 
                         
                           
                             ∑ 
                             
                               i 
                               = 
                               1 
                             
                             
                               # 
                                
                               
                                   
                               
                                
                               w 
                             
                           
                            
                           
                             
                               C 
                               i 
                             
                              
                             
                               ( 
                               
                                 
                                   w 
                                   
                                     ( 
                                     i 
                                     ) 
                                   
                                 
                                 , 
                                 
                                   B 
                                    
                                   
                                     ( 
                                     
                                       σ 
                                       
                                         ( 
                                         i 
                                         ) 
                                       
                                     
                                     ) 
                                   
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                     
                       
                         
                           w 
                           ∈ 
                            
                         
                         , 
                         
                           B 
                           ∈ 
                           
                             
                               ℬ 
                               _ 
                             
                             . 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   168 
                   ) 
                 
               
             
           
         
       
     
       5.6 The Solution of the Display Optimization Problem 
       [0418]    We shall assume that we are given a dictionary D of valid combinations and a specific cost function C. We shall also assume that we know the collection of all probabilities P={P(W)} wεD  of combinations in D. We let C avg =C avg (B) be the average total cost for all combinations in D using the display procedure Bε  B . The display optimization problem of Subsection 5.1 can now be precisely stated as follows: find the solution B min  to the minimization problem 
         [0000]      min Bε  B   C avg (B).  (169) 
         [0419]    In other words, the solution to the display optimization problem is the display algorithm B min  such that 
         [0000]        C   avg ( B   min )=min Bε  B     C   avg ( B ).  (170) 
         [0420]    To solve this problem, we first observe that this is the same as solving each of the following problems for the differential cost functions C i , i=1, . . . , #  D , associated with C: 
         [0000]      min Bε  B    avg wε  D       i   C i (w,B(σ))  (171) 
         [0000]    where σ is the signature of w. Further untangling our notation, this is equivalent to solving 
         [0000]      min uε  D (σ) avg wε  D (σ) C i (w,u) for each σε  S   i .  (172) 
         [0000]    In other words, fixing a general σε  S   i , to solve the display optimization problem we have to find the element u min ε  D (σ) for which 
         [0000]      avg wε  D (σ)   C   i ( w,u   min )=min uε  D (σ) avg wε  D (σ) C i ( w,u ).  (173) 
         [0000]    Once we find this u min =u min (σ), then the corresponding optimal display algorithm B min  is given by 
         [0000]        B   min (σ)= u   min (σ), σε  S   i   (174) 
         [0000]    for i=1, . . . , #  D . 
         [0421]    This equation is in fact not hard to solve in general. However, let us still start with the easiest case. If we pick the cost function C 1 , then due to the particular definition of this cost function (it is either 0 or 1 depending on whether the displayed u is the same as the intended combination), it is easy to see that the solution of (170) is B min =BOW/po (for each fixed dictionary). 
         [0422]    Going back to the general case (169) and its alternative formulation (172), we note that if we are given the probabilities P={p(w)} wεD  of the combinations in the dictionary D, then we can calculate all the probabilities P={  p (w)} wε  D    of all the wε  D . Using the definition of the average (or expected value) over this probability distribution, we see that (172) is the same as 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       min 
                       
                         u 
                         ∈ 
                         
                           
                              
                             _ 
                           
                            
                           
                             ( 
                             σ 
                             ) 
                           
                         
                       
                     
                      
                     
                       
                         ∑ 
                         
                           w 
                           ∈ 
                           
                             
                               D 
                               _ 
                             
                              
                             
                               ( 
                               σ 
                               ) 
                             
                           
                         
                       
                        
                       
                         
                           
                             C 
                             i 
                           
                            
                           
                             ( 
                             
                               w 
                               , 
                               u 
                             
                             ) 
                           
                         
                          
                         
                           
                             p 
                             _ 
                           
                            
                           
                             ( 
                             
                               w 
                               | 
                               σ 
                             
                             ) 
                           
                         
                          
                         
                             
                         
                          
                         for 
                          
                         
                             
                         
                          
                         each 
                          
                         
                             
                         
                          
                         σ 
                       
                     
                   
                   ∈ 
                   
                     
                       
                          
                         _ 
                       
                       i 
                     
                     . 
                   
                 
               
               
                 
                   ( 
                   175 
                   ) 
                 
               
             
           
         
       
     
         [0423]    Here  p (w|σ) is the conditional probability of w, knowing that wε  D (σ): 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         p 
                         _ 
                       
                        
                       
                         ( 
                         
                           w 
                           | 
                           σ 
                         
                         ) 
                       
                     
                     = 
                     
                       
                         
                           p 
                           _ 
                         
                          
                         
                           ( 
                           w 
                           ) 
                         
                       
                       
                         
                           p 
                           _ 
                         
                          
                         
                           ( 
                           σ 
                           ) 
                         
                       
                     
                   
                   , 
                   
                     
 
                   
                    
                   with 
                 
               
               
                 
                   ( 
                   176 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       p 
                       _ 
                     
                      
                     
                       ( 
                       σ 
                       ) 
                     
                   
                   = 
                   
                     
                       
                         p 
                         _ 
                       
                        
                       
                         ( 
                         
                           
                             D 
                             _ 
                           
                            
                           
                             ( 
                             σ 
                             ) 
                           
                         
                         ) 
                       
                     
                     = 
                     
                       
                         ∑ 
                         
                           w 
                           ∈ 
                           
                             
                               D 
                               _ 
                             
                             ( 
                             σ 
                             ) 
                           
                         
                       
                        
                       
                         
                           
                             p 
                             _ 
                           
                            
                           
                             ( 
                             w 
                             ) 
                           
                         
                         . 
                       
                     
                   
                 
               
               
                 
                   ( 
                   177 
                   ) 
                 
               
             
           
         
       
     
         [0424]    The equation (175) thus shows that the solution to the display optimization problem is obtained by letting u min (a) be the smallest component of the vector obtained by applying the matrix C i (σ)=(C i (w,u)) uε  D (σ),wε  D (σ)  to the vector of probabilities P(σ)=(  p (w)) wε  D (σ) . 
         [0425]    In the case of the cost function C 1 , it is easily shown that this solution is in fact BOW/po. 
       Example 5.2 
       [0426]    In the case of the cost function C 1 , the matrices C i   1 (σ), σε  S   i , are particularly easy. All elements are 1 except for the diagonal where they are 0: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       C 
                       i 
                       1 
                     
                      
                     
                       ( 
                       σ 
                       ) 
                     
                   
                   = 
                   
                     
                       ( 
                       
                         
                           
                             1 
                           
                           
                             1 
                           
                           
                             … 
                           
                           
                             1 
                           
                         
                         
                           
                             1 
                           
                           
                             1 
                           
                           
                             … 
                           
                           
                             1 
                           
                         
                         
                           
                             … 
                           
                           
                             … 
                           
                           
                             … 
                           
                           
                             … 
                           
                         
                         
                           
                             1 
                           
                           
                             1 
                           
                           
                             … 
                           
                           
                             1 
                           
                         
                       
                       ) 
                     
                     - 
                     
                       ( 
                       
                         
                           
                             1 
                           
                           
                             0 
                           
                           
                             … 
                           
                           
                             0 
                           
                         
                         
                           
                             0 
                           
                           
                             1 
                           
                           
                             … 
                           
                           
                             0 
                           
                         
                         
                           
                             … 
                           
                           
                             … 
                           
                           
                             … 
                           
                           
                             … 
                           
                         
                         
                           
                             0 
                           
                           
                             0 
                           
                           
                             … 
                           
                           
                             1 
                           
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   ( 
                   178 
                   ) 
                 
               
             
           
         
       
     
         [0000]    These are n×n matrices with n given by the number of elements in  D (σ): n=#  D (σ) (for each σ). Hence, the equation (175) in this case becomes 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       min 
                       
                         u 
                         ∈ 
                         
                           
                             D 
                             _ 
                           
                           ( 
                           σ 
                           ) 
                         
                       
                     
                      
                     
                       
                         ∑ 
                         
                           w 
                           ∈ 
                           
                             
                               D 
                               _ 
                             
                             ( 
                             σ 
                             ) 
                           
                         
                       
                        
                       
                         
                           p 
                           _ 
                         
                          
                         
                           ( 
                           w 
                           ) 
                         
                       
                     
                   
                   - 
                   
                     
                       
                         p 
                         _ 
                       
                        
                       
                         ( 
                         u 
                         ) 
                       
                     
                     . 
                   
                 
               
               
                 
                   ( 
                   179 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Since the sum of probabilities here is independent of u, the minimum value u min  is obtained for the component corresponding to the largest probability  p (u). This is of course exactly BOW/po. 
         [0427]    Let us also briefly reconsider Example 5.1. 
       Example 5.3 
       [0428]    Let us consider the small dictionary in Example 5.1 and the cost function C 3 . The three combinations aa, bb, and bc have the same signature (hitting the same key twice) and hence belong to the same  D (σ). If we order these three elements with aa first, bb second, and bc last, then the cost matrix C=C 2   3 (σ) for that σ is given by 
         [0000]    
       
         
           
             
               
                 
                   
                     C 
                     = 
                     
                       ( 
                       
                         
                           
                             0 
                           
                           
                             2 
                           
                           
                             2 
                           
                         
                         
                           
                             2 
                           
                           
                             0 
                           
                           
                             1 
                           
                         
                         
                           
                             2 
                           
                           
                             1 
                           
                           
                             0 
                           
                         
                       
                       ) 
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   180 
                   ) 
                 
               
             
           
         
       
     
         [0000]    and the vector of probabilities is 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       P 
                       _ 
                     
                     = 
                     
                       
                         ( 
                         
                           
                             
                               0.4 
                             
                           
                           
                             
                               0.39 
                             
                           
                           
                             
                               0.21 
                             
                           
                         
                         ) 
                       
                       . 
                       
                         
 
                       
                        
                       So 
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   181 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       C 
                        
                       
                         P 
                         _ 
                       
                     
                     = 
                     
                       ( 
                       
                         
                           
                             1.6 
                           
                         
                         
                           
                             1.01 
                           
                         
                         
                           
                             1.19 
                           
                         
                       
                       ) 
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   182 
                   ) 
                 
               
             
           
         
       
     
         [0000]    and the smallest component u min  of this vector is the second, corresponding to the combination bb, 
         [0000]      u min =bb. 
         [0000]    This is consistent with the choice we made back in Example 5.1. 
       5.7 Optimal Display of Alternatives 
       [0429]    In the previous section we have shown how to obtain the optimal combination to display when the user has hit certain keys. Of course, often the keystrokes and the corresponding signatures do not identify the intended character combinations uniquely, and then the displayed combination is only the best in a probabilistic sense, with the lowest average cost (with respect to the selected differential cost function). Of course, the user may very well have intended a different combination than what is displayed on the screen. In this subsection, we shall look at what to bring up next, after the optimal solution has been displayed and is rejected by the user. Further, if that alternative is also rejected by the user, then what combination shall come up after that, and so on. 
         [0430]    We shall assume that the user has typed in a signature σ, i.e., a sequence of keystrokes, and that one of the combinations uε  D (σ) has been displayed. Since u is the first to be displayed, we shall use the notation u (0) ; it is also convenient to set  D   (0) (σ)=  D (σ). If the user inspects this u (0)  and decides to discard it, the collection of the remaining valid combinations with that signature is 
         [0000]          D     (1) (σ)=   D     (0) (σ)\{ u   (0) }.  (183) 
         [0000]    We are again interested in the optimal display algorithm, now conditioned on the extra information that u (0)  is not the intended letter combination. This translates into finding another optimal combination u (1) ε  D   (1) (σ). The optimality may be measured with a potentially different cost function. 
         [0431]    This process is then repeated recursively. Let J=J(σ)=#  D (σ) (σ is fixed). From u (j)  and  D   (j) , j=0, . . . , J−1, we obtain 
         [0000]          D     (j+1) (σ)=   D     (j) (σ)\{ u   (j)   }=  D   (σ)\{ u   (1)   , . . . , u   (j)   }, j= 0 , . . . , J− 1.  (184) 
         [0000]    Note that #  D   (j) (σ)=J−j, and in particular, the last set  D   (j)  is empty. 
         [0432]    At each step, a different cost function may be utilized if we believe that the user experience is better reflected in that way. Also, once we know that an intended element is not  D   (j−1) (σ), then the conditional probabilities for the remaining elements in  D   (j) , j=0, . . . , J−1, takes this into account. At each step, these conditional probabilities differ by a simple scaling factor. More precisely, let 
         [0000]          p     (0) ( w )=   p   ( w|wε  D   (σ))=    p   ( w |σ)  (185) 
         [0000]      and 
         [0000]          p     (j) ( w )=   p   ( w|wε  D     (j) (σ)),  j= 0, . . . , J−1  (186) 
         [0000]    for j=0, . . . , J−1. Then 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         p 
                         _ 
                       
                       
                         ( 
                         j 
                         ) 
                       
                     
                      
                     
                       ( 
                       w 
                       ) 
                     
                   
                   = 
                   
                     { 
                     
                       
                         
                           0 
                         
                         
                           
                             
                               
                                 if 
                                  
                                 
                                     
                                 
                                  
                                 w 
                               
                               ∉ 
                               
                                 
                                   D 
                                   _ 
                                 
                                 
                                   ( 
                                   j 
                                   ) 
                                 
                               
                             
                             , 
                           
                         
                       
                       
                         
                           
                             
                               1 
                               
                                 
                                   p 
                                   _ 
                                 
                                 ( 
                                 
                                   
                                     D 
                                     _ 
                                   
                                   
                                     ( 
                                     j 
                                     ) 
                                   
                                 
                                 ) 
                               
                             
                              
                             
                               
                                 p 
                                 _ 
                               
                                
                               
                                 ( 
                                 w 
                                 ) 
                               
                             
                           
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               w 
                             
                             ∈ 
                             
                               
                                 
                                   D 
                                   _ 
                                 
                                 
                                   ( 
                                   j 
                                   ) 
                                 
                               
                               . 
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   187 
                   ) 
                 
               
             
           
         
       
     
         [0433]    Now, to determine the optimal elements u (j)  to display with this successive additional information, we may proceed as before by using the analog of the equation (175) (with the cost function and the conditional probabilities replaced in the obvious way). 
         [0434]    We have now solved the full display problem, both the problem of what to display initially and then in what order to display the alternatives. The solution to the initial display optimization problem provides a display algorithm B, i.e., a mapping B:  S →  D  so that 
         [0000]    
       
         
           
             
               
                 
                   
                      
                     _ 
                   
                   ∋ 
                   
                     σ 
                      
                     
                       → 
                       B 
                     
                      
                     u 
                   
                   ∈ 
                   
                     
                       
                         D 
                         _ 
                       
                        
                       
                         ( 
                         σ 
                         ) 
                       
                     
                     . 
                   
                 
               
               
                 
                   ( 
                   188 
                   ) 
                 
               
             
           
         
       
     
         [0435]    The solution to the full display problem extends this. For each signature σε  S , the full solution defines a vector {right arrow over (B)}(σ) consisting of all elements in  D (σ) ordered with respect to the cost functions used. Hence, 
         [0000]    
       
         
           
             
               
                 
                   
                     
                        
                       _ 
                     
                     ∋ 
                     
                       σ 
                        
                       
                         → 
                         
                           B 
                           → 
                         
                       
                        
                       
                         ( 
                         
                           
                             
                               
                                 u 
                                 
                                   ( 
                                   0 
                                   ) 
                                 
                               
                             
                           
                           
                             
                               
                                 u 
                                 
                                   ( 
                                   1 
                                   ) 
                                 
                               
                             
                           
                           
                             
                               ⋮ 
                             
                           
                           
                             
                               
                                 u 
                                 
                                   ( 
                                   
                                     J 
                                     - 
                                     1 
                                   
                                   ) 
                                 
                               
                             
                           
                         
                         ) 
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   189 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where u (j) ε  D (σ), j=0, . . . , J and J=J(σ)=#  D (σ). We refer to the mapping {right arrow over (B)} as a full display algorithm, and u (0)  is the initial display and the elements u (1)  . . . , u (J−1)  are the alternatives. 
         [0436]    We remark that the overall cost function that determines a display algorithm may be a composite of various individual cost functions. For instance, variations may be used not only before and after certain keystrokes (such as space) are entered, but also for different ordering rank in the alternatives presented. 
       5.8 A Note on Display Optimization, Approximate Typing, and NLP Considerations 
       [0437]    In the previous sections, we have often used maximum likelihood considerations for resolving ambiguities and for assessing what alternatives to present to the user. As we have seen, this often amounts to basing decisions on the most frequently occurring character combinations. It is clear that these types of considerations can instead be based on the appropriately defined cost functions. In particular, the techniques we have developed for approximate typing (including automatic error correction and auto-completion) and improved ambiguity resolution using NLP techniques both have direct analogs based on cost functions and the methods described above. These are practically realized by using the generated cost measures as a replacement of the frequency measures involved in these techniques. 
         [0438]    6 Miscellaneous Observations and Comments 
       6.1 Auto-Completion 
       [0439]    Short words often create ambiguities for any reduced keyboard and for the ORK in particular. At the other end of the spectrum, there is a sparsity of valid words and signatures, especially of the longer combinations, among the collection of all possibilities. As we have mentioned earlier, this sparsity can be exploited for auto-completion: after specifying the beginning of the word or the signature, the rest may be unique and hence it can be left to the device to automatically complete the input. 
         [0440]    Auto-completion is useful for more situations than just where the beginning uniquely identifies the rest of the input. There are situations where the several characters at the beginning of the sequence are unique, but there are several possible endings. Similarly, there is a possibility that the intended signature can be completed without the word being uniquely identified. The device may then make a prediction as to what the likely set of characters may be and thereby still provide an auto-completion option to the user. 
         [0441]    Another situation arises when there are several possible continuations of the input sequence, but the device may make a prediction as to what the likely set of characters may be. In such situations, auto-completion can also be useful. 
         [0442]    We begin by limiting the search for auto-completion alternatives to the dictionary entries that satisfy the signature entered so far, and then we proceed as follows. At any given point in the signature entry process, there may be more than one dual signature sequence that, in combination with the entered signature, forms a full word or BOW arising from a valid dictionary entry. For each of these dual signature sequences, there will be zero or more completion alternatives that will satisfy the entered signature sequence as well as the dual signature sequence. (Zero for the case when the dual signature sequence will correspond to a full word only.) Thus, if we offer an auto-completion sequence to the user for each of these “duals” separately, the overall collection of available alternatives increases. These alternatives may then be presented to the user as he cycles through the duals of the entered signature. 
         [0443]    The above determination of the auto-completion alternatives can be incorporated as part of the normal dictionary search that occurs on keystroke entry. At any given keystroke, the signature sequence so far is known and, hence, as one scans through the dictionary for matching dual signature sequences, one may also check the outlined criterion to find an auto-completion alternative for each possible dual signature sequence. These alternatives may then be stored and made available to the user as he cycles through the collection. This simultaneous scanning for multiple purposes is very efficient and decreases overall computation load on the processor. 
         [0444]    When the user has already typed the delimiter after a sequence of signatures, it is clear that the end of the intended word has been reached, and no auto-completion offering will be useful. This information causes a redundancy that can be exploited for other uses. For instance, we can use the same mechanism for presenting alternatives and accepting these for both auto-completion and auto-correction. The auto-correction may then be offered only when the entire signature has been entered. The offering of auto-completion and auto-correction alternatives may be mutually exclusive in time for another reason: auto-correction alternatives may, for instance, be offered only if there is no matching dual signature sequence from the dictionary for the entered signature sequence, which of course never occurs for auto-completion. 
         [0445]    Clearly, auto-completion alternatives that do not add much more information to the entered signature are not very useful. For instance, if only one character is remaining in a sequence of character entries, it may be easier to just type the remaining character rather than to use the auto-completion acceptance method. Also, it may distract the user from the general typing flow to see such short, non-useful alternatives on the display. Thus, we may require a minimum number of additional characters before alternatives are presented to the user. This not only improves the user experience, but it also helps us to quickly search the dictionary for auto-completion alternatives as we can directly eliminate the entries that do not meet the minimum additional characters criterion. An additional benefit is that by eliminating shorter entries, we can consider the longer, useful entries only in those cases. As a result, the number of useful alternatives actually increases. 
       6.2 Reference Lists 
       [0446]    As we search for auto-completion alternatives, there are typically many valid character combinations consistent with the signature entered up to that point. For example, suppose the user is certain about the spelling of the beginning of a word, but needs assistance with the rest. In this situation and others, we may provide the user access to a list of such alternatives. Moreover, we may disregard the currently displayed word and offer the full set of alternatives consistent with the entered signature. We may additionally limit these alternatives based on frequency of use, recent use, or other factors. This is desirable if there are too many alternatives for a good user experience. 
       6.3 Predictions Based on Mixed Ambiguity 
       [0447]    The dictionary used may be composed of characters/symbols that may or may not correspond to an ambiguously entered signature. It also possible to have a character/symbol in a dictionary correspond to both an ambiguously entered signature and an unambiguously entered input. Specifically of interest is the following scenario where we have two or more modes. In one or more modes, we use the ten keys for ambiguous signature entry and in other modes we use the ten keys for unambiguous entry only. The unambiguous entries may be for a numeric mode for characters 0 through 9 or for a symbol mode. In each of these modes, we may use additional input such as a Shift key press to create further sub-modes which need not be mutually exclusive in composition. Now, with a dictionary that supports all kinds of characters/symbols and entry modes as outlined above, we may use input from all modes to predict the final output presented to the user. For instance, for typing a word (abbreviation really) such as “Y2K,” one may use the standard ambiguous mode to enter “Y” and “K” while “2” may be entered in the numeric unambiguous mode. The disambiguation engine will still be able to predict the full sequence “Y2K” from the given input and dictionary. A possible optimization for dictionary storage that is helpful for storing and indexing characters which do not correspond to an ambiguous signature is the following: One may, for the purpose of indexing, assign a known signature and new dual to an unambiguously entered character. Since the index is composed for the known signatures (first four signatures in our specific case), we can now incorporate the new character in the dictionary without increasing the index size. For input purposes, the use of a common signature does not impose any additional requirements except a mapping between the two. 
       6.4 Prediction of the Case of Characters Typed 
       [0448]    Unlike the QWERTY keyboard, the Shift key in the ORK is used not only for specifying the case of letters, but also to limit the set of duals corresponding to letters and non-letter characters. Further, depending on the case of characters entered so far, we may improve upon the auto-correction and auto-completion alternatives that may be offered. Specifically, if all signatures entered so far correspond to letters in a possible offering that are upper case, we may cause all the rest of the letters in the offering to also be upper case. In other instances, we simply let them be lower case. For instance, “Thistle” may be offered as the auto-completion alternative to “This” while “THISTLE” may be offered as the auto-completion alternative for “THIS.” 
       6.5 Locking of BOW 
       [0449]    In some user typing scenarios, explicit feedback from the user regarding the validity of predicted, or otherwise entered, dual signatures is useful to capture and record as a “lock” on one or more of the duals of the character signatures entered up to that point. This “lock information” can then be used in additional typing to narrow down the search for alternatives (including auto-completion and auto-correction) to only those possible sequences that satisfy the lock. Two such specific instances are outlined below:
       If the user pauses while entering a signature to cycle through the alternatives, then the alternative cycled to must be perceived as one the user is interested in and thus may be locked.   If the user types something in an unambiguous mode or manner, such as in numeric mode, then this should be locked. Further, at this point it may be appropriate to lock the entire sequence already typed. The reasoning behind this is that if a break in touch-typing flow exists (by unambiguous entry), it is likely that the user is confident in the sequence available so far.       
 
       6.6 Contextual Information 
       [0452]    The effective auto-completion alternatives to use are often context dependent. For example, as the user enters an email address, the natural auto-completion alternatives may be those provided by his address book or by recently used email addresses. Or, if the user is entering text in a certain programming environment with specific technical words, then the best auto-completion alternatives may be quite different than when typing a general text. 
         [0453]    This type of contextual information may be used for virtually all aspects of entry using a reduced keyboard, not just for auto-completion. We may have several dictionaries available, depending on the context, and entries in these dictionaries may be flagged so that the context is identified. Contexts and dictionaries can then be given different priorities at run-time, and the feedback to the user may then reflect this. 
       6.7 Nature of “Text” 
       [0454]    The various discussions of “text” that we have had are generally understood to be composed of characters that may be letters or symbols. It is important to realize that, in fact, “text” is a misnomer here and really applies to all kinds of objects that the user input can be mapped to. For instance, a key on the keyboard may actually be mapped to a picture or graphic such as a “smiley face.” The disambiguation engine may then determine how the prediction may include such a graphic. Additionally, the engine may determine that one or more characters or symbols may be mapped to a graphic. For instance, the sequence “:-)” may be mapped by the system to a single “smiley face.” This is similar to how approximate typing methods map a sequence of characters to another such sequence, only in this case the resulting sequence includes a graphic object. 
       6.8 Spell Mode Automatic Tracking 
       [0455]    The primary objective of “spell mode” is to enable specification of the dual signature of the sequence typed by the user. Typically while we are in spell mode, we use the “cycle” key (or scroll/up-down mechanism) to go through the dual signatures for each character (or other object) entered. It is also possible to enter normal signatures in the spell mode through ORK typing. The typing prediction in the spell mode may be different than that in the normal prediction mode and in fact may be completely deterministic for a key. However, a user may choose to not use this typing and may enter normal signatures only in the normal prediction mode. 
         [0456]    In the process of entry of the normal signature, if the user finds that the dual signature of the sequence needs to be specified, and thus the user moves into spell mode, we may provide an additional feature that we call “automatic tracking.” This feature comes into play when the user enters and also exits the spell mode. At time of entry the system specifically replaces the cursor such that it operates on the first character of the sequence being typed, while at the time of exit it re-places the cursor such that it goes back to the original position where the spell mode was entered or a position that is at the end of the sequence (including before or after a delimiter). In general, the exact placement of the cursor in both cases may vary and may be determined by several factors at run-time. 
         [0457]    Note that for the above feature the user may attempt to spell a sequence on a “word” basis, or on possibly another basis that may be longer, such as full sentences/paragraphs/pages/etc., and the corresponding location of the cursor to be placed at may vary. Also, note that the feature may be provided to the user as a set of customizable options, including ones that may enable or disable the whole feature of replacement of cursor entirely. 
       6.9 Numeric and Symbol Mode Mapping 
       [0458]    A particular way for mapping of numerals and some symbols is described here and may be used. 
         [0459]    The user may enter a numeric mode through an input signal that may be a key press. In this mode, pressing any one of the main ten keyboard keys will lead to the system generating as output a corresponding numeral (from 09, exact assignment may vary such as 1234567890). 
         [0460]    Further, when in the numeric mode, another input (including a key down event of Shift or other Key) may cause the mode to change to a symbol mode in which each of the ten keys may correspond to a specific symbol being output. In particular, the correspondence to the key arrangement from left to right may be as follows: @$+-/( ),.:. 
         [0461]    Further, when in symbol mode (and the Shift key may be continued to be held down), the user may produce one or more inputs (including an up/down/cycle key events) that cause the mapping of the keys to symbols to change to a different set of symbols. In particular, the following two mapping are of interest and may be arrived to by consecutive presses of say a cycle key: #%*={ }&lt; &gt;; and ″&amp;̂_|[ ]!&#39;?. Another input from the user (including release of the Shift or other key previously held down) may then cause the mode to revert from symbol to numeric. 
       REFERENCES 
       [0000]    
       
         [1] The Penn Treebank Project. World Wide Web.
       http://www.ldc.upenn.edu/doc/treebank2/treebank2. index.html.   
     
         [2] Steven Abney. Parsing by chunks. In Robert C. Berwick, Steven P. Abney, and Carol Tenny, editors, Principle-Based Parsing: Computation and Psycholinguistics, pages 257-278. Kluwer Academic Publishers, Boston, 1991.
       http://citeseer.ist.psu.edu/article/abney91parsing.html.   
     
         [3] Steven Abney. Partial parsing via finite-state cascades. In Workshop on Robust Parsing, 8th European Summer School in Logic, Language and Information, Prague, Czech Republic, pages 8-15, 1996.
       http://citeseer.ist.psu.edu/abney96partial.html.   
     
         [4] James F. Allen.  Natural Language Understanding . The Benjamin/Cummings Publishing Company, Menlo Park, Calif., 1995. 
         [5] Susan Armstrong, Graham Russell, Dominique Petitpierre, and Gilber Robert. An open architecture for multilingual text-processing. In  EACL  1995,  SIGDAT Workshop , pages 30-34, 1995. 
         [6] Ricardo A. Baeza-Yates and Gonzalo Navarro. Fast approximate string matching in a dictionary. In  String Processing and Information Retrieval , pages 14-22, 1998.
       http://citeseer.ist.psu.edu/article/baeza-yates98fast.html.   
     
         [7] Ricardo A. Baeza-Yates and Gonzalo Navarro. Faster approximate string matching.  Algorithmica,  23(2):127-158, 1999.
       http://link.springer.de/link/service/journals/00453/bibs/23n2 p127.html.   
     
         [8] Adam L. Berger, Stephen A. Della Pietra, and Vincent J. Della Pietra. A maximum entropy approach to natural language processing.  Computational Linguistics,  22(1):39-71, 1996.
       http://www-2.cs.cmu.edu/˜aberger/maxent.html   http://citeseer.ist.psu.edu/berger96maximum.html.   
     
         [9] T. Brants. Tnt—a statistical part-of-speech tagger. In Proceedings of the 6th Applied NLP Conference, ANLP-2000, Apr. 29-May 3, 2000, Seattle, Wash., 2000.
       http://citeseer.ist.psu.edu/article/brants00tnt.html.   
     
         [10] E. Brill. A report of recent progress in transformation-based error-driven learning. In  Proc. ARPA Human Language Technology Workshop &#39; 94, Princeton, N.J., 1994.
       http://citeseer.ist.psu.edu/brill94report.html.   
     
         [11] Eric Brill. A simple rule-based part-of-speech tagger. In  Proceedings of ANLP -92, 3 rd Conference on Applied Natural Language Processing , pages 152-155, Trento, IT, 1992.
       http://citeseer.ist.psu.edu/brill92simple.html.   
     
         [12] Eric Brill. Some advances in transformation-based part of speech tagging. In  National Conference on Artificial Intelligence , pages 722-727, 1994. 
         [13] Eric Brill. Unsupervised learning of disambiguation rules for part of speech tagging. In  Proceedings of the Third Workshop on Very Large Corpora . Association for Computational Linguistics, 1995. 
         [14] Harry C. Bunt, Giorgio Satta, and John Carroll.  New Developments in Parsing Technology . Kluwer Academic Publishers, 2004.
       http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?userid=3B6Dv27AZ1&amp;isbn=140202293X&amp;itm=136.   
     
         [15] Glenn Carroll and Eugene Charniak. Two experiments on learning probabilistic dependency grammars from corpora. Technical Report CS-92-16, Brown, March 1992.
       http://www.cs.brown.edu/publications/techreports/reports/CS-92-16.html.   
     
         [16] E. Chavez and G. Navarro. A metric index for approximate string matching. In LATIN, pages 181-195, 2002.
       http://citeseer.ist.psu.edu/article/avez02metric.html.   
     
         [17] Doug Cutting, Julian Kupiec, Jan Pedersen, and Penelope Sibun. An practical part-of-speech tagger. In  Proceedings of the Third Conference on Applied Natural Language Processing &#39; 92, 1992. 
         [18] Matt Davis. World Wide Web, 2003.
       http://www.mrc-cbu.cam.ac.uk/personal/matt.davis/Cmabrigde/.   
     
         [19] Stephen J. DeRose. Grammatical category disambiguation by statistical optimization.  Computational Linguistics , (14.1):31-39, 1988. 
         [20] Bonnie J. Dorr.  Machine Translation: A View from the Lexicon . The MIT Press, 1993. 
         [21] Jeff Erickson. Combinatorial algorithms. World Wide Web, 2004.
       http://www-courses.cs.uiuc.edu/˜cs473g/cs373u/notes/04-dynprog.pdf.   
     
         [22] Tegic et al. A communication terminal having a predictive text editor application.
       http://swpat.ffii.org/pikta/txt/ep/1246/430/.   
     
         [23] Tegic et al. Reduced keyboard disambiguating computer.
       http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&amp;Sect2=HITOFF&amp;d=PALL&amp;p=1&amp;u=/netahtml/srchnum.htm&amp;r=1&amp;f=G&amp;1=50&amp;s1=5818437.WKU.&amp;OS=PN/5818437&amp;RS=PN/5818437.   
     
         [24] R. Garside, G. Leech, and G. Sampson, editors.  The Computational Analysis of English , chapter The CLAWS Word-tagging System. London: Longman, 1987. 
         [25] R. Garside and N. Smith.  Corpus Annotation: Linguistic Information from Computer Text Corpora , chapter A hybrid grammatical tagger: CLAWS4, pages 102-121. Longman, London, 1997.
       http://vww.comp.lancs.ac.uk/ucrel/claws/.   
     
         [26] Stuart Geman and Donald Geman. Stochastic relaxation, Gibbs distributions, and the Bayesian estimation of images. IEEE Transactions on  Pattern Analysis and Machine Intelligence,  6(6):721-741, 1984. 
         [27] Ulf Grenander.  Elements of Pattern Theory . The Johns Hopkins University Press, 1996. 
         [28] Dennis Grinberg, John Lafferty, and Daniel Sleator. A robust parsing algorithm for link grammars. In  Proceedings of the Fourth International Workshop on Parsing Technologies , September 1995.
       http://www.link.cs.cmu.edu/link/papers/index.html.   
     
         [29] Linda Van Guilder. Automated part of speech tagging: A brief overview. Lectures, World Wide Web, 1995.
       http://www.georgetown.edu/faculty/ballc/ling361/tagging-overview.html.   
     
         [30] Paul G. Hoel, Sidney C. Port, and Charles J. Stone.  Introduction to Stochastic Processes . Waveland Press, 1987. 
         [31] X. D. Huang, A. Acero, and H. Hon.  Spoken Language Processing . Prentice Hall, New York, 2001. 
         [32] W. John Hutchins and Harold L. Somers. An  Introduction to Machine Translation. Academic Press, San Diego,  1992. 
         [33] Heikki Hyyrö.  Practical methods for approximate string matching . PhD thesis, University of Tampere, Finland, 2003.
       http://acta.uta.fi/pdf/951-44-5840-0.pdf.   
     
         [34] Frederick Jelinek.  Statistical methods for speech recognition . The MIT Press, 1997. 
         [35] Mark Johnson. Pcfg models of linguistic tree representations.  Computational Linguistics , (24(4)):613-632, 1999.
       http://www.cog.brown.edu/˜mj/Publications.htm.   
     
         [36] J. Kazama and J. Tsujii. Evaluation and extension of maximum entropy models with inequality constraints.  Proceedings of the  2002  Empirical Methods in Natural Language Processing , pages 137-144, 2003. 
         [37] Angelika Kimmig and Daniel Meier. Probabilistic context free grammars. Lectures, World Wide Web, 2003/04.
       http://www.informatik.uni-freiburg.de/˜ml/teaching/ws03/pll/pcfg.pdf.   
     
         [38] l. Bahl et al. Design and construction of a binary-tree system for language modelling, 1987.
       http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&amp;Sect2=HITOFF&amp;d=PALL&amp;p=1&amp;u=/netahtml/srchnum.htm&amp;r=1&amp;f=G&amp;1=50&amp;s1=4,852,173.WKU.&amp;OS=PN/4,852,173&amp;RS=PN/4,852,173.   
     
         [39] Roy Lowrance and Robert A. Wagner. An extension of the string-to-string correction problem.  J. ACM,  22(2):177-183, 1975. 
         [40] Robert Malouf. A comparison of algorithms for maximum entropy parameter estimation. In  Proceedings of the Sixth Conference on Natural Language Learning  ( CoNLL -2002), pages 49-55, 2002.
       http://bulba.sdsu.edu/malouf/papers/conll02.pdf.   
     
         [41] Christopher D. Manning and Hinrich Schütze.  Foundations of Statistical Natural Language Processing . The MIT Press, 1999.
       http://wvw-nlp.stanford.edu/fsnlp/.   
     
         [42] Mitchell P. Marcus, Beatrice Santorini, and Mary Ann Marcinkiewicz. Building a large annotated corpus of English: The Penn Treebank.  Computational Linguistics,  19(2):313-330, 1994.
       http://citeseer.ist.psu.edu/marcus93building.html.   
     
         [43] Andrew McCallum. Introduction to natural language processing. Lectures, World Wide Web, 2004.
       http://www.cs.umass.edu/˜mccallum/courses/inlp2004/.   
     
         [44] Andrew McCallum, Kedar Bellare, and Fernando Pereira. A conditional random field for discriminatively-trained finite-state string edit distance. Technical report, June 2005.
       http://www.cs.umass.edu/˜mccallum/papers/crfstredit-uai05.pdf.   
     
         [45] Bernard Merialdo. Tagging English text with a probabilistic model.  Computational Linguistics , (20(2)):155-172, 1994. 
         [46] Ide Nancy and Jean Veronis. Word sense disambiguation: The state of the art.  Computational Linguistics,  24(1):1-40, 1998.
       http://citeseer.ist.psu.edu/ide98word.html.   
     
         [47] F. Och and H. Ney. Discriminative training and maximum entropy models for statistical machine translation. In Proc. of the 40th Annual Meeting of the Association for Computational Linguistics (ACL), 2002.
       http://citeseer.ist.psu.edu/och02discriminative.html.   
     
         [48] Judea Pearl. Causality: models, reasoning, and inference. Cambridge University Press, 2000. 
         [49] Leonid Peshkin and Virginia Savova. Why build another part-of-speech tagger? a minimalist approach. In  RANLP,  2003.
       citeseer.ist.psu.edu/peshkin03why.html.   
     
         [50] Adwait Ratnaparkhi. A maximum entropy part-of-speech tagger. In  Proceedings of the Empirical Methods in Natural Language Processing Conference , May 17-18 1996.
       http://www.cis.upenn.edu/˜adwait/statnlp.html.   
     
         [51] Antoine Rozenknop. The Wall Street Journal experiment (and useful programs). Technical Report IC/2004/32, École Polytechnique Fédérale De Lausanne, School of Computer and Communication Sciences, Mar. 26, 2004.
       http://icwww.epfl.ch/publications/documents/IC_TECH_REPORT — 200432.pdf.   
     
         [52] Virginia Savova and Leonid Peshkin. Part-of-speech tagging with minimal lexicalization. 
         [53] Noah A. Smith. Log-linear models, 2004.
       http://nlp.cs.jhu.edu/˜nasmith/loglinear_handout.pdf.   
     
         [54] Andreas Stolcke. An efficient probabilistic context-free parsing algorithm that computes prefix probabilities.  Computational Linguistics , (21(2)):165-201, 1995.
       http://www.icsi.berkeley.edu/˜stolcke/papers/cl95/paper-html.html.   
     
         [55] P. Vanroose. Part-of-speech tagging from an information-theoretic point of view, 2001.
       http://citeseer.ist.psu.edu/646161.html.   
     
         [56] Jacques Vergne. Tutorial: Trends in robust parsing. In  Coling,  2000.
       http://users.info.unicaen.fr/˜jvergne/tutorialColing2000.html.   
     
         [57] Robert A. Wagner and Michael J. Fischer. The string-to-string correction problem. J. ACM, 21( 1 ):168-173, 1974. 
         [58] G. Winkler.  Image analysis, random fields and dynamic Monte - Carlo methods . Springer-Verlag, Berlin, 1995. 
         [59] Stuart N. Wrigley. Speech recognition by dynamic time warping. World Wide Web, 1998.
       http://www.dcs.shef.ac.uk/˜stu/com326/sym.html.   
     
         [60] Justin Zobel and Philip W. Dart. Finding approximate matches in large lexicons.  Software—Practice and Experience,  25(3):331-345, 1995.
       http://citeseer.ist.psu.edu/zobel95finding.html.   
     
       
     
       APPENDIX A STANDARD TAG SETS 
     A.1 Part-of-Speech Tags Used 
       [0562]    These are standard tags used for instance by the British National Corpus (BNC).
   AJ0 adjective (general or positive) e.g. good, old   AJC comparative adjective e.g. better, older   AJS superlative adjective, e.g. best, oldest   AT0 article, e.g. the, a, an, no   AV0 adverb (general, not subclassified as AVP or AVQ), e.g. often, well, longer, furthest. Note that adverbs, unlike adjectives, are not tagged as positive, comparative, or superlative. This is because of the relative rarity of comparative or superlative forms.   AVP adverb particle, e.g. up, off, out. This tag is used for all prepositional adverbs, whether or not they are used idiomatically in phrasal verbs such as Come out here, or I can&#39;t hold out any longer.   AVQ wh-adverb, e.g. when, how, why. The same tag is used whether the word is used interrogatively or to introduce a relative clause.   CJC coordinating conjunction, e.g. and, or, but.   CJS subordinating conjunction, e.g. although, when.   CJT the subordinating conjunction that, when introducing a relative clause, as in the day that follows Christmas. Some theories treat that here as a relative pronoun; others as a conjunction. We have adopted the latter analysis.   CRD cardinal numeral, e.g. one, 3, fifty-five, 6609.   DPS possessive determiner form, e.g. your, their, his.   DT0 general determiner: a determiner which is not a DTQ e.g. this both in This is my house and This house is mine. A determiner is defined as a word which typically occurs either as the first word in a noun phrase, or as the head of a noun phrase.   DTQ wh-determiner, e.g. which, what, whose, which. The same tag is used whether the word is used interrogatively or to introduce a relative clause.   EX0 existential there, the word there appearing in the constructions there is . . . , there are . . . .   ITJ interjection or other isolate, e.g. oh, yes, mhm, wow.   NN0 common noun, neutral for number, e.g. aircraft, data, committee. Singular collective nouns such as committee take this tag on the grounds that they can be followed by either a singular or a plural verb.   NN1 singular common noun, e.g. pencil, goose, time, revelation.   NN2 plural common noun, e.g. pencils, geese, times, revelations.   NP0 proper noun, e.g. London, Michael, Mars, IBM. Note that no distinction is made for number in the case of proper nouns, since plural proper names are a comparative rarity.   ORD ordinal numeral, e.g. first, sixth, 77th, next, last. No distinction is made between ordinals used in nominal and adverbial roles. next and last are included in this category, as general ordinals.   PNI indefinite pronoun, e.g. none, everything, one(pronoun), nobody. This tag is applied to words which always function as heads of noun phrases. Words like some and these, which can also occur before a noun head in an article-like function, are tagged as determiners, DT0 or AT0.   PNP personal pronoun, e.g. I, you, them, ours. Note that possessive pronouns such as ours and theirs are included in this category.   PNQ wh-pronoun, e.g. who, whoever, whom. The same tag is used whether the word is used interrogatively or to introduce a relative clause.   PNX reflexive pronoun, e.g. myself, yourself, itself, ourselves. POS the possessive or genitive marker &#39;s or &#39;. Note that this marker is tagged as a distinct word. For example, Peter&#39;s or someone else&#39;s is tagged &lt;NP0&gt; Peter &lt;POS&gt;&#39;s &lt;CJC&gt; or &lt;PNI&gt; someone &lt;AV0&gt; else &lt;POS&gt;&#39;s]];   PRF the preposition of. This word has a special tag of its own, because of its high frequency and its almost exclusively postnominal function.   PRP preposition, other than of, e.g. about, at, in, on behalf of, with. Note that prepositional phrases like on behalf of or in spite of are treated as single words.   TO0 the infinitive marker to.   UNC unclassified items which are not appropriately classified as items of the English lexicon. Examples include foreign (non-English) words; special typographical symbols; formulae; hesitation fillers such as errm in spoken language.   VBB the present tense forms of the verb be, except for is or &#39;s am, are &#39;m, &#39;re, be (subjunctive or imperative), ai (as in ain&#39;t).   VBD the past tense forms of the verb be, was, were.   VBG -ing form of the verb be, being.   VBI the infinitive form of the verb be, be.   VBN the past participle form of the verb be, been   VBZ the -s form of the verb be, is, &#39;s.   VDB the finite base form of the verb do, do.   VDD the past tense form of the verb do, did.   VDG the -ing form of the verb do, doing.   VDI the infinitive form of the verb do, do.   VDN the past participle form of the verb do, done.   VDZ the -s form of the verb do, does.   VHB the finite base form of the verb have, have, &#39;ve.   VHD the past tense form of the verb have, had, &#39;d.   VHG the -ing form of the verb have, having.   VHI the infinitive form of the verb have, have.   VHN the past participle form of the verb have, had.   VHZ the -s form of the verb have, has, &#39;s.   VM0 modal auxiliary verb, e.g. can, could, will, &#39;ll, &#39;d, wo (as in won&#39;t)   VVB the finite base form of lexical verbs, e.g. forget, send, live, return. This tag is used for imperatives and the present subjunctive forms, but not for the infinitive (VVI).   VVD the past tense form of lexical verbs, e.g. forgot, sent, lived, returned.   VVG the -ing form of lexical verbs, e.g. forgetting, sending, living, returning.   VVI the infinitive form of lexical verbs , e.g. forget, send, live, return.   VVN the past participle form of lexical verbs, e.g. forgotten, sent, lived, returned.   VVZ the -s form of lexical verbs, e.g. forgets, sends, lives, returns.   XX0 the negative particle not or n&#39;t.   ZZ0 alphabetical symbols, e.g. A, a, B, b, c, d.   
 
         [0619]    The following tags are used to indicate where the CLAWS system (the tagging system used by the BNC) has indicated an uncertainty between two possible analyses:
   AJ0-AV0 adjective or adverb   AJ0-NN1 adjective or singular common noun   AJ0-VVD adjective or past tense verb   AJ0-VVG adjective or -ing form of the verb   AJ0-VVN adjective or past participle   AVP-PRP adverb particle or preposition   AVQ-CJS wh-adverb or subordinating conjunction   CJS-PRP subordinating conjunction or preposition   CJT-DT0 that as conjunction or determiner   CRD-PNI one as number or pronoun   NN1-NP0 singular common noun or proper noun   NN1-VVB singular common noun or base verb form   NN1-VVG singular common noun or -ing form of the verb   NN2-VVZ plural noun or -s form of lexical verb   VVD-VVN past tense verb or past participle   
 
         [0635]    The following codes are used with c elements only:
   PUL left bracket (i.e. (or [)   PUN any mark of separation(. !, : ; - ? . . . )   PUQ quotation mark (‘ ’ “ ”)   PUR right bracket (i.e.) or])
 
Note that some punctuation marks (notably long dashes and ellipses) are not tagged as such in the corpus, but appear simply as entity references.
   
 
       APPENDIX B POS TAGS AND COLLISION GROUPS 
       [0640]    B.1 Top Ten Collision Groups with Conditional Probabilities 
         [0000]    
       
         
               
             
               
               
               
               
               
             
               
               
               
               
               
             
           
               
                 TABLE 18 
               
             
             
               
                   
               
               
                 Top collision groups with frequencies and conditional probabilities. 
               
               
                 (x. denotes an approximation of x to at least three decimals.) 
               
             
          
           
               
                 # 
                 Words 
                 Tag 
                 Frequency 
                 P (·|signature, tag) 
               
               
                   
               
             
          
           
               
                 1 
                 of 
                 total 
                 2941790 
                 0.888 
               
               
                   
                   
                 prf 
                 2941444 
                 1. 
               
               
                   
                   
                 prp 
                 276 
                 1. 
               
               
                   
                   
                 unc 
                 28 
                 0.373 
               
               
                   
                   
                 av0 
                 27 
                 1. 
               
               
                   
                   
                 cjc 
                 11 
                 0. 
               
               
                   
                   
                 cjs 
                 3 
                 1. 
               
               
                   
                   
                 vhi 
                 1 
                 1. 
               
               
                   
                 or 
                 total 
                 370855 
                 0.112 
               
               
                   
                   
                 cjc 
                 370808 
                 1. 
               
               
                   
                   
                 unc 
                 47 
                 0.627 
               
               
                 2 
                 they 
                 total 
                 433475 
                 0.729 
               
               
                   
                   
                 pnp 
                 433441 
                 1. 
               
               
                   
                   
                 unc 
                 34 
                 1. 
               
               
                   
                 then 
                 total 
                 160826 
                 0.271 
               
               
                   
                   
                 av0 
                 160652 
                 1. 
               
               
                   
                   
                 cjs 
                 171 
                 1. 
               
               
                   
                   
                 aj0-av0 
                 1 
                 1. 
               
               
                   
                   
                 aj0 
                 1 
                 1. 
               
               
                   
                   
                 cjc 
                 1 
                 1. 
               
               
                 3 
                 now 
                 total 
                 137814 
                 0.575 
               
               
                   
                   
                 av0 
                 137801 
                 1. 
               
               
                   
                   
                 cjs 
                 11 
                 1. 
               
               
                   
                   
                 nn1 
                 1 
                 0.027 
               
               
                   
                   
                 unc 
                 1 
                 0.125 
               
               
                   
                 how 
                 total 
                 101517 
                 0.424 
               
               
                   
                   
                 avq 
                 101508 
                 1. 
               
               
                   
                   
                 unc 
                 4 
                 0.500 
               
               
                   
                   
                 nn1 
                 3 
                 0.081 
               
               
                   
                   
                 av0 
                 1 
                 0. 
               
               
                   
                   
                 np0 
                 1 
                 0.009 
               
               
                   
                 nos 
                 total 
                 186 
                 0.001 
               
               
                   
                   
                 np0 
                 107 
                 0.939 
               
               
                   
                   
                 nn2 
                 79 
                 0.975 
               
               
                   
                 yow 
                 total 
                 84 
                 0. 
               
               
                   
                   
                 nn1 
                 33 
                 0.892 
               
               
                   
                   
                 nn1-vvb 
                 26 
                 1. 
               
               
                   
                   
                 nn1-np0 
                 15 
                 1. 
               
               
                   
                   
                 vvb 
                 6 
                 1. 
               
               
                   
                   
                 np0 
                 3 
                 0.026 
               
               
                   
                   
                 vvi 
                 1 
                 1. 
               
               
                   
                 hos 
                 total 
                 8 
                 0. 
               
               
                   
                   
                 np0 
                 3 
                 0.026 
               
               
                   
                   
                 unc 
                 3 
                 0.375 
               
               
                   
                   
                 nn2 
                 2 
                 0.025 
               
               
                 4 
                 to 
                 total 
                 2560346 
                 0.966 
               
               
                   
                   
                 to0 
                 1620850 
                 1. 
               
               
                   
                   
                 prp 
                 917579 
                 1. 
               
               
                   
                   
                 avp-prp 
                 15488 
                 1. 
               
               
                   
                   
                 avp 
                 6245 
                 1. 
               
               
                   
                   
                 unc 
                 182 
                 0.363 
               
               
                   
                   
                 av0 
                 1 
                 1. 
               
               
                   
                   
                 pnp 
                 1 
                 1. 
               
               
                   
                 go 
                 total 
                 90542 
                 0.034 
               
               
                   
                   
                 vvi 
                 59772 
                 1. 
               
               
                   
                   
                 vvb 
                 28605 
                 1. 
               
               
                   
                   
                 nn1 
                 1462 
                 1. 
               
               
                   
                   
                 nn1-vvb 
                 381 
                 1. 
               
               
                   
                   
                 unc 
                 320 
                 0.637 
               
               
                   
                   
                 np0 
                 2 
                 1. 
               
               
                 5 
                 just 
                 total 
                 129550 
                 0.641 
               
               
                   
                   
                 av0 
                 125465 
                 1. 
               
               
                   
                   
                 aj0-av0 
                 3305 
                 1. 
               
               
                   
                   
                 aj0 
                 777 
                 1. 
               
               
                   
                   
                 unc 
                 3 
                 1. 
               
               
                   
                 must 
                 total 
                 72571 
                 0.359 
               
               
                   
                   
                 vm0 
                 72059 
                 1. 
               
               
                   
                   
                 nn1 
                 512 
                 1. 
               
               
                 6 
                 way 
                 total 
                 96280 
                 0.575 
               
               
                   
                   
                 nn1 
                 95313 
                 0.995 
               
               
                   
                   
                 np0 
                 844 
                 0.996 
               
               
                   
                   
                 av0 
                 122 
                 0.976 
               
               
                   
                   
                 unc 
                 1 
                 0.018 
               
               
                   
                 say 
                 total 
                 68535 
                 0.409 
               
               
                   
                   
                 vvi 
                 41291 
                 0.975 
               
               
                   
                   
                 vvb 
                 26109 
                 0.944 
               
               
                   
                   
                 nn1-vvb 
                 673 
                 1. 
               
               
                   
                   
                 nn1 
                 436 
                 0.005 
               
               
                   
                   
                 unc 
                 20 
                 0.364 
               
               
                   
                   
                 av0 
                 3 
                 0.024 
               
               
                   
                   
                 np0 
                 3 
                 0.004 
               
               
                   
                 wan 
                 total 
                 2770 
                 0.017 
               
               
                   
                   
                 vvb 
                 1554 
                 0.056 
               
               
                   
                   
                 vvi 
                 1043 
                 0.025 
               
               
                   
                   
                 aj0 
                 139 
                 1. 
               
               
                   
                   
                 unc 
                 34 
                 0.618 
               
               
                 7 
                 on 
                 total 
                 724197 
                 0.914 
               
               
                   
                   
                 prp 
                 647344 
                 1. 
               
               
                   
                   
                 avp 
                 49967 
                 1. 
               
               
                   
                   
                 avp-prp 
                 26791 
                 1. 
               
               
                   
                   
                 unc 
                 84 
                 0.977 
               
               
                   
                   
                 av0 
                 9 
                 1. 
               
               
                   
                   
                 aj0 
                 1 
                 1. 
               
               
                   
                   
                 np0 
                 1 
                 0.043 
               
               
                   
                 oh 
                 total 
                 68437 
                 0.086 
               
               
                   
                   
                 itj 
                 68413 
                 1. 
               
               
                   
                   
                 np0 
                 22 
                 0.957 
               
               
                   
                   
                 unc 
                 2 
                 0.023 
               
               
                 8 
                 may 
                 total 
                 128513 
                 0.671 
               
               
                   
                   
                 vm0 
                 113024 
                 1. 
               
               
                   
                   
                 np0 
                 15242 
                 0.893 
               
               
                   
                   
                 nn1 
                 231 
                 0.004 
               
               
                   
                   
                 unc 
                 16 
                 0.390 
               
               
                   
                 man 
                 total 
                 62098 
                 0.324 
               
               
                   
                   
                 nn1 
                 58769 
                 0.996 
               
               
                   
                   
                 nn1-np0 
                 1669 
                 0.740 
               
               
                   
                   
                 np0 
                 1544 
                 0.090 
               
               
                   
                   
                 nn1-vvb 
                 71 
                 0.772 
               
               
                   
                   
                 unc 
                 25 
                 0.610 
               
               
                   
                   
                 vvb 
                 12 
                 0.308 
               
               
                   
                   
                 vvi 
                 8 
                 0.800 
               
               
                   
                 jay 
                 total 
                 940 
                 0.005 
               
               
                   
                   
                 nn1-np0 
                 587 
                 0.260 
               
               
                   
                   
                 np0 
                 275 
                 0.016 
               
               
                   
                   
                 nn1 
                 27 
                 0. 
               
               
                   
                   
                 vvb 
                 27 
                 0.692 
               
               
                   
                   
                 nn1-vvb 
                 21 
                 0.228 
               
               
                   
                   
                 vvi 
                 2 
                 0.200 
               
               
                   
                   
                 nn0 
                 1 
                 1. 
               
               
                 9 
                 can 
                 total 
                 236321 
                 0.791 
               
               
                   
                   
                 vm0 
                 234386 
                 1. 
               
               
                   
                   
                 nn1 
                 1019 
                 0.017 
               
               
                   
                   
                 vvb 
                 734 
                 1. 
               
               
                   
                   
                 nn1-vvb 
                 153 
                 0.987 
               
               
                   
                   
                 unc 
                 13 
                 0.722 
               
               
                   
                   
                 vvi 
                 9 
                 1. 
               
               
                   
                   
                 aj0-nn1 
                 3 
                 1. 
               
               
                   
                   
                 aj0 
                 2 
                 1. 
               
               
                   
                   
                 np0 
                 2 
                 0.001 
               
               
                   
                 day 
                 total 
                 62256 
                 0.208 
               
               
                   
                   
                 nn1 
                 58863 
                 0.983 
               
               
                   
                   
                 np0 
                 1812 
                 0.998 
               
               
                   
                   
                 nn1-np0 
                 1576 
                 0.988 
               
               
                   
                   
                 unc 
                 5 
                 0.278 
               
               
                   
                 cay 
                 total 
                 34 
                 0. 
               
               
                   
                   
                 nn1-np0 
                 19 
                 0.012 
               
               
                   
                   
                 nn1 
                 11 
                 0. 
               
               
                   
                   
                 nn1-vvb 
                 2 
                 0.013 
               
               
                   
                   
                 np0 
                 2 
                 0.001 
               
               
                 10 
                 new 
                 total 
                 125206 
                 0.672 
               
               
                   
                   
                 aj0 
                 114655 
                 1. 
               
               
                   
                   
                 np0 
                 10544 
                 0.996 
               
               
                   
                   
                 unc 
                 7 
                 0.500 
               
               
                   
                 yes 
                 total 
                 60612 
                 0.326 
               
               
                   
                   
                 itj 
                 60592 
                 1. 
               
               
                   
                   
                 nn2 
                 14 
                 0.609 
               
               
                   
                   
                 unc 
                 6 
                 0.429 
               
               
                   
                 yew 
                 total 
                 269 
                 0.001 
               
               
                   
                   
                 nn1 
                 171 
                 0.868 
               
               
                   
                   
                 nn1-np0 
                 34 
                 0.739 
               
               
                   
                   
                 nn1-vvb 
                 32 
                 0.821 
               
               
                   
                   
                 np0 
                 27 
                 0.003 
               
               
                   
                   
                 vvb 
                 4 
                 0.800 
               
               
                   
                   
                 vvi 
                 1 
                 0.143 
               
               
                   
                 hes 
                 total 
                 38 
                 0. 
               
               
                   
                   
                 nn2-vvz 
                 15 
                 1. 
               
               
                   
                   
                 nn2 
                 9 
                 0.391 
               
               
                   
                   
                 vvz 
                 7 
                 1. 
               
               
                   
                   
                 np0 
                 6 
                 0.001 
               
               
                   
                   
                 unc 
                 1 
                 0.071 
               
               
                   
                 hex 
                 total 
                 31 
                 0. 
               
               
                   
                   
                 nn1 
                 19 
                 0.096 
               
               
                   
                   
                 nn1-np0 
                 5 
                 0.109 
               
               
                   
                   
                 np0 
                 4 
                 0. 
               
               
                   
                   
                 nn1-vvb 
                 3 
                 0.077 
               
               
                   
                 hew 
                 total 
                 28 
                 0. 
               
               
                   
                   
                 nn1-np0 
                 7 
                 0.152 
               
               
                   
                   
                 nn1 
                 7 
                 0.036 
               
               
                   
                   
                 vvi 
                 6 
                 0.857 
               
               
                   
                   
                 nn1-vvb 
                 4 
                 0.103 
               
               
                   
                   
                 np0 
                 3 
                 0. 
               
               
                   
                   
                 vvb 
                 1 
                 0.200 
               
               
                   
               
             
          
         
       
     
       B.2 The Accuracy of Using Tags to Predict Dual Signatures 
       [0641]    In Subsection 3.3we argued that if we know the signature and the tag of an intended word, then we may pinpoint the word and, equivalently, the dual signature with good accuracy. In this subsection we shall investigate this a little more closely. 
         [0642]    To be specific, let us assume that we use the maximum likelihood estimator w to select the word, given the tag n and the signature σ: 
         [0000]        ŵ=ŵ (σ,κ)=arg max w  Prob( w |σ,κ).  (190) 
         [0000]    We now want to find out, on the average, how often will this maximum likelihood estimator coincide with the intended word. In other words, what is the probability that the intended word w equals ŵ? 
         [0643]    Here is how we can calculate this. Let us pick a corpora that we believe reflects the usage of the words that we are interested in. Let us also assume that this corpora is correctly tagged and the tags come with the corresponding frequencies (of occurrence). 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             Prob 
                              
                             
                               ( 
                               
                                 w 
                                 ≠ 
                                 
                                   w 
                                   ^ 
                                 
                               
                               ) 
                             
                           
                           = 
                             
                            
                           
                             
                               ∑ 
                               σ 
                             
                              
                             
                               
                                 ∑ 
                                 κ 
                               
                                
                               
                                 Prob 
                                 ( 
                                 
                                   
                                     
                                       
                                         w 
                                         ≠ 
                                         
                                           
                                             w 
                                             ^ 
                                           
                                            
                                           
                                             ( 
                                             
                                               σ 
                                               , 
                                               κ 
                                             
                                             ) 
                                           
                                         
                                       
                                       | 
                                       
                                         sign 
                                          
                                         
                                           ( 
                                           w 
                                           ) 
                                         
                                       
                                     
                                     = 
                                     σ 
                                   
                                   , 
                                 
                               
                             
                           
                         
                       
                     
                     
                       
                         
                           
                               
                              
                             
                               
                                 tag 
                                  
                                 
                                   ( 
                                   w 
                                   ) 
                                 
                               
                               = 
                               κ 
                             
                             ) 
                           
                            
                           
                             Prob 
                              
                             
                               ( 
                               
                                 
                                   
                                     sign 
                                      
                                     
                                       ( 
                                       w 
                                       ) 
                                     
                                   
                                   = 
                                   σ 
                                 
                                 , 
                                 
                                   
                                     tag 
                                      
                                     
                                       ( 
                                       w 
                                       ) 
                                     
                                   
                                   = 
                                   κ 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                     
                       
                         
                           ≈ 
                             
                            
                           
                             
                               1 
                               F 
                             
                              
                             
                               
                                 ∑ 
                                 σ 
                               
                                
                               
                                 
                                   ∑ 
                                   κ 
                                 
                                  
                                 
                                   
                                     
                                       ∑ 
                                       ′ 
                                     
                                     
                                       
                                         
                                           sign 
                                            
                                           
                                             ( 
                                             w 
                                             ) 
                                           
                                         
                                         = 
                                         σ 
                                       
                                       , 
                                       
                                         
                                           tag 
                                            
                                           
                                             ( 
                                             w 
                                             ) 
                                           
                                         
                                         = 
                                         κ 
                                       
                                     
                                   
                                    
                                   
                                     
                                       f 
                                        
                                       
                                         ( 
                                         w 
                                         ) 
                                       
                                     
                                     . 
                                   
                                 
                               
                             
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   Here 
                    
                   
                     
 
                   
                    
                   
                     F 
                     = 
                     
                       
                         ∑ 
                         σ 
                       
                        
                       
                         
                           ∑ 
                           κ 
                         
                          
                         
                           
                             ∑ 
                             
                               
                                 
                                   sign 
                                    
                                   
                                     ( 
                                     w 
                                     ) 
                                   
                                 
                                 = 
                                 σ 
                               
                               , 
                               
                                 
                                   tag 
                                    
                                   
                                     ( 
                                     w 
                                     ) 
                                   
                                 
                                 = 
                                 κ 
                               
                             
                           
                            
                           
                             f 
                              
                             
                               ( 
                               w 
                               ) 
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   191 
                   ) 
                 
               
             
           
         
       
     
         [0000]    is the total frequencies of all words w in the corpora, and 
         [0000]    
       
         
           
             
               
                 ∑ 
                 ′ 
               
               
                 
                   
                     sign 
                      
                     
                       ( 
                       w 
                       ) 
                     
                   
                   = 
                   σ 
                 
                 , 
                 
                   
                     tag 
                      
                     
                       ( 
                       w 
                       ) 
                     
                   
                   = 
                   κ 
                 
               
             
              
             
               f 
                
               
                 ( 
                 w 
                 ) 
               
             
           
         
       
     
         [0000]    denotes the sum of all the word frequencies f (w) f (w, σ, κ) corresponding to a fixed signature σ and tag κ except the highest frequency in each tag group. Now, if we let {circumflex over (f)}(σ, κ) denote the highest frequency of a word, given a specific signature σ and specific tag κ, then we have 
         [0000]    
       
         
           
             
               
                 
                   
                     ∑ 
                     ′ 
                   
                   
                     
                       
                         sign 
                          
                         
                           ( 
                           w 
                           ) 
                         
                       
                       = 
                       σ 
                     
                     , 
                     
                       
                         tag 
                          
                         
                           ( 
                           w 
                           ) 
                         
                       
                       = 
                       κ 
                     
                   
                 
                  
                 
                   f 
                    
                   
                     ( 
                     w 
                     ) 
                   
                 
               
               = 
               
                 
                   
                     ∑ 
                     
                       
                         
                           sign 
                            
                           
                             ( 
                             w 
                             ) 
                           
                         
                         = 
                         σ 
                       
                       , 
                       
                         
                           tag 
                            
                           
                             ( 
                             w 
                             ) 
                           
                         
                         = 
                         κ 
                       
                     
                   
                    
                   
                     f 
                      
                     
                       ( 
                       w 
                       ) 
                     
                   
                 
                 - 
                 
                   
                     f 
                     ^ 
                   
                    
                   
                     ( 
                     
                       σ 
                       , 
                       κ 
                     
                     ) 
                   
                 
               
             
             , 
             
               
 
             
              
             and 
             , 
             hence 
             , 
             
               
 
             
              
             
               
                 
                   ∑ 
                   σ 
                 
                  
                 
                   
                     ∑ 
                     κ 
                   
                    
                   
                     
                       
                         ∑ 
                         ′ 
                       
                       
                         
                           
                             sign 
                              
                             
                               ( 
                               w 
                               ) 
                             
                           
                           = 
                           σ 
                         
                         , 
                         
                           
                             tag 
                              
                             
                               ( 
                               w 
                               ) 
                             
                           
                           = 
                           κ 
                         
                       
                     
                      
                     
                       f 
                        
                       
                         ( 
                         w 
                         ) 
                       
                     
                   
                 
               
               = 
               
                 F 
                 - 
                 
                   
                     ∑ 
                     σ 
                   
                    
                   
                     
                       ∑ 
                       κ 
                     
                      
                     
                       
                         
                           f 
                           ^ 
                         
                          
                         
                           ( 
                           
                             σ 
                             , 
                             κ 
                           
                           ) 
                         
                       
                       . 
                     
                   
                 
               
             
           
         
       
     
         [0000]    With this, we may rewrite the formula (191) as 
         [0000]    
       
         
           
             
               
                 
                   
                     Prob 
                      
                     
                       ( 
                       
                         w 
                         ≠ 
                         
                           w 
                           ^ 
                         
                       
                       ) 
                     
                   
                   ≈ 
                   
                     1 
                     - 
                     
                       
                         1 
                         F 
                       
                        
                       
                         
                           ∑ 
                           σ 
                         
                          
                         
                           
                             ∑ 
                             κ 
                           
                            
                           
                             
                               
                                 f 
                                 ^ 
                               
                                
                               
                                 ( 
                                 
                                   σ 
                                   , 
                                   κ 
                                 
                                 ) 
                               
                             
                             . 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   192 
                   ) 
                 
               
             
           
         
       
     
         [0644]    Now, with this equation we can calculate the probability Prob(w≠ŵ) once we are given a tagged corpus with frequency information. 
       Example B.1 
       [0645]    Suppose we take the full Corpus 1. Then the total word count F=90, 198, 465, the sum of all the non-collision word frequencies ncF=51, 571, 283, and the sum cF of the largest frequencies for each POS in each collision group cF=38, 079, 825. With this we have 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         F 
                         - 
                         
                           ( 
                           
                             ncF 
                             + 
                             cF 
                           
                           ) 
                         
                       
                       = 
                       547 
                     
                     , 
                     357. 
                   
                    
                   
                     
 
                   
                    
                   
                     Hence 
                     , 
                   
                 
               
               
                 
                   ( 
                   193 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         
                           Prob 
                            
                           
                             ( 
                             
                               w 
                               ≠ 
                               
                                 w 
                                 ^ 
                               
                             
                             ) 
                           
                         
                         = 
                           
                          
                         
                           1 
                           - 
                           
                             
                               nCF 
                               + 
                               cF 
                             
                             F 
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                           
                          
                         
                           1 
                           - 
                           0.9939316 
                         
                       
                     
                   
                   
                     
                       
                         = 
                           
                          
                         
                           0.0060684 
                           . 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   194 
                   ) 
                 
               
             
           
         
       
     
         [0000]    In other words, the maximum likelihood estimator is accurate 99.4% of the time (on the average).