PATENT DOCUMENT

Publication Number: US-9842101-B2
Application Number: US-201514839830-A
Country: US
Kind Code: B2

Title: Predictive conversion of language input

Abstract:
Systems and processes for predictive conversion of language input are provided. In one example process, text composed by a user can be obtained. Input comprising a sequence of symbols of a first symbolic system can be received from the user. Candidate word strings corresponding to the sequence of symbols can be determined. Each candidate word string can comprise two or more words of a second symbolic system. The candidate word strings can be ranked based on a probability of occurrence of each candidate word string in the obtained text. Based on the ranking, a portion of the candidate word strings can be displayed for selection by the user.

Claims:
What is claimed is: 
     
       1. A method for converting language input, the method comprising:
 at an electronic device having one or more processors and memory:
 obtaining a corpus of text composed by a user; 
 after obtaining the corpus of text:
 receiving, from the user, input comprising a sequence of symbols of a first symbolic system; 
 determining a plurality of candidate word strings corresponding to the sequence of symbols, each candidate word string of the plurality of candidate word strings comprising two or more words of a second symbolic system, wherein the obtained corpus of text comprises words of the second symbolic system; 
 ranking the plurality of candidate word strings based on a probability of occurrence of each candidate word string of the plurality of candidate word strings in the obtained corpus of text; and 
 displaying, based on the ranking, a portion of the plurality of candidate word strings for selection by the user. 
 
 
 
     
     
       2. The method of  claim 1 , wherein the first symbolic system is different from the second symbolic system. 
     
     
       3. The method of  claim 1 , further comprising:
 generating a first language model using the obtained corpus of text; and 
 determining, using the first language model, the probability of occurrence of each candidate word string of the plurality of candidate word strings in the obtained corpus of text. 
 
     
     
       4. The method of  claim 3 , wherein the first language model is an n-gram language model. 
     
     
       5. The method of  claim 3 , further comprising:
 receiving, from the user, a selection of a candidate word string from the displayed portion of the plurality of candidate word strings; and 
 displaying the selected candidate word string in a text field of the electronic device. 
 
     
     
       6. The method of  claim 5 , further comprising:
 receiving an indication that the user has committed to the selected candidate word string; and 
 in response to receiving the indication, updating the first language model using the selected candidate word string. 
 
     
     
       7. The method of  claim 6 , wherein receiving the indication further comprises receiving a full stop input for a sentence containing the selected candidate word string. 
     
     
       8. The method of  claim 6 , wherein receiving the indication further comprises receiving a command to send a message containing the selected candidate word string. 
     
     
       9. The method of  claim 5 , further comprising:
 determining a predicted word of the second symbolic system based on a probability of occurrence of a sequence of words in the obtained corpus of text, the sequence of words comprising the selected candidate word string and the predicted text; and 
 displaying the predicted word adjacent to the selected candidate word string in the text field. 
 
     
     
       10. The method of  claim 1 , wherein:
 the obtained corpus of text is associated with a first context; 
 the input is associated with an input context; and 
 ranking the plurality of candidate word strings is based on a degree of similarity between the input context and the first context. 
 
     
     
       11. The method of  claim 10 , wherein the first context includes a first recipient and a first application of the electronic device, and wherein the input context includes a second recipient and a second application of the electronic device. 
     
     
       12. The method of  claim 10 , wherein the first context and input context are determined using a sensor of the electronic device. 
     
     
       13. The method of  claim 1 , further comprising:
 obtaining a second corpus of text composed by the user, wherein:
 the obtained second corpus of text is associated with a second context; 
 ranking the plurality of candidate word strings is based on a probability of occurrence of each candidate word string of the plurality of candidate word strings in the second obtained corpus of text; and 
 the ranking the plurality of candidate word strings is based on a degree of similarity between the input context and the second context. 
 
 
     
     
       14. The method of  claim 13 , wherein the obtained second corpus of text comprises words of the second symbolic system. 
     
     
       15. The method of  claim 1 , further comprising:
 determining, using a second language model, a probability of occurrence of each candidate word string of the plurality of candidate word strings in a general corpus of text, wherein ranking the plurality of candidate word strings is based on the probability of occurrence of each candidate word string of the plurality of candidate word strings in the general corpus of text, and wherein the general corpus of text is not composed by the user. 
 
     
     
       16. The method of  claim 1 , wherein the first symbolic system comprises a phonetic system for transcribing a language. 
     
     
       17. The method of  claim 1 , wherein the first symbolic system comprises Chinese Pinyin. 
     
     
       18. The method of  claim 1 , wherein the first symbolic system comprises Chinese Zhuyin. 
     
     
       19. The method of  claim 1 , wherein the second symbolic system comprises Chinese characters. 
     
     
       20. The method of  claim 1 , wherein each word of the two or more words is a monosyllabic Chinese character. 
     
     
       21. The method of  claim 1 , wherein the probability of occurrence of each candidate word string of the plurality of candidate word strings in the obtained corpus of text is the probability that each candidate word string of the plurality of candidate word strings occurs within the obtained corpus of text composed by the user. 
     
     
       22. A non-transitory computer-readable storage medium comprising computer-executable instructions, which when executed by one or more processors, cause the one or more processors to:
 obtain a corpus of text composed by a user; 
 after obtaining the corpus of text: 
 receive, from the user, input comprising a sequence of symbols of a first symbolic system; 
 determine a plurality of candidate word strings corresponding to the sequence of symbols, each candidate word string of the plurality of candidate word strings comprising two or more words of a second symbolic system, wherein the obtained corpus of text comprises words of the second symbolic system; 
 rank the plurality of candidate word strings based on a probability of occurrence of each candidate word string of the plurality of candidate word strings in the obtained corpus of text; and 
 display, based on the ranking, a portion of the plurality of candidate word strings for selection by the user. 
 
     
     
       23. A system comprising:
 one or more processors; 
 memory storing computer-readable instructions, which when executed by the one or more processors, cause the one or more processors to: 
 obtain a corpus of text composed by a user; 
 after obtaining the corpus of text: 
 receive, from the user, input comprising a sequence of symbols of a first symbolic system; 
 determine a plurality of candidate word strings corresponding to the sequence of symbols, each candidate word string of the plurality of candidate word strings comprising two or more words of a second symbolic system, wherein the obtained corpus of text comprises words of the second symbolic system; 
 rank the plurality of candidate word strings based on a probability of occurrence of each candidate word string of the plurality of candidate word strings in the obtained corpus of text; and 
 display, based on the ranking, a portion of the plurality of candidate word strings for selection by the user. 
 
     
     
       24. The system of  claim 23 , wherein the computer-readable instructions further cause the one or more processors to:
 generate a first language model using the obtained corpus of text; and 
 determine, using the first language model, the probability of occurrence of each candidate word string of the plurality of candidate word strings in the obtained corpus of text. 
 
     
     
       25. The system of  claim 24 , wherein the computer-readable instructions further cause the one or more processors to:
 receive, from the user, a selection of a candidate word string from the displayed portion of the plurality of candidate word strings; and 
 display the selected candidate word string in a text field. 
 
     
     
       26. The computer-readable storage medium of  claim 22 , wherein the computer-executable instructions further cause the one or more processors to:
 generate a first language model using the obtained corpus of text; and 
 determine, using the first language model, the probability of occurrence of each candidate word string of the plurality of candidate word strings in the obtained corpus of text. 
 
     
     
       27. The computer-readable storage medium of  claim 26 , wherein the computer-readable instructions further cause the one or more processors to:
 receive, from the user, a selection of a candidate word string from the displayed portion of the plurality of candidate word strings; and 
 display the selected candidate word string in a text field. 
 
     
     
       28. The computer-readable storage medium of  claim 22 , wherein:
 the obtained corpus of text is associated with a first context; 
 the input is associated with an input context; and 
 ranking the plurality of candidate word strings is based on a degree of similarity between the input context and the first context. 
 
     
     
       29. The computer-readable storage medium of  claim 28 , wherein the first context includes a first recipient and a first application of the electronic device, and wherein the input context includes a second recipient and a second application of the electronic device. 
     
     
       30. The computer-readable storage medium of  claim 28 , wherein the first context and input context are determined using a sensor of the electronic device. 
     
     
       31. The computer-readable storage medium of  claim 22 , wherein the computer-executable instructions further cause the one or more processors to:
 obtain a second corpus of text composed by the user, wherein:
 the obtained second corpus of text is associated with a second context; 
 ranking the plurality of candidate word strings is based on a probability of occurrence of each candidate word string of the plurality of candidate word strings in the second obtained corpus of text; and 
 the ranking the plurality of candidate word strings is based on a degree of similarity between the input context and the second context. 
 
 
     
     
       32. The system of  claim 23 , wherein:
 the obtained corpus of text is associated with a first context; 
 the input is associated with an input context; and 
 ranking the plurality of candidate word strings is based on a degree of similarity between the input context and the first context. 
 
     
     
       33. The system of  claim 32 , wherein the first context includes a first recipient and a first application of the electronic device, and wherein the input context includes a second recipient and a second application of the electronic device. 
     
     
       34. The system of  claim 32 , wherein the first context and input context are determined using a sensor of the electronic device. 
     
     
       35. The system of  claim 23 , wherein the computer-executable instructions further cause the one or more processors to:
 obtain a second corpus of text composed by the user, wherein:
 the obtained second corpus of text is associated with a second context; 
 ranking the plurality of candidate word strings is based on a probability of occurrence of each candidate word string of the plurality of candidate word strings in the second obtained corpus of text; and 
 the ranking the plurality of candidate word strings is based on a degree of similarity between the input context and the second context.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
     This application claims priority from U.S. Provisional Ser. No. 62/168,679, filed on May 29, 2015, entitled PREDICTIVE CONVERSION OF LANGUAGE INPUT, which is hereby incorporated by reference in its entirety for all purposes. 
     This application is a continuation-in-part of U.S. patent application Ser. No. 14/720,655, filed May 22, 2015, entitled PREDICTIVE TEXT INPUT, which claims priority to U.S. Provisional Patent Application No. 62/006,010, filed on May 30, 2014, entitled PREDICTIVE TEXT INPUT, which are hereby incorporated by reference in their entirety for all purposes. 
     This application also relates to the following applications: U.S. Patent Application Ser. No. 62/005,837, “Device, Method, and Graphical User Interface for a Predictive Keyboard,” filed May 30, 2014; U.S. Patent Application Ser. No. 62/046,876, “Device, Method, and Graphical User Interface for a Predictive Keyboard,” filed Sep. 5, 2014; U.S. patent application Ser. No. 14/713,420, “Entropy-Guided Text Prediction Using Combined Word and Character N-gram Language Models,” filed May 15, 2015; U.S. patent application Ser. No. 14/724,641, “Text Prediction Using Combined Word N-gram and Unigram Language Models,” filed May 28, 2015; and U.S. patent application Ser. No. 14/719,163, “Canned Answers in Messages,” filed May 21, 2015; which are hereby incorporated by reference in their entirety for all purposes. 
    
    
     FIELD 
     This relates generally to language input in electronic devices and, more specifically, to predictive conversion of language input in electronic devices. 
     BACKGROUND 
     Pinyin is a phonetic system for transcribing Mandarin Chinese using the Roman alphabet. In a pinyin transliteration, the phonetic pronunciations of Chinese characters can be mapped to syllables composed of Roman letters. Pinyin is commonly used to input Chinese characters into a computer via a conversion system. For a given pinyin input, the conversion system can output Chinese characters that most likely correspond to the pinyin input. Such a system often incorporates statistical language models to improve conversion accuracy. However, while conventional language models can be helpful for determining commonly used Chinese character sequences, they can be less successful at determining Chinese character sequences that are not frequently used in the Chinese language. This can present difficulties to users who frequently need to input particular sequences of Chinese characters that are less common in the Chinese language, such as the names of friends or family members or the names of locations frequented by the user. 
     SUMMARY 
     Systems and processes for predictive conversion of language input are provided. In one example process, text composed by a user can be obtained. Input that includes a sequence of symbols of a first symbolic system can be received. A plurality of candidate word strings corresponding to the sequence of symbols can be determined. Each candidate word string of the plurality of candidate word strings can include two or more words of a second symbolic system. The plurality of candidate word strings can be ranked based on a probability of occurrence of each candidate word string of the plurality of candidate word strings in the obtained text. A portion of the plurality of candidate word strings can be displayed for selection by the user based on the ranking. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  illustrates an exemplary language model having a hierarchical context tree structure according to various examples. 
         FIG. 2  illustrates an exemplary process for predictive text input according to various examples. 
         FIG. 3  illustrates an exemplary process for predictive text input according to various examples. 
         FIG. 4  illustrates an exemplary process for predictive text input according to various examples. 
         FIGS. 5A-B  illustrate an exemplary process for predictive conversion of language input according to various examples. 
         FIGS. 6A-C  illustrate exemplary screenshots of an electronic device at various stages of an exemplary process for predictive conversion of language input according to various examples. 
         FIGS. 7A-D  illustrate an exemplary process for predictive conversion of language input according to various examples. 
         FIGS. 8A-F  illustrate exemplary screenshots of an electronic device at various stages of an exemplary process for predictive conversion of language input according to various examples. 
         FIG. 9  illustrates an exemplary user device for carrying out aspects of predictive text input or predictive conversion of language input according to various examples. 
         FIG. 10  illustrates an exemplary system and environment for carrying out aspects of predictive text input or predictive conversion of language input according to various examples. 
         FIG. 11  illustrates a functional block diagram of an exemplary electronic device according to various examples. 
         FIG. 12  illustrates a functional block diagram of an exemplary electronic device according to various examples 
         FIG. 13  illustrates a functional block diagram of an exemplary electronic device according to various examples. 
     
    
    
     DETAILED DESCRIPTION 
     In the following description of examples, reference is made to the accompanying drawings in which it is shown by way of illustration specific examples that can be practiced. It is to be understood that other examples can be used and structural changes can be made without departing from the scope of the various examples. 
     The present disclosure relates to systems and processes for predictive conversion of language input. In an exemplary process, text composed by a user can be obtained. The obtained text can be used to generate a user-specific language model. Input that includes a sequence of symbols of a first symbolic system (e.g., pinyin input) can be received. A plurality of candidate word strings corresponding to the sequence of symbols can be determined. Each candidate word string can include two or more words of a second symbolic system (e.g., Chinese words). The probability of occurrence of each candidate word string in the obtained text can be determined using the generated user-specific language model. The plurality of candidate word strings can be ranked based on a probability of occurrence of each candidate word string in the obtained text. A portion of the plurality of candidate word strings can be displayed for user selection based on the ranking. A selection of a candidate word string from the displayed portion can cause the selected candidate word to be displayed in a text field. 
     By utilizing text composed by the user to generate a user-specific language model, candidate word strings that are more frequently used by the user, but uncommon in typical collections of text, can be displayed for user selection. Further, unlike deterministic conversion methods where fixed conversion rules are set up for specific inputs, the processes for predictive conversion of language input described herein can incorporate dynamic learning where the probability of occurrence of a particular candidate word string can change based on input collected from the user over time. This can improve the accuracy of predicting the most likely candidate word string corresponding to the inputted sequence of symbols of the first symbolic system. 
     The present disclosure further relates to systems and processes for predictive text input. In various examples described herein, a language model can be used to generate predictive text given input text. In some examples, the language model can be a user language model having a hierarchical context tree structure. For example, the language model can be built from user text and thus can more closely model the intent of the user. This enables greater accuracy in generating predictive text for the user. In addition, the language model can include various sub-models associated with various specific contexts. The language model can thus be used to model various specific contexts, thereby improving accuracy in generating predictive text. The hierarchical context tree structure can enable information to be shared between the sub-models and can prevent redundancy among the sub-models. This allows the language model to be stored and implemented efficiently. 
     In one example process for predictive text input, a text input can be received. The text input can be associated with an input context. A frequency of occurrence of an m-gram with respect to a subset of a corpus can be determined using a language model. The m-gram can include at least one word in the text input. A weighting factor can be determined based on a degree of similarity between the input context and the context. A weighted probability of a predicted text given the text input can be determined based on the frequency of occurrence of the m-gram and the weighting factor. The m-gram can include at least one word in the predicted text. The predicted text can be presented via a user interface of an electronic device. 
     In some examples, physical context can be used to improve the accuracy of predictive text. Physical context can refer to a time period, a location, an environment, a situation, or a circumstance associated with the user at the time the text input is received. For example, physical context can include the situation of being on an airplane. The physical context can be determined using a sensor of an electronic device. In addition, the physical context can be determined using data obtained from an application of the electronic device. In one example, the physical context of being on an airplane can be determined based on audio detected by the microphone of the electronic device. In another example, the physical context of being on an airplane can be determined based on a user calendar entry obtained from the calendar application on the electronic device. 
     In one example process of predictive text using physical context, a text input can be received. A physical context that is associated with the text input can be determined. A weighted probability of a predicted text given the text input can be determined using a language model and the physical context. The predicted text can be presented via a user interface of an electronic device. 
     1. Language Model 
     A language model generally assigns to an n-gram a frequency of occurrence of that n-gram with respect to a corpus of natural language text. An n-gram refers to a sequence of n words, where n is any integer greater than zero. In some cases, the frequency of occurrence can be in the form of raw counts. For example, a particular 2-gram can occur 25 times within a corpus of natural language text. Accordingly, the frequency of occurrence of that 2-gram within the corpus can be 25 counts. In other cases, the frequency of occurrence can be a normalized value. For example, the frequency of occurrence can be in the form of a likelihood or probability (e.g., probability distribution or probability of occurrence). In one such example, a corpus of natural language text can include 25 counts of a particular 2-gram and 1000 counts of all 2-grams. Accordingly, the frequency of occurrence of that 2-gram within the corpus can be equal to 25/1000. 
     A language model can be built from a corpus. In some cases, the language model can be a general language model built from a corpus that includes a large volume of text associated with various contexts. In other cases, the language model can be a context-specific language model where the language model is built from a corpus that is associated with a specific context. The specific context can be, for example, a subject, an author, a source of text, an application for inputting text, a recipient of text, or the like. Context-specific language models can be desirable to improve accuracy in text predictions. However, because each context-specific language model can be associated with only one context, multiple context-specific language models can be required to cover a range of contexts. This can be an inefficient use of resources where significant memory and computational power can be required to store and implement a large number of context-specific language models. It should be recognized that that the term “context” described herein can refer to a scope or a domain. 
       FIG. 1  depicts language model  100  having a hierarchical context tree structure. The hierarchical context tree structure can be advantageous in enabling multiple contexts to be efficiently integrated within a single language model. Language model  100  can thus be used to efficiently model a variety of contexts. 
     As shown in  FIG. 1 , language model  100  can include multiple nodes that extend from root node  102  in a tree structure. The nodes can be arranged in multiple hierarchical levels where each hierarchical level can represent a different category of context. For example, hierarchical level  132  can represent application context while hierarchical level  134  can represent recipient context. Having only a single category of context for each hierarchical level can be advantageous in preventing redundancy between the nodes of language model  100 . This reduces the memory required to store language model  100  and also enables greater efficiency in determining text predictions. 
     Each node of language model  100  can correspond to a sub-model of language model  100 . Each sub-model within a hierarchical level can be associated with a specific context of the category of context of the hierarchical level. For example, hierarchical level  132  can include sub-models that are each associated with a specific application of the user device. Specifically, sub-models  104 ,  106 , and  108  can be associated with the messaging application, the email application, and the word processor application, respectively. Similarly, hierarchical level  134  can include sub-models that are each associated with a specific recipient. Specifically, sub-models  110 ,  112 , and  114  can be associated with the spouse of the user, a first friend of the user, and a second friend of the user, respectively. In addition, a child sub-model can be associated with the context of its parent sub-model. For example, children sub-models  110 ,  112 , and  114  can extend from parent sub-model  104  and thus children sub-models  110 ,  112 , and  114  can be associated with the messaging application of parent sub-model  104 . Further, the sub-models can be independent of one another such that each sub-model is associated with a unique context. This prevents redundancy between the sub-models. 
     Language model  100  can be built from a corpus that includes multiple subsets where each subset can be associated with a specific context. In this example, language model  100  can be an n-gram statistical language model that includes a plurality of n-grams. Each n-gram can be associated with a frequency of occurrence. The frequency of occurrence of each n-gram can be with respect to a subset or a plurality of subsets of the corpus. Thus, each n-gram can be associated with a specific context of a subset or of a plurality of subsets. 
     Each sub-model of language model  100  can be built from a subset of the corpus and can be associated with the specific context of the subset. For example, sub-model  110  can be built from a first subset of the corpus. The first subset can include text that is associated with the messaging application of the user device and that is directed to the spouse of the user. Thus, sub-model  110  can be associated with a first context where the first context can include the messaging application and the spouse of the user. Further, the frequency of occurrence of an n-gram of sub-model  110  can be with respect to the first subset. 
     In some examples, a parent sub-model can be based on its children sub-models. For example, the frequency of occurrence of a specific n-gram with respect to parent sub-model  104  can be derived by combining the frequencies of occurrence of that n-gram with respect to children sub-models  110 ,  112 , and  114 . In some examples, the result from each child sub-model can be weighted by a weighting factor prior to being combined. For example, the frequency of occurrence of a particular 2-gram with respect to parent sub-model  104  can be equal to the sum of the weighted frequencies of occurrence of that 2-gram with respect to children sub-models  110 ,  112 , and  114 . This can be expressed as: C(w 1  w 2 ) messaging =λ 1 C(w 1  w 2 ) messaging,spouse +λ 2 C(w 1  w 2 ) messaging,friend1 +λ 3 C(w 1  w 2 ) messaging,friend2 , where C(w 1  w 2 ) messaging  denotes the frequency of occurrence of the 2-gram with respect to sub-model  104 , C(w 1  w 2 ) messaging,spouse  denotes the frequency of occurrence of the 2-gram with respect to sub-model  110 , C(w 1  w 2 ) messaging,friend1  denotes the frequency of occurrence of the 2-gram with respect to sub-model  112 , C(w 1  w 2 ) messaging,friend2  denotes the frequency of occurrence of the 2-gram with respect to sub-model  114 , and λ 1 , λ 2 , λ 3  are different weighting factors. 
     Language model  100  can further include a plurality of hierarchical context tags to encode the context associated with each n-gram. Each context can thus be represented by one or more hierarchical context tags. For example, an n-gram of sub-model  104  can be represented by the hierarchical context tag “messaging” while an n-gram of sub-model  110  can be represented by the hierarchical context tags “messaging, spouse”. Identical n-grams from different sub-models can thus be differentiated by the hierarchical context tags associated with each n-gram. 
     In some examples, language model  100  can be a general language model. In other examples, language model  100  can be user language model that is built from a corpus of user text. User text or user text input can refer to text that is inputted by a user of the user device. The user can be an individual or a group of individuals. Further, language model  100  can be a static language model or dynamic language model. 
     It should be recognized that language model  100  can include any number of hierarchical levels representing a respective number of categories of context. The hierarchical levels can be arranged in any suitable order. For instance, in some examples, hierarchical level  134  can extend from root  102  while hierarchical level  132  can extend from hierarchical level  134 . Each hierarchical level can include any number of sub-models associated with a respective number of specific contexts. For example, hierarchical level  132  can include additional sub-models that are associated with other applications of the user device. The applications can include, for example, web browser, social media, chat, calendar scheduler, spreadsheets, presentations, notes, media, virtual assistant, or the like. Similarly, hierarchical level  134  can include additional sub-models that are associated with other recipients. The recipients can include any specific individual, any group of individuals, or any category of people. For example, the recipients can include a family member, a friend, a colleague, a group of friends, children within a particular age range, or the like. Further, in some examples, language model  100  can include an additional hierarchical level representing physical context. The sub-models of the hierarchical level can be associated with a specific physical context. For example, physical context can include one or more of an environment, situation, circumstance, weather, time period, location, and the like. 
     Below,  FIGS. 2, 3, 4, 5, and 7  provide a description of exemplary processes  200 ,  300 ,  400 ,  500 , and  700  for predictive text input or predictive conversion of language input. In some examples, each of processes  200 ,  300 ,  400 ,  500 , and  700  can be implemented by a user device (e.g., user device  900 , described below). In some examples, the user device can be part of a server-client system (e.g., system  1000 , described below). In these examples, each of processes  200 ,  300 ,  400 ,  500 , and  700  can be implemented by the server-client system where different portions of each process can be divided between the user device (e.g., user device  900 ) and the server (e.g., server system  1010 , described below) 
     2. Process for Predictive Text Input 
       FIG. 2  illustrates exemplary process  200  for predictive text input according to various examples. At block  202  of process  200 , a text input can be received. In some examples, the text input can be received via an interface of the user device (e.g., touch screen  946  or other input/control devices  948  of user device  900 , described below). The interface can be any suitable device for inputting text. For example, the interface can be a keyboard/keypad, a touch screen implementing a virtual keyboard or a handwriting recognition interface, a remote control (e.g., television remote control), a scroll wheel interface, an audio input interface implementing speech-to-text conversion, or the like. The received text input can be in any language and can include at least one word. In some examples, the text input can include a sequence of words. In some cases, a character (e.g., symbols and punctuation) can be considered a word. 
     The received text input can be associated with an input context. The input context can include any contextual information related to the received text input. The input context can include a single context or a combination of contexts. In some examples, the input context can include an application of the user device with which the received text input is associated. The application can be any application configured to receive text input, such as, for example, email, text messaging, web browser, calendar scheduler, word processing, spreadsheets, presentations, notes, media, virtual assistant, or the like. In addition, the input context can include the recipient to which the received text input is directed. The recipient can include, for example, a family member, a friend, a colleague, or the like. The recipient can also include a particular group of people or a category of people, such as, for example, best friends, professional acquaintances, children of a particular age group, or the like. 
     The recipient can be determined using a language model. In some examples, the language model can be the same language model used in block  204  for determining a first frequency of occurrence of an m-gram with respect to a first subset of a corpus. In other examples, the language model used to determine the recipient can be different from that used in block  204 . The language model used to determine the recipient can include sub-models that are associated with various recipients (e.g., recipient A, B, C . . . Z). The most likely recipient to which the input text is directed can be determined from the input text using the language model. For example, the probability that the recipient is recipient A given the text input can be determined as follows: P(recipient A|text input)=P(text input|recipient A)*P(recipient A)/P(text input). The input context can thus include the most likely recipient determined based on the input text and using the language model. 
     In some examples, the input context can include a physical context. The physical context can refer to an environment, a situation, or a circumstance associated with the user at the time the text input is received. For example, the physical context can include a time, a location, a weather condition, a speed of travel, a noise level, or a brightness level. The physical context can also include traveling on a vehicle (e.g., car, bus, subway, airplane, boat, etc.), engaging in a particular activity (e.g., sports, hobby, shopping, etc.), or attending a particular event (e.g., dinner, conference, show, etc.). 
     In some examples, the input context can be determined using a sensor of the user device. The sensor can include, for example, a microphone, a motion sensor, a GPS receiver, a light/brightness sensor, an image sensor, a moisture sensor, a temperature sensor, or the like. In a specific example, the user can be inputting text to the user device while traveling on an airplane. In such an example, the microphone of the user device can receive audio that is characteristic of an airplane and a sound classifier can be used to determine that the received audio is associated with an airplane. Further, the motion sensor and GPS sensor (e.g., GPS receiver) of the user device can be used to determine that the speed, altitude, and location of the user are consistent with being on an airplane. The input context of traveling on an airplane can thus be determined using information obtained from the microphone, motion sensor, and GPS sensor. 
     In another example, the user can be inputting text to the user device while jogging. In such an example, the motion sensor can detect oscillations and vibration associated with jogging while the microphone can receive audio that is consistent with a person jogging. The input context of jogging can thus be determined based on the information from the microphone and motion sensor. 
     In yet another example, the user can be inputting text to the user device while in a dark environment. In such an example, the image sensor or the brightness sensor can be used to detect that the user is in a dark environment. The physical context of being in a dark environment can thus be determined based on the information from the image or brightness sensor. Further, in some cases, other physical context can be determined based on determining that the user is in a dark environment. For example, the user device can determine the physical context of watching a movie in a movie theater based on determining the location of the user using the GPS sensor and determining that the user is in a dark environment. 
     In some examples, the input context can be represented by one or more hierarchical context tags. For example, the received text input can be associated with the email application and spouse of the user as the recipient. In such an example, the input context can be represented by the hierarchical context tags “email, spouse”. 
     At block  204  of process  200 , a first frequency of occurrence of an m-gram with respect to a first subset of a corpus can be determined using a first language model. In some examples, the first language model can be an n-gram statistical language model having a hierarchical context tree structure. Specifically, the first language model can be similar or identical to language model  100  described above with reference to  FIG. 1 . 
     The first language model can be built from a corpus having a plurality of subsets where each subset is associated with a context. Thus, the first subset can be associated with a first context. In one example, with reference to  FIG. 1 , sub-model  110  can be built from the first subset of the corpus. In this example, the first subset can include a collection of text that is associated with the messaging application and directed to the spouse of the user. Accordingly, in this example, the first context can include the messaging application and the spouse as the recipient. 
     The m-gram can be a sequence of m words where m is a specific positive integer. The m-gram can include at least one word in the text input received at block  202 . In one example, the text input can include the word “apple” and the m-gram can be the 2-gram “apple cider”. In one example, the first frequency of occurrence of the 2-gram “apple cider” can be determined from sub-model  110  of language model  100 . 
     It should be recognized that in other examples, the first frequency of occurrence of the m-gram with respect to the first subset can be determined from any sub-model of language model  100  and the first subset can be associated with the context of the respective sub-model. For instance, in one example, a sub-model of language model  100  can be built from a first subset that includes a collection of text associated with a specific physical context (e.g., environment, situation, circumstance, time period, location, etc.). In this example, the sub-model can be a physical context sub-model that is associated with the specific physical context. The first frequency of occurrence of the m-gram with respect to the first subset can be determined from the physical context sub-model where the first context includes the specific physical context. 
     In some examples, the first language model can be a general language model. In other examples, the first language model can be a user language model built using a corpus that includes a collection of user input text received prior to receiving the text input. In some examples, the first language model can be a static language model that is not modified or updated using the input text. In other examples, the first language model can be a dynamic language model. For example, learning based on received input text can be performed to update the dynamic language model. Specifically, the first language model can be updated using the input text received at block  202 . Further, the first language model can be pruned (e.g., unlearned) using methods known in the art to enable the efficient use of the language model and to limit the memory required to store the language model. 
     At block  206  of process  200 , a first weighting factor to apply to the first frequency of occurrence of the m-gram can be determined based on a degree of similarity between the input context and the first context. For example, a higher first weighting factor can be determined based on a higher degree of similarity between the input context and the first context. Conversely, a lower first weighting factor can be determined based on a lower degree of similarity between the input context and the first context. 
     In some example, the input context and the first context can be represented by hierarchical context tags and the degree of similarity can be determined based on the number of matching hierarchical context tags between the input context and the first context. For example, the input context can be represented by the hierarchical context tags “messaging, spouse” and the first context can be represented by the hierarchical context tags “messaging, spouse”. In this example, the degree of similarity can be high based on the matching of both the application context tags and the recipient context tags. Therefore, in this example, the first weighting factor can be determined to have a high value. In another example, the input context can be represented by the hierarchical context tags “messaging, spouse” and first context can be represented by the hierarchical context tags “email, colleague1”. In this example, the degree of similarity can be low due to neither the application context tags nor the recipient context tags matching. Therefore, in this example, the first weighting factor can be determined to have a low value. 
     In some examples, the first weighting factor can be determined using a look-up table. The look-up table can have predetermined values of the first weighting factor based on various combinations of input context and first context. In other examples, the first weighting factor can be determined by performing calculations based on predetermined logic. 
     At block  208  of process  200 , a first weighted probability of a first predicted text given the text input can be determined based on the first frequency of occurrence of the m-gram and the first weighting factor. The m-gram at block  204  can include at least one word in the first predicted text. In one example, the text input can be the word “apple”, the first predicted text can be the word “cider”, and the m-gram can be the 2-gram “apple cider”. In this example, the first weighted probability of the word “cider” given the word “apple” can be determined as follows: 
                 P     w   ⁢           ⁢   1       ⁡     (     cider   ❘   apple     )       =       λ   1     ⁢           C   1     ⁡     (     apple   ⁢           ⁢   cider     )         message   ,   spouse             C   1     (   apple   ⁢           )       message   ,   spouse                 
