Remote and local predictions

The description relates to predicting terms based on text inputted by a user. One example includes a computing device comprising a processor configured to send, over a communications network, the text to a remote prediction engine. The processor is configured to send the text to a local prediction engine stored at the computing device, and to monitor for a local predicted term from the local prediction engine and a remote predicted term from the remote prediction engine, in response to the sent text. The computing device includes a user interface configured to present a final predicted term to the user such that the user is able to select the final term. The processor is configured to form the final predicted term using either the remote predicted term or the local predicted term on the basis of a time interval running from the time at which the user input the text.

BACKGROUND

Predictive emoji keyboards predict emoji based on what the user has typed. The words and phrases typed by the user are used as inputs for a prediction model and the prediction model is used to generate one or more predicted emoji to be presented to the user. For example, referring toFIG. 1, a user might provide input text10“Running late, be home in 30 mins” using a personal computing device12, and the device12subsequently presents predicted emoji14,16and18to the user based on the input text10.

Typically the prediction model is large and the process of calculating predictions using the model is Random Access Memory (RAM)-intensive. This is not suitable for a personal computing device which has a limited hard drive and limited RAM. As a result, the prediction model is stored on a server and the computing device requests predictions over a communications network. In this approach, predictions are not available to the computing device until they have been received from the server. This introduces a delay due to the lag involved in network communication. If the delay is long enough it can be quite noticeable to the user.

SUMMARY

The following presents a simplified summary of the disclosure in order to provide a basic understanding to the reader. This summary is not intended to identify key features or essential features of the claimed subject matter nor is it intended to be used to limit the scope of the claimed subject matter. Its sole purpose is to present a selection of concepts disclosed herein in a simplified form as a prelude to the more detailed description that is presented later.

The description relates to predicting terms based on text inputted by a user. One example can include a computing device comprising a memory storing text that the user has inputted to the computing device. The computing device also includes a processor configured to send, over a communications network, the text to a remote prediction engine having been trained to predict terms from text. The processor is also configured to send the text to a local prediction engine stored at the computing device. The processor is configured to monitor for a local predicted term from the local prediction engine and to monitor for a remote predicted term from the remote prediction engine, in response to the sent text. The computing device also includes a user interface configured to present a final predicted term to a user of the computing device such that the user is able to select the final term to enter the final predicted term into the computing device. The processor is configured to form the final predicted term using either the remote predicted term or the local predicted term on the basis of a time interval running from the time at which the user input the text.

DETAILED DESCRIPTION

The detailed description provided below in connection with the appended drawings is intended as a description of the present examples and is not intended to represent the only forms in which the present example are constructed or utilized. The description sets forth the functions of the example and the sequence of operations for constructing and operating the example. However, the same or equivalent functions and sequences may be accomplished by different examples.

The present disclosure presents a technique for forming a final predicted term based on text input from a user. The final predicted term is formed using a term predicted remotely or a term predicted locally.

Referring toFIG. 2, a system for implementing the technique comprises a computing device20having a local prediction engine22and a server24having a remote prediction engine26. The computing device20communicates with the server24using a communications network28such as the Internet.

The remote prediction engine26of the server24uses a remote prediction model. This is suitably a large file that supports a large vocabulary of input text, and the remote prediction engine26is RAM-intensive to run.

By contrast, the local prediction engine22of the computing device20uses a local prediction model which is related to the remote prediction model but is generally smaller, for example a subset of the remote prediction model. This may exclude rarely used words and therefore may not be able to predict emoji for rare input text, but the model is faster to download during app installation and the execution of the local prediction engine using the smaller local prediction model is less RAM-intensive. The local prediction model may have a special format arranged to reduce the RAM required to use it.

The predictions from the server24are considered to be better predictions, but they generally take longer that those generated locally at the computing device20because of the lag involved in network communication.

The present disclosure includes a technique for combining the two sources of predictions: the local predictions generated at the computing device20and the remote predictions generated at the server24.

Referring toFIG. 3, a method30of combining the two sources of predictions will now be described. Text input is received31by the computing device20from the user. The computing device20then runs two processes, for example in parallel. In the first process, the computing device20transmits32the inputted text to the server24over the communication network28. The computing device20then monitors33for a remote prediction term provided to the computing device20by the server24over the communication network28. In the second process, the computing device20sends34the inputted text to the local prediction engine22. The computing device20then monitors35for a local predicted term generated by the local prediction engine22.

Having performed the first and second processes, the computing device20forms36a final prediction term on the basis of a time interval running from the time at which the user inputted the input text. An example of this will be described below. After forming the final predicted term, the computing device20presents37the final predicted term to the user, for example in a similar way as shown for the predicted terms14,16and18inFIG. 1.

Referring toFIG. 4, further a method40of combining the two sources of predictions will now be described. The method40may be considered as an example of the method30because it provides further details of the step of forming36a final predicted term on the basis of a time interval.

In method40, the steps31to35are the same as method30, so the description of these steps will not be repeated. In the method40, after or during the monitoring steps33and35, the computing device20forms42a final predicted term on the basis of a remote predicted term received from the server24over the communications network28if the remote predicted term is received by the computing device20in a time interval running from the time the user inputted the input text.

