text: 1 a preferred embodiment of the present invention comprises the one - row keyboard . 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 : 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 α with 1 ≦ α ≦ 10 , and so on . for example , the letter ν is assigned the number α = α ( ν )= 24 . we also assign the space character ( used when we reach the end of a word , for instance ) the number α = 0 . 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 fig1 and fig1 - 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 : 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 . 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 . suppose we identify each of the keys of the basic one - row keyboard with a number σ , 1 ≦ a ≦ 10 , starting from left and going to the right . so , for example , each of the three letters r , f and ν corresponds to the number σ = σ ( r )= σ ( f )= σ ( ν )= 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 . 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 . each specific letter can thus be specified exactly either through the number α or through the pair σ , τ . more generally , an n - letter word w is specified exactly through the sequence 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 . 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 α in turn with a path α 1 α 2 . . . α n in this tree : starting from the root , the value of α 1 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 .) similarly , the signature σ = σ ( ω ) of word ω 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 τ = τ ( ω ) is a path in a 4 - ary tree . clearly , very few of the possible paths in these trees correspond to real words , signatures , and dual signatures , respectively . the 31 - ary tree , used for the words and sequences α , factors precisely into the two trees for the signatures σ and dual signatures τ . we can also visualize each sequence α and its corresponding σ , τ as a path through the infinite block in fig2 ( 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 . 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 t 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 τ i ; the character t j i is identified with the pair σ i , τ j . 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 ”). most paths a 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 . 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 for the particular dictionary we use . the standard way of organizing is alphabetically , and when we use this we shall use the subscript ω : ω . there are several other views that are useful as well . for example , we may instead consider as consisting of the sequences a 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 α ( ω )= α 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 α : α . the ordering between the sequences makes it possible to compare two sequences α 1 , α 2 ε α : we say that if the sequence α 1 comes before α 2 in α , i . e . if not all signatures σ correspond to words either , and some σ &# 39 ; s correspond to more than one word . the collection of valid σ &# 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 α , 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 ; τ . with the orderings & lt ; σ and & lt ; τ in s σ and t τ , respectively , we may define several additional views of . if we have two words ω 1 , ω 2 ε with corresponding signatures and dual signatures ( σ 1 , τ 1 ), ( σ 2 , τ 2 ), then we shall write for σ , τ for with this ordering . we may also write = 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 τ , σ = t τ ( s σ ). 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 ωε 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 ; σ × τ : words are identified with their interleaved expansions and entered into in ascending order . to indicate this view , we write σ × τ . of course , there is similarly an ordering & lt ; τ × σ , and the view using this is τ × σ . suppose we have a word dictionary tiny = ω tiny containing the ten words , alphabetically ordered , “ and ”, “ cat ”, “ do ”, “ go ”, “ is ”, “ it ”, “ say ,” “ the ”, “ to ”, and “ way ”. the corresponding a 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 . 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 ]. 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 . 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 . 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 : 1 . how do we provide feedback to the user concerning the progress of the typing process ? 3 . how do we best resolve ambiguities between words with similar signatures ? 6 . how do we quickly look up signatures , dual signatures , and words ? 9 . how do we customize dictionaries depending on contexts and on the user ? 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 . 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 o and l ( or , more precisely , in the same equivalence class ). the disambiguation engine then has to carry out the disainbiguation 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 . 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 ′ from each other , just as we use shift to distinguish ‘ h ’ from ‘ h ’. for this example , we have made the assumption that ′ replaces / on the qwerty keyboard .) 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 ′ replaces / on the qwerty keyboard .) as an example of nesting , the sequence 00692000 may be disambiguated as “ how ?”. 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 . 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 . 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 cell phone 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 . 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 . further , different prediction techniques can be used to simplify the required user interaction as the spell process proceeds . 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 . 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 . 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 . 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 . 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 . 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 . the user intends to input a sequence of words ( or other character combinations ) ω i , ( what constitutes the appropriate delimiter for the different character combinations ω 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 fig3 . 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 ω i under consideration . 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 . 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 . 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 . 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 . 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 . let us for now consider just the single character combination ω 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 ν = c 0 . . . c j , 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 σ α = σ 0 α . . . σ j α , and his target signature is σ ν = σ 0 ν . . . σ 1 ν . ( notice , in particular , that the number j + 1 of actual keystrokes may not be the same as the intended number i .) from a maximum likelihood point of view , we are interested in finding the best solution where the maximum is taken over all the intended words ν . more generally , we may also consider the n - best solutions { right arrow over ( ν )}= ν −( n ) = n − arg max ν prob ( ν | σ α ). ( 9 ) 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 it is a reasonable approximation to say that the first factor here , prob ( ν | σ ν , σ α ), is independent of σ α . ( in other words , learning the value of σ α does not provide any additional information about ν once we know σ ν ; ν and σ α are conditionally independent given σ ν ; cf . [ 48 ].) if we accept that , we get { circumflex over ( ν )}≈ arg max ν prob ( ν | σ ν ) prob ( σ ν | σ α ) ( 11 ) ( 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 . it is not entirely obvious how to estimate the second factor prob ( σ ν | σ α ) in ( 11 ) based on some specific sampling statistics . in contrast , the probability prob ( σ α | σ ν ) is easy to obtain ; for example , just start typing the intended word ν over and over , and then observe the actual signatures typed . with this in mind , we shall rewrite ( 11 ) using bayes formula : { circumflex over ( ν )}≈ arg max ν prob ( ν | σ ν ) prob ( σ α | σ ν ) prob ( σ ν ). ( 13 ) the signatures of the character combinations “ wondr ” and “ slyer ” are the same . let us call the signature σ α . only the latter of these combinations is an english word . hence , if the user enters this signature σ α , a disambiguation system based on exact signature entry wilt display “ slyer .” however , let us look at probabilities : ( 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 .” 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 with ν ( 1 ) = wonder and ν ( 2 ) = slyer . equivalently , using ( 13 ) instead , this happens exactly when since we are assuming that there is only one word with the signature σ ν ( 1 ) and one with σ ν ( 2 ) , by the sampling estimate above we have hence , inserting this into the inequality ( 16 ), we see that the criterion is essentially 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 so , at least for user 1 , it is more than 10 times as likely that he has mistyped “ wonder ” than intending to type “ slyer .” 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 . 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 .) 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 . 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 . 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 . 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 σ α , and the objective is to find the label σ ν of the intended signature word ν . 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 . 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 . 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 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 . 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 are 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 ). 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 ]). the edit distance from “ food ” to “ money ” is at most four . a sequence of transformations is given by 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 substitutions , 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 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 . clearly , the ed ( algorithm , altruistic )≦ 6 , but it is not obvious whether there is a better set of transformations , with a lower total cost . 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 . 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 σ j 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 : e ( i , j )= min { e ( i − 1 , j − 1 )+[ σ i a ≠ σ j b ], e ( i , j − 1 )+ 1 , e ( i − 1 , j )+ 1 } ( 22 ) ed ( σ a , σ b )= e ( m , n ) with m =# σ a and n =# σ b . ( 25 ) 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 in this section , we shall start by collecting some hopefully representative typing errors . 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 .” there seem to be four different types of errors that we may identify in these tables . 1 . errors with the user continuing to perceived end of the word ; 3 . errors for which the user stopped typing before reaching the end ; and 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 . 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 are 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 . 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 . 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 . 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 ( σ ν | σ α ) ( in the case of equation ( 11 )) or prob ( σ α | σ ν ) ( 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 ]. the models we shalt 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 . 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 ( σ ν , σ α ) corresponds to the signatures σ ν and σ α being similar or close . suppose the user intends to type the signature σ ν . suppose further that he sometimes enters σ α 1 and sometimes σ α 2 . now , if the user is more likely to enter σ α 1 than σ α 2 , then it seems that , at least for this , user , σ α 1 is closer to σ ν . in other words , it seems desirable to require prob ( σ α 2 | σ ν )≦ prob ( σ α 1 | σ α ) c ( σ ν , σ α 2 )≧ c ( σ ν , σ α 1 ). ( 27 ) prob ( σ ν | σ α 2 )≦ prob ( σ ν | σ α 1 ) c ( σ α 2 , σ ν )≧ c ( σ α 1 , σ ν ( 28 ) 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 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 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 .) 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 . 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 we obtain the standard edit distance ( based on the four nontrivial transformations ). 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 ed * ( σ a , σ b )= ed ( σ a , σ b , c *). ( 33 ) we can now define a preliminary model for the actual conditional probabilities . we simply let p * ( σ a σ b )= exp (− ed * ( σ a , σ b )) ( 34 ) 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 hence , this looks as if the application of each of the different transforms are independent events , each with probability p i . 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 . our objective is to find a model for the probabilities p ( σ ν | σ α ), σ ν εs ν , σ α εs α 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 . here is the setup for the more rigorous modeling we are going to consider . we let s ν be the space of labels ( of valid signatures ) and s α the space of unlabeled examples ( of all possible signatures ). to establish an appropriate model , we use a training set ( σ l α , σ l ν ), 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 { tilde over ( π )}[ φ 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 α × s ν , and π = π ( σ ν | σ α ) is a model distribution over s α δs ν . specifically , to find the model π ( σ ν | σ α ), σ α , σ ν εs α × s ν , we use a maximum entropy approach ; cf . [ 8 ], [ 41 ], [ 34 ]. we , let h be the average ( conditional ) entropy given by we then look for the solution { circumflex over ( π )}( σ ν | σ α ) of the following constrained maximization problem ; cf . [ 36 ], [ 8 ]. using lagrange multipliers , we find that the solution to this constrained maximization problem is of the form where z ( σ α )= z { right arrow over ( λ )} ( σ α ) is the so - called partition function 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 . the dual objective function ({ right arrow over ( λ )}) associated with ( 39 ) is given by 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 ( λ )}: once we obtain this vector , then the solution to ( 39 ) is the probability distribution π { right arrow over ( λ )} * ( σ ν | σ α ), cf . ( 40 ). we also remark that the maximization of the dual objective function is equivalent to the maximization of the log - likelihood function 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 it is also interesting to note that the second derivatives are given by the covariance matrix of the features : before applying the maximum entropy modelling to our current situation , we make the following remark . note that by replacing φ i ( σ α , σ ν ) by − φ i ( σ α , σ ν ), 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 ( φ )}( σ α , σ ν ) by ( we let the associated cost functions { right arrow over ( c )} be defined by { right arrow over ( c )}=−{ right arrow over ( λ )}.) the conditional probabilities may then be written as 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 φ i ( σ ν , σ α )=# t i , i = 0 , . . . , 4 , ( 52 ) where # t i denotes the number of occurrences of the ith transformation t i in the ( optimal ) calculation of the edit distance ed ( σ α , σ ν , { right arrow over ( c )}). these features φ i ( σ ν , σ α ) obviously may depend on the particular choice of the cost functions { right arrow over ( c )}. suppose then that we have obtained the solution { circumflex over ( λ )} * ={ λ i *} i = 0 4 and let 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 ( σ α , σ ν ) 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 ). 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 . 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 88 insertion of extra symbol after same symbol ( where symbol is not 2 or 8 ) de 80 deletion of extra symbol in a duplication ( where symbol is not 2 or 8 ) 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 are not exactly what we need . the reason is the following . the probability distributions p { right arrow over ( λ )} ( σ ν | σ α ) we obtained are defined in terms of the appropriate edit distance in such a way that if two signatures σ 1 ν and σ 2 ν have the same edit distance from the typed σ α , then p { right arrow over ( λ )} ( σ ν 1 | σ α )= p { right arrow over ( λ )} ( σ ν 2 | σ α ). if one of these two intended signatures σ i ν , 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 ( λ )} ( σ ν 1 | σ α ) 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 .) we can of course go back to the maximum entropy models and instead model p { right arrow over ( λ )} ( σ α | σ ν ) 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 ν , z ( ν ). 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 ν : s . another possibility is to introduce more constraints in the basic maximization ( 39 ). for example , we may add a constraint for each σ ν so that we guarantee through this constraint that the probability ( obtained from a standard corpus perhaps ) of each σ ν 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 . 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 σ ν . 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 . 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 . fig3 . to sort this out , let us consider the input process as consisting of two parts : one process corresponding to units of characters σ ν ( like signatures corresponding to words ) followed by another process corresponding to the user &# 39 ; s typing and outputting a σ α for each σ ν . let us for simplicity also assume that the first of these processes is 0th order and can be described by the distribution of the σ ν : s and that the second outputs a σ α according to another distribution after each σ ν . ( 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 ( σ ν ), σ ν εs ν ( for instance , p may be the probabilities of words in a big corpus ), and that there are probability distributions π ( σ α | σ ν ) for the data entered σ α εs α given each intended σ ν εs ν . together these distributions determine a joint distribution p ( σ ν , σ α ) on s ν × s α defined by p ( σ ν , σ α )= p ( σ ν ) π ( σ α / σ ν ), σ ν εs ν , σ α εs α . ( 58 ) so , p ( σ ν , σ α ) describes the probability that σ ν is the intended signature when σ α 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 ]. both p ( σ ν ) and the family π ( σ α | σ ν ) may easily be recovered from the joint distribution p ( σ ν , σ α ). to see this , we note that we clearly have further , by using the definition of conditional probability and the definition ( 58 ), we see that hence , we may recover π ( σ α | σ ν ) by first obtaining p from the joint distribution and then use the joint distribution again to get p ( σ α | σ ν ). this also tells us that the conditional probabilities p ( σ α | σ ν ) 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 σ ν . we introduce the notation q ( σ α ), σ α εs α , for the other marginal distribution associated with the joint distribution p ( σ ν , σ α ): assume now that we are given the typed σ α and are asking for the distribution of the σ ν : s . once again , simply by using the definition of conditional probability we get where we of course assume that the denominator q ( σ α ) does not vanish . one way to interpret this relationship is like this : we started with a distribution p ( σ ν ) of the signatures σ ν εs ν . once we obtain the σ α , then this distribution is adjusted and modified by the factor we refer to p ( σ ν ) as the prior distribution and , p ( σ ν | σ α ) as the posterior distribution of σ ν given σ α . note that to describe the joint distribution p ( σ ν , σ α ) and the input process , we only need the “ transition ” probability distributions π (·| σ ν ) 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 π ( σ ν , σ α ) on s ν × s α . we let where # s ν is the number of signatures in s ν ( which we assume is finite ). we then have two corresponding marginal distributions : ( equivalently , we may have defined π ( σ ν , σ α ) by first picking the uniform distribution ω ( σ ν ), s ν , and then requiring π ( σ ν , σ α )= ω ( σ ν ) π ( σ α | σ ν ).) for our purposes , we typically want to compare different σ ν : s given the same user input σ α . with this in mind , we observe that by ( 60 ) and ( 62 ) combining these equations ( 66 ) and ( 67 ) and once again using ( 60 ), we find that so if we model p ( σ ν ) and π ( σ α | σ ν ), then through ( 58 ) we obtain a corresponding model for the joint distribution p ( σ ν , σ α ). in particular , let us use the maximum entropy model π { right arrow over ( λ )} * ( σ ν | σ α ) from the previous subsection to model π ( σ ν | σ α ). let us also use some reasonable approximation p 0 ( σ ν ) of the distribution p ( σ ν ) ( for instance , the probabilities generated from a large corpus of some kind ). then we obtain a corresponding model p { circumflex over ( λ )} * ( σ ν , σ α )= p 0 ( σ ν ) π { right arrow over ( λ )} * ( σ α | σ ν ), σ ν εs 84 , σ α εs α . ( 69 ) for this model , the various identities above are valid . for example , equation ( 68 ) now reads using the explicit description of π { right arrow over ( λ )} * given by ( 51 ), we may equivalently write 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 . 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 . let us consider a fixed unit au of intended character combinations ( a “ word ”) with individual characters σ n ν : where n =# σ ν is the length of σ ν . ( we note that we are using a left - to - right ordering , but the particular ordering is not important .) each unit σ ν is input by the user , resulting in the signature σ α with characters σ m α : 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 ( σ ν , σ α )={ t k } to explain the typed entries σ α given the intended ones σ ν . each transform acts on a set of characters in the intended signature and outputs some characters in the typed signature , and the transforms are ordered sequentially , just as the input process , so we shall also write each of the transforms t k acts on a character σ n k ν and outputs either the empty character or a character in σ α . the idea is to choose the transforms so that the probability prob ( t ) becomes an approximation of the typing model π ( σ α | σ ν ). 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 the character curr = σ i k ν , at the current position , the previous character prev = σ i − 1 ν , 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 . suppose the intended signature σ ν = 1234 and the typed signature is σ α = 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 : ( b , b )→( in , 5 ) ( b , b )→( in , 5 ) ( b , 1 )→( id , 1 ) ( 1 , 2 )→( id , 2 ) ( 2 , 3 )→( id , 3 ) ( 2 , 3 )→( in , 3 ) ( 3 , 4 )→( id , 4 ). ( 81 ) similarly , let us assume the intended signature is σ ν = 12234 and the typed signature is σ α = 1243 . then the typos may possibly be explained by the sequence t ={ id , id , de , id , tr }, or , more precisely , by the sequence ( b , 1 )→( id , 1 ) ( 1 , 2 )→( id , 2 ) ( 2 , 2 )→( de , ε ) ( 2 , 3 )→( id , 3 ) ( 3 , 4 )→( tr ,( 4 , 3 )). ( 82 ) ( obviously , there is redundancy in the notation here ; for example , the transpose of ( 3 , 4 ) is clearly known without specifying ( 4 , 3 ).) 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 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 ). 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 . 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 .” 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 ], [ 51 ]). 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 . 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 . the exact typing model of a user depends on the system within which the typing occurs . 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 . 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 . 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 . 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 . 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 .) 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 . 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 . 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 σ α : 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 ( σ ν | σ α ) for each one of the σ α : s . the σ ν : 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 ( σ ν ) can be estimated from sample data ( like a large corpus or dynamically ). this means that as soon as we have a typing model π ( σ ν | σ α ), then we have the basis for selecting the most likely four combinations σ ν : s for each fixed σ α . 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 . 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 . for the second prediction method , we only assume that the first two characters entered are correct . hence , the highest percentages we can mach now are 87 . 7 %, 81 . 3 %, and 80 . 5 % for the three users , cf . table 3 . 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 . 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 . 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 . 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 . 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 ]. 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 . 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 4 edison , his life and inventions ( by frank lewis dyer ) 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 .) 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 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 . 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 are being incorrectly displayed . assuming that the average sentence is about 23 words long , we would then expect to and only one incorrectly displayed word in one out of six or seven sentences ( 23 × 0 . 007 = 0 . 161 ). 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 . 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 pine sentences . 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 . 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 ]. 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 . 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 ], [ 1 ], [ 13 ], [ 45 ], [ 9 ], [ 5 ], [ 17 ], [ 52 ], [ 49 ], [ 50 ], [ 24 ], [ 25 ]. 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 . 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 : which has the pos tag assignment : noun verb prep art noun conj adj noun verb art noun 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 . 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 fig3 . 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 ω ( typically words ). a sentence s with n words is then represented by now it seems to make sense to distinguish two types of processing : batch and on - the - fly . 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 fig3 , 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 . 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 fig3 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 . 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 ω in this sentence carries a certain meaning μ . we also write 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 ω . so , to model the communication processes as communication systems , we have the following . for regular written text , the user intends to communicate { ω , μ } and the channel only transmits ω . the meaning μ must be deduced from the context . the goal of the tagger is to find κ i for each word ω i and obtain { ω 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 { ω i , κ i , θ }. in the case of a reduced keyboard , the user still wants to transmit { ω , μ }={( σ , τ ),( κ , λ )}, 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 the challenge is for the decoder to provide τ i or , equivalently , ω i . a possibility we shall consider here is to use a pos tagger ( or really any nlp tool ) to obtain . . . { ω i − 2 ,( κ i − 2 , θ )};{ ω i − 1 ,( κ i − 1 , θ )},{( σ i , τ i ),( κ i , θ )}, ( 90 ) there are essentially two observations motivating this approach for finding the missing dual signatures ( also called the disambiguation problem for a reduced keyboard ). 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 ). 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 . 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 . 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 . 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 . so , the second observation is that pos tagging and extracting syntactical structure are attempts to establish predictable patterns in our language . 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 . it is instructive to compare the challenge here with that of speech recognition , see 1341 . speech recognition is a comparatively harder problem . in that case , we are presented with some auditory “ evidence ” a of the intended words ω and sentences s , and the task is to reconstruct ω and s with high accuracy . if we let p ( s | α ) be the conditional probability that the sentence s was spoken given the auditory evidence α , and we use a maximum likelihood estimate to reconstruct the sentence , then the problem is to find language modeling plays a prominent part in many of the current approaches to speech recognition . 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 . 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 189 - 209 ); 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 . 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 { ω i } i = 0 n of words ω i , i = 0 , . . . , n . for each word ω 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 . at the point when the user starts inputting the information for word ω m ( 0 ≦ m ≦ n ), the user is assumed to have made sure that the words ω 0 , . . . , ω 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 { circumflex over ( κ )} 0 , . . . { circumflex over ( κ )} m ,{ circumflex over ( τ )} m = arg max κ 0 , . . . , κ m , τ m prob ( κ 0 , . . . , κ m , τ m | ω 0 , . . . , ω m − 1 , σ m ). ( 93 ) using the definition of conditional probability , the probability on the right - hand side equals now , ω 0 , . . . , ω 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 { circumflex over ( κ )} 0 , . . . { circumflex over ( κ )} m ,{ circumflex over ( τ )} m = arg max κ 0 , . . . , κ m , τ m prob ( κ 0 , . . . , κ m , τ m , ω 0 , . . . , ω m − 1 , σ m ). note that there is a unique word ω m with ω m =( σ m , τ m ) for each τ m . as a consequence { circumflex over ( κ )} 0 , . . . { circumflex over ( κ )} m ,{ circumflex over ( τ )} m = arg max τ m max κ 0 , . . . , κ m { prob ( κ 0 , . . . , κ m , ω 0 , . . . , ω m − 1 , ω m ): ω m =( σ m , τ m )}. ( 94 ) 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 ). using the definition of conditional probability again , we may rewrite the probability on the right - hand side as follows : prob ( κ 0 , . . . , κ m , ω 0 , . . . , ω m − 1 , ω m )= prob ( κ 0 , . . . , κ m )× prob ( ω 0 , . . . , ω m − 1 , ω m | κ 0 , . . . , κ m ). ( 95 ) each of these two factors are then approximated by simpler ones that are easier to collect . for the first factor , we first use the “ chain rule ” to see that 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 or 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 k m depends on k m - 1 . hence , with this approximation we obtain for the second factor in ( 95 ), it seems reasonable to assume that there is the following type of independence , at least approximately : 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 ). 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 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 the largest of all four numbers is clearly the one corresponding to “ the ” and κ 0 = at . 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 of course , the largest corresponds to “ man ” with tag n n , and “ the ” with tag at . in the third position , we only have the word “ still ” but it has three possible tags ( see table 16 ): n n , a j , and r b . we must then choose between the following : 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 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 & lt ; the , at & gt ;& lt ; man , n n & gt ;& lt ; still , rb & gt ;& lt ; was , v b d & gt ; with probability 1 . 24908 · 10 − 9 hence , in this particular instance we would , select the wrong word based on these probabilities . finally , we have the word “ her ” with two tags ( ppo and p p $). 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 : 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 , j ≦ n − 1 . then clearly , the column sums must be one : further , it is convenient if we can rely on the following relationship for the probabilities of the different states p i : 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 . let us now return to the general case and equation ( 100 ). tb 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 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 , ω 0 , . . . , ω l − 1 , ω l ) with the side - condition that the last tag κ l is fixed ( and the words ω 0 , . . . , ω l fixed ). 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 v l ( κ l )= max κ l − 1 prob ( ω l | κ l ) prob ( κ l | κ l − 1 ) v l − 1 ( κ l − 1 ), 0 ≦ l ≦ m . ( 109 ) note that the κ 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 ): b l ( κ l )= arg max κ l − 1 prob ( ω l | κ l ) prob ( κ l | κ l − 1 ) v l − 1 ( κ l − 1 ), 1 ≦ l ≦ m , ( 110 ) since prob ( ω l | κ l ) is independent of κ l − 1 , b l ( κ l )= arg max κ l − 1 prob ( κ l | κ l − 1 ) v l − 1 ( κ l − 1 ), 1 ≦ l ≦ m . ( 112 ) now , let us review how we can go about solving ( 100 ). we consider each τ m separately . we obtain ̂ m from ( 108 ): { circumflex over ( κ )} m = arg max κ m v m ( κ m ). ( 113 ) 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 : { circumflex over ( κ )} l − 1 = b l ({ circumflex over ( κ )} l ), 1 ≦ l ≦ m . ( 114 ) 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 ). 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 . cont &# 39 ; d . as an illustration , let us calculate the quantities v l , b l , 0 ≦ l ≦ 4 for the sentence ( 101 ): “ the man still saw her .” b 4 ( κ 4 )= v b d for all κ 4 . 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 = v b d , { circumflex over ( κ )} 2 = rb , { circumflex over ( κ )} 1 = nn , and { circumflex over ( κ )} 0 = at . this corresponds to the following sequence 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 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 is 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 v l ( κ l , κ l − 1 )= max κ l − 2 prob ( ω l | κ l ) prob ( κ l | κ l − 1 , κ l − 2 ) v l − 1 ( κ l − 1 , κ l − 2 ), 0 ≦ l ≦ m . ( 118 ) the corresponding function b l ( κ l , κ l − 1 ) is defined by b l ( κ l , κ l − 1 )= arg max κ l − 2 prob ( ω l | κ l ) prob ( κ l | κ l − 1 , κ l − 2 ) v l − 1 ( κ l − 1 , κ l − 2 ), 1 ≦ l ≦ m , ( 119 ) since prob ( ω l | κ l ) is independent of κ l − 2 , b l ( κ l κ l − 1 )= arg max κ l − 1 prob ( κ l | κ l − 1 , κ l − 2 ) v l − 1 ( κ l − 1 , κ l − 2 ), 1 ≦ l ≦ m . ( 121 ) 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 where t j , k = prob ( k | j ) is the bigram transition matrix . hence , for each fixed j , 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 trigrum 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 . 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 and then the derivation used for the bigram model produces the above formulas ( with some trivial , mostly notational differences ) for the trigram case . 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 . 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 . 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 ( ω m | κ m ). so the maximum is obtained by maximizing just this factor over τ m . suppose we let { circumflex over ( ω )} denote the maximum likelihood estimator of a word , given the tag κ and the signature σ : then the maximum over τ m in ( 100 ) is obtained for and the maximum value of the factor prob ( ω m | κ m ) is prob ({ circumflex over ( ω )} m | κ m ). this follows , for instance , from the fact that 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 b , subsection 13 . 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 b , subsection 8 . 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 . similarly , the maximum over τ m is easily incorporated directly into the viterbi algorithm . we simply replace the quantity v m in ( 106 ) by then the maximum on the right - hand side of ( 100 ) is given by only the last term l = m needs to be modified in the recursive relation ( 109 ): { circumflex over ( v )} m ( κ m )= max κ m − 1 prob ({ circumflex over ( ω )} m | κ m ) prob ( κ m | κ m − 1 ) v m − 1 ( κ m − 1 ). ( 129 ) 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 { circumflex over ( κ )} m , { circumflex over ( τ )} hd m = arg max κ m , τ m v m ( κ m )= arg τ m arg max κ m { circumflex over ( v )} m ( κ m ). ( 130 ) 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 t m &# 39 ; s separately , we are considering several different hidden markov models , one for each τ m , and each producing a word ω m with the output probability prob ( ω m | κ m ). the hidden 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 { circumflex over ( ω )} m in the mth step with probability prob ({ circumflex over ( ω )} 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 ({ circumflex over ( ω )} m | κ m ) for each fixed κ m is in general strictly less than one . let us now also take a closer look at the recursive relation ( 109 ) for v m . we write v m = v m ( κ m , τ m )= prob ( ω m | κ m ) q m − 1 ( κ m ) ( 131 ) q m − 1 ( κ m )= max κ m − 1 prob ( κ m | κ m − 1 ) v m − 1 ( κ m − 1 ). ( 132 ) 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 ( ω m | κ m )} κ m , τm have been q - ordered when the sequence { v m ( κ m , τ m )} κ m , τ m is rearranged in nonincreasing order . 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 ( k 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 )} τm by letting we shall say that the words ω m for the different τ &# 39 ; s ( and σ fixed ) have been q *- ordered when the corresponding sequence { v m *( τ m )} τ m has been rearranged in a nonincreasing fashion . it is now clear how to refine the results from the previous sections to incorporate the considerations in this one . given a dictionary we let ( κ ) be the collection of all words with tag κ . similarly , if is the collection of all valid character combinations , then for each κ we let ( κ ) be the valid character combinations corresponding to the entities in ( κ ). also , ( σ , κ ) are generated by the character combinations of elements in with signature σ and tag κ . now we can work with character combinations ωε instead of just the complete words ωε . for example , in connection with the viterbi algorithm and equation ( 131 ) we use the quantity v m = v m ( κ m , ω m )= prob ( ω m | κ m ) q m − 1 ( κ m ), ω m ε ( 135 ) 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 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 math 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 { circumflex over ( τ )} m = arg max τ m prob ( τ m | ω 0 , . . . , ω m − 1 , σ m ), ( 137 ) 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 . { circumflex over ( τ )} m = arg max τ m { prob ( ω 0 , . . . , ω m − 1 , ω m ): ω m =( σ m , τ m )}. ( 138 ) by considering all possible state sequences , we may rewrite this as this replaces ( 94 ) in the earlier argument . with the conditions ( 97 ) ( the markov condition ) and ( 98 ) ( the independence condition ) we obtain 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 . the analog of the viterbi algorithm is just as easy . let us introduce 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 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 . we shall refer to the modification of the viterbi algorithm outlined above as the “ forward ” algorithm . we have evaluated various versions of the markov model approach , using corpus 1 . 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 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 . 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 ) { circumflex over ( ν )}= arg max ν prob ( ν | σ ν ) prob ( σ ν | σ α )= arg max ν prob ( ν | σ ν ) prob ( σ ν , σ α ). ( 146 ) to estimate prob ( σ ν | σ α ), or equivalently , prob ( σ ν , σ α ), we also discussed the need for modeling . for example , we suggested the basic model given by equation ( 58 ), p ( σ ν , σ α )= p ( σ ν ) π ( σ α | σ ν ), σ ν εs ν , σ α εs α . 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 σ ν a certain typed combination σ α : { circumflex over ( σ )} ν = arg max ν prob ( σ ν | σ α )= arg max ν prob ( σ ν , σ α ). ( 147 ) 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 . we assume that the intended signature σ ν and the typed signature σ α are given by the individual characters σ i ν and σ j α respectively : σ ν = σ 0 ν σ 1 ν . . . σ m ν , σ α = σ 0 α σ 1 α . . . σ n α . ( 148 ) hence , for problems like ( 146 ) and ( 147 ), we need to estimate prob ( σ ν , σ α )= prob ( σ 0 ν , . . . , σ m ν , σ 0 α , . . . , σ n α ). ( 149 ) 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 . while we take a closer look at this , we shall also make the connection with the edit distance more explicit . as in subsections 2 . 8 and 2 . 9 , we shall use the characters of σ ν at the current and previous positions to define our states ( this corresponds to the bigrams above ); see fig4 . 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 σ ν , these operators are applied to produce the output characters of σ α ; see fig5 and 6 . so , corresponding to the basic states in fig4 , we have the following basic operators : 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 σ ν into something else ). 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 . fig5 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 . with κ 0 , . . . , κ m , ω 0 , . . . , ω m corresponding to σ ν = σ 0 ν . . . σ m ν and σ α = σ 0 α . . . σ n α , respectively , the analog of equation ( 95 ) is prob ( σ ν , σ α )= prob ( σ ν ) δprob ( γ α | σ ν ) or , with our basic model ( 58 ), prob ( σ ν , σ α )≈ p ( σ ν , σ α )= p ( σ ν ) π ( σ α | σ ν ). the basic independence assumption , corresponding to equation ( 98 ), is now that each character of σ α is independent of the others once we are given the underlying , intended σ ν : further , σ i α only depends on the two characters of σ ν that define the state the system is in when the character is output . the markov assumption ( 97 ) is here replaced by p ( σ ν ), which is obtained from an appropriate context or corpus . hence , the analog of equation ( 99 ) is simply and this is essentially the approximation we used in subsections 2 . 8 and 2 . 9 . 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 . the markov assumption ( 97 ) may still be quite useful when the probabilities p ( cru ) are difficult to obtain . 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 . 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 . 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 . 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 . 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 . 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 . 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 fix 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 . 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 . 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 ) 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 . 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 . the training procedure is to scan through an untagged corpus word by word , using the flowchart in fig7 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 fig8 . 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 . note that the empty tag in the second column of the trellis will not be connected with the method outlined thus far . its use will become clear in the following subsections , 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 . the flowchart in fig9 may be used to carry out the actual disambiguation . choosing the word with the maximum ratio 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 . note that in most cases the check for r can be applied before comparison of ratios to eliminate the greatest number of possibilities . 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 : 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 . several observations and assumptions can be made to obtain , a sparse trellis , cf . fig1 : 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 ): 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 : 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 . fast run - time disambiguation . limited storage requirements . storage limits can be arbitrarily specified . very flexible approach . extensive manual / autoinatic 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 . 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 . fig1 , 12 , 13 , and 14 are analogous to fig7 , 8 , 9 , 10 . 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 . 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 n n1 and n n2 into n n , etc . 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 . 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 . 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 . 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 . 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 . 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 . 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 α ( with α ≧ 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 kα . in this way , we obtain a more general class of cost functions c 1 ( α ) with c 1 ( 0 )= c 1 . by adjusting the value of α , we can model how much we believe the effort to adjust the displayed character combinations impacts the user &# 39 ; s experience . 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 { tilde over ( c )} 1 ( 2 ) . 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 .) 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 . 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 . let the dictionary consist of three words , each one with two letters . let the three words be suppose the keyboard has all three letters on one key : [ abc ]. let us further assume that the probabilities of the words are as follows : 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 { right arrow over ( c )} 3 ( bow / po ) for this three - word based dictionary is 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 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 . 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 . to be more precise , we shall look more carefully at bow , and introduce some appropriate definitions and notation . let the dictionary 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 we derive the collection of beginnings of valid character combinations , and this collection is denoted by , 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 # ω be the length of the character combination ωε , i . e ., the number of characters in ω . we also let # = max {# ω : ωε } be the length of the longest character combination in . we define to be the collection of all character combinations from of length i , i = 1 , . . . , # in this way , = u , i , and i ∩ i = θ , i t ≠ i 2 ( 162 ) we denote the collection of all valid signatures , corresponding to combinations in , 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 i , i = 1 , . . . , # . if we also let ( σ ) be all the combinations in with signature σ , then we have the classes ( σ ) are interesting since each contains the “ collisions ” we have for the corresponding signature σ . now , a display algorithm is simply a mapping b : s → that filters these classes in the sense that b s i ⊂ i ; i = 1 , . . . , # ( 164 ) b ( σ ) ε i , for each σ ε s i , i = 1 , . . . , # . ( 165 ) the collection of all display algorithms is denoted by b . with b = bow / po we certainly have bε b . 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 diameter combinations , b i , i = 1 , . . . , n + 1 . furthermore , # b i i = i , i = 1 , . . . , n + 1 . ( 166 ) 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 . 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 i , . . . , n + 1 , sees the character combination b i , then c i ( ω , b i ) somehow should ideally reflect the user &# 39 ; s experience at that point ; a larger value of c i ( ω , b i ) should hopefully correspond to a worse user experience . a differential cost function at step i is now simply a non - negative function c i : i × i →[ 0 , +∞) defined on pairs ( u , ν ) of valid chararacter combinations of length i : for a valid character combination ωε with signature σ , we let ω ( i ) be the i first characters and , similarly , σ ( i ) be the signature of ω ( i ) , i = 1 , . . . , # ω . now , a total cost function is a non - negative function c : × b →[ 0 , +∞) that is defined through a collection of differential cost functions c i , i = 1 , . . . , # by letting we shall assume that we are given a dictionary of valid combinations and a specific cost function c . we shall also assume that we know the collection of all probabilities p = of combinations in . we let c avg = c avg ( b ) be the average total cost for all combinations in 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 in other words , the solution to the display optimization problem is the display algorithm b min such that 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 , . . . , # , associated with c : where σ is the signature of ω . further untangling our notation , this is equivalent to solving c i ( ω , u ) for each σ ε s i . ( 172 ) in other words , fixing a general σε s i , to solve the display optimization problem we have to find the element u min ε ( σ ) for which once we find this u min = u min ( σ ), then the corresponding optimal display algorithm b min is given by 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 ). going back to the general case ( 169 ) and its alternative formulation ( 172 ), we note that if we are given the probabilities p = of the combinations in the dictionary , then we can calculate all the probabilities p = of all the ωε . using the definition of the average ( or expected value ) over this probability distribution , we see that ( 172 ) is the same as here p ( ω | σ ) is the conditional probability of ω , knowing that ωε ( σ ): the equation ( 175 ) thus shows that the solution to the display optimization problem is obtained by letting u min ( σ ) be the smallest component of the vector obtained by applying the matrix c i ( σ )= to the vector of probabilities p ( σ )= in the case of the cost function c 1 , it is easily shown that this solution is in fact bow / po . 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 : these are n × n , matrices with n given by the number of elements in ( σ ): n =# ( σ ) ( for each σ ). hence , the equation ( 175 ) in this case becomes 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 . 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 ( σ ). 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 and the smallest component u min of this vector is the second , corresponding to the combination bb , this is consistent with the choice we made back in example 5 . 1 . 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 . we shall assume that the user has typed in a signature σ , i . e ., a sequence of keystrokes , and that one of the combinations uε ( σ ) has been displayed . since u is the first to be displayed , we shall use the notation u ( 0 ) ; it is also convenient to set ( 0 ) ( σ )= ( σ ). if the user inspects this u ( 0 ) and decides to discard it , the collection of the remaining valid combinations with that signature is 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 ) ε ( 1 ) ( σ ). the optimality may be measured with a potentially different cost function . this process is then repeated recursively . let j = j ( σ )=# ( σ ) ( σ is fixed ). from u ( j ) and ( j ) , j = 0 , . . . , j − 1 , we obtain ( j + 1 ) ( σ )= ( j ) ( σ )\{ u ( j ) }= ( σ )\{ u ( 1 ) , . . . , u ( j ) }, j = 0 . . . , j − 1 . ( 184 ) note that # ( j ) ( σ )= j − j , and in particular , the last set ( j ) is empty . 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 ( j − 1 ) ( σ ), then the conditional probabilities for the remaining elements in ( j ) , j = 0 , . . . , j − 1 , takes this into account . at each step , these conditional probabilities differ by a simple scaling factor . more precisely , let p ( j ) ( ω )= p ( ω / ωε ( j ) ( σ )), j = 0 , . . . , j − 1 ( 186 ) 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 ). 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 → so that 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 ( σ ) ordered with respect to the cost functions used . hence , where u ( j ) ε ( σ ), j = 0 , . . . , j and j = j ( σ )=# ( σ ). 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 . 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 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 . 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 . 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 . 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 . 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 . 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 . 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 . 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 row 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 . 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 . 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 . 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 .” 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 . 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 . 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 . 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 . 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 . 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 . 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 re - placement of cursor entirely . a particular way for mapping of numerals and some symbols is described here and may be used . 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 0 - 9 , exact assignment may vary such as 1234567890 ). 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 : @ $ + − / ( ) , . :. 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 ; ̂ — |[ ] ! ′ ?. 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 . 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 . 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 . james f . allen . natural language understanding . the benjamin / cummings publishing company , menlo park , calif ., 1995 . 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 . 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 . 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 / 23n2p127 . html . 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 . 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 . 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 . 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 / bri1192simple . html . eric brill . some advances in transformation - based part of speech tagging . in national conference on artificial intelligence , pages 722 - 727 , 1994 . eric brill . unsupervised learning of disambiguation rules for part of speech tagging . in proceedings of the third workshop on very lange corpora . association for computational linguistics , 1995 . harry c . bunt , giorgio satta , and john carroll . new developments in parsing technology . kluwer academic publishers , 2004 . http :// search . barnesancinoble . com / booksearch / sbninquiry . asp ? userid = 3b6dv27azi & amp ; isbn = 140202293 & amp ; itm = 136 . 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 . e . chavez and g . navarro . a metric index for approximate string matching . in latin , pages 181 - 195 , 2002 . http :// citeseer . ist . pau . edu / article / avez02metric . html . 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 . stephen j . derose . grammatical category disambiguation by statistical optimization . computational linguistics , ( 14 . 1 ): 31 - 39 , 1988 . bonnie j . dorr . machine translation : a view from the lexicon . the mit press , 1993 . tegic et al . a communication terminal having a predictive text editor application . http :// swpat . ffii . org / pikta / txt / ep / 1246 / 430 /. r . garside , g . leech , and g . sampson , editors . the computational analysis of english , chapter the claws word - tagging system . london : longman , 1987 . 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 :// www . comp . lancs . ac . uk / ucrel / claws /. 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 . ulf grenander . elements of pattern theory . the johns hopkins university press , 1996 . 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 . linda van guilder . automated part of speech tagging : a brief overview . lectures , world wide web , 1995 . http :// www . gaorgetown . edu / faculty / ballc / ling361 / tagging_overview . html . paul g . hoel , sidney c . port , and charles j . stone . introduction to stochastic processes . waveland press , 1987 . x . d . huang , a . acero , and h . hon . spoken language processing . prentice hall , new york , 2001 . w . john hutchins and harold l . somers . an introduction to machine translation . academic press , san diego , 1992 . heikki hyyrõ . practical methods for approximate string matching . phd thesis , university of tarnpere , finland , 2003 . http :// acta . uta . fi / pdf / 951 - 44 - 5840 - 0 . pdf . frederick jelinek . statistical methods for speech recognition . the mit press , 1997 . mark johnson . pcfg models of linguistic tree representations . computational linguistics , ( 24 ( 4 )): 613 - 632 , 1999 . http :// www . cog . brown . eda /˜ mj / publications . htm . 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 . angelika kimmig and daniel meier . probabilistic context free grammars . lectures , world wide web , 2003 / 04 . http :// www . informatik . uni - freiburg . de /˜ ml / teaching / ws03 / p11 / pcfg . pdf . i . bahl et al . design and construction of a binary - tree system for language modelling , 1987 . http :// patft . uspto . gov / netacgi / nph - parser ? secti = pt01 & amp ; sect2 = hitoff & amp ; d = pall & amp ; p = 1 & amp ; u =/ netahtml / srchnum . htm & amp ; r = i & amp ; f = g & amp ; 1 = 50 & amp ; 1 = 4 , 852 , 173 . wku .& amp ; 0s = pn / 4 , 852 , 173 & amp ; rs = pn / 4 , 852 , 173 . roy lowrance and robert a . wagner . an extension of the string - to - string correction problem . j . acm , 22 ( 2 ): 177 - 183 , 1975 . 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 . sdau . edu / malouf / papers / con1102 . pdf . christopher d . manning , and hinrich schütze . foundations of statistical natural language processing . the mit press , 1999 . http :// www - nlp . stanford . edu / fsnlp /. 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 . andrew mccallum . introduction to natural language processing . lectures , world wide web , 2004 . http :// www . cs . umass . edu /˜ mccalluth / coures / inlp2004 /. 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 . bernard merialdo . tagging english text with a probabilistic model . computational linguistics , ( 20 ( 2 )): 155 - 172 , 1994 . 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 . f . och and h . nay . 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 . judea pearl . causality : models , reasoning , and inference . cambridge . university press , 2000 . leonid peshkin and virginia savova . why build another part - of - speech tagger ? a minimalist approach . in ranlp , 2003 . citeseer . ist . psu . edu / peshkin03why . html . 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 . 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 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 / c195 / paper - html . html . p . vanroose . part - of - speech tagging from an information - theoretic point of view , 2001 . http :// citeseer . ist . psu . edu / 646161 . html . jacques vergne . tutorial : trends in robust parsing . in coling , 2000 . http :// users . info . unicaen . fr /˜ jvergne / tutorialcoling2000 . html . robert a . wagner and michael j . fischer . the string - to - string correction problem . j . acm , 21 ( 1 ): 168 - 173 , 1974 . g . winkler . image analysis , random fields and dynamic monte - carlo methods . springer - verlag , berlin , 1995 . stuart n . wrigley . speech recognition by dynamic time warping . world wide web , 1998 . http :/// ww . dcs . shef . ac . uk /˜ stu / com326 / sym . html . 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 / zobe195finding . html . 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 sub - classified 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 , of 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 verbhave , 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 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 . 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 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 . in subsection 3 . 3 we 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 . to be specific , let us assume that we use the maximum likelihood estimator { circumflex over ( ω )} to select the word , given the tag κ and the signature σ : 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 ω equals { circumflex over ( ω )}? 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 ). is the total frequencies of all words ω in the corpora , and denotes the sum of all the word frequencies f ( ω )= f ( ω , σ , κ ) 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 now , with this equation we can calculate the probability prob ( ω ≠{ circumflex over ( ω )}) once we are given a tagged corpus with frequency information . 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 in other words , the maximum likelihood estimator is accurate 99 . 4 % of the time ( on the average ).