where C 1 (apple cider) message,spouse  denotes the first frequency of occurrence of the 2-gram “apple cider” with respect to the first subset determined using sub-model  110  of language model  100 , C 1 (apple) message,spouse  denotes the frequency of occurrence of the 1-gram “apple” with respect to the first subset determined using sub-model  110  of language model  100 , and λ 1  denotes the first weighting factor.
 
     At block  210  of process  200 , the first predicted text can be presented via a user interface of the user device. The first predicted text can be presented in a variety of ways. For example, the first predicted text can be displayed via a user interface displayed on the touchscreen of the user device. The manner in which the first predicted text is displayed can be based at least in part on the first probability of the first predicted text given the text input. For example, a list of predicted text can be presented and the position of the first predicted text on the list can be based at least in part on the first probability. A higher first probability can result in the first predicted text being positioned closer to the front or top of the list. 
     Although process  200  is described above with reference to blocks  202  through  210 , it should be appreciated that in some cases, one or more blocks of process  200  can be optional and additional blocks can also be performed. 
     Further, it should be recognized that the first weighted probability of the first predicted text given the text input at block  208  can be determined based on any number of frequencies of occurrence of the m-gram and a respective number of the weighting factors. This enables information from other sub-models to be leveraged in determining the first weighted probability. For instance, in some examples, the first weighted probability of the first predicted text given the text input can be determined based on a first frequency of occurrence of the m-gram with respect to a first subset of the corpus, a first weighting factor, a second frequency of occurrence of the m-gram with respect to a second subset of the corpus, and a second weighting factor. In these examples, process  200  can further include determining, using the first language model, the second frequency of occurrence of the m-gram with respect to a second subset of the corpus. The second subset can be different from the first subset and the second subset can be associated with a second context that is different from the first context. For example, as described above with reference to block  204 , the first frequency of occurrence of the m-gram with respect to the first subset can be determined using sub-model  110  of language model  100 . Sub-model  110  can be built using the first subset of the corpus and the first context of the first subset can be associated with the messaging application and the spouse of the user. In addition, the second frequency of occurrence of the m-gram with respect to the second subset can be determining using sub-model  112  of language model  100 . Sub-model  112  can be built using the second subset of the corpus and the second context of the second subset can be associated with the messaging application and the first friend of the user. 
     Further, process  200  can include determining the second weighting factor to apply to the second frequency of occurrence of the m-gram based on a degree of similarity between the input context and the second context. For example, the input context can be represented by “messaging, spouse”, the first context can be represented by “messaging, spouse”, and the second context can be represented by “messaging, friend1”. In this example, the degree of similarity between the input context and the first context can be greater than the degree of similarity between the input context and the second context. Accordingly, in this example, the first weighting factor can be greater than the second weighting factor. It should be appreciated that in other examples, the degree of similarity between the input context and the first context can be less than the degree of similarity between the input context and the second context and thus the first weighting factor can be less than the second weighting factor. 
     As described above, the first weighted probability of the first predicted text given the text input can be determined based on the first frequency of occurrence of the m-gram, the first weighting factor, the second frequency of occurrence of the m-gram, and the second weighting factor. In an example where the text input is “apple” and the predicted text is “cider”, the first weighted probability of the word “cider” given the word “apple” can be determined as follows: 
                 P     w   ⁢           ⁢   1       ⁡     (     cider   ❘   apple     )       =         λ   1     ⁢           C   1     ⁡     (     apple   ⁢           ⁢   cider     )         message   ,   spouse             C   1     (   apple   ⁢           )       message   ,   spouse           +       λ   2     ⁢           C   2     ⁡     (     apple   ⁢           ⁢   cider     )         message   ,     friend   ⁢           ⁢   1               C   2     (   apple   ⁢           )       message   ,     friend   ⁢           ⁢   1                     