If a remote predicted term is not received by the computing device20in the time interval, but a local predicted term is received from the local prediction engine22of the computing device20in the time interval, the computing device20forms44a final predicted term on the basis of the local predicted term.

If a remote predicted term is not received in the time interval and a local predicted term is not received in the time interval, the computing device20forms46a final predicted term on the basis of a first prediction term to arrive—i.e. whichever of a remote predicted term or a local predicted term arrives first. It is noted that if the remote prediction fails, then, assuming the local prediction does not fail, the local prediction term will arrive first (and the remote prediction term will not arrive at all). In this case the computing device20forms46a final predicted term on the basis of the local prediction term. This scenario provides a back-up in case the computing device20loses connection to the communications network28.

Finally, the computing device20presents48the final predicted term to the user.

This approach makes use of both remote and local sources of prediction terms and strikes a balance between displaying predictions to the user within a reasonable time period and avoiding changing the displayed predictions (e.g. from local to remote) once they have been presented to the user. A suitable time interval is 0.45 seconds. This is short enough for the user not to be aware that they are waiting for something. It also results in approximately 75% of the presented predictions being remote predictions and approximately 25% being local predictions. Other suitable time intervals can be used, for example time intervals within the range 80 milliseconds to 1000 milliseconds.

The time interval could be dynamic by being varied based on various parameters such as the speed or type of a connection of the computing device to a communications network, the location of the computing device, or user preferences. In some examples, an input means is provided enabling the user to “upgrade” to remote predictions if the computing device initially presents local predicted terms when implementing method40.

A computing device50suitable for implementing the methods30and40is shown inFIG. 5. The computing device50comprises a processor52, a communication interface54, an input/output controller56, a primary memory58such as RAM, and a secondary memory60such as a hard-disk. The secondary memory60stores an operating system62, a local prediction engine64and a local prediction model66.

A further method70according to the disclosure will now be described in relation toFIG. 6andFIG. 7. The method70may be performed by a computing device such as computing device20.

Referring toFIG. 6, input text67“I am go” may be used to generate n-grams68. An n-gram is a sequence of n written language components (usually words, sometimes including characters such as punctuation characters or emoji), where n can be any whole, positive number. For example, an n-gram may be a word, phrase, or part of a phrase occurring in the text input. In the example ofFIG. 6, six n-grams can be generated from the input text67“I am go”.

Referring toFIG. 7, the method70comprises receiving31text input from the user and determining71the number of n-grams in the text input. If the number of n-grams is above a threshold, the computing device20implements the first process as described above (i.e. steps32and33) and forms74a final predicted term on the basis of a remote predicted term. If the number of n-grams is not above the threshold, the computing device20implements the second process as described above (i.e. steps34and35) and forms77a final predicted term on the basis of a local predicted term.

Finally, the computing device20presents78the final predicted term to the user.

A further method80according to the disclosure will now be described in relation toFIG. 8. The method80may be performed by a computing device such as computing device20.

Referring toFIG. 8, the method80comprises the steps31to35as described above, so the description of these steps will not be repeated here. The method80then comprises presenting82a predicted term based on a local predicted term, for example immediately after the local predicted term is received from a local prediction engine. After presenting the local predicted term, the computing device20replaces84the local predicted term with a remote predicted term unless it is determined that the user is moving a digit such as a finger towards the screen as if to select a presented local predicted term.

The technique disclosed herein could be used for any predictive keyboard, whether for words, emoji or both, or any other kind of data. In the case of predicting words, the format of the model would include delimiters to distinguish between input text and predicted text.

In the above description, the techniques are implemented using instructions provided in the form of stored software. Alternatively, or in addition, the functionality described herein is performed, at least in part, by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that are optionally used include Field-programmable Gate Arrays (FPGAs), Application-specific Integrated Circuits (ASICs), Application-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), Graphics Processing Units (GPUs).

The term ‘computer’ or ‘computing-based device’ is used herein to refer to any device with processing capability such that it executes instructions. Those skilled in the art will realize that such processing capabilities are incorporated into many different devices and therefore the terms ‘computer’ and ‘computing-based device’ each include personal computers (PCs), servers, mobile telephones (including smart phones), tablet computers, set-top boxes, media players, games consoles, personal digital assistants, wearable computers, and many other devices.

The methods described herein are performed, in some examples, by software in machine readable form on a tangible storage medium e.g. in the form of a computer program comprising computer program code means adapted to perform all the operations of one or more of the methods described herein when the program is run on a computer and where the computer program may be embodied on a computer readable medium. The software is suitable for execution on a parallel processor or a serial processor such that the method operations may be carried out in any suitable order, or simultaneously.

The term ‘subset’ is used herein to refer to a proper subset such that a subset of a set does not comprise all the elements of the set (i.e. at least one of the elements of the set is missing from the subset).

The methods herein, which involve input text from users in their daily lives, may and should be enacted with utmost respect for personal privacy. Accordingly, the methods presented herein are fully compatible with opt-in participation of the persons being observed. In embodiments where personal data is collected on a local system and transmitted to a remote system for processing, that data can be anonymized in a known manner.