RELATED APPLICATION(S)This application is a continuation of and claims priority to U.S. patent application Ser. No. 16/989,420, filed on Aug. 10, 2020, which in turn is a continuation of and claims priority to U.S. patent application Ser. No. 15/422,175, filed on Feb. 1, 2017, now U.S. Pat. No. 10,747,427, issued on Aug. 18, 2020, the disclosures of which are incorporated by reference herein in their entireties.
BACKGROUNDSome graphical keyboards may rely on one or more models to determine what graphical keys a user may be selecting and/or what word or words the user may be typing, when providing input at the graphical keys. For example, a graphical keyboard may use a language model, a spatial model, and/or other model to perform tasks such as auto-correction, auto-completion, key selection, character, word or phrase prediction, and other keyboard input related tasks. Some models may be tailored to a particular language. In other words, some models may be configured to discern input assuming that a user is typing in a particular language. If a graphical keyboard tries to discern user input while the user is typing in a language that is different from what a model is expecting, the keyboard may exert abnormal or incorrect behavior resulting in errors in decoding input and/or a frustrating user experience.
SUMMARYIn general, this disclosure is directed to techniques for enabling a graphical keyboard to automatically determine one or more target languages associated with user input and, either automatically or in response to receiving a user input to a prompt requesting instructions to do change the active language decoder, reconfigure itself to enable language decoding in each of the one or more target languages. For example, a graphical keyboard of a graphical user interface (GUI) of a computing device may default to using an initial language decoder (e.g., a language model, a spatial model, and/or other type of model used to determine text from user input at a graphical keyboard) as a current decoder for decoding user inputs. The current language decoder may be configured to translate keyboard inputs into text of a default language, such as a language associated with a geographic location at which the computing device was sold and/or manufactured. A user of the computing device may provide inputs to the graphical keyboard to intentionally create text written in one or more target languages that differ from the language of the current decoder.
After receiving explicit consent to make use of and/or analyze information about the user of the computing device, and to enable more accurate input decoding, the graphical keyboard may use a language identification module (e.g., a machine-learned model) trained to determine whether any of the one or more target languages are unsupported by the current decoder, and if so, reconfigure itself to change decoders such that the graphical keyboard may decode inputs in the otherwise unsupported target language. In response to determining an unsupported target language, the graphical keyboard may generate a prompt (e.g., a graphical and/or audible alert) alerting the user to the option of reconfiguring the graphical keyboard to be able to decode inputs in the otherwise unsupported target languages. In other examples, the graphical keyboard may automatically reconfigure itself to without alerting the user. Once reconfigured, the graphical keyboard may automatically switch between multiple different decoders for subsequent user inputs so that the graphical keyboard uses the particular decoder associated with the target language determined by the language identification module. If the decoder associated with any of the one or more target languages is not currently installed as part of the graphical keyboard, the graphical keyboard may automatically download and/or install the different decoder (e.g., from a data repository at a remote server) without requiring the user to navigate through a menu of settings and options to download and install a new keyboard decoder and/or to toggle between keyboards of different languages.
By learning when and how to automatically reconfigure itself to be able to decode user inputs in multiple target languages, the graphical keyboard described herein may avoid incorrectly decoding user inputs and therefore reduce the number of user inputs required to perform text-entry. Exhibiting more accurate behavior and receiving fewer user inputs may simplify the user experience and may reduce power consumption of the computing device.
In one example, a method includes outputting, by a keyboard application executing at a computing device, for display, a graphical keyboard; determining, by the keyboard application, using a first decoder and based on a selection of one or more keys of the graphical keyboard, text; responsive to determining that a characteristic of the text satisfies a threshold for determining a target language of the text, and determining, by a machine-learned model of the keyboard application, the target language of the text. The method further includes, if the target language of the text is not different than a language associated with the first decoder, outputting, by the keyboard application, for display, an indication of one or more first candidate words determined by the first decoder from the text; and if the target language of the text is different than the language associated with the first decoder: enabling, by the keyboard application, a second decoder, wherein a language associated with the second decoder matches the target language of the text; and outputting, by the keyboard application, for display, an indication of one or more second candidate words determined by the second decoder from the text.
In another example, a mobile computing device includes at least one processor, and a memory. The memory stores instructions for a keyboard application that when executed cause the at least one processor to: output, for display at the presence-sensitive display, a graphical keyboard; determine, using a first decoder and based on a selection of one or more keys of the graphical keyboard, text; responsive to determining that a characteristic of the text satisfies a threshold for determining a target language of the text, determine, using a machine-learned model, the target language of the text. The instructions, when executed, further cause the at least one processor to, if the target language of the text is not different than a language associated with the first decoder, output, for display at the presence-sensitive display, an indication of one or more first candidate words determined by the first decoder from the text; and if the target language of the text is different than the language associated with the first decoder: enable, a second decoder, wherein a language associated with the second decoder matches the target language of the text; and output, for display at the presence-sensitive display, an indication of one or more second candidate words determined by the second decoder from the text.
In another example, a computer-readable storage medium encoded with instructions that, when executed by at least one processor of a computing device, cause the at least one processor to output, for display at the presence-sensitive display, a graphical keyboard; determine, using a first decoder and based on a selection of one or more keys of the graphical keyboard, text; responsive to determining that a characteristic of the text satisfies a threshold for determining a target language of the text, determine, using a machine-learned model, the target language of the text. The instructions, when executed, further cause the at least one processor to, if the target language of the text is not different than a language associated with the first decoder, output, for display, an indication of one or more first candidate words determined by the first decoder from the text; and if the target language of the text is different than the language associated with the first decoder: enable, a second decoder, wherein a language associated with the second decoder matches the target language of the text; and output, for display, an indication of one or more second candidate words determined by the second decoder from the text.
In another example, a system includes means for outputting, for display, a graphical keyboard; means for determining, using a first decoder and based on a selection of one or more keys of the graphical keyboard, text; responsive to determining that a characteristic of the text satisfies a threshold for determining a target language of the text, and means for determining, by a machine-learned model, the target language of the text. The system further includes, if the target language of the text is not different than a language associated with the first decoder, means for outputting, for display, an indication of one or more first candidate words determined by the first decoder from the text; and if the target language of the text is different than the language associated with the first decoder: means for enabling a second decoder, wherein a language associated with the second decoder matches the target language of the text; and means for outputting, for display, an indication of one or more second candidate words determined by the second decoder from the text.
The details of one or more examples are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the disclosure will be apparent from the description and drawings, and from the claims.
BRIEF DESCRIPTION OF DRAWINGSFIGS. 1A-1C are conceptual diagrams illustrating a system including a computing device that executes an example graphical keyboard configured to automatically reconfigure itself to decode user inputs into text of a target language determined based on the user inputs, in accordance with one or more aspects of the present disclosure.
FIG. 2 is a block diagram illustrating an example computing device that includes a graphical keyboard configured to automatically reconfigure itself to decode user inputs into text of a target language determined based on the user inputs, in accordance with one or more aspects of the present disclosure.
FIG. 3 is a block diagram illustrating an example computing device that outputs graphical content for display at a remote device, in accordance with one or more techniques of the present disclosure.
FIG. 4 is a flowchart illustrating example operations of a computing device that includes a graphical keyboard configured to automatically reconfigure itself to decode user inputs into text of a target language determined based on the user inputs, in accordance with one or more aspects of the present disclosure.
FIGS. 5-7 are conceptual diagrams illustrating example graphical user interfaces of an example computing device that includes a graphical keyboard configured to automatically reconfigure itself to decode user inputs into text of a target language determined based on the user inputs, in accordance with one or more aspects of the present disclosure.
DETAILED DESCRIPTIONFIGS. 1A-1C are conceptual diagrams illustrating a system including a computing device that executes an example graphical keyboard configured to automatically reconfigure itself to decode user inputs into text of a target language determined based on the user inputs, in accordance with one or more aspects of the present disclosure.System100 includes information server system (“ISS”)160 in communication withcomputing device110 vianetwork130.
Network130 represents any public or private communications network, for instance, cellular, Wi-Fi, and/or other types of networks, for transmitting data between computing systems, servers, and computing devices. Network130 may include one or more network hubs, network switches, network routers, or any other network equipment, that are operatively inter-coupled thereby providing for the exchange of information between ISS160 andcomputing device110.Computing device110 and ISS160 may transmit and receive data acrossnetwork130 using any suitable communication techniques.
ISS160 andcomputing device110 may each be operatively coupled tonetwork130 using respective network links. The linkscoupling computing device110 and ISS160 tonetwork130 may be Ethernet, ATM or other types of network connections, and such connections may be wireless and/or wired connections.
ISS160 represents any suitable remote computing system, such as one or more desktop computers, laptop computers, mainframes, servers, cloud computing systems, etc. capable of sending and receiving information both to and from a network, such asnetwork130. ISS160 hosts (or at least provides access to) a service for providing a computing device, such ascomputing device110, access information that is available (e.g., data) for download, install, and execution by the computing device. In some examples, ISS160 represents a cloud computing system that is accessible vianetwork130. For example, computing device110 (e.g.,UI module120 and/or keyboard module122) may communicate with ISS160 vianetwork130 to access the prediction service provided by ISS160. In the example ofFIG. 1, ISS160 includesdata repository module162 and decoderpackage data store132.
Module162 may perform operations described using software, hardware, firmware, or a mixture of hardware, software, and firmware residing in and/or executing at ISS160. ISS160 may executemodule162 with multiple processors or multiple devices. ISS160 may executemodule162 as a virtual machine executing on underlying hardware, as one or more services of an operating system or computing platform of ISS160, and/or as one or more executable programs at an application layer of a computing platform of ISS160.
Data repository module162 may provide a digital distribution platform related to computing software, including software stored as one or more decoder packages at decoderpackage data store132. A decoder package may include one or more models (e.g., language model, spatial model, etc.), decoders, and/or other data necessary for a graphical keyboard to display a graphical keyboard layout and decode input detected at the keyboard layout into text of a particular written language.
Data repository module162 may transmit data (e.g., one or more decoder packages) vianetwork130 in response to a request for data from a computing device, such ascomputing device110. Upon receipt, the computing device may install the data in memory and/or execute instructions of the data at a local processor of the computing device. For example, data repository module126 may enable a user ofcomputing device110 to browse, search, select, purchase and/or causecomputing device110 to download and install one or more decoder packages stored at decoderpackage data store132. In some examples, repository module126 may include information about the data stored at decoderpackage data store132, such as a description of each decoder package and/or user comments and reviews of each decoder package. Data repository module126 may send information about one or more decoder packages to computingdevice110 so thatcomputing device110 may display the information to a user of thecomputing device110.
Computing device110 represents an individual mobile or non-mobile computing device. Examples ofcomputing device110 include a mobile phone, a tablet computer, a laptop computer, a desktop computer, a server, a mainframe, a set-top box, a television, a wearable device (e.g., a computerized watch, computerized eyewear, computerized gloves, etc.), or any other type of portable computing device, a personal digital assistants (PDA), portable gaming systems, media players, e-book readers, mobile television platforms, automobile navigation systems, automobile and/or home entertainment and infotainment systems, counter-top or mobile assistant devices (e.g., an “always listening” home assistant devices), or any other types of mobile, non-mobile, wearable, and non-wearable computing devices configured to receive information via a network, such asnetwork130.
Computing device110 includes presence-sensitive display (PSD)112, user interface (UI)module120, andkeyboard module122. Modules120-122 may perform operations described using software, hardware, firmware, or a mixture of hardware, software, and firmware residing in and/or executing atrespective computing device110.Computing device110 may execute modules120-122 with multiple processors or multiple devices.Computing device110 may execute modules120-122 as virtual machines executing on underlying hardware. Modules120-122 may execute as one or more services of an operating system or computing platform. Modules120-122 may execute as one or more executable programs at an application layer of a computing platform.
PSD112 ofcomputing device110 may function as an input and/or output device forcomputing device110 and may be implemented using various technologies that enablescomputing device110 to provide a user interface.PSD112 may function as an input device using microphone technologies, infrared sensor technologies, presence-sensitive input screens, touchscreens (e.g., resistive touchscreens, surface acoustic wave touchscreens, capacitive touchscreens, projective capacitance touchscreens, acoustic pulse recognition touchscreens), pressure sensitive screens, or other input device technology for use in receiving user input.PSD112 may function as an output (e.g., display) device using any one or more display devices (e.g., liquid crystal displays (LCD), dot matrix displays, light emitting diode (LED) displays, organic light-emitting diode (OLED) displays, e-ink, or similar monochrome or color displays capable of outputting visible information to a user of computing device110), speaker technologies, haptic feedback technologies, or other output device technology for use in outputting information to a user.
PSD112 may detect input (e.g., touch and non-touch input) from a user ofrespective computing device110.PSD112 may detect indications of input by detecting one or more gestures from a user (e.g., the user touching, pointing, and/or swiping at or near one or more locations ofPSD112 with a finger or a stylus pen).PSD112 may output information to a user in the form of a user interface (e.g.,user interfaces114A-114C) which may be associated with functionality provided bycomputing device110. Such user interfaces may be associated with computing platforms, operating systems, applications, and/or services executing at or accessible from computing device110 (e.g., electronic message applications, chat applications, Internet browser applications, mobile or desktop operating systems, social media applications, electronic games, and other types of applications). For example,PSD112 may presentuser interfaces114A-114C (collectively referred to as “user interfaces114”) which, as shown inFIGS. 1A-1C, are graphical user interfaces of a chat application executing atcomputing device110 and includes various graphical elements displayed at various locations ofPSD112.
As shown inFIGS. 1A-1C, user interfaces114 are chat user interfaces, however user interfaces114 may be any graphical user interface which includes a graphical keyboard. User interfaces114 includeoutput region116A,graphical keyboard116B, and editregion116C. A user ofcomputing device110 may provide input atgraphical keyboard116B to produce textual characters withinedit region116C that form the content of the electronic messages displayed withinoutput region116A. The messages displayed withinoutput region116A form a chat conversation between a user ofcomputing device110 and a user of a different computing device.
UI module120 may manage user interactions withPSD112 and other input and output components ofcomputing device110 as the interactions relate to the user interface(s) provided by computingdevices110, including user interfaces114. In other words,UI module120 may act as an intermediary between various components ofcomputing device110 to make determinations based on user input detected byPSD112 and generate output atPSD112 in response to the user input. For example,UI module120 may receive instructions from an application, service, platform, or other module ofcomputing device110 to causePSD112 to output a user interface (e.g., user interfaces114).UI module120 may send commands and/or instructions toPSD112 that causePSD112 to output user interface114 for display.UI module120 may manage inputs received by computingdevice110 as a user views and interacts with the user interface presented atPSD112 and update the user interface in response to receiving additional instructions from the application, service, platform, or other module ofcomputing device110 that is processing the user input.
Keyboard module122 represents an application, service, or component executing at or accessible tocomputing device110 that providescomputing device110 with a graphical keyboard configured to automatically reconfigure itself to decode user inputs into text of a target language that has been determined, by the graphical keyboard, from the user inputs.Keyboard module122 may perform traditional, graphical keyboard operations used for text-entry, such as: generating a graphical keyboard layout for display atPSD112, mapping detected inputs atPSD112 to selections of graphical keys, determining characters based on selected keys, or predicting or autocorrecting words and/or phrases based on the characters determined from selected keys.Keyboard module122 is responsible for controlling operations associated withgraphical keyboard116B of user interfaces114.
In some examples,keyboard module122 may be a stand-alone application, service, or module executing atcomputing device110 and, in other examples,keyboard module122 may be a single, integrated sub-component thereof For example,keyboard module122 may be integrated into a chat or messaging application executing atcomputing device110 whereas, in other examples,keyboard module122 may be a stand-alone application or subroutine that is invoked by an application or operating platform ofcomputing device110 any time an application or operating platform requires graphical keyboard input functionality. Ifkeyboard module122 forms part of a chat or messaging application executing atcomputing device110,keyboard module122 may provide the chat or messaging application with text-entry capability Similarly, ifkeyboard module122 is a stand-alone application or subroutine that is invoked by an application or operating platform ofcomputing device110, any time an application or operating platform requires graphical keyboard input functionality,keyboard module122 may provide the invoking application or operating platform with text-entry.
In some examples,computing device110 may download and installkeyboard module122 from a data distribution platform (e.g., via the Internet) such asdata repository module162 ofISS160 or some other service provider. In other examples,keyboard module122 may be preloaded during production ofcomputing device110 or be installed as part of installation of an encompassing software package (e.g., an operating system).
Graphical keyboard116B of user interfaces114 includes graphical elements displayed asgraphical keys118A and118B (collectively “graphical keys118”) andword suggestion regions119A and119B (collectively “word suggestion regions119”).Keyboard module122 may output information toUI module120 that specifies the layout ofgraphical keyboard116B within user interfaces114. For example, the information may include instructions that specify locations, sizes, colors, characters, text, and other characteristics of graphical keys118 and word suggestion regions119. Based on the information received fromkeyboard module122,UI module120 may causePSD112 displaygraphical keyboard116B as part of user interfaces114.
Each character key ofgraphical keys118A may be associated with a respective character (e.g., a letter, number, punctuation, or other character) displayed within the key or otherwise associated with the key. Each non-character key of graphical keys118 may be associated with a function or command (e.g., emoji search, keyboard selector, etc.) ofgraphical keyboard116B. A user ofcomputing device110 may provide input at locations ofPSD112 at which one or more of graphical keys118 are displayed to causecomputing device110 to input content (e.g., text) intoedit region116C (e.g., for composing messages that are sent and displayed withinoutput region116A).Keyboard module122 may receive information fromUI module120 indicating locations associated with input detected byPSD112 that are relative to the locations of each of graphical keys118. Using one or more decoders (e.g., a spatial model, language model, and/or other decoder component)keyboard module122 may translate inputs atPSD112 to selections of keys118 and textual output (e.g., characters, words, and/or phrases of a language) atedit region116C.
For example,PSD112 may detect user inputs as a user ofcomputing device110 provides the user inputs at or near a location ofPSD112 wherePSD112 presents graphical keys118.UI module120 may receive, fromPSD112, an indication of the user input detected byPSD112 and output, tokeyboard module122, information about the user input, such as an indication of one or more touch events (e.g., locations, pressure, and other information about the input).
Based on the information received fromUI module120, one or more decoders ofkeyboard module122 may map detected inputs atPSD112 to selections of graphical keys118, determine characters based on selected keys118, and predict or autocorrect words and/or phrases determined based on the characters associated with the selected keys118. For example, a decoder ofkeyboard module122 may include a spatial model that may determine, based on the locations of keys118 and the information about the input, the most likely one or more keys118 being selected. A language model of the decoder ofkeyboard module122 may determine, based on the one or more keys118 being selected, one or more characters, words, and/or phrases. In other words, a spatial model of a decoder ofkeyboard module122 may determine a sequence of characters selected based on the one or more selected keys118, and a language model of a decoder ofkeyboard module122 may determine one or more the most likely candidate letters, morphemes, words, and/or phrases that a user is trying to input based on the most likely keys118 being selected.
Keyboard module122 may send the sequence of characters and/or candidate words and phrases toUI module120 andUI module120 may causePSD112 to present the characters and/or candidate words determined from a selection of one or more keys118 as text withinedit region116C. In some examples, when functioning as a traditional keyboard for performing text-entry operations, and in response to receiving a user input at graphical keys118 (e.g., as a user is typing atgraphical keyboard116B to enter text withinedit region116C),keyboard module122 may causeUI module120 to display the candidate words and/or phrases as one or more selectable spelling corrections and/or selectable word or phrase suggestions within a suggestion region119 displayed adjacent to (e.g., above, below, or otherwise withingraphical keyboard116B) graphical keys118.
While providing traditional keyboard functionality,keyboard module122 may automatically determine one or more target languages associated with user input at graphical keyboard116 and, either automatically or in response to prompting the user for instructions to do so, reconfigure itself to perform operations in the one or more target languages. For example,keyboard module122 may default to using an initial language decoder (e.g., a language model, a spatial model, and/or other type of model used to determine text from user input at a graphical keyboard) as a current language decoder that is configured to translate keyboard inputs detected atPSD112 into text of a default language (e.g., a language associated with a geographic location at whichcomputing device110 was sold and/or manufactured). Despite being configured to handle decoding in the default language,keyboard module122 may receive user inputs detected byPSD112 indicating that a user ofcomputing device110 is intentionally typing atgraphical keyboard116B to create text written in one or more target languages that differ from the default language.
A language identification module configured as a model (e.g., a machine-learned model) executing in the background ofkeyboard module122 may be trained to determine what one or more target languages that a user is typing in, and whether any of the one or more target languages are unsupported by its decoder. For example, the language identification module may be trained offline based on keyboard inputs from other users of other computing devices when those other users are typing in a different target language than the language of the keyboard decoder. For instance, the language identification module may be trained to determine what types of inputs a user makes at an English language graphical keyboard when typing words in a language other than English (e.g., Danish, Dutch, French, German, etc.).
If the language identification module determines that a user is providing inputs tographical keyboard116B that differ from the language of the decoder(s) ofkeyboard module122,keyboard module122 may automatically reconfigure itself to decode inputs in that target language. For example, if a decoder associated with any of the one or more target languages is not currently installed as part ofkeyboard module122,keyboard module122 may automatically download and/or install the decoder needed to decode the target languages.Keyboard module122 may communicate withdata repository module162 to obtain a decoder package for the target language(s) fromdata store132.Keyboard module122 may receive the decoder package vianetwork130 and install the decoder package—all without requiring a user ofcomputing device110 to navigate through a menu of settings and options to download and install a new keyboard decoder.
Once reconfigured,keyboard module122 may automatically switch between its multiple decoders for subsequent user inputs so thatkeyboard module122 always uses the particular decoder that works with the target language determined by the language identification module. For example, askeyboard module122 receives information fromUI module120 about user inputs detected byPSD112 atgraphical keyboard116B, the language identification module may initially determine a language associated with the user inputs. The language identification module may indicate tokeyboard module122 the target language of the input so thatkeyboard module122 can automatically toggle to using the appropriate decoder for decoding the inputs. By learning when and how to automatically reconfigure itself to be able to decode user inputs in multiple target languages,keyboard module122 may enablecomputing device110 to avoid incorrectly decoding user inputs and therefore reduce the number of user inputs required to perform text-entry. Exhibiting more accurate behavior and receiving fewer user inputs may simplify the user experience ofcomputing device110 and may reduce power consumption ofcomputing device110.
In operation, a user may rely oncomputing device110 to exchange text messages by providing inputs toPSD112 whilePSD112 displays user interfaces114. The user may be a native German speaker.Keyboard module122 may be configured as an English based graphical keyboard application such thatkeyboard module122 causesUI module120 to displaygraphical keyboard116B having English language typegraphical keys118A.
As shown inFIG. 1A,computing device110 may receive a message from a device associated with a friend that states, in German, “Wie geht's?” which translated to English, means “How are you?”Computing device110 mayoutput user interface114A for display which includes a message bubble with the message received from the device associated with the friend.
After viewing the message displayed atPSD112, the user ofcomputing device110 may provide input to select the English languagegraphical keys118A to compose a reply message, for instance, by gesturing at or near locations ofPSD112 at whichkeys118A are displayed.UI module120 may send information tokeyboard module122 about the selection ofkeys118A.Keyboard module122, using an English language decoder, may determine text based on the information about the selection ofkeys118A. For example,keyboard module122 may determine the text to be “es geht mir gut” which is meaningless in English, however, in German, translates to “I am doing well” in English.
Responsive to determining that a characteristic of the text satisfies a threshold for determining a target language of the text, a machine-learned model ofkeyboard module122 may determine the target language of the text. For example, the language identification module ofkeyboard module122 may require a sufficient amount of text (e.g., a minimum quantity of words or characters, a minimum byte length, etc.) before attempting to determine the target language of the text. By refraining from determining the target language unless the characteristic of the text satisfies the threshold, the language identification module may avoid wasting energy trying to compute the target language when doing so may not be very accurate. In the example ofFIG. 1A, the language identification module ofkeyboard module122 may determine that the length of the text is sufficient for determining a target language associated with it and in response, determine the language of the text to be German.
If the target language of the text is not different than a language associated with the English decoder,keyboard module122 may output, for display, an indication of one or more first candidate words determined by the English decoder from the text. For example, if the language identification module ofkeyboard module122 identifies the language associated with the text to be English, keyboard module1222 may send information toUI module120 that causesPSD112 to display, within word-suggestion region119A, one or more English language word suggestions that,keyboard module122 has determined from the text.
If the target language of the text is different than the language associated with the Englishdecoder keyboard module122 may enable a German decoder and output, for display, an indication of one or more German candidate words determined by the German decoder from the text. In some examples,keyboard module122 may automatically enable the German decoder and in other examples,keyboard module122 may first prompt the user before enabling a different decoder.
For example, as shown inFIG. 1B, if the language identification module ofkeyboard module122 identifies the language associated with the text to be German,keyboard module122 may causeUI module120 to display atPSD112graphical indication117 that includes information for alerting the user thatkeyboard module122 has determined the user's inputs to be for typing German whereaskeyboard module122 is configured to translate keyboard inputs into English.Graphical indication117 indicates thatkeyboard module122 has automatically enabled a German decoder but also provides the user an opportunity to revert the reconfiguration by either clicking the undo button or going into the settings menu to manually adjust the keyboard settings.
As shown inFIG. 1C, if the language identification module ofkeyboard module122 identifies the language associated with the text to be German, keyboard module1222 may send information toUI module120 that causesPSD112 to display, within word-suggestion region119B, one or more German language word suggestions that,keyboard module122 has determined from the text. Also shown inFIG. 1C,keyboard module122, in response to determining the target language that is different than the language of the English decoder, may causeUI module120 andPSD112 to output, for display, German languagegraphical keys118B that replace the English languagegraphical keys118A. For example,keyboard module122 may send information toUI module120 that causesPSD112 to display, within word-suggestion region119B, one or more German language word suggestions that,keyboard module122 has determined from the text.Keyboard module122 may send further information toUI module120 that causesPSD112 change the layout of graphical keyboard116 to be a German, as opposed to English, language graphical keyboard.
To enable the German decoder,keyboard module122 may need to first download and install a decoder package associated with the target language. For example,keyboard module122 may request, fromdata repository module162, a German decoder package. In response to the request,keyboard module122 may receive data that once unpackaged, causeskeyboard module122 to install and enable the German decoder package including the German keyboard decoder defined by the data.
FIG. 2 is a block diagram illustrating an example computing device that includes a graphical keyboard configured to automatically reconfigure itself to decode user inputs into text of a target language determined based on the user inputs, in accordance with one or more aspects of the present disclosure.Computing device210 ofFIG. 2 is described below as an example ofcomputing device110 ofFIGS. 1A-1C.FIG. 2 illustrates only one particular example ofcomputing device210, and many other examples ofcomputing device210 may be used in other instances and may include a subset of the components included inexample computing device210 or may include additional components not shown inFIG. 2.
As shown in the example ofFIG. 2,computing device210 includesPSD212, one ormore processors240, one ormore communication units242, one ormore input components244, one ormore output components246, and one ormore storage components248. Presence-sensitive display212 includesdisplay component202 and presence-sensitive input component204.Storage components248 ofcomputing device210 includeUI module220,keyboard module222, one ormore application modules224, and one or more decoder package data stores232.Keyboard module122 may include one ormore decoder models226A-226N (collectively “decoder models226”),installer model228, andlanguage identification module230.Communication channels250 may interconnect each of thecomponents212,240,242,244,246,248,220,222,224,226,228, and230 for inter-component communications (physically, communicatively, and/or operatively). In some examples,communication channels250 may include a system bus, a network connection, an inter-process communication data structure, or any other method for communicating data.
One ormore communication units242 ofcomputing device210 may communicate with external devices via one or more wired and/or wireless networks by transmitting and/or receiving network signals on the one or more networks. Examples ofcommunication units242 include a network interface card (e.g. such as an Ethernet card), an optical transceiver, a radio frequency transceiver, a GPS receiver, or any other type of device that can send and/or receive information. Other examples ofcommunication units242 may include short wave radios, cellular data radios, wireless network radios, as well as universal serial bus (USB) controllers.
One ormore input components244 ofcomputing device210 may receive input. Examples of input are tactile, audio, and video input.Input components242 ofcomputing device210, in one example, includes a presence-sensitive input device (e.g., a touch sensitive screen, a PSD), mouse, keyboard, voice responsive system, video camera, microphone or any other type of device for detecting input from a human or machine. In some examples,input components242 may include one or more sensor components one or more location sensors (GPS components, Wi-Fi components, cellular components), one or more temperature sensors, one or more movement sensors (e.g., accelerometers, gyros), one or more pressure sensors (e.g., barometer), one or more ambient light sensors, and one or more other sensors (e.g., microphone, camera, infrared proximity sensor, hygrometer, and the like). Other sensors may include a heart rate sensor, magnetometer, glucose sensor, hygrometer sensor, olfactory sensor, compass sensor, step counter sensor, to name a few other non-limiting examples.
One ormore output components246 ofcomputing device210 may generate output. Examples of output are tactile, audio, and video output.Output components246 ofcomputing device210, in one example, includes a PSD, sound card, video graphics adapter card, speaker, cathode ray tube (CRT) monitor, liquid crystal display (LCD), or any other type of device for generating output to a human or machine.
PSD212 ofcomputing device210 may be similar toPSD112 ofcomputing device110 and includesdisplay component202 and presence-sensitive input component204.Display component202 may be a screen at which information is displayed byPSD212 and presence-sensitive input component204 may detect an object at and/ornear display component202. As one example range, presence-sensitive input component204 may detect an object, such as a finger or stylus that is within two inches or less ofdisplay component202. Presence-sensitive input component204 may determine a location (e.g., an [x, y] coordinate) ofdisplay component202 at which the object was detected. In another example range, presence-sensitive input component204 may detect an object six inches or less fromdisplay component202 and other ranges are also possible. Presence-sensitive input component204 may determine the location ofdisplay component202 selected by a user's finger using capacitive, inductive, and/or optical recognition techniques. In some examples, presence-sensitive input component204 also provides output to a user using tactile, audio, or video stimuli as described with respect to displaycomponent202. In the example ofFIG. 2,PSD212 may present a user interface (such as graphical user interfaces114 ofFIGS. 1A-1C).
While illustrated as an internal component ofcomputing device210,PSD212 may also represent an external component that shares a data path withcomputing device210 for transmitting and/or receiving input and output. For instance, in one example,PSD212 represents a built-in component ofcomputing device210 located within and physically connected to the external packaging of computing device210 (e.g., a screen on a mobile phone). In another example,PSD212 represents an external component ofcomputing device210 located outside and physically separated from the packaging or housing of computing device210 (e.g., a monitor, a projector, etc. that shares a wired and/or wireless data path with computing device210).
PSD212 ofcomputing device210 may detect two-dimensional and/or three-dimensional gestures as input from a user ofcomputing device210. For instance, a sensor ofPSD212 may detect a user's movement (e.g., moving a hand, an arm, a pen, a stylus, etc.) within a threshold distance of the sensor ofPSD212.PSD212 may determine a two or three dimensional vector representation of the movement and correlate the vector representation to a gesture input (e.g., a hand-wave, a pinch, a clap, a pen stroke, etc.) that has multiple dimensions. In other words,PSD212 can detect a multi-dimension gesture without requiring the user to gesture at or near a screen or surface at whichPSD212 outputs information for display. Instead,PSD212 can detect a multi-dimensional gesture performed at or near a sensor which may or may not be located near the screen or surface at whichPSD212 outputs information for display.
One ormore processors240 may implement functionality and/or execute instructions associated withcomputing device210. Examples ofprocessors240 include application processors, display controllers, auxiliary processors, one or more sensor hubs, and any other hardware configure to function as a processor, a processing unit, or a processing device.Modules220,222,224,226,228, and230 may be operable byprocessors240 to perform various actions, operations, or functions ofcomputing device210. For example,processors240 ofcomputing device210 may retrieve and execute instructions stored bystorage components248 that causeprocessors240 to perform theoperations modules220,222,224,226,228, and230. The instructions, when executed byprocessors240, may causecomputing device210 to store information withinstorage components248.
One ormore storage components248 withincomputing device210 may store information for processing during operation of computing device210 (e.g.,computing device210 may store data accessed bymodules220,222,224,226,228, and230 during execution at computing device210). For example, one ormore storage components248 may store decoder information at decoderpackage data store232 that, when unpackaged and installed byinstaller module228 ofkeyboard module222, enableskeyboard module222 to determine text, including candidate words in various languages, based on inputs atgraphical keyboard116B.
In some examples,storage component248 is a temporary memory, meaning that a primary purpose ofstorage component248 is not long-term storage.Storage components248 oncomputing device210 may be configured for short-term storage of information as volatile memory and therefore not retain stored contents if powered off Examples of volatile memories include random access memories (RAM), dynamic random access memories (DRAM), static random access memories (SRAM), and other forms of volatile memories known in the art.
Storage components248, in some examples, also include one or more computer-readable storage media.Storage components248 in some examples include one or more non-transitory computer-readable storage mediums.Storage components248 may be configured to store larger amounts of information than typically stored by volatile memory.Storage components248 may further be configured for long-term storage of information as non-volatile memory space and retain information after power on/off cycles. Examples of non-volatile memories include magnetic hard discs, optical discs, floppy discs, flash memories, or forms of electrically programmable memories (EPROM) or electrically erasable and programmable (EEPROM) memories.Storage components248 may store program instructions and/or information (e.g., data) associated withmodules220,222,224,226,228, and230.Storage components248 may include a memory configured to store data or other information associated withmodules220,222,224,226,228, and230.
UI module220 may include all functionality ofUI module120 ofcomputing device110 ofFIGS. 1A-1C and may perform similar operations asUI module120 for managing a user interface (e.g., user interfaces114) thatcomputing device210 provides at presence-sensitive display212 for handling input from a user. For example,UI module220 ofcomputing device210 may querykeyboard module222 for a keyboard layout.UI module220 may transmit a request for a keyboard layout overcommunication channels250 tokeyboard module222.Keyboard module222 may receive the request and reply toUI module220 with data associated with the keyboard layout thatkeyboard module222 determines is likely associated with a target language of a user.UI module220 may receive the keyboard layout data overcommunication channels250 and use the data to generate a user interface.UI module220 may transmit a display command and data overcommunication channels250 to causePSD212 to present the user interface atPSD212.
In some examples,UI module220 may receive an indication of one or more user inputs detected atPSD212 and may output information about the user inputs tokeyboard module222. For example,PSD212 may detect a user input and send data about the user input toUI module220.UI module220 may generate one or more touch events based on the detected input. A touch event may include information that characterizes user input, such as a location component (e.g., [x,y] coordinates) of the user input, a time component (e.g., when the user input was received), a force component (e.g., an amount of pressure applied by the user input), or other data (e.g., speed, acceleration, direction, density, etc.) about the user input.
Based on location information of the touch events generated from the user input,UI module220 may determine that the detected user input is associated the graphical keyboard.UI module220 may send an indication of the one or more touch events tokeyboard module222 for further interpretation.Keyboard module222 may determine, based on the touch events received fromUI module220, that the detected user input represents a selection of one or more keys of the graphical keyboard.
Application modules224 represent all the various individual applications and services executing at and accessible fromcomputing device210 that may rely on a graphical keyboard. A user ofcomputing device210 may interact with a graphical user interface associated with one ormore application modules224 to causecomputing device210 to perform a function. Numerous examples ofapplication modules224 may exist and include, a fitness application, a calendar application, a personal assistant or prediction engine, a search application, a map or navigation application, a transportation service application (e.g., a bus or train tracking application), a social media application, a game application, an e-mail application, a chat or messaging application, an Internet browser application, or any and all other applications that may execute atcomputing device210.
Keyboard module222 may include all functionality ofkeyboard module122 ofcomputing device110 ofFIGS. 1A-1C and may perform similar operations askeyboard module122 for providing a graphical keyboard configured to automatically reconfigure itself to decode user inputs into text of a target language determined based on the user inputs.Keyboard module222 may include various submodules, such as one or more decoder modules226,installer module228, andlanguage identification module230, which may perform the functionality ofkeyboard module222.
Decoder modules226 determine text from inputs detected byPSD112 at locations at whichgraphical keyboard116B is displayed. A single module226 from decoder modules226 may include a spatial model, a language model, or any other component or model used bykeyboard module222 to determine text based on keyboard inputs. For example,decoder module226A anddecoder module226N may each include a respective spatial model, a respective language model, and a respective lexicon of one or more word from a dictionary. Each of decoders226 may be associated with a language.Decoder226A may be associated with a particular language anddecoder226N may be associated with a different language.
Decoder module226A may include a spatial model configured to receive one or more touch events as input, and output text as a character or sequence of characters that likely represents the one or more touch events, along with a degree of certainty or spatial model score indicative of how likely or with what accuracy the one or more characters define the touch events. In other words, the spatial model ofdecoder module226A may infer touch events as a selection of one or more keys of a keyboard and may output, based on the selection of the one or more keys, a character or sequence of characters.
Decoder module226A may include a language model configured to receive a character or sequence of characters as input, and output one or more candidate characters, words, or phrases that the language model identifies from a lexicon (e.g., a dictionary) as being potential replacements for a sequence of characters that the language model receives as input for a given language context (e.g., a sentence in a written language).Keyboard module222 may causeUI module220 to present one or more of the candidate words determined by a language model of decoder modes226 atsuggestion region119A or119B ofuser interfaces114A or114C.
Decoder module226A may include one or more lexicons (e.g., dictionaries) of words of a language thatdecoder module226A uses to perform traditional text-entry (e.g., auto-completion, auto-correction, spell check, word suggestion, etc.) operations. The lexicon may include a list of words within a written language vocabulary (e.g., a dictionary). For instance, the lexicon may include a database of words (e.g., words in a standard dictionary and/or words added to a dictionary by a user or computing device210). A language model ofdecoder module226A may perform a lookup in the lexicon, of a character string, to determine one or more letters, words, and/or phrases that include parts or all of the characters of the character string.
Decoderpackage data stores232 is similar to and includes all the functionality of decoder package data stores123. Decoderpackage data stores232 includesdecoder package234A-234N (collectively “decoder packages234”). Each of decoder packages234 is associated with a different language and includes instructions that, when installed as part of keyboard module222 (e.g., as one of decoder modules226), enableskeyboard module222 to produce a keyboard layout in the language and decode keyboard inputs into the language associated with that decoder package.Installer module228 is configured to install decoder packages234 that are downloaded and/or stored atdata store232.Installer module228 may unpackaged one of decoder packages234 to produce a respective one of decoder modules226.
For example,decoder package234A may be associated with the Danish language. Whendecoder package234A is installed and enabled byinstaller module228,installer module228 may generatedecoder module226A.Decoder module226A ofkeyboard module222 may causePSD212 to display a Danish keyboard layout forgraphical keyboard116B and may interpret inputs detected atkeyboard116B into text in the written Danish language.
Language identification module230 is a machine-learned model (e.g., a long-short-term-memory-network or “LSTM network”) executing as part ofkeyboard module222 for determining what one or more target languages that a user is typing in when providing inputs at graphical keyboard116, and whether any of the one or more target languages are unsupported by one of decoder modules226.Language identification module230 may be divided into multiple levels of technology that act together to determine what one or more target languages that a user is typing in when providing inputs at graphical keyboard116.
A first level may be the core identification engine configured to return a probabilistic result (e.g., a probability or other numerical value indicative of a degree of likelihood) that classifies a piece of text into a particular language from a pre-defined set of languages known tomodule230. For example,language identification module230 may determine, for each of a plurality of potential languages, a respective degree of likelihood or probability that the potential language is the target language of the text.Language identification module230 may determine that the one or more potential languages from the plurality of potential languages with the highest respective degree of likelihoods are the target languages of the text.
The machine-learned model oflanguage identification module230 may be any supervised machine learning model. In some examples however, to achieve high accuracy, certain types of models may be better than others. For example, while a larger model, like a translation model executing at a server to provide on-demand translation service to the Internet, a smaller model that condenses the information of a large model may execute faster and with less memory, processing, and/or storage requirements. A smaller model that is trained to mimic the outputs of a larger model may execute faster and cheaper (e.g., from a computing resources perspective). For example, a recurrent neural network, such as a LSTM network trained with a cross-entropy criterion to predict the corresponding language may be used to determine a language from text. Rather than require a long input stream of text and compare the input stream to a plurality of different languages, the LSTM can use shorter portions of text input and execute faster by simply approximating the larger model's output.
The machine-learned model oflanguage identification module230 may be trained on various types of user information, such as which application a user is currently using, a user's typing history, or other kinds of information that may improve a target language determination. Context information may be used (e.g., location and time ofcomputing device210, current activity being performed by the user ofcomputing device210, sensor information obtained by computingdevice210, etc.) to train the machine-learned model oflanguage identification module230 to improve target language determinations.
Language identification module230 may only make use of user information (e.g., content logs, user information, context information, etc.) about users ofcomputing device210 and/or users of other computing devices after receiving explicit permission to do so. In other words,language identification module230 may be restricted from using information about a user to determine a target language, until computingdevice210 obtains clear and unambiguous consent from the user to make use of and analyze information about the user andcomputing device210. For example,computing device210 may causePSD212 to present a prompt asking the user to affirmatively give permission forcomputing device210 to evaluate information about the user,computing device210, and information thatcomputing device210 receives that is to be presented to the user. The user may check a box in settings menu or affirmatively reply to the prompt to provide his or her consent.Computing device210 may enable to the user to withdraw his or her consent at any time by unchecking the box or providing some other type of input to withdraw consent.
To reflect the real-world behavior of a large model, the model used bylanguage identification module230 may be trained based on data (e.g., content logs) received by keyboard applications executing at other computing devices. Said differently, the model oflanguage identification module230 may be trained based on user inputs (e.g., content logs) received by other keyboard applications executing at other computing devices.Language identification module230 may be trained based on real-world data (e.g., content logs or other application data) obtained from keyboard applications executing on other computing devices to learn how users of the other computing devices provide inputs to their keyboards to type in a target language, without necessarily worrying about what the users are specifically typing (as far as content is concerned). In this way,language identification module230, by executing a smaller model, need not necessarily translate text or compare the text to all the words of a plurality of languages to determine the target language of the input. Using machine-learning on the input, the model oflanguage identification module230 may determine the language of the text using rules trained on previous inputs to infer what language is a user's target language.
A second level oflanguage identification module230 may be a layer of restrictions to ensure that performance is balanced for accuracy. That is,language identification module230 may refrain from determining the target language of text inputs unless it determines a characteristic of the text satisfies a threshold for determining the target language of the text. The characteristic of the text may be a byte-length of the text, a minimum number of words associated with the text (e.g., as defined by a quantity of space delimiters in the text), and/or an average log probability associated with a frame of the text.Language identification module230 may tune thresholds associated with one or more of these characteristics to achieve a balance of performance and accuracy.
FIG. 3 is a block diagram illustrating an example computing device that outputs graphical content for display at a remote device, in accordance with one or more techniques of the present disclosure. Graphical content, generally, may include any visual information that may be output for display, such as text, images, a group of moving images, to name only a few examples. The example shown inFIG. 3 includes acomputing device310, aPSD312,communication unit342,projector380,projector screen382,mobile device386, andvisual display component390. In some examples,PSD312 may be a presence-sensitive display as described inFIGS. 1-2. Although shown for purposes of example inFIGS. 1 and 2 as a stand-alone computing device110 and210, respectively, a computing device such ascomputing device310 may, generally, be any component or system that includes a processor or other suitable computing environment for executing software instructions and, for example, need not include a presence-sensitive display.
As shown in the example ofFIG. 3,computing device310 may be a processor that includes functionality as described with respect toprocessors240 inFIG. 2. In such examples,computing device310 may be operatively coupled toPSD312 by acommunication channel362A, which may be a system bus or other suitable connection.Computing device310 may also be operatively coupled tocommunication unit342, further described below, by acommunication channel362B, which may also be a system bus or other suitable connection. Although shown separately as an example inFIG. 3,computing device310 may be operatively coupled toPSD312 andcommunication unit342 by any number of one or more communication channels.
In other examples, such as illustrated previously by computingdevices110 and210 inFIGS. 1 and 2, respectively, a computing device may refer to a portable or mobile device such as mobile phones (including smart phones), laptop computers, etc. In some examples, a computing device may be a desktop computer, tablet computer, smart television platform, camera, personal digital assistant (PDA), server, or mainframes.
PSD312 may includedisplay component302 and presence-sensitive input component304.Display component302 may, for example, receive data fromcomputing device310 and display the graphical content. In some examples, presence-sensitive input component304 may determine one or more user inputs (e.g., continuous gestures, multi-touch gestures, single-touch gestures) atPSD312 using capacitive, inductive, and/or optical recognition techniques and send indications of such user input tocomputing device310 usingcommunication channel362A. In some examples, presence-sensitive input component304 may be physically positioned on top ofdisplay component302 such that, when a user positions an input unit over a graphical element displayed bydisplay component302, the location at which presence-sensitive input component304 corresponds to the location ofdisplay component302 at which the graphical element is displayed.
As shown inFIG. 3,computing device310 may also include and/or be operatively coupled withcommunication unit342.Communication unit342 may include functionality ofcommunication unit242 as described inFIG. 2. Examples ofcommunication unit342 may include a network interface card, an Ethernet card, an optical transceiver, a radio frequency transceiver, or any other type of device that can send and receive information. Other examples of such communication units may include Bluetooth, 3G, and WiFi radios, Universal Serial Bus (USB) interfaces, etc.Computing device310 may also include and/or be operatively coupled with one or more other devices (e.g., input devices, output components, memory, storage devices) that are not shown inFIG. 3 for purposes of brevity and illustration.
FIG. 3 also illustrates aprojector380 andprojector screen382. Other such examples of projection devices may include electronic whiteboards, holographic display components, and any other suitable devices for displaying graphical content.Projector380 andprojector screen382 may include one or more communication units that enable the respective devices to communicate withcomputing device310. In some examples, the one or more communication units may enable communication betweenprojector380 andprojector screen382.Projector380 may receive data fromcomputing device310 that includes graphical content.Projector380, in response to receiving the data, may project the graphical content ontoprojector screen382. In some examples,projector380 may determine one or more user inputs (e.g., continuous gestures, multi-touch gestures, single-touch gestures) at projector screen using optical recognition or other suitable techniques and send indications of such user input using one or more communication units tocomputing device310. In such examples,projector screen382 may be unnecessary, andprojector380 may project graphical content on any suitable medium and detect one or more user inputs using optical recognition or other such suitable techniques.
Projector screen382, in some examples, may include a presence-sensitive display384. Presence-sensitive display384 may include a subset of functionality or all of the functionality of presence-sensitive display112,212, and/or312 as described in this disclosure. In some examples, presence-sensitive display384 may include additional functionality. Projector screen382 (e.g., an electronic whiteboard), may receive data fromcomputing device310 and display the graphical content. In some examples, presence-sensitive display384 may determine one or more user inputs (e.g., continuous gestures, multi-touch gestures, single-touch gestures) atprojector screen382 using capacitive, inductive, and/or optical recognition techniques and send indications of such user input using one or more communication units tocomputing device310.
FIG. 3 also illustratesmobile device386 andvisual display component390.Mobile device386 andvisual display component390 may each include computing and connectivity capabilities. Examples ofmobile device386 may include e-reader devices, convertible notebook devices, hybrid slate devices, etc. Examples ofvisual display component390 may include other devices such as televisions, computer monitors, etc. In some examples,visual display component390 may be a vehicle cockpit display or navigation display (e.g., in an automobile, aircraft, or some other vehicle). In some examples,visual display component390 may be a home automation display or some other type of display that is separate fromcomputing device310.
As shown inFIG. 3,mobile device386 may include a presence-sensitive display388.Visual display component390 may include a presence-sensitive display392. Presence-sensitive displays388,392 may include a subset of functionality or all of the functionality of presence-sensitive display112,212, and/or312 as described in this disclosure. In some examples, presence-sensitive displays388,392 may include additional functionality. In any case, presence-sensitive display392, for example, may receive data fromcomputing device310 and display the graphical content. In some examples, presence-sensitive display392 may determine one or more user inputs (e.g., continuous gestures, multi-touch gestures, single-touch gestures) at projector screen using capacitive, inductive, and/or optical recognition techniques and send indications of such user input using one or more communication units tocomputing device310.
As described above, in some examples,computing device310 may output graphical content for display atPSD312 that is coupled tocomputing device310 by a system bus or other suitable communicationchannel Computing device310 may also output graphical content for display at one or more remote devices, such asprojector380,projector screen382,mobile device386, andvisual display component390. For instance,computing device310 may execute one or more instructions to generate and/or modify graphical content in accordance with techniques of the present disclosure.Computing device310 may output the data that includes the graphical content to a communication unit ofcomputing device310, such ascommunication unit342.Communication unit342 may send the data to one or more of the remote devices, such asprojector380,projector screen382,mobile device386, and/orvisual display component390. In this way,computing device310 may output the graphical content for display at one or more of the remote devices. In some examples, one or more of the remote devices may output the graphical content at a presence-sensitive display that is included in and/or operatively coupled to the respective remote devices.
In some examples,computing device310 may not output graphical content atPSD312 that is operatively coupled tocomputing device310. In other examples,computing device310 may output graphical content for display at both aPSD312 that is coupled tocomputing device310 bycommunication channel362A, and at one or more remote devices. In such examples, the graphical content may be displayed substantially contemporaneously at each respective device. For instance, some delay may be introduced by the communication latency to send the data that includes the graphical content to the remote device. In some examples, graphical content generated by computingdevice310 and output for display atPSD312 may be different than graphical content display output for display at one or more remote devices.
Computing device310 may send and receive data using any suitable communication techniques. For example,computing device310 may be operatively coupled toexternal network374 usingnetwork link373A. Each of the remote devices illustrated inFIG. 3 may be operatively coupled to networkexternal network374 by one ofrespective network links373B,373C, or373D.External network374 may include network hubs, network switches, network routers, etc., that are operatively inter-coupled thereby providing for the exchange of information betweencomputing device310 and the remote devices illustrated inFIG. 3. In some examples, network links373A-373D may be Ethernet, ATM or other network connections. Such connections may be wireless and/or wired connections.
In some examples,computing device310 may be operatively coupled to one or more of the remote devices included inFIG. 3 usingdirect device communication378.Direct device communication378 may include communications through whichcomputing device310 sends and receives data directly with a remote device, using wired or wireless communication. That is, in some examples ofdirect device communication378, data sent by computingdevice310 may not be forwarded by one or more additional devices before being received at the remote device, and vice-versa. Examples ofdirect device communication378 may include Bluetooth, Near-Field Communication, Universal Serial Bus, WiFi, infrared, etc. One or more of the remote devices illustrated inFIG. 3 may be operatively coupled withcomputing device310 bycommunication links376A-376D. In some examples,communication links376A-376D may be connections using Bluetooth, Near-Field Communication, Universal Serial Bus, infrared, etc. Such connections may be wireless and/or wired connections.
In accordance with techniques of the disclosure,computing device310 may be operatively coupled tovisual display component390 usingexternal network374.Computing device310 may output, for display atPSD312, a graphical user interface including an edit region and a graphical keyboard the graphical keyboard including a plurality of For instance,computing device310 may send data that includes a representation of the graphical user interface tocommunication unit342.Communication unit342 may send the data that includes the representation of the graphical user interface tovisual display component390 usingexternal network374.Visual display component390, in response to receiving the data usingexternal network374, may causePSD312 to output the graphical user interface. In response to receiving a user input atPSD312 to select one or more keys of the keyboard of the graphical user interface,visual display device130 may send an indication of the selection of the one or more keys tocomputing device310 usingexternal network374.Communication unit342 of may receive the indication of the selection of the one or more keys, and send the indication of the selection of the one or more keys tocomputing device310.
While receiving the indication of the selection of the one or more keys,computing device310 may determine, using a first decoder of a keyboard application executing atcomputing device310 and based on a selection of one or more keys of the graphical keyboard, text. Responsive to determining that a characteristic of the text satisfies a threshold for determining a target language of the text, a machine-learned model of the keyboard application executing atcomputing device310 may determine the target language of the text.
If the target language of the text is not different than a language associated with the first decoder,computing device310 may output, for display, an indication of one or more first candidate words determined by the first decoder from the text. For example,computing device310 may send an updated representation of the graphical user interface that includes the one or more candidate words written in the language of the first decoder, within a suggestion region of the graphical keyboard.Communication unit342 may receive the representation of the updated graphical user interface and may send the updated representation tovisual display component390, such thatvisual display component390 may causePSD312 to output the updated graphical user interface, including the candidate words displayed within the suggestion region of the graphical keyboard.
If the target language of the text is different than the language associated with the first decoder: computingdevice310 may enable a second decoder of the keyboard application wherein has a language associated with the second decoder matches the target language of the text, and may output, for display, an indication of one or more second candidate words determined by the second decoder from the text. For example,computing device310 may send an updated representation of the graphical user interface that includes the one or more candidate words written in the language of the second decoder within the suggestion region of the graphical keyboard.Computing device310 may also send an updated layout of the graphical keys that is associated with the language of the second decoder.Communication unit342 may receive the representation of the updated graphical user interface and may send the updated representation tovisual display component390, such thatvisual display component390 may causePSD312 to output the updated graphical user interface, including the candidate words displayed within the suggestion region of the graphical keyboard and the updated layout of the graphical keys.
FIG. 4 is a flowchart illustrating example operations of a computing device that includes a graphical keyboard configured to automatically reconfigure itself to decode user inputs into text of a target language determined based on the user inputs, in accordance with one or more aspects of the present disclosure. The operations ofFIG. 4 may be performed by one or more processors of a computing device, such ascomputing devices110 ofFIG. 1 orcomputing device210 ofFIG. 2. For purposes of illustration only,FIG. 4 is described below within the context ofcomputing devices110 ofFIGS. 1A-1C.
In operation,computing device110 may output, for display, a graphical keyboard (400). For example,keyboard module122 may send instructions toUI module120 that causesPSD112 to presentuser interface114A.
Computing device110 may determine, using a first decoder and based on a selection of one or more keys of the graphical keyboard, text (410). For example, using an English language decoder,keyboard module122 may process input information received fromUI module120 about touch inputs detected atPSD112 at or near locations ofPSD112 at whichgraphical keys118A are displayed.
Computing device110 may determine whether a characteristic of the text satisfies a threshold for determining a target language of the text (420). For example,keyboard module122 may determine whether the user has provided sufficient text input to make verifying the language configuration of keyboard module122 a worthwhile and not overly consuming process that could detract from usability or efficiency of the system.Keyboard module122 may determine, after detecting a sufficient quantity of text (e.g., minimum quantity of words and/or byte-length), to verify whether the decoder being used matches the target language of the input (420, YES branch). Otherwise,computing device110 will continue to determine text using the first decoder (420, NO branch).
Responsive to determining that the characteristic of the text satisfies the threshold for determining the target language of the text,computing device110 may determine, using a machine-learned model, the target language of the text (430). For example, a LSTM network ofkeyboard module122 may determine the target language of the text using rules developed from content log data obtained and analyzed from keyboard applications executing at other devices. The LSTM network may approximate the output of a large-scale machine-learning system executing at a remote computing device without necessarily performing the same analysis on the text input.
Computing device110 may determine whether the target language is different than the first decoder (440). If the target language of the text is not different than a language associated with the first decoder (440, NO branch),computing device110 may output an indication of one or more first candidate words determined by the first decoder from the text. In other words, if the determined language corresponds to the language of the decoder used bykeyboard module122,keyboard module122 may causeUI module120 to display candidate words determined by the first decoder atPSD112.
If the target language of the text is different than the language associated with the first decoder (440, YES branch),computing device110 may enable, a second decoder, wherein a language associated with the second decoder matches the target language of the text, and output an indication of one or more second candidate words determined by the second decoder from the text. For example,keyboard module122 may enable a different decoder that can handle processing input in the target language. In some cases,keyboard module122 may output a graphical indication to allow the user to approve or deny the enablement of the second decoder.
In some examples,computing device110 may enable the second decoder comprises by downloading, by the keyboard application, from a remote computing system, a decoder package that includes instructions for executing the second decoder, installing, by the keyboard application, the decoder package. For example,keyboard module122 may request and obtain a decoder package fromISS160 and in response to obtaining the decoder package, unpack and install the decoder defined by the package so that subsequent text can be decoded using the decoder from the newly obtained and installed decoder package.
FIGS. 5-7 are conceptual diagrams illustrating example graphical user interfaces of an example computing device that includes a graphical keyboard configured to automatically reconfigure itself to decode user inputs into text of a target language determined based on the user inputs, in accordance with one or more aspects of the present disclosure.FIGS. 5-7 illustrate, respectively,example user interfaces514,614, and714. Each ofuser interfaces514,614, and714 may correspond to a graphical user interface displayed by computingdevices110,210, or310 ofFIGS. 1, 2, and 3 respectively.
FIG. 5 shows anexample user interface514 that represents a page of a settings menu associated withcomputing device110 and/orkeyboard module122. As shown insettings option590, a user may be provided with an opportunity to control whetherkeyboard module122 analyzes the keyboard inputs detected atPSD112 for a language. By selectingoption590, the user may enable target language detection and by unselectingoption590, the user may disable target language detection.
FIG. 6 shows anexample user interface614 that includesoutput region616A, editregion616C, andgraphical keyboard616B.User interface614 shows how, after determining that the target language of the text inferred from inputs at a first graphical keyboard,keyboard module122 may causeUI module120 andUID112 to display a second graphical keyboard associated with the target language that replaces the first graphical keyboard. In other words, if the graphical keyboard initially shown by computingdevice110 was an English language keyboard (e.g.,116B),keyboard module122 may causecomputing device110 to display aGerman language keyboard616B that replaces the English language keyboard. As shown in the example ofFIG. 6,spacebar key690 ofgraphical keys618 includes an indication the target language and the language of the first decoder to indicate that one or more decoders are enabled.
FIG. 7 showsuser interface714 that includesoutput region716A, editregion716C, andgraphical keyboard716B.User interface714 shows how after determining that the target language of the text inferred from inputs differs from the decoder, and then after enabling a second decoder to correspond to the target language,computing device110 may determine at least one other target language of text inferred from user inputs and may enable the at least one third decoder in response. In other words,keyboard module122 may periodically determine whether the target language of user inputs corresponds to one of the enabled decoders and if not,keyboard module122 may enable a decoder to handle it. As shown in the example ofFIG. 7,spacebar key790 ofgraphical keys718 includes an indication of three decoders (EN, DE, and FR) being enabled simultaneously in response to determining that the user ofcomputing device110 is multilingual and typing in each of English, German, and French, atuser interface714.
The following numbered clauses may illustrate one or more aspects of the disclosure:
Clause 1. A method comprising: outputting, by a keyboard application executing at a computing device, for display, a graphical keyboard; determining, by the keyboard application, using a first decoder and based on a selection of one or more keys of the graphical keyboard, text; responsive to determining that a characteristic of the text satisfies a threshold for determining a target language of the text, determining, by a machine-learned model of the keyboard application, the target language of the text; determining whether the target language is different than a language associated with the first decoder; if the target language of the text is not different than a language associated with the first decoder, outputting, by the keyboard application, for display, an indication of one or more first candidate words determined by the first decoder from the text; and if the target language of the text is different than the language associated with the first decoder: enabling, by the keyboard application, a second decoder, wherein a language associated with the second decoder matches the target language of the text; and outputting, by the keyboard application, for display, an indication of one or more second candidate words determined by the second decoder from the text.
Clause 2. The method of clause 1, further comprising: training, by the keyboard application, the machine-learned model based on user inputs received by other keyboard applications executing at other computing devices, wherein the second decoder was enabled by at least some of the other keyboard applications while receiving the user inputs.
Clause 3. The method of any one of clauses 1 or 2, wherein the characteristic of the text is a byte-length of the text.
Clause 4. The method of any one of clauses 1-3, wherein the characteristic of the text is a minimum number of words associated with the text.
Clause 5. The method of any one of clauses 1-4, wherein the characteristic of the text is an average log probability associated with the text.
Clause 6. The method of any one of clauses 1-5, wherein determining the target language of the text comprises: determining, by the machine-learned model, for each of a plurality of potential languages, a respective degree of likelihood that the potential language is the target language of the text; and determining, by the machine-learned model, that the potential language from the plurality of potential languages with the highest respective degree of likelihood is the target language of the text.
Clause 7. The method of any one of clauses 1-6, wherein the machine-learned model is a long short-term memory network.
Clause 8. The method of any one of clauses 1-7, wherein enabling the second decoder comprises: downloading, by the keyboard application, from a remote computing system, a decoder package that includes instructions for executing the second decoder; and installing, by the keyboard application, the decoder package.
Clause 9. The method of any one of clauses 1-8, wherein the graphical keyboard comprises a first graphical keyboard associated with the language of the first decoder, the method further comprising: outputting, by the keyboard application, for display, a second graphical keyboard associated with the target language that replaces the first graphical keyboard.
Clause 10. The method of clause 9, wherein a respective character of at least one key of the second graphical keyboard is different than a respective character of a corresponding key of the first graphical keyboard.
Clause 11. The method of any one of clauses 9 or 10, wherein a spacebar key of the second graphical keyboard includes an indication the target language.
Clause 12. The method of clause 11, wherein the spacebar key of the second graphical keyboard further includes an indication the language of the first decoder.
Clause 13. The method of any one of clauses 1-13, further comprising: enabling, by the keyboard application, at least one third decoder in response to determining at least one other target language of the text.
Clause 14. The method of any one of clauses 1-13, wherein enabling the second decoder comprises: outputting, by the keyboard application, for display, a graphical indication overlaying at least a portion of the graphical keyboard indicating that the second decoder is enabled.
Clause 15. A mobile device comprising: a presence-sensitive display component; at least one processor; and a memory that stores instructions for a keyboard application that, when executed, cause the at least one processor to: output, for display at the presence-sensitive display, a graphical keyboard; determine, using a first decoder and based on a selection of one or more keys of the graphical keyboard, text; responsive to determining that a characteristic of the text satisfies a threshold for determining a target language of the text, determine, using a machine-learned model, the target language of the text; determine whether the target language is different than the language associated with the first decoder; if the target language of the text is not different than a language associated with the first decoder, output, for display at the presence-sensitive display, an indication of one or more first candidate words determined by the first decoder from the text; and if the target language of the text is different than the language associated with the first decoder: enable, a second decoder, wherein a language associated with the second decoder matches the target language of the text; and output, for display at the presence-sensitive display, an indication of one or more second candidate words determined by the second decoder from the text.
Clause 16. The mobile device of clause 15, wherein the instructions, when executed, further cause the at least one processor to train the machine-learned model based on user inputs received by other keyboard applications executing at other computing devices, wherein the second decoder was enabled by at least some of the other keyboard applications while receiving the user inputs.
Clause 17. The mobile device of any one of clauses 15 or 16, wherein the characteristic of the text is a byte-length of the text or a minimum number of words associated with the text.
Clause 18. A computer-readable storage medium comprising instructions for a keyboard application that when executed cause at least one processor of a computing device to: output, for display, a graphical keyboard; determine, using a first decoder and based on a selection of one or more keys of the graphical keyboard, text; responsive to determining that a characteristic of the text satisfies a threshold for determining a target language of the text, determine, using a machine-learned model, the target language of the text; determine whether the target language is different than a language associated with the first decoder; if the target language of the text is not different than the language associated with the first decoder, output, for display, an indication of one or more first candidate words determined by the first decoder from the text; and if the target language of the text is different than the language associated with the first decoder: enable, a second decoder, wherein a language associated with the second decoder matches the target language of the text; and output, for display, an indication of one or more second candidate words determined by the second decoder from the text.
Clause 19. The computer-readable storage medium of clause 18, wherein the instructions, when executed, further cause the at least one processor to train the machine-learned model based on user inputs received by other keyboard applications executing at other computing devices, wherein the second decoder was enabled by at least some of the other keyboard applications while receiving the user inputs.
Clause 20. The computer-readable storage medium of any one of clauses 18 or 19, wherein the characteristic of the text is a byte-length of the text or a minimum number of words associated with the text.
Clause 21. A system comprising means for performing any of the methods of clauses 1-14.
Clause 22. A computing device comprising means for performing any of the methods of clauses 1-14.
In one or more examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof If implemented in software, the functions may be stored on or transmitted over, as one or more instructions or code, a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to a tangible medium such as data storage media, or communication media including any medium that facilitates transfer of a computer program from one place to another, e.g., according to a communication protocol. In this manner, computer-readable media generally may correspond to (1) tangible computer-readable storage media, which is non-transitory or (2) a communication medium such as a signal or carrier wave. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, code and/or data structures for implementation of the techniques described in this disclosure. A computer program product may include a computer-readable medium.
By way of example, and not limitation, such computer-readable storage media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage, or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. It should be understood, however, that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but are instead directed to non-transient, tangible storage media. Disk and disc, as used, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
Instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Accordingly, the term “processor,” as used may refer to any of the foregoing structure or any other structure suitable for implementation of the techniques described. In addition, in some aspects, the functionality described may be provided within dedicated hardware and/or software modules. Also, the techniques could be fully implemented in one or more circuits or logic elements.
The techniques of this disclosure may be implemented in a wide variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC) or a set of ICs (e.g., a chip set). Various components, modules, or units are described in this disclosure to emphasize functional aspects of devices configured to perform the disclosed techniques, but do not necessarily require realization by different hardware units. Rather, as described above, various units may be combined in a hardware unit or provided by a collection of interoperative hardware units, including one or more processors as described above, in conjunction with suitable software and/or firmware.
Various examples have been described. These and other examples are within the scope of the following claims.