where C 1 (apple cider) message,spouse  denotes the first frequency of occurrence of the 2-gram “apple cider” with respect to the first subset determined using sub-model  110 , C 1 (apple) message,spouse  denotes the first frequency of occurrence of the 1-gram “apple” with respect to the first subset determined using sub-model  110 , λ 1  denotes the first weighting factor, C 2 (apple cider) message,friend1  denotes the second frequency of occurrence of the 2-gram “apple cider” with respect to the second subset determined using sub-model  112 , C 2 (apple) message,friend1  denotes the second frequency of occurrence of the 1-gram “apple” with respect to the second subset determined using sub-model  112 , and λ 2  denotes the second weighting factor. In this example, the probability of each sub-model is calculated and each probability is weighted separately before being combined.
 
     In another example, the first weighted probability of the word “cider” given the word “apple” can be determined as follows: 
                 P     w   ⁢           ⁢   1       ⁡     (     cider   ❘   apple     )       =           λ   1     ⁢         C   1     ⁡     (     apple   ⁢           ⁢   cider     )         message   ,   spouse         +       λ   2     ⁢         C   2     ⁡     (     apple   ⁢           ⁢   cider     )         message   ,     friend   ⁢           ⁢   1                   λ   1     ⁢         C   1     (   apple   ⁢           )       message   ,   spouse         +       λ   2     ⁢         C   2     (   apple   ⁢           )       message   ,     friend   ⁢           ⁢   1                     
In this example, the frequencies of occurrence are combined separately in the numerator and the denominator to derive the first weighting probability.
 
     Further, in this example, the first weighted probability of the word “cider” given the word “apple” (e.g., P w1 (cider|apple)) can be based on the first weighted probability of the 1-gram “apple” with respect to the first subset (e.g., λ 1 C 1 (apple) message,spouse ). Therefore, in this example, process  200  can include determining, using the first language model, a first frequency of occurrence of an (m−1)-gram with respect to the first subset (e.g., C 1 (apple) message,spouse ). The m-gram (e.g., “apple cider”) can include one or more words in the (m−1)-gram (e.g., “apple”). The first weighting factor (e.g., λ 1 ) can be applied to the first frequency of occurrence of the (m−1)-gram (e.g., C 1 (apple) message,spouse ) to obtain the weighted frequency of occurrence of the (m−1)-gram (e.g., λ 1 C 1 (apple) message,spouse ). The first weighted probability of the first predicted text given the text input (e.g., P w1 (cider|apple)) can thus be determined based on the first weighted frequency of occurrence of the (m−1)-gram (e.g., λ 1 C 1 (apple) message,spouse ). 
     In some examples, the weighted probability of a second predicted text given the text input and the first predicted text can be determined in response to the first weighted probability of the first predicted text given the text input being greater than a predetermined threshold. In these examples, process  200  can further include determining, using the language model, a frequency of occurrence of an (m+1)-gram with respect to the first subset of the corpus. The (m+1)-gram can include one or more words in the m-gram and at least one word in the second predicted text. The weighted probability of the second predicted text given the text input and the first predicted text can be determined based on the frequency of occurrence of the (m+1)-gram and the first weighting factor. In one example, the m-gram can be the 2-gram “apple cider” and the (m+1)-gram can be the 3-gram “apple cider vinegar”. In response to the first weighted probability of the word “cider” given the word “apple” (e.g., P w1 (cider|apple)) being greater than a predetermined threshold, the frequency of occurrence of the 3-gram “apple cider vinegar” (e.g., C(apple cider vinegar) message,spouse ) with respect to the first subset of the corpus can be determined using sub-model  110  of language model  100 . A weighted probability of the word “vinegar” given the words “apple cider” can be determined based on the frequency of occurrence of the 3-gram “apple cider vinegar” and the first weighting factor λ 1 . In particular: 
                 P     w   ⁢           ⁢   1       ⁡     (     vinegar   ❘     apple   ⁢           ⁢   cider       )       =       λ   1     ⁢         C   ⁡     (     apple   ⁢           ⁢   cider   ⁢           ⁢   vinegar     )         message   ,   spouse           C   ⁡     (     apple   ⁢           ⁢   cider     )         message   ,   spouse                 
It should be recognized that weighted probabilities can be determined for any number of additional predicted texts in response to the weighted probability of the previous predicted text being greater than a predetermined threshold. In some examples, weighted probabilities of predicted text can be determined for up to five words using process  200 . This can be desirable for enabling the generation of predictive text that includes a sequence of up to five words.
 
     In some examples, additional language models can be used to determine a weighted probability of the first predicted text given the text input. Additional language models enable the use of additional statistical or contextual information for determining weighted probability of the first predicted text given the text input. This can be desirable for achieving greater accuracy and robustness in text prediction. For example, process  200  can include determining a second weighted probability of the first predicted text given the text input (e.g., P w2 (cider|apple)) based on the first weighted probability of the first predicted text given the text input (e.g., P w1 (cider|apple)) and a probability of the first predicted text given the text input (e.g., P(cider|apple)). In this example, the probability of the first predicted text given the text input (e.g., P(cider|apple)) can be determined using a second language model. The second language model can be any suitable language model. In one example, the second language model can be a general language model. In another example, the second language model can be a static language model. In a specific example, the first language model can be a dynamic user language model while the second language model can be a static general language model. Determining the second weighted probability of the first predicted text given the text input (e.g., P w2 (cider|apple)) can include applying a third weighting factor (e.g., λ 3 ) to the first weighted probability of the first predicted text given the text input (e.g., P w1 (cider|apple)) and applying a fourth weighting factor (e.g., λ 4 ) to the probability of the first predicted text given the text input (e.g., P(cider|apple)). In particular, the second weighted probability of the first predicted text given the text input can be determined as follows: P w2 (cider|apple)=λ 3 P w1 (cider|apple)+λ 4 P (cider|apple). 
     In examples where the language model is a dynamic language model, process  200  can further include updating the language model using the text input of block  202 . In some examples, process  200  can include updating the language model using the text input of block  202  and the predicted text of block  208 . Further, the input context can be used to update the language model. In an example where the input context is associated with “messaging, spouse”, the text input and predicted text of “apple cider” can be used to update the sub-model  110  of language model  100 . Further, in some examples, only certain text is used to update the model. For example, only text that is accepted by the user can be used to update the model. In one example, text that is transmitted, sent, published, or posted via an application of the user device (e.g., email, messenger, chat, social media, etc.) can be considered to be accepted by the user. 
     Although in the above examples the language model can be an n-gram statistical language model having a hierarchical context tree structure (e.g., language model  100 ), it should be recognized that various other language models can be suitable for implementing process  200 . For example, the language model can be a neural network based language model that is trained using a corpus. The corpus can include multiple subsets where each subset is associated with a specific context. The neural network based language model can be configured to receive an input that includes the m-gram and the input context and output a frequency of occurrence of the m-gram with respect to a first subset of the corpus and a first weighting factor to apply to the frequency of occurrence of the m-gram. 
       FIG. 3  illustrates another exemplary process  300  for predictive text input according to various examples. At block  302  of process  300 , a first text input can be received. The first text input can be associated with a first input context. Block  302  can be similar or identical to block  202  described above. 
     At block  304  of process  300 , a first weighted probability of a predicted text given the first text input can be determined using a language model and based on the first input context. The first weighted probability can be determined in a similar or identical manner as described above with respect to blocks  204  through  208 . 
     At block  306  of process  300 , a second text input can be received. In some examples, the second text input can be received after the first text input is received. The second text input can be associated with a second input context. The first text input can be identical to the second text input. However, the first input context can be different from the second input context. Block  306  can be similar or identical to block  202  described above. 
     At block  308  of process  300 , a second weighted probability of the predicted text given the second text input can be determined using the language model and based on the second input context. The second weighted probability can be determined in a similar or identical manner as described above with respect to blocks  204  through  208 . 
     The language model can take into account the differences in the first input context and the second input context in determining the first weighted probability and the second weighted probability, respectively. For example, different weighting factors can be determined at block  206  due to differences in the first input context and the second input context. Further, in some examples, different sub-models of the language model can be used to determine the second weighted probability at block  308  compared to the first weighted probability at block  304 . Therefore, although the first input text and the second input text are identical, the first weighted probability can be different from the second weighted probability due to different sub-models being used to determine the frequency of occurrence of an m-gram or different weighting factors being determined. 
     3. Predictive Text Input Using Physical Context 
       FIG. 4  illustrates exemplary process  400  for predictive text input using physical context according to various examples. In process  400 , physical context information can be used to improve the accuracy of a predicted text given a text input such that the predicted text is more likely to include the user&#39;s intent. 
     At block  402  of process  400 , a text input can be received. Block  402  can be similar or identical to block  202  of process  200  described above. 
     At block  404  of process  400 , a physical context associated with the text input can be determined. As described above, the physical context can refer to an environment, a situation, or a circumstance associated with the user at the time the text input is received. In some examples, the physical context can include a time, a location, a weather condition, a speed of travel, a noise level, a brightness level, or the like. The physical context can also include a situation or circumstance such as, traveling on a vehicle (e.g., car, bus, subway, airplane, boat, etc.), engaging in a particular activity (e.g., sports, hobby, shopping, etc.), or attending a particular event (e.g., dinner, conference, show, etc.). 
     In some examples, the physical context can be determined using a sensor of the user device. For example, the physical context can be determine in a similar or identical manner as determining the input context using a sensor of the user device at block  202  of process  200 , described above. 
     In other examples, the physical context can be determined using data obtained from an application of the user device. The data can be obtained from any suitable application of the user device. For example, the physical context can be determined using the entries of the calendar application and the time of the clock application. In a specific example, it can be determined using the clock application and the calendar application that the text input is received while the user is attending a work meeting. According, the physical context associated with the text input can be determined to be the situation of attending a work meeting. 
     In other examples, the physical context can be determined to be a particular time period. The time period can be determined from data obtained from a clock application, a calendar application, or a weather application. In one example, the physical context can include a convenient time period for the user to schedule an outdoor activity. In this example, the convenient time period can be determined using the current time from the clock application, the user&#39;s schedule from the calendar application, and the weather forecast using the weather application. 
     At block  406  of process  400 , a first weighted probability of a predicted text given the text input can be determined using a first language model and the physical context. The first language model can be any suitable language model for determining a probability of a predicted text given the text input. The first language model can be a general language model or a user language model. In an example where the first language model is a user language model, the first language model can be built from a corpus that includes a collection of user input text received prior to receiving the text input at block  302 . In some examples, the first language model can be a static language model or a dynamic language model. In an example where the first language model is a dynamic language model, the first language model can be updating using the received text input. 
     In some examples, the first weighted probability of the predicted text given the text input can be determined based on a first probability of the predicted text given the text input and a first weighting factor. Block  406  can include determining, using the first language model, the first probability of the predicted text given the text input. Further, block  406  can include determining the first weighting factor based on the physical context. For example, if the physical context includes the situation of traveling in Paris and the text input includes the phrase, “I&#39;m having fun at the”, the first weighting factor can be determined to be higher for a predicted text that is associated with Paris (e.g., Eiffel tower, Louvre, or Notre Dame) and lower for a predicted text associated with San Francisco (e.g., Union Square, Pier 39, or Alcatraz). The first weighting factor can be apply to the first probability of the predicted text given the text input to obtained the first weighted probability of a predicted text given the text input. 
     In some examples, the first language model can be a class-based language model that includes a class and a first sub-model. The first sub-model can be associated with the physical context. Block  406  can include determining, using the first language model, a probability of a class given the input text (e.g., P(class|text input)). Block  406  can further include determining, using the first sub-model, a first probability of the predicted text given the class (e.g., P 1 (predicted text|class)). The first weighted probability of the predicted text given the text input (e.g., P w1 (predicted text|text input) can be determined based on the probability of the class given the input text (e.g., P(class|text input)) and the first probability of the predicted text given the class (e.g., P 1 (predicted text|class)). For example, the first weighted probability of the predicted text given the text input can be determined as follows:
 
 P   w1 (predicted text|text input)= P (class|text input) P   1 (predicted text|class)
 
     In some example, the first language model can include a second sub-model. The second sub-model can be associated with a context that is different from that of the first sub-model. For example, the second sub-model can be associated with a general context. The second sub-model can be built from a corpus that is different from that of the first sub-model. Block  406  can further include determining, using the second sub-model, a second probability of the predicted text given the class (e.g., P 2 (predicted text|class)). The first weighted probability of the predicted text given the text input can be determined based on the second probability of the predicted text given the class. In one example, the first weighted probability of the predicted text given the text input can be based on a linear combination of the first probability of the predicted text given the class and second probability of the predicted text given the class. In particular:
 
 P   w1 (predicted text|text input)= P (class|text input){λ 1   P   1 (predictedtext|class)+λ 2   P   2 (predictedtext|class)}
 
where λ 1  and λ 2  are weighting factors.
 
     It should be recognized that the first language model can include any number of sub-models. For instance, in some examples, the first language model can include n sub-models, where n is a positive integer. In these examples, the first weighted probability of the predicted text given the text input can be determined as follows: 
     
       
         
           
             
               
                 P 
                 
                   w 
                   ⁢ 
                   
                       
                   
                   ⁢ 
                   1 
                 
               
               ⁡ 
               
                 ( 
                 
                   
                     predicted 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     text 
                   
                   ❘ 
                   
                     text 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     input 
                   
                 
                 ) 
               
             
             = 
             
               
                 P 
                 ( 
                 
                   class 
                   ❘ 
                   
                     text 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     input 
                   
                 
                 ) 
               
               ⁢ 
               
                 
                   ∑ 
                   
                     i 
                     = 
                     1 
                   
                   n 
                 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 
                   
                     λ 
                     i 
                   
                   ⁢ 
                   
                     
                       P 
                       i 
                     
                     ⁡ 
                     
                       ( 
                       
                         
                           predicted 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           text 
                         
                         ❘ 
                         class 
                       
                       ) 
                     
                   
                 
               
             
           
         
       
     
     Further, it should be recognized that, in some example, the first language model can include multiple classes. In these examples, the first weighted probability of the predicted text given the text input can be determined based on the combined probabilities across the multiple classes. For example: 
                 P     w   ⁢           ⁢   1       ⁡     (       predicted   ⁢           ⁢   text     ❘     text   ⁢           ⁢   input       )       =       ∑     class   ⁢           ⁢   ε   ⁢           ⁢   L       ⁢           ⁢     [       P   ⁡     (     class   ❘     text   ⁢           ⁢   input       )       ⁢       ∑     i   =   1     n     ⁢           ⁢       λ   i     ⁢       P   i     ⁡     (       predicted   ⁢           ⁢   text     ❘   class     )             ]             
where L denotes the first language model and P (class|text input)P 1 (predicted text|class) is summed over all classes in the first language model, L.
 
     In some examples, the first language model can be an n-gram statistical language model. In particular, the first language model can be an n-gram statistical language model having a hierarchical context tree structure (e.g., language model  100 , described above). In these examples, the first language model can be built from a corpus that includes a plurality of subsets where each subset is associated with a context. Further, the first language model can include a hierarchical level representing physical context where the sub-models in the hierarchical level can each be associated with a specific physical context. In these examples, the first weighted probability of the predicted text given the text input can be determined using similar or identical methods described above with respect to blocks  204  through  208  of process  200 . For example, block  406  can include determining, using the first language model, a first frequency of occurrence of an m-gram with respect to a first subset of the plurality of subsets. The first subset can be associated with a first context and the m-gram can include at least one word in the text input and at least one word in the predicted text. In addition, block  406  can include determining, based on a degree of matching between the physical context and the first context, a first weighting factor to apply to the first frequency of occurrence of the m-gram. The first weighting factor can be determined to be higher if the first context is more similar to the physical context. Conversely, the first weighting factor can be determined to be lower if the first context is less similar to the physical context. The first weighted probability of the predicted text given the text input can be based on the first frequency of occurrence of the m-gram and the first weighting factor. 
     It should be recognized that the first weighted probability of the predicted text given the text input can be based on any number of frequencies of occurrence of the m-gram and a respective number of weighting factors. For example, the first weighted probability of the predicted text given the text input can also be based on a second frequency of occurrence of the m-gram and a third weighting factor. In such an example, block  406  can further include determining, using the first language model, a second frequency of occurrence of the m-gram with respect to a second subset of the plurality of subsets. The second subset can be associated with a second context. Block  406  can further include determining a third weighting factor to apply to the second frequency of occurrence of the m-gram based on a degree of matching between the input context and the second context. 
     In yet other examples, the first language model can be a context-specific language model that is associated with the physical context. In these examples, the physical context can be used to select the first language model among a plurality of context-specific language models. The selected first language model can thus be used to determine the first weighted probability of the predicted text given the text input. In some cases, no weighting is performed in determining the first weighted probability of the predicted text given the text input. For example, the probability of the predicted text given the text input can be determined from the first language model and first weighted probability of the predicted text given the text input can equal the determined probability of the predicted text given the text input. 
     At block  408  of process  400 , the predicted text can be presented via a user interface of the electronic device. Block  408  can be similar or identical to block  210  of process  200  described above. 
     Although process  400  is described above with reference to blocks  402  through  408 , it should be appreciated that in some cases, one or more blocks of process  400  can be optional and additional blocks can also be performed. For instance, in examples where the first language model is a dynamic language model, process  400  can include updating the first language model using the received text input at block  402 . 
     Further, in some examples, additional language models can be used to determine a second weighted probability of the predicted text given the text input. Using additional language models can be desirable for achieving greater accuracy in predicting text. In these examples, process  400  can include determining, using a second language model, a third probability of the predicted text given the text input. In addition, a second weighted probability of the predicted text given the text input can be determined based on the first weighted probability and the third probability. In some examples, determining the second weighted probability can include applying a third weighting factor to the first weighted probability and applying a fourth weighting factor to the third probability. For example, P w2 (predicted text|text input)=λ 3 P w1 (predicted text|text input)+λ 4 P 3 (predicted text|text input), where P w2 (predicted text|text input) denotes the second weighted probability of the predicted text given the text input, P w1  (predicted text|text input) denotes the first weighted probability of the predicted text given the text input, P 3 (predicted text|text input) denotes the third probability of the predicted text given the text input, λ 3  denotes the third weighting factor, and λ 4  denotes the fourth weighting factor. 
     4. Predictive Conversion of Language Input 
       FIGS. 5A-B  illustrate exemplary process  500  for predictive conversion of language input according to various examples.  FIGS. 6A-C  are exemplary screenshots of an electronic device illustrating various stages of exemplary process  500 . Process  500  is described below with simultaneous reference to  FIGS. 5A-B  and  6 A-C. 
     At block  502  of process  500 , text composed by a user can be obtained. In some examples, the text can be obtained directly from the user by collecting text input as it is received from the user (e.g., via a language input interface displayed on touch screen  946 ). In other examples, the text can be obtained from identifying and retrieving stored text that was composed by the user. The stored text can be text that is stored on the user device (e.g., stored in user data and models  966 ) or on a remote server accessible by the user device (e.g., stored in user data and models  1020 ). In some examples, text composed by a user can be identified based on authentication information. In particular, authentication information (e.g., user name and/or passcode) used to obtain access to the user device can be associated with a particular user. In these examples, any text input received by the user device while being accessed using the authentication information can be identified and retrieved as text composed by the particular user. In other examples, text composed by a user can be identified based on sender information associated with the text. In particular, sender information (e.g., a phone number, email address, etc.) can be associated with a particular user. Thus, in these examples, text (e.g., from messages, emails, social media posts, etc.) can be determined to be composed by the sender of the text. 
     The obtained text can comprise words of a second symbolic system of a language. In the present example described in process  500 , the second symbolic system can be written Chinese characters (e.g., “Han characters”). However, it should be recognized that, in other examples, the second symbolic system can be any script type of any language. 
     In some examples, the obtained text can be associated with a first context. The first context can be any context discussed above with respect to processes  200 ,  300 , or  400 . For example, the obtained text can be directed toward a first recipient and/or composed using a first application (e.g., messages, email, word processing, etc.). In this example, the first context can include the first recipient and/or first application. In other examples, the first context can be a context that is determined using a sensor of the user device. For example, as described above in processes  200 ,  300 , and  400 , the first context can be one or more physical contexts that are determined based on data obtained from one or more sensors of the user device. In a specific example, the one or more physical contexts can include determining whether the user is standing or sitting based on data received from an accelerometer sensor of the user device. In another example, the one or more physical contexts can include determining the location (e.g., address, city, country, landmark, restaurant, etc.) of the user based on data received from the GPS sensor of the user device and from a maps service. 
     It should be appreciated that additional text composed by the user can be obtained. The additional text can be associated with other contexts. For example, block  502  can further include obtaining second text composed by the user where the second text is associated with a second context that is different from the first context. 
     At block  504  of process  500 , a first language model can be generated using the obtained text. Because the first language model is generated using text composed by the user, the first language model can predict the language style and tendencies of the user. Further, the first language model can better predict particular phrases that are frequently used by the user (e.g., names, locations, etc.) but are found less frequently in typical collections of text. In some examples, the first language model can be an n-gram language model. In other examples, the first language model can be a neural network based language model. It should be understood that other types of language models can be contemplated. The first language model can be stored on the user device or remotely on a server. Further, the first language model can be configured to be dynamically updated as the user inputs additional text. 
     In some examples, the first language model can have a hierarchical context tree structure similar to language model  100 , described above. In these examples, the first language model can have multiple nodes representing various contexts. In particular, a first node of the first language model can be based on the text obtained in block  502  and can be associated with the first context. Similarly, a second node of the first language model can be based on the second text obtained in block  502  and can be associated with the second context. In this way, the first language model can take into account the input context associated with the input received at block  506 . 
     At block  506  of process  500 , input that includes a sequence of symbols can be received from the user. The input can be received via a user interface (e.g., a keyboard interface displayed on touch screen  946 ). The sequence of symbols can include symbols of a first symbolic system. The first symbolic system can be different from the second symbolic system. In the present example described in process  500 , the first symbolic system can be a system of phonetic notations for transcribing the Mandarin pronunciations of Chinese characters (e.g., Chinese pinyin phonetic system or Chinese zhuyin phonetic system). For example, as shown in  FIG. 6A , the input received at block  506  can include the pinyin input  604  “liumingjie,” which is intended to correspond to the Chinese characters “ ” (a person&#39;s name). Pinyin input  604  can be received via keyboard interface  602 . It should be recognized that, in other examples, the first symbolic system can be any script type of any language. In particular, the first symbolic system can be any phonetic system for transcribing a language. 
     In some examples, the received input can be associated with an input context. Input context can be a context similar or identical to the first context described above in block  502 . In particular, the input context can be any context described above in processes  200 ,  300 , or  400 . In some examples, the received input can be directed to a second recipient and/or composed using a second application of the device. In these examples, the input context can include the second recipient and/or the second application. Further, in some examples, the input context can be determined using a sensor of the device. For example, as described above in processes  200 ,  300 , or  400  the input context can be one or more of the physical contexts determined using one or more sensors of the device. 
     At block  508  of process  500 , a plurality of candidate word strings corresponding to the sequence of symbols can be determined. Each candidate word string of the plurality of candidate word strings can include two or more words of the second symbolic system. In some examples, each candidate words string can include one or more words of the second symbolic system. The plurality of candidate word strings can thus include words from the same second symbolic system as the text obtained in block  502 . In the present example, each word of the two or more words can be a monosyllabic Chinese character. 
     The plurality of candidate word strings can be determined by initially resolving the sequence of symbols of the first symbolic system into groups of symbols that correspond to a single word of the second symbolic system. For example, the pinyin input of “liumingjie” can be resolved into the groups “liu,” “ming,” and “jie” that each correspond to a monosyllable of the Chinese language. The resolved groups of symbols can then be converted into the plurality of candidate word strings using a dictionary or look-up table that maps predefined groups of symbols of the first symbolic system to multiple words of the second symbolic system. For example, “liu” can be mapped to Chinese words such as “ ,” “ ,” and “ ,” “ming” can be mapped to Chinese words such as “ ,” and “ ,” and “ ” can be mapped to Chinese words such as “ ,” “ ,” and “ ”. The plurality of candidate word strings can then be determined based on various combinations of the mapped Chinese words. For example, the plurality of candidate word strings can include candidate word strings such as “ ”, “   ” and “ ” that correspond to the pinyin input of “liumingjie.” Further, in some examples, the plurality of candidate word strings can include candidate word strings that correspond to a portion of the sequence of symbols of the first symbolic system. For example, the plurality of candidate word strings can include candidate word strings such as “ ,” “   ,” or “ .” 
     At block  510  of process  500 , a probability of occurrence of each candidate word string of the plurality of candidate word strings in the obtained text can be determined. In particular, the probability of occurrence of each candidate word string in the obtained text can be determined using the first language model generated at block  504 . For example, each candidate word string can be an n-gram, and the probability of occurrence of the respective n-gram in the obtained text can be determined using the first language model. Further, in examples where second text associated with a second context is obtained at block  502 , a probability of occurrence of each candidate word string in the obtained second text can be determined using the first language model. 
     At block  512  of process  500 , a probability of occurrence of each candidate word string in a corpus of text can be determined. The corpus of text can be a collection of text that is not composed by the user. For example, the corpus of text can contain text authored by several individuals that do not include the user. A second language model can be trained using the corpus of text, and the probability of occurrence of each candidate word string in the corpus of text can be determined using the second language model. In particular, each candidate word string can be an n-gram, and the probability of occurrence of the respective n-gram in the corpus of text can be determined using the second n-gram language model. 
     At block  514  of process  500 , the plurality of candidate word strings can be ranked. The ranking can be based on an overall probability that the input received at block  506  corresponds to each candidate word string. In particular, the plurality of candidate word strings can be ranked in decreasing order from the highest overall probability to the lowest overall probability. 
     The overall probability can be determined based on the probability of occurrence of each candidate word string in the obtained text. In examples where second text associated with a second context is obtained at block  502 , the overall probability can additionally or alternatively be determined based on the probability of occurrence of each candidate word string in the obtained second text. By utilizing the probability of occurrence of each candidate word string in text composed by the user (e.g., text obtained at block  502 ) to rank the plurality of candidate word strings, candidate word strings that are frequently used by the user (e.g., particular proper nouns) but uncommon in other corpuses of text can be ranked higher at block  514 . In this way, these frequently used candidate word strings can be displayed at block  516  for user selection. This can improve user experience by personalizing the candidate word strings that are displayed at block  516  according to the text input habits of the user. 
     Further, in some examples, the overall probability can be determined based on the probability of occurrence of each candidate word string in the corpus of text. As described above, the corpus of text may not be composed by the user. In some examples, the overall probability can comprise a combination of the probability of occurrence of each candidate word string in the obtained text, the probability of occurrence of each candidate word string in the obtained second text, and the probability of occurrence of each candidate word string in the corpus of text. In some examples, as described in processes  200 ,  300 , or  400 , appropriate weighting factors can be applied to each probability to obtain the overall probability. 
     In some examples, the overall probability can be based on a degree of similarity between the input context and the first context. In particular, when determining the overall probability, a larger weighting factor can be applied to the probability of occurrence of each candidate word string in the obtained text in accordance with a determination that the degree of similarity between the input context and the first context is high. Conversely, a smaller weighting factor can be applied to the probability of occurrence of each candidate word string in the obtained text in accordance with a determination that the degree of similarity between the input context and the first context is low. Similarly, the overall probability can be based on a degree of similarity between the input context and the second context in examples where second text associated with a second context is obtained at block  502 . 
     At block  516  of process  500 , a portion of the plurality of candidate word strings can be displayed (e.g., using touch screen  946 ) for selection by the user. For example, as shown in  FIG. 6A , candidate word strings  606  can be displayed in language input interface  608 . Candidate word strings  606  can include a portion of the plurality of candidate word strings determined at block  508 . The portion of the plurality of candidate word strings that is displayed can be based on the ranking of block  514 . For example, the N highest ranked candidate word strings can be displayed, where N is a predetermined number. Further, the displayed portion of the plurality of candidate word strings can be arranged based on the ranking of block  514 . In particular, the displayed portion of the plurality of candidate word strings can be arranged in decreasing order from the highest ranked candidate word string (e.g., candidate word string  612  “ ”) to the lowest ranked candidate word string (e.g., candidate word string  613  “ ”). 
     It should be recognized that the ranking of block  514  may not be based on a deterministic rule where a particular candidate word string (e.g., “ ”) is always determined to rank within the top N candidate word strings whenever a particular sequence of symbols (e.g., pinyin input “liumingjie”) is received. Rather, the ranking of block  514  and thus the portion of the plurality of candidate word strings displayed at block  516  can dynamically change based on the text inputted by the user over time. Further, as described above, the plurality of candidate word strings displayed at block  516  can change in accordance with different input contexts associated with the input received at block  506 . 
     At block  518  of process  500 , a selection of a candidate word string from the displayed portion of the plurality of candidate word strings can be detected (e.g., via touch screen  946 ). For example, as shown in  FIG. 6A , a selection of candidate word string  612  “ ” can be detected via language input interface  608 . Candidate word string  612  “ ” can be the word string that pinyin input  604  “liumingjie” is intended to represent. In response to detecting the selection of the candidate word string, block  520  can be performed. 
     At block  520  of process  500 , the selected candidate word string can be displayed in a text field of the device. For example, as shown in  FIG. 6B , selected candidate word string  612  “ ” can be displayed in text field  610 . In particular, display of pinyin input  604  “liumingjie” can be replaced by the display of selected candidate word string  612  “ .” In this example, the text field can be the body of a word processing document. In other examples, the text field can be any field of an application where text can be entered. For example, the text field can be a text field for composing a text message, the body of a draft email message, or the search field of a web browser. 
     At block  522  of process  500 , an indication that the user has committed to the selected candidate word string can be received (e.g., via a user interface on touch screen  946 ). In some examples, the indication can be a full stop input for a sentence containing the selected candidate word string. For example, as shown in  FIG. 6C , full stop  614  can be inputted at the end of sentence  616  containing the selected candidate word string  612  “ .” Full stop  614  can thus be an indication that the user has committed to the selected candidate word string  612  “ .” In other examples, the indication can be a command to store text containing the selected candidate word string on the device. In yet other examples, the indication can be a command to send a message, email, document, search string, or the like containing the candidate word string to a device separate from the user device. In response to receiving the indication, block  524  can be performed. 
     At block  524  of process  500 , the first language model can be updated using the selected candidate word string. For example, in the example shown in  FIG. 6C , sentence  616  and selected candidate word string  612  “ ” can be used to train the first language model. In particular, the selected candidate word string can be used to increase the probability of occurrence of the selected candidate word string in the first language model. In this way, the first language model can be dynamically updated to better predict the language input characteristics of the user. 
     At block  526  of process  500 , a predicted word of the second symbolic system can be determined. The predicted word can be determined using the predictive text methods described above with respect to processes  200 ,  300 , or  400 . For instance, the predicted word can be determined based on a probability of occurrence of a sequence of words in the obtained text. In some examples, the sequence of words can include the predicted text and one or more words of the selected candidate word string. Specifically, the predicted word can be determined based on a probability of occurrence of the predicted word in the obtained text given one or more words of the selected candidate word string. 
     At block  528  of process  500 , the predicted word can be displayed (e.g., using touch screen  946 ) for user selection. For example, as shown in  FIG. 6B , a plurality of candidate predicted words  618  can be displayed in language input interface  608 . In this example, predicted word  620  “ ” can have the highest probability of occurrence given one or more words of selected candidate word string  612  “ .” In other examples, predicted word  620  can be alternatively or additionally displayed adjacent to selected candidate word string  612  “ ” in text field  610 . 
     Although process  500  is described above with reference to blocks  502  through  528 , it should be appreciated that, in some cases, one or more blocks of process  500  can be optional and additional blocks can also be performed. 
     Turning now to  FIGS. 7A-D , exemplary process  700  for predictive conversion of language input is described below.  FIGS. 8A-F  illustrate exemplary screenshots of a user device at various stages of exemplary process  700 . Process  700  is described below with simultaneous reference to  FIGS. 7A-D  and  FIGS. 8A-F . 
     At block  702  of process  700 , text composed by the user can be obtained. Block  702  can be similar or identical to block  502  of process  500 , described above. The obtained text can be text currently being inputted by the user on the user device (e.g., via touch screen  946 ). Alternatively or additionally, the obtained text can be text previously composed by the user and stored remotely (e.g., in user data and models  1020 ) or on the user device (e.g., in user data and models  966 ). 
     The obtained text can include words of a second symbolic system of a language. For example, the second symbolic system can include Chinese characters (e.g., Han characters). It should be recognized that, in other examples, the second symbolic system can be any script type of any language. 
     In some examples, the obtained text can be associated with a first context. The first context can be any context discussed above with respect to processes  200 ,  300 , or  400 . For example, the first context can include a first recipient and a first application of the device. In another example, the first context can be a context determined using a sensor of the device. It should be appreciated that additional text composed by the user and associated with other contexts can be obtained. For example, block  702  can further include obtaining second text composed by the user where the second text is associated with a second context that is different from the first context. 
     At block  704  of process  700 , a first language model can be generated using the text composed by the user. Block  704  can be similar or identical to block  504  of process  500 , described above. In some examples, the first language model can be an n-gram language model. It should be recognized that other types of language models can be contemplated. 
     At block  706  of process  700 , first input can be received (e.g., via a user interface on touch screen  946 ) from a user. The first input can include a sequence of symbols of a first symbolic system. The sequence of symbols can represent a sequence of three or more words of a second symbolic system. The first symbolic system can be different from the second symbolic system. In some examples, the first symbolic system can be the pinyin phonetic system for transcription of Mandarin Chinese. It should be recognized that, in other examples, the first symbolic system can include other symbolic systems such as Chinese Zhuyin, Japanese hiragana, or other types of written scripts. 
     In one example, as shown in  FIG. 8A , first input  804  can be received from a user via keyboard interface  802  and displayed in text field  810 . First input  804  includes the sequence of symbols “liumingjie” of the pinyin phonetic system. In this example, first input  804  “liumingjie” can be intended to represent the sequence of three monosyllabic Chinese words “ ”. 
     At block  708  of process  700 , a plurality of candidate word strings corresponding to the sequence of symbols can be displayed in a language input interface (e.g. using touch screen  946 ). For example, the plurality of candidate word strings can be determined, ranked, and displayed in a similar manner as described in blocks  508 - 516  above. Each candidate word string of the plurality of candidate word strings can include two or more words of the second symbolic system. In some examples, each candidate word string can include one or more words of the second symbolic system. In the examples depicted in  FIGS. 8A-F , each word can be a monosyllabic Chinese character. 
     As shown in  FIG. 8A , candidate word strings  806  are displayed in language input interface  808 . Each of candidate word strings  806  can correspond to at least a portion of first input  804  “liumingjie.” In this example, candidate word strings  806  include “ ,” “ ,” and “ ,” which each include two or more Chinese words. As shown, displayed candidate word strings  806  do not include the intended sequence of three Chinese words “ .” In particular, “ ” is a person&#39;s name, which may not be commonly found in general corpuses of Chinese texts. Further, the user may not have previously inputted the Chinese words “ ” on user device. Thus, the probability of occurrence of “ ” in a general corpus of Chinese text or in Chinese text composed by the user can be low, which may result in “ ” not being ranked high enough to be displayed in language input interface  808 . 
     At block  710  of process  700 , second input indicating that the sequence of symbols of the first symbolic system correspond to the intended sequence of three or more words of the second symbolic system can be received (e.g., via a user interface on touch screen  946 ) from the user. The second input can include mapping individual words of the second symbolic system to respective portions of the sequence of symbols. In this way, the user device can learn the sequence of three of more words that are intended to correspond to the first input. In some examples, block  710  can include one or more of blocks  712 - 716 . 
     At block  712  of process  700 , a selection of the first word corresponding to a first portion of the sequence of symbols can be received. For example, as shown in  FIG. 8A , first word  812  “ ,” which is intended to correspond to the first portion “liu” of first input  804 , can be selected via language input interface  808 . As shown in  FIG. 8B , in response to receiving the selection of first word  812  “ ,” first word  812  “ ” can be displayed in lieu of the first portion “liu” of first input  804  in text field  810 . Further, candidate words  814  corresponding to at least a portion of “mingjie” of pinyin input  804  can be displayed in language input interface  808 . 
     At block  714  of process  700 , a selection of the second word corresponding to a second portion of the sequence of symbols can be received. For example, as shown in  FIG. 8B , second word  816  “ ,” which is intended to correspond to the second portion “ming” of first input  804 , can be selected via language input interface  808 . As shown in  FIG. 8C , in response to receiving the selection of second word  816  “ ,” second word  816  “ ” can be displayed in lieu of the second portion “ming” of first input  804  in text field  810 . Further, candidate words  818  corresponding to “jie” of pinyin input  804  can be displayed in language input interface  808 . 
     At block  716  of process  700 , a selection of the third word corresponding to a third portion of the sequence of symbols can be received. For example, as shown in  FIG. 8C , third word  820  “ ,” which is intended to correspond to the third portion “jie” of first input  804 , can be selected via language input interface  808 . As shown in  FIG. 8D , in response to receiving the selection of third word  820  “ ,” third word  820  “ ” can be displayed in lieu of the third portion “jie” of first input  804  in text field  810 . 
     Although in the present example described above, the second input includes mapping individual words of the second symbolic system to respective portions of the sequence of symbols, it should be recognized that other input methods can be contemplated to achieve the mapping. For example, the second input could alternatively include selecting “ ” via language input interface  808  to correspond to “liuming” and then selecting “ ” via language input  808  to correspond to “jie.” 
     At block  718  of process  700 , the first language model can be updated using the second input. Block  718  can be similar or identical to block  524  described above. In particular, the word string “ ” can be used to train the first language model to increase the probability of occurrence of “ ” in the obtained text. By dynamically updating the first language model, the word string “ ” can be more likely to be displayed in language input interface  808  when the pinyin input “liumingjie” is received in the future. It should be appreciated that the updating of block  718  may not create a fixed deterministic rule where the word string “ ” is always be displayed in language input interface  808  when the pinyin input “liumingjie” is received. Rather, the updating of block  718  can incorporate the second input as part of the obtained collection of text composed by the user and can dynamically adjust the probability of occurrence of “ ” in the obtained collection of text composed by the user. 
     In some examples, block  718  can be performed in response to receiving an indication that the user has committed to the second input. The indication can be similar or identical to the indication discussed above in block  522 . In particular, the indication can be a full stop input received at the end of a sentence containing “ ” of the second input. In other examples, the indication can be a command to send text containing “ ” of the second input. After receiving the second input at block  710 , one or more of blocks  718 - 734  can be performed. 
     At block  720  of process  700 , third input can be received (e.g., via a user interface on touch screen  946 ). The third input can include the first word (e.g., “ ”) and the second word (e.g., “ ”) of the intended sequence of three or more words (e.g., “ ”) of the second symbolic system. In some examples, block  720  can include blocks  722 - 726 . 
     At block  722  of process  700 , a second sequence of symbols of the first symbolic system can be received. The second sequence of symbols can be intended to correspond to the first word and the second word of the intended sequence of three or more words of the second symbolic system. For example, as shown in  FIG. 8E , second sequence of symbols  828  can be received and displayed in text field  810 . As shown in this example, second sequence of symbols  828  is the pinyin input “liuming.” In response to receiving the second sequence of symbols, block  724  can be performed. 
     At block  724  of process  700 , the first word and the second word of the intended sequence of three or more words can be displayed as candidate words that correspond to a first and second portion of the second sequence of symbols, respectively. For example, as shown in  FIG. 8E , candidate words  831  corresponding to a first and second portion of second sequence of symbols  828  can be displayed. In particular, first word  830  “ ” and second word  832  “ ” corresponding to second sequence of symbols  828  “liuming” can be displayed in language input interface  808 . In this example, first word  830  “ ” and second word  832  “ ” are displayed together as a candidate word string. In other examples, first word  830  “ ” and second word  832  “ ” can be displayed separately as individual words. Further, first word  830  “ ” and second word  832  “ ” can be displayed at separate instances. 
     At block  726 , a selection of the first word and the second word of the intended sequence of three or more words can be received. For example, with reference to  FIG. 8E , a selection of first word  830  “ ” and second word  832  “ ” can be received via language input interface  808 . In this example, first word  830  “ ” and second word  832  “ ” can be selected together as a candidate word string. It should be recognized that, in other examples, first word  830  “ ” and second word  832  “ ” can be selected separately. As shown in  FIG. 8F , in response to receiving the selection of first word  830  “ ” and second word  832  “ ”, first word  830  “ ” and second word  832  “ ” can be displayed in text field  810 . In particular, display of second sequence of symbols  828  “liuming” in text field  810  can be replaced with display of first word  830  “ ” and second word  832  “ .” 
     In some examples, the third input can be associated with an input context. The input context can be similar to that described above at block  506 . In particular, the input context can be any context described above in process  200 ,  300 ,  400 , or  500 . For example, the input context can include a second recipient and a second application of the device. Further, in some examples, input context can be a context determined using a sensor of the user device. In particular, as described above with respect to processes  200 ,  300 , or  400 , input context can be a physical context determined using a sensor of the user device. 
     At block  728  of process  700 , the probability of occurrence of the intended sequence of three or more words in the text composed by the user can be determined using the first language model. In the present example, the probability of occurrence of the 3-gram “ ” in the text obtained in block  702  can be determined using the first language model. 
     At block  730  of process  700 , a probability of occurrence of the sequence of three or more words in a corpus of text can be determined using a second language model. The corpus of text can be text that is not composed by the user. In the present example, the probability of occurrence of the 3-gram “ ” in the corpus of text can be determined using the second language model. 
     At block  732  of process  700 , a predicted word based on the first word and the second word of the sequence of three or more words can be determined. In this example, the determined predicted word can include the third word (e.g, “ ”) of the sequence of three or more words. The predicted word can be determined using predictive text methods described above in processes  200 ,  300 , or  400 . In particular, the predicted word can be determined based on the probability of occurrence of the predicted word given the first word and the second word of the sequence of three of more words. 
     In some examples, the predicted word can be determined using the probability of occurrence of the sequence of three or more words in the text composed by the user. In examples where the text obtained at block  702  is associated with the first context, the predicted text can be determined based on a degree of similarity between the input context and the first context. In particular, as described above, the probability of occurrence of the sequence of three or more words in the text obtained at block  702  can be weighted based on the degree of similarity between the input context and the first context. Further, in examples where second text is obtained at block  702  and the second text is associated with a second context, the predicted word can be determined based on the probability of occurrence of the sequence of three or more words in the second text. The probability of occurrence of the sequence of three or more words in the second text can be weighted based on the degree of similarity between the input context and the second context. 
     In some examples, the predicted word can be determined based on the probability of occurrence of the sequence of three or more words in the corpus of text. In particular, the predicted word can be determined based on a combined probability of occurrence of the predicted word given the first word and the second word of the sequence of three or more words. The combined probability can be determined based on one or more of the probability of occurrence of the sequence of three or more words in the corpus of text, the probability of occurrence of the sequence of three or more words in the text obtained in block  702 , or the probability of occurrence of the sequence of three or more words in the second text obtained in block  702 . Further, as described above, each of the probabilities can be weighted using suitable weighting factors. In particular, the weighting factors can be based on the degree of similarity between the input context and the first context. In examples where second text is obtained in block  702 , the weighting factors can be based on the degree of similarity between the input context and the second context. 
     At block  734  of process  700 , the predicted word can be displayed (e.g., using touch screen  946 ) for user selection. For example, as shown in  FIG. 8F , candidate predicted words  835  can be displayed in language input interface  808  for user selection. Candidate predicted words  835  can be displayed based on the probability of occurrence of each predicted word given first word  830  “ ” and second word  832  “ .” As shown in  FIG. 8F , candidate predicted words  835  can include predicted word  834  “ .” In this example, predicted word  834  “ ” can have the highest probability of occurrence given first word  830  “ ” and second word  832  “ .” Additionally or alternatively, as shown in  FIG. 8F , predicted word  834  “ ” can be displayed in the text field adjacent to the displayed second word  832  “ ” (as indicated by brackets  836 ). 
     Although process  700  is described above with reference to blocks  702  through  734 , it should be appreciated that, in some cases, one or more blocks of process  700  can be optional and additional blocks can also be performed. 
     5. User Device for Predictive Text Input 
       FIG. 9  is a block diagram of user device  900  for carrying out various aspects of predictive text input according to various examples. User device  900  can be any electronic device that is configured to receive a text input. For example, user device  900  can include a cellular telephone (e.g., smartphone), tablet computer, laptop computer, desktop computer, portable media player, wearable digital device (e.g., digital glasses, wristband, wristwatch, brooch, armbands, etc.), television, set top box (e.g., cable box, video player, video streaming device, etc.), gaming system, or the like. As shown in  FIG. 9 , user device  900  can include a memory interface  902 , one or more processors  904 , and a peripherals interface  906 . The various components in user device  900  can be together coupled by one or more communication buses or signal lines. User device  900  can further include various sensors, subsystems, and peripheral devices that are coupled to peripherals interface  906 . The sensors, subsystems, and peripheral devices gather information and/or facilitate various functionalities of user device  900 . 
     In some examples, user device  900  can include a motion sensor  910 , a light sensor  912  (e.g., a brightness sensor), and a proximity sensor  914  coupled to peripherals interface  906  to facilitate orientation, light, and proximity sensing functions. One or more other sensors  916 , such as a positioning system (e.g., a GPS receiver), a temperature sensor, a biometric sensor, a gyroscope, a compass, an accelerometer (e.g., a motion sensor), and the like, are also connected to peripherals interface  906  to facilitate related functionalities. Further, the various sensors of user device  900  described above can be used to determine an input context at block  202  of process  200  or a physical context at block  404  of process  400 . 
     In some examples, a camera subsystem  920  and an optical sensor  922  (e.g., an image sensor or brightness sensor) can be utilized to facilitate camera functions, such as taking photographs and recording video clips. Communication functions can be facilitated through one or more wired and/or wireless communication subsystems  924 , which can include various communication ports, radio frequency receivers and transmitters, and/or optical (e.g., infrared) receivers and transmitters. An audio subsystem  926  can be coupled to speakers  928  and a microphone  930  to facilitate audio-enabled functions, such as voice recognition, music recognition, voice replication, digital recording, telephony functions, and speech-to-text conversion. In one example, the text input at block  202 ,  302 , and  402  described above can be received by means of speech-to-text conversion facilitated by microphone  930 . Optical sensor  922  and microphone  930  can be used to determine an input context at block  202  of process  200  or a physical context at block  404  of process  400 . 
     In some examples, user device  900  can further include an I/O subsystem  940  coupled to peripherals interface  906 . I/O subsystem  940  can include a touch screen controller  942  and/or other input controller(s)  944 . Touch-screen controller  942  can be coupled to a touch screen  946 . Touch screen  946  and the touch screen controller  942  can, for example, detect contact and movement or a break thereof using any of a plurality of touch sensitivity technologies, such as capacitive, resistive, infrared, surface acoustic wave technologies, proximity sensor arrays, and the like. Other input controller(s)  944  can be coupled to other input/control devices  948 , such as one or more buttons, rocker switches, a thumb-wheel, an infrared port, a USB port, and/or a pointer device such as a stylus. In some examples, a signal to begin receiving an audio input can be received by user device  900  via input to touch screen  946  (e.g., a virtual button) or other input/control devices  948 . The text input at blocks  202 ,  302 , and  402  can be received via touch screen  946  and/or other input/control devices  948 . 
     In some examples, user device  900  can further include a memory interface  902  coupled to memory  950 . Memory  950  can include any electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, a portable computer diskette (magnetic), a random access memory (RAM) (magnetic), a read-only memory (ROM) (magnetic), an erasable programmable read-only memory (EPROM) (magnetic), a portable optical disc such as CD, CD-R, CD-RW, DVD, DVD-R, or DVD-RW, or flash memory such as compact flash cards, secured digital cards, USB memory devices, memory sticks, and the like. In some examples, a non-transitory computer-readable storage medium of memory  950  can be used to store instructions (e.g., for performing processes  200 ,  300 ,  400 ,  500 , or  700 , described above) for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. In other examples, the instructions (e.g., for performing processes  200 ,  300 ,  400 ,  500 , or  700 , described above) can be stored on a non-transitory computer-readable storage medium of server system  1010  described below, or can be divided between the non-transitory computer-readable storage medium of memory  950  and the non-transitory computer-readable storage medium of server system  1010 . 
     In some examples, memory  950  can store an operating system  952 , a communication module  954 , a graphical user interface module  956 , a sensor processing module  958 , a phone module  960 , and applications  962 . Operating system  952  can include instructions for handling basic system services and for performing hardware dependent tasks. Communication module  954  can facilitate communicating with one or more additional devices, one or more computers, and/or one or more servers. Graphical user interface module  956  can facilitate graphic user interface processing. Sensor processing module  958  can facilitate sensor related processing and functions. Phone module  960  can facilitate phone-related processes and functions. Applications module  962  can facilitate various functionalities of user applications, such as electronic-messaging, web browsing, media processing, navigation, imaging, virtual assistant functions, and/or other processes and functions. 
     As described herein, memory  950  can also store predictive text input module  964  and various user data and models  966  to provide the client-side functionalities of the virtual assistant. The predictive text input module  964  can include modules, instructions, and programs for performing various aspects of processes  200 ,  300 ,  400 ,  500 , or  700  described above. User data and models  966  can include various language models, look-up tables, and text described above with respect to processes  200 ,  300 ,  400 ,  500 , or  700  that are used for predictive text input. For example, user data and models  966  can include user language models built using a corpus that includes a collection of user text. 
     In various examples, memory  950  can include additional instructions or fewer instructions. Furthermore, various functions of user device  900  can be implemented in hardware and/or in firmware, including in one or more signal processing and/or application specific integrated circuits. Further, processes for predictive text input described above can be implemented as a stand-alone application installed on user device  900 . Alternatively, processes for predictive text input can be implemented according to a client-server model as described below with reference to  FIG. 10 . 
     6. System for Predictive Text Input 
       FIG. 10  illustrates exemplary client-server system  1000  for carrying out various aspects of predictive text input according to various examples. System  1000  can include a client-side portion executed on user device  900  and a server-side portion executed on server system  1010 . User device  900  can communicate with server system  1010  through one or more networks  1008 , which can include the Internet, an intranet, or any other wired or wireless public or private network. The client-side portion executed on user device  900  can provide client-side functionalities, such as user-facing input and output processing and communications with server system  1010 . Server system  1010  can provide server-side functionalities for any number of clients residing on a respective user device  900 . 
     As shown in  FIG. 10 , server system  1010  can include memory  1028 , one or more processors  1026 , client-facing I/O interface  1022 , and I/O interface to external services  1016 . The various components of server system  1010  can be coupled together by one or more communication buses or signal lines. Memory  1028 , or the computer-readable storage media of memory  1028 , can include one or more processing modules  1018  and user data and model storage  1020 . The one or more processing modules  1018  can include various programs and instructions. The one or more processors  1026  can execute the programs and instructions of the one or more processing modules  1018  and read/write to/from user data and model storage  1020 . In the context of this document, a “non-transitory computer-readable storage medium” can be any medium that can contain or store the program for use by or in connection with the instruction execution system, apparatus, or device. 
     In some examples, the one or more processing modules  1018  can include various programs and instructions for performing various aspects of processes  200 ,  300 ,  400 ,  500 , or  700 , described above. In particular, the one or more processing modules  1018  can include a predictive text input module for performing various aspects of processes  200 ,  300 ,  400 ,  500 , or  700  described above. User data and models  1020  can include various user data and models that can be accessed or referenced when performing various aspects of predictive text input. For example, user data and models  1020  can include various language models used for predictive text input described above with reference to processes  200 ,  300 ,  400 ,  500 , or  700 . Further user data can include various user application data that can be used to determine an input context or a physical context associated with a received text input. 
     In some examples, system server  1010  can communicate with external services  1024 , such as telephony services, calendar services, information services, messaging services, navigation services, and the like, through network(s)  1008 . In some examples, external services can provide relevant application data for determining input context or physical context associated with a received text input. Further, in some examples, system server  1010  can access one or more language models stored on external services  1024  for performing predictive text input. The I/O interface to external services  1016  can facilitate communications between system server  1010  and external services  1024 . 
     Server system  1010  can be implemented on one or more stand-alone data processing devices or a distributed network of computers. In some examples, server system  1010  can employ various virtual devices and/or services of third-party service providers (e.g., third-party cloud service providers) to provide the underlying computing resources and/or infrastructure resources of server system  1010 . 
     The division of functionalities between the client and server portions of the virtual assistant can vary in different examples. For instance, in some examples, one or more processing modules  1018  and user data and models  1020  can be stored in the memory of user device  900  to enable the user device to perform a greater proportion or all of the functionalities associated with predictive text input. In other examples, the client executed on user device  900  can be a thin-client that provides only user-facing input and output processing functions, and delegates all other functionalities of predictive text input to a back-end server. 
     7. Electronic Device 
       FIG. 11  shows a functional block diagram of an electronic device  1100  configured in accordance with the principles of the various described examples. The functional blocks of the device can be, optionally, implemented by hardware, software, or a combination of hardware and software to carry out the principles of the various described examples. It is understood by persons of skill in the art that the functional blocks described in  FIG. 11  can be, optionally, combined or separated into sub-blocks to implement the principles of the various described examples. Therefore, the description herein optionally supports any possible combination, separation, or further definition of the functional blocks described herein. 
     As shown in  FIG. 11 , electronic device  1100  can include touch screen display unit  1102  configured to display a user interface for receiving text input and to receive touch input, and text receiving unit  1104  configured to receive text input. In some examples, electronic device  1100  can include sensor unit  1106  that is configured to sense a physical context. Sensor unit  1106  can include any sensor for sensing a physical context, such as, for example, a microphone, an image sensor, a brightness sensor, a motion sensor, a GPS sensor, and the like. Electronic device  1100  can further include processing unit  1110  coupled to touch screen display unit  1102  and text receiving unit  1104  (and, optionally, coupled to sensor unit  1106 ). In some examples, processing unit  1110  can include receiving unit  1112 , frequency of occurrence determining unit  1114 , weighting factor determining unit  1116 , weighted probability determining unit  1118 , probability determining unit  1120 , language model updating unit  1122 , and presenting unit  1124 . 
     Processing unit  1110  can be configured to receive a text input (e.g., from text receiving unit  1104  and using receiving unit  1112 ). The text input can be associated with an input context. Processing unit  1110  can be configured to determine, using a first language model, a first frequency of occurrence of an m-gram with respect to a first subset of a corpus (e.g., using frequency of occurrence determining unit  1114 ). The first subset can be associated with a first context and the m-gram can include at least one word in the text input. Processing unit  1110  can be configured to determining (e.g., using weighting factor determining unit  1116 ), based on a degree of similarity between the input context and the first context, a first weighting factor to apply to the first frequency of occurrence of the m-gram. Processing unit  1110  can be configured to determining (e.g., using weighted probability determining unit  1118 ), based on the first frequency of occurrence of the m-gram and the first weighting factor, a first weighted probability of a first predicted text given the text input. The m-gram can include at least one word in the first predicted text. 
     In some examples, processing unit  1110  can be configured to determine, using the first language model, a second frequency of occurrence of the m-gram with respect to a second subset of the corpus (e.g., using frequency of occurrence determining unit  1114 ). The second subset can be associated with a second context. Processing unit  1110  can be configured to determine (e.g., using weighting factor determining unit  1116 ), based on a degree of similarity between the input context and the second context, a second weighting factor to apply to the second frequency of occurrence of the m-gram. Processing unit  1110  can be configured to determine the first weighted probability of the first predicted text given the text input (e.g., using weighted probability determining unit  1118 ) based on the second frequency of occurrence of the m-gram and the second weighting factor. 
     In some examples, the first context and the second context can be different, and the first weighting factor and the second weighting factor can be different. 
     In some examples, processing unit  1110  can be configured to determine, using the first language model, a first frequency of occurrence of an (m−1)-gram with respect to the first subset of the corpus (e.g., using frequency of occurrence determining unit  1114 ). The m-gram can include one or more words in the (m−1)-gram. Processing unit  1110  can be configured to determine the first weighted probability of the first predicted text given the text input (e.g., using weighted probability determining unit  1118 ) based on a first weighted frequency of occurrence of the (m−1)-gram. The first weighting factor can be applied to the first frequency of occurrence of the (m−1)-gram to obtain the first weighted frequency of occurrence of the (m−1)-gram. 
     In some examples, the first language model can be a user language model that is built from the corpus and the corpus can include a collection of user input text received prior to receiving the text input. 
     In some examples, processing unit  1110  can be configured to update (e.g., using language model updating unit  1122 ) the first language model using the text input. 
     In some examples, processing unit  1110  can be configured to determine, using a second language model, a probability of the first predicted text given the text input (e.g., using probability determining unit  1120 ). Processing unit  1110  can be configured to determine (e.g., using weighted probability determining unit  1118 ) a second weighted probability of the first predicted text given the text input based on the first weighted probability of the first predicted text given the text input and the probability of the first predicted text given the text input. 
     In some examples, processing unit  1110  can be configured to apply a third weighting factor to the first weighted probability of the first predicted text given the text input and apply a fourth weighting factor to the probability of the first predicted text given the text input (e.g., using weighted probability determining unit  1118 ) to determine the second weighted probability of the first predicted text given the text input. 
     In some examples, the first language model can be built from the corpus. The corpus can include a plurality of subsets where each subset can be associated with a context of a plurality of contexts. Each context of the plurality of contexts can be represented by one or more hierarchical context tags of the first language model. 
     In some examples, the first language model can include a plurality of n-grams including the m-gram where each n-gram of the plurality of n-grams can be associated with one or more hierarchical context tags and a frequency of occurrence of the n-gram with respect to a subset of the corpus. 
     In some examples, the first language model can include a plurality of sub-models arranged in a hierarchical context tree where each sub-model can be associated with a specific context. 
     In some examples, the first weighted probability of the first predicted text given the text input can be greater than a predetermined threshold. Processing unit  1110  can be configured to determine, using the first language model, a frequency of occurrence of an (m+1)-gram with respect to the first subset of the corpus (e.g., using frequency of occurrence determining unit  1114 ). The (m+1)-gram can include one or more words in the m-gram. Processing unit  1110  can be configured to determine (e.g., using weighted probability determining unit  1118 ), based on the frequency of occurrence of the (m+1)-gram and the first weighting factor, a weighted probability of a second predicted text given the text input and the first predicted text. The (m+1)-gram can include at least one word in the second predicted text. 
     In some examples, the first context can include a first application of the electronic device and the first subset can include a collection of user text that is associated with the first application. 
     In some examples, the first context can include a first recipient and the first subset can include a collection of user text that is directed to the first recipient. In some examples, the first context can include a physical context determined using a sensor of the electronic device (e.g., sensor unit  1106 ). The first subset can include a collection of user text that is associated with the physical context. 
     In some examples, the first context can include a time period or a location and the first subset can include a collection of user text that is associated with the time period or the location. 
     In some examples, the first context can include an environment, a situation, or a circumstance and the first subset can include a collection of user text that is associated with the environment, the situation, or the circumstance. 
     In some examples, the text input can be associated with a second application of the electronic device and the input context can include the second application. In some examples, the text input can be directed to a second recipient, and wherein the input context includes the second recipient. In some examples, the second recipient can be determined based on the text input and using the first language model. In some examples, the input context can be determined using a sensor of the electronic device (e.g., sensor unit  1106 ). In some examples, the input context can be determined from data obtained from one or more applications of the electronic device. 
     In some examples, processing unit  1110  can be configured to presenting (e.g., using presenting unit  1124 ) the first predicted text via a user interface of the electronic device. 
     In some examples, processing unit  1110  can be configured to receive (e.g., from text receiving unit  1104  and using receiving unit  1112 ) a first text input where the first text input can be associated with a first input context. Processing unit  1110  can be configured to determine, using a language model and based on the first input context, a first weighted probability of a predicted text given the first text input (e.g., using one or more of frequency of occurrence determining unit  1114 , weighting factor determining unit  1116 , weighted probability determining unit  1118 , and probability determining unit  1120 ). Processing unit  1110  can be configured to receive (e.g., from text receiving unit  1104  and using receiving unit  1112 ) a second text input where the second text input can be associated with a second input context. The first text input can be identical to the second text input and the first input context can be different from the second input context. Processing unit  1110  can be configured to determine, using the language model and based on the second input context, a second weighted probability of the predicted text given the second text input (e.g., using one or more of frequency of occurrence determining unit  1114 , weighting factor determining unit  1116 , weighted probability determining unit  1118 , and probability determining unit  1120 ). The first weighted probability can be different from the second weighted probability. In some examples, the language model can be similar or identical to the first language model described above. 
     In some examples, the first text input can be associated with a first application of the electronic device and the first input context can include the first application. The second text input can be associated with a second application of the electronic device and the second input context can include the second application. The first application can be different from the second application. 
     In some examples, the first text input can be directed to a first recipient and the first input context can include the first recipient. The second text input can be directed to a second recipient and the second input context can include the second recipient. The first recipient can be different from the second recipient. 
     In some examples, the first recipient can be determined based on the first text input and using a second language model. In some examples, the first input context can be determined using a sensor of the electronic device (e.g., sensor unit  1106 ). In some examples, the first input context can be determined using data obtained from one or more applications of the electronic device. 
       FIG. 12  shows a functional block diagram of an electronic device  1200  configured in accordance with the principles of the various described examples. The functional blocks of the device can be, optionally, implemented by hardware, software, or a combination of hardware and software to carry out the principles of the various described examples. It is understood by persons of skill in the art that the functional blocks described in  FIG. 12  can be, optionally, combined or separated into sub-blocks to implement the principles of the various described examples. Therefore, the description herein optionally supports any possible combination, separation, or further definition of the functional blocks described herein. 
     As shown in  FIG. 12 , electronic device  1200  can include touch screen display unit  1202  configured to display a user interface for receiving text input and to receive touch input, and text receiving unit  1204  configured to receive text input. In some examples, electronic device  1200  can include sensor unit  1206  that is configured to sense a physical context. Sensor unit  1206  can include any sensor for sensing a physical context, such as, for example, a microphone, an image sensor, a brightness sensor, a motion sensor, a GPS sensor, and the like. Electronic device  1200  can further include processing unit  1210  coupled to touch screen display unit  1202  and text receiving unit  1204  (and, optionally, coupled to sensor unit  1206 ). In some examples, processing unit  1210  can include receiving unit  1212 , physical context determining unit  1214 , frequency of occurrence determining unit  1216 , weighting factor determining unit  1218 , weighted probability determining unit  1220 , probability determining unit  1222 , language model updating unit  1224 , and presenting unit  1226 . 
     Processing unit  1210  can be configured to receive a text input (e.g., from text receiving unit  1204  and using receiving unit  1212 ). Processing unit  1210  can be configured to determine (e.g., using physical context determining unit  1214 ) a physical context associated with the text input. Processing unit  1210  can be configured to determine, using a first language model and the physical context, a first weighted probability of a predicted text given the text input (e.g., using one or more of frequency of occurrence determining unit  1216 , weighting factor determining unit  1218 , weighted probability determining unit  1220 , and probability determining unit  1222 ). Processing unit  1210  can be configured to present (e.g., using presenting unit  1226 ) the predicted text via a user interface of the electronic device. 
     In some examples, the physical context can be determined using a sensor of the electronic device (e.g., sensor unit  1206 ). In some examples, the physical context can be determined using data obtained from an application of the electronic device. 
     In some examples, processing unit  1210  can be configured to determine, using the first language model, a first probability of the predicted text given the text input (e.g., using probability determining unit  1222 ). Processing unit  1210  can be configured to determine (e.g., using weighting factor determining unit  1218 ), based on the physical context, a first weighting factor to apply to the first probability of the predicted text given the text input. Processing unit  1210  can be configured to determine (e.g., using weighted probability determining unit  1220 ) the first weighted probability of the predicted text given the text input based on the first probability of the predicted text given the text input and the first weighting factor. 
     In some examples, the first language model can be a class-based language model that includes a first sub-model. The first sub-model can be associated with the physical context. Processing unit  1210  can be configured to determine, using the first language model, a probability of a class given the input text (e.g., using probability determining unit  1222 ). Processing unit  1210  can be configured to determine, using the first sub-model, a first probability of the predicted text given the class (e.g., using probability determining unit  1222 ). The first weighted probability of the predicted text given the text input can be determined based on the probability of the class given the input text and the first probability of the predicted text given the class. In some examples, the first language model can include a second sub-model. The second sub-model can be associated with a general context. Processing unit  1210  can be configured to determine, using the second sub-model, a second probability of the predicted text given the class (e.g., using probability determining unit  1222 ). The first weighted probability of the predicted text given the text input can be determined based on the first probability of the predicted text given the class. 
     In some examples, the first language model can be a general language model. In some examples, the first language model can be a user language model that is built from a corpus where the corpus can include a collection of user input text received prior to receiving the text input. In some examples, processing unit  1210  can be configured to update (e.g., using language model updating unit  1224 ) the first language model using the text input and the predicted text. 
     In some examples, the physical context can include a time period. In some examples, the time period can be determined from data obtained from an application of the electronic device. The application can be one of a clock application, a scheduler application, and a weather application. 
     In some examples, the physical context can include an environment, a situation, or a circumstance experienced by a user of the electronic device when the text input is received. In some examples, the environment, the situation, or the circumstance can be determined using a microphone of the electronic device (e.g., sensor unit  1206 ). In some examples, the environment, the situation, or the circumstance can be determined using a light sensor or an image sensor of the electronic device (e.g., sensor unit  1206 ). In some examples, the environment, the situation, or the circumstance can be determined using a motion sensor of the electronic device (e.g., sensor unit  1206 ). 
     In some examples, the first language model can be built from a corpus that includes a plurality of subsets, where each subset can be associated with a context. Processing unit  1210  can be configured to determine, using the first language model, a first frequency of occurrence of an m-gram with respect to a first subset of the plurality of subsets (e.g., using frequency of occurrence determining unit  1216 ). The first subset can be associated with a first context and the m-gram can include at least one word in the text input and at least one word in the predicted text. Processing unit  1210  can be configured to determine (e.g., using weighting factor determining unit  1218 ), based on a degree of similarity between the physical context and the first context, a first weighting factor to apply to the first frequency of occurrence of the m-gram. The first weighted probability can be based on the first frequency of occurrence of the m-gram and the first weighting factor. 
     In some examples, processing unit  1210  can be configured to determine, using the first language model, a second frequency of occurrence of the m-gram with respect to a second subset of the plurality of subsets (e.g., using frequency of occurrence determining unit  1216 ). The second subset can be associated with a second context. Processing unit  1210  can be configured to determine, based on a degree of similarity between the input context and the second context, a third weighting factor to apply to the second frequency of occurrence of the m-gram (e.g., using frequency of occurrence determining unit  1216 ). The first weighted probability of the predicted text given the text input can be determined based on the second frequency of occurrence of the m-gram and the third weighting factor. 
     In some examples, processing unit  1210  can be configured to determine, using a second language model, a third probability of the predicted text given the text input (e.g., using probability determining unit  1222 ). Processing unit  1210  can be configured to determine (e.g., using weighted probability determining unit  1220 ) a second weighted probability of the predicted text given the text input based on the first weighted probability and the third probability. In some examples, processing unit  1210  can be configured to apply a third weighting factor to the first weighted probability and apply a fourth weighting factor to the third probability (e.g., using weighted probability determining unit  1220 ) to determine the second weighted probability. In some examples, the first language model can be a user language model and the second language model can be a general language model. 
       FIG. 13  shows a functional block diagram of an electronic device  1300  configured in accordance with the principles of the various described examples. The functional blocks of the device can be, optionally, implemented by hardware, software, or a combination of hardware and software to carry out the principles of the various described examples. It is understood by persons of skill in the art that the functional blocks described in  FIG. 13  can be, optionally, combined or separated into sub-blocks to implement the principles of the various described examples. Therefore, the description herein optionally supports any possible combination, separation, or further definition of the functional blocks described herein. 
     As shown in  FIG. 13 , electronic device  1300  can include touch screen display unit  1302  configured to display a user interface for receiving language input and to receive touch input, and text input unit  1304  configured to receive text input. In some examples, electronic device  1300  can include sensor unit  1306  that is configured to sense a physical context. Sensor unit  1306  can include any sensor for sensing a physical context, such as, for example, a microphone, an image sensor, a brightness sensor, a motion sensor, a GPS sensor, and the like. Electronic device  1300  can further include processing unit  1310  coupled to touch screen display unit  1302  and text input unit  1304  (and, optionally, coupled to sensor unit  1306 ). In some examples, processing unit  1310  can include obtaining unit  1312 , generating unit  1314 , receiving unit  1316 , determining unit  1318 , ranking unit  1320 , displaying unit  1322 , detecting unit  1324 , and updating unit  1326 . 
     In some embodiments, processing unit  1310  is configured to obtain (e.g., with obtaining unit  1312 ) text composed by a user. Processing unit  1310  is further configured to receive (e.g., with receiving unit  1316 ), via touch screen display unit  1302  or text input unit  1304 , input comprising a sequence of symbols of a first symbolic system. Processing unit  1310  is further configured to determine (e.g., with determining unit  1318 ) a plurality of candidate word strings corresponding to the sequence of symbols. Each candidate word string of the plurality of candidate word strings comprises two or more words of a second symbolic system. Processing unit  1310  is further configured to rank (e.g., with ranking unit  1320 ) the plurality of candidate word strings based on a probability of occurrence of each candidate word string of the plurality of candidate word strings in the obtained text. Processing unit  1310  is further configured to display (e.g., with displaying unit  1322 ), via touch screen display unit  1302 , a portion of the plurality of candidate word strings for selection by the user based on the ranking. 
     In some examples, the first symbolic system is different from the second symbolic system. 
     In some examples, processing unit  1310  is further configured to generate (e.g., with generating unit  1314 ) a first language model using the obtained text. Processing unit  1310  is further configured to determine (e.g., with determining unit  1318 ), using the first language model, the probability of occurrence of each candidate word string of the plurality of candidate word strings in the obtained text. 
     In some examples, the first language model is an n-gram language model. 
     In some examples, processing unit  1310  is further configured to receive (e.g., with receiving unit  1316 ), via touch screen display unit  1302 , a selection of a candidate word string from the displayed portion of the plurality of candidate word strings. Processing unit  1310  is further configured to display (e.g., with displaying unit  1322 ), via touch screen display unit  1302 , the selected candidate word string in a text field of the device. 
     In some examples, processing unit  1310  is further configured to receive (e.g., with receiving unit  1316 ), via touch screen display unit  1302 , an indication that the user has committed to the selected candidate word string. Processing unit  1310  is further configured to, in response to receiving the indication, update (e.g., with updating unit  1326 ) the first language model using the selected candidate word string. 
     In some examples, processing unit  1310  is further configured to receive (e.g., with receiving unit  1316 ) via touch screen display unit  1302  or text input unit  1304 , a full stop input for a sentence containing the selected candidate word string. 
     In some examples, processing unit  1310  is further configured to receive (e.g., with receiving unit  1316 ), via touch screen display unit  1302 , a command to send a message containing the selected candidate word string. 
     In some examples, processing unit  1310  is further configured to determine (e.g., with determining unit  1318 ) a predicted word of the second symbolic system based on a probability of occurrence of a sequence of words in the obtained text. The sequence of words comprises the selected candidate word string and the predicted text. Processing unit  1310  is further configured to display (e.g., with displaying unit  1322 ), via touch screen display unit  1302 , the predicted word adjacent to the selected candidate word string in the text field. 
     In some examples, the obtained text is associated with a first context, the input is associated with an input context, and ranking the plurality of candidate word strings is based on a degree of similarity between the input context and the first context. 
     In some examples, the first context includes a first recipient and a first application of the device. Further, the input context includes a second recipient and a second application of the device. 
     In some examples, the first context and input context are determined using a sensor of the device. 
     In some examples, processing unit  1310  is further configured to obtain (e.g., with obtaining unit  1312 ) second text composed by the user. The obtained second text is associated with a second context. Additionally, ranking the plurality of candidate word strings is based on a probability of occurrence of each candidate word string of the plurality of candidate word strings in the second obtained text. Further, ranking the plurality of candidate word strings is based on a degree of similarity between the input context and the second context. 
     In some examples, the obtained second text comprises words of the second symbolic system. In some examples, the obtained text comprises words of the second symbolic system. 
     In some examples, processing unit  1310  is further configured to determine (e.g., with determining unit  1318 ), using a second language model, a probability of occurrence of each candidate word string of the plurality of candidate word strings in a corpus of text. The corpus of text is not composed by the user. Further, ranking the plurality of candidate word strings is based on the probability of occurrence of each candidate word string of the plurality of candidate word strings in the corpus of text. 
     In some examples, the first symbolic system comprises a phonetic system for transcribing a language. In some examples, the first symbolic system comprises Chinese Pinyin. In some examples, the first symbolic system comprises Chinese Zhuyin. In some examples, the second symbolic system comprises Chinese characters. In some examples, each word of the two or more words is a monosyllabic Chinese word. 
     In some embodiments, processing unit  1310  is configured to receive (e.g., with receiving unit  1316 ) via touch screen display unit  1302  or text input unit  1304 , first input comprising a sequence of symbols of a first symbolic system. The sequence of symbols represents an intended sequence of three or more words of a second symbolic system. Processing unit  1310  is further configured to display on a language input interface (e.g., with displaying unit  1322 ), via touch screen display unit  1302 , a plurality of candidate word strings corresponding to the sequence of symbols. Each candidate word string of the plurality of candidate word strings comprises two or more words of the second symbolic system. The plurality of candidate word strings does not include the intended sequence of three or more words. Processing unit  1310  is further configured to receive (e.g., with receiving unit  1316 ) via touch screen display unit  1302  or text input unit  1304 , second input indicating that the sequence of symbols of the first symbolic system corresponds to the intended sequence of three or more words of the second symbolic system. Processing unit  1310  is further configured to, after receiving the second input, receive (e.g., with receiving unit  1316 ) via touch screen display unit  1302  or text input unit  1304 , third input comprising a first word and a second word of the intended sequence of three or more words of the second symbolic system. Processing unit  1310  is further configured to determine (e.g., with determining unit  1318 ) a predicted word based on the first word and the second word of the intended sequence of three or more words. The predicted word comprises a third word of the intended sequence of three or more words. Processing unit  1310  is further configured to display (e.g., with displaying unit  1322 ), via touch screen display unit, the predicted word for user selection. 
     In some examples, the first symbolic system is different from the second symbolic system. 
     In some examples, processing unit  1310  is further configured to receive (e.g., with receiving unit  1316 ) via the language input interface (e.g., displayed on touch screen display unit  1302 ) a selection of the first word corresponding to a first portion of the sequence of symbols, the second word corresponding to a second portion of sequence of symbols, and the third word corresponding to a third portion of sequence of symbols. 
     In some examples, processing unit  1310  is further configured to receive (e.g., with receiving unit  1316 ) via touch screen display unit  1302  or text input unit, a second sequence of symbols of the first symbolic system. The second sequence of symbols corresponds to the first word and the second word of the intended sequence of three or more words of the second symbolic system. Processing unit  1310  is further configured to display on the language input interface (e.g., with displaying unit  1322 ), via touch screen display unit  1302 , the first word and the second word as candidate words corresponding to a first portion of the second sequence of symbols and a second portion of the second sequence of symbols, respectively. Processing unit  1310  is further configured to receive (e.g., with receiving unit  1316 ) via the language input interface (e.g., displayed on touch screen display unit  1302 ) a selection of the first word and the second word. 
     In some examples, processing unit  1310  is further configured to, in response to receiving the selection of the first word and the second word, display (e.g., with displaying unit  1322 ), via touch screen display unit  1302 , the first word and the second word in a text field. The predicted word is displayed in the text field adjacent to the displayed second word. 
     In some examples, processing unit  1310  is further configured to obtain (e.g., with obtaining unit  1312 ) text composed by the user. The predicted word is determined based on a probability of occurrence of the intended sequence of three or more words in the text composed by the user. 
     In some examples, the obtained text comprises words of the second symbolic system. 
     In some examples, processing unit  1310  is further configured to generate (e.g., with generating unit  1314 ) a first language model using the text composed by the user. Processing unit  1310  is further configured to determine (e.g., with determining unit  1318 ), using the first language model, the probability of occurrence of the intended sequence of three or more words in the text composed by the user. 
     In some examples, the first language model is an n-gram language model. 
     In some examples, processing unit  1310  is further configured to update (e.g., with updating unit  1326 ) the first language model using the second input. 
     In some examples, the text composed by the user is associated with a first context, the third input is associated with an input context, and the predicted text is determined based on a degree of similarity between the input context and the first context. 
     In some examples, the first context includes a first recipient and a first application of the device. Further, the input context includes a second recipient and a second application of the device. 
     In some examples, the first context and input context are determined using a sensor of the device. 
     In some examples, processing unit  1310  is further configured to obtain (e.g., with obtaining unit  1312 ) second text composed by the user. The predicted word is determined based on a probability of occurrence of the intended sequence of three or more words in the second text composed by the user. The second text composed by the user is associated with a second context. The predicted text is determined based on a degree of similarity between the input context and the second context. 
     In some examples, processing unit  1310  is further configured to determine (e.g., with determining unit  1318 ), using a second language model, a probability of occurrence of the intended sequence of three or more words in a corpus of text. The corpus of text is not composed by the user. Further, the predicted word is determined based on the probability of occurrence of the intended sequence of three or more words in the corpus of text. 
     In some examples, the first symbolic system is a phonetic system for transcription of a language. In some examples, the first symbolic system comprises Chinese Pinyin. In some examples, the first symbolic system comprises Chinese Zhuyin. In some examples, the second symbolic system comprises Chinese characters. In some examples, each word of the intended sequence of three or more words is a monosyllabic Chinese word. 
     Although examples have been fully described with reference to the accompanying drawings, it is to be noted that various changes and modifications will become apparent to those skilled in the art. Such changes and modifications are to be understood as being included within the scope of the various examples as defined by the appended claims. For example, it should be recognized that the processes for predictive conversion of language input described above can be implemented to convert any script type of a first symbolic system to another script type of a second symbolic system. In particular, the processes can be applied to translate a first language of a first symbolic system to a second language of a second symbolic system. Further, a word of a symbolic system can refer to a character (e.g., a monosyllabic Chinese character) or a plurality of characters. 
     In some cases, the systems, processes, and devices described above can include the gathering and use of data available from various sources to improve the delivery to users of invitational content or any other content that may be of interest to them. The present disclosure contemplates that in some instances, this gathered data may include personal information data that uniquely identifies or can be used to contact or locate a specific person. Such personal information data can include demographic data, location-based data, telephone numbers, email addresses, home addresses, or any other identifying information. 
     The present disclosure recognizes that the use of such personal information data in connection with the systems, processes, and devices described above, can be used to the benefit of users. For example, the personal information data can be used to deliver targeted content that is of greater interest to the user. Accordingly, use of such personal information data enables calculated control of the delivered content. Further, other uses for personal information data that benefit the user are also contemplated by the present disclosure. 
     The present disclosure further contemplates that the entities responsible for the collection, analysis, disclosure, transfer, storage, or other use of such personal information data will comply with well-established privacy policies and/or privacy practices. In particular, such entities should implement and consistently use privacy policies and practices that are generally recognized as meeting or exceeding industry or governmental requirements for maintaining personal information data private and secure. For example, personal information from users should be collected for legitimate and reasonable uses of the entity and not shared or sold outside of those legitimate uses. Further, such collection should occur only after receiving the informed consent of the users. Additionally, such entities would take any needed steps for safeguarding and securing access to such personal information data and ensuring that others with access to the personal information data adhere to their privacy policies and procedures. Further, such entities can subject themselves to evaluation by third parties to certify their adherence to widely accepted privacy policies and practices. 
     Despite the foregoing, the present disclosure also contemplates examples in which users selectively block the use of, or access to, personal information data. That is, the present disclosure contemplates that hardware and/or software elements can be provided to prevent or block access to such personal information data. For example, in the case of advertisement delivery services, the systems and devices described above can be configured to allow users to select to “opt in” or “opt out” of participation in the collection of personal information data during registration for services. In another example, users can select not to provide location information for targeted content delivery services. In yet another example, users can select to not provide precise location information, but permit the transfer of location zone information. 
     Therefore, although the present disclosure broadly covers use of personal information data to implement one or more various disclosed examples, the present disclosure also contemplates that the various examples can also be implemented without the need for accessing such personal information data. That is, the various examples disclosed herein are not rendered inoperable due to the lack of all or a portion of such personal information data. For example, content can be selected and delivered to users by inferring preferences based on non-personal information data or a bare minimum amount of personal information, such as the content being requested by the device associated with a user, other non-personal information available to the content delivery services, or publicly available information.

Metadata:
Filing Date: 20150828
Publication Date: 20171212
Grant Date: 20171212
Priority Date: 20140530
Inventors: WANG XIN
RAMERTH BRENT D.
Assignee: APPLE INC
CPC Classifications: [{"code": "G06F16/3329", "inventive": true, "first": false, "tree": "[]"}, {"code": "G06F40/274", "inventive": true, "first": true, "tree": "[]"}, {"code": "G06F16/3322", "inventive": true, "first": false, "tree": "[]"}, {"code": "G06F3/018", "inventive": true, "first": false, "tree": "[]"}, {"code": "G06F3/018", "inventive": true, "first": true, "tree": "[]"}, {"code": "G06F16/3329", "inventive": true, "first": false, "tree": "[]"}, {"code": "G06F40/129", "inventive": true, "first": false, "tree": "[]"}, {"code": "G06F40/274", "inventive": true, "first": false, "tree": "[]"}, {"code": "G06F40/129", "inventive": true, "first": false, "tree": "[]"}, {"code": "G06F16/3322", "inventive": true, "first": false, "tree": "[]"}, {"code": "G06F17/2223", "inventive": true, "first": false, "tree": "[]"}, {"code": "G06F3/018", "inventive": true, "first": false, "tree": "[]"}, {"code": "G06F17/3064", "inventive": true, "first": false, "tree": "[]"}, {"code": "G06F17/276", "inventive": true, "first": true, "tree": "[]"}, {"code": "G06F17/30654", "inventive": true, "first": false, "tree": "[]"}]
Family ID: 54869800