This specification relates to providing handwriting input functionality on a computing device, and more specifically, to providing real-time, multi-script, stroke-order independent handwriting recognition and input functionality on a computing device.
A handwriting input method is an important alternative input method for computing devices that are equipped with touch-sensitive surfaces (e.g., touch-sensitive display screens, or touch-pads). Many users, particularly users in some Asian or Arab countries, are accustomed to writing in a cursive style, and may feel comfortable writing in longhand as opposed to typing on a keyboard.
For certain logographic writing systems, such as Hanzi and Kanji (also referred to as Chinese characters), even though alternative syllabic input methods (e.g., Pinyin or Kana) are available to enter characters of the corresponding logographic writing systems, such syllabic input methods are inadequate when the user does not know how to phonetically spell a logographic character, and uses an incorrect phonetic spelling of the logographic character. Therefore, being able to use handwriting input on a computing device becomes crucial for users who are not able to pronounce words well enough or at all for a relevant logographic writing system.
Although handwriting input functionality has gained some popularity in certain regions of the world, improvements are still needed. In particular, human handwriting is highly variable (e.g., in terms of stroke order, size, writing style, etc.), and high-quality handwriting recognition software is complex and requires extensive training. As such, providing efficient, real-time handwriting recognition on a mobile device having limited memory and computing resources has been a challenge.
Furthermore, in today's multi-cultural world, users in many countries are multi-lingual, and may frequently need to write in more than one script (e.g., writing a message in Chinese that mentions a movie title in English). However, manually switching a recognition system to a desired script or language during writing is cumbersome and inefficient. Furthermore, the utility of conventional multi-script handwriting recognition techniques is severely limited because scaling-up the recognition capability of a device to simultaneously handle multiple scripts vastly increases the complexity of the recognition system and the demand on computer resources.
In addition, conventional handwriting techniques rely heavily on language or script-specific particularities to achieve recognition accuracy. Such particularities are not easily portable to other languages or scripts. Thus, adding handwriting input capabilities for new languages or scripts is a daunting task that is not lightly undertaken by suppliers of the software and devices. As a result, users of many languages are deprived of an important alternative input method for their electronic devices.
Conventional user interfaces for providing handwriting input include an area for accepting handwriting input from the user and an area for displaying handwriting recognition results. On portable devices having a small form factor, significant improvement of the user interface is still required to improve the efficiency, accuracy, and user experience in general.
This specification describes a technique for providing multi-script handwriting recognition using a universal recognizer. The universal recognizer is trained using a large multi-script corpus of writing samples for characters in different languages and scripts. The training of the universal recognizer is language-independent, script-independent, stroke-order independent, and stroke-direction independent. Thus, the same recognizer is capable of recognizing mixed-language, mixed-script handwriting input without requiring manual switching between input languages during use. In addition, the universal recognizer is lightweight enough to be deployed as a standalone module on mobile devices to enable handwriting input in different languages and scripts used in different regions worldwide.
In addition, because the universal recognizer is trained on spatially-derived features which are stroke-order independent and stroke-direction independent, and require no temporal or sequence information at the stroke-level, the universal recognizer provides numerous additional features and advantages over conventional temporally-based recognition methods (e.g., recognition methods based on the Hidden Markov Method (HMM)). For example, the user is permitted to enter the strokes of one or more characters, phrases, and sentences in any order, and still obtain the same recognition results. Thus, out-of-order multi-character input, and out-of-order corrections (e.g., additions or rewrites) of earlier-entered characters are now possible.
Furthermore, the universal recognizer is used for real-time handwriting recognition, where temporal information for each stroke is available and is optionally used to disambiguate or segment the handwriting input before character recognition is performed by the universal recognizer. The real-time, stroke-order independent recognition described herein differs from conventional offline recognition methods (e.g., Optical Character Recognition (OCR)) and can offer better performance than conventional offline recognition methods. In addition, the universal recognizer described herein is able to handle high variability in individual writing habits (e.g., variability in speed, tempo, stroke-order, stroke-direction, stroke-continuity, etc.) without explicitly embedding distinguishing features of the different variations (e.g., variations in speed, tempo, stroke-order, stroke-direction, stroke-continuity, etc.) in the recognition system, thereby reducing the overall complexity of the recognition system.
As described herein, in some embodiments, temporally-derived stroke distribution information is optionally reintroduced into the universal recognizer to enhance recognition accuracy and disambiguate between similar-looking recognition outputs for the same input image. The re-introduction of the temporally-derived stroke distribution information does not destroy the stroke-order and stroke-direction independence of the universal recognizer, because the temporally-derived features and the spatially-derived features are obtained through a separate training process and are only combined in the handwriting recognition model after the separate training has been completed. Furthermore, the temporally-derived stroke distribution information is carefully designed such that it captures distinguishing temporal characteristics of similar-looking characters, without relying on explicit knowledge on the differences in the stroke-orders of the similar-looking characters.
User interfaces for providing handwriting input functionality are also described herein.
In some embodiments, a method of providing multi-script handwriting recognition includes: training a multi-script handwriting recognition model based on spatially-derived features of a multi-script training corpus, the multi-script training corpus including respective handwriting samples corresponding to characters of at least three non-overlapping scripts; and providing real-time handwriting recognition for a user's handwriting input using the multi-script handwriting recognition model that has been trained on the spatially-derived features of the multi-script training corpus.
In some embodiments, a method of providing multi-script handwriting recognition includes: receiving a multi-script handwriting recognition model, the multi-script recognition model having been trained on spatially-derived features of a multi-script training corpus, the multi-script training corpus including respective handwriting samples corresponding to characters of at least three non-overlapping scripts; receiving a handwriting input from a user, the handwriting input comprising one or more handwritten strokes provided on a touch-sensitive surface coupled to the user device; and in response to receiving the handwriting input, providing in real-time one or more handwriting recognition results to the user based on the multi-script handwriting recognition model that has been trained on the spatially-derived features of the multi-script training corpus.
In some embodiments, a method of providing real-time handwriting recognition includes: receiving a plurality of handwritten strokes from a user, the plurality of handwritten strokes corresponding to a handwritten character; generating an input image based on the plurality of handwritten strokes; providing the input image to a handwriting recognition model to perform real-time recognition of the handwritten character, wherein the handwriting recognition model provides stroke-order independent handwriting recognition; and displaying in real-time of receiving the plurality of handwritten strokes, an identical first output character irrespective of a respective order by which the plurality of handwritten strokes have been received from the user.
In some embodiments, the method further includes: receiving a second plurality of handwritten strokes from the user, the second plurality of handwritten strokes corresponding to a second handwritten character; generating a second input image based on the second plurality of handwritten strokes; providing the second input image to the handwriting recognition model to perform real-time recognition of the second handwritten character; and displaying in real-time of receiving the second plurality of handwritten strokes, a second output character corresponding to the second plurality of handwritten strokes, wherein the first output character and the second output character are concurrently displayed in a spatial sequence independent of a respective order by which the first plurality of handwriting inputs and the second plurality of handwriting inputs have been provided by the user.
In some embodiments, the second plurality of handwritten strokes spatially follow the first plurality of handwritten strokes along a default writing direction of a handwriting input interface of the user device, and the second output character follows the first output character in a spatial sequence along the default writing direction, and the method further includes: receiving a third handwritten stroke from the user to revise the handwritten character, the third handwritten stroke being received temporally after the first and the second plurality of handwritten strokes; in response to receiving the third handwritten stroke, assigning the handwritten stroke to a same recognition unit as the first plurality of handwritten strokes based on relative proximity of the third handwritten stroke to the first plurality of handwritten strokes; generating a revised input image based on the first plurality of handwritten stroke and the third handwritten stroke; providing the revised input image to the handwriting recognition model to perform real-time recognition of the revised handwritten character; and displaying in response to receiving the third handwriting input, a third output character corresponding to the revised input image, wherein the third output character replaces the first output character and is concurrently displayed with the second output character in the spatial sequence along the default writing direction.
In some embodiments, the method further includes: while the third output character and the second output character are concurrently displayed as a recognition result in a candidate display area of the handwriting input interface, receiving a deletion input from the user; and in response to the deletion input, deleting the second output character from the recognition result, while maintaining the third output character in the recognition result.
In some embodiments, rendering in real-time the first plurality of handwritten strokes, the second plurality of handwritten strokes, and the third handwritten stroke in the handwriting input area of the handwriting input interface as each of said handwritten stroke is provided by the user; and in response to receiving the deletion input, deleting a respective rendering of the second plurality of handwritten strokes from the handwriting input area, while maintaining respective renderings of the first plurality of handwritten strokes and the third handwritten stroke in the handwriting input area.
In some embodiments, a method of providing real-time handwriting recognition includes: receiving a handwriting input from a user, the handwriting input comprising one or more handwritten strokes provided in a handwriting input area of a handwriting input interface; based on a handwriting recognition model, identifying a plurality of output characters for the handwriting input; dividing the plurality of output characters into two or more categories based on a predetermined categorization criterion; displaying, in an initial view of a candidate display area of the handwriting input interface, respective output characters in a first category of the two or more categories, wherein the initial view of the candidate display area is concurrently provided with an affordance for invoking an extended view of the candidate display area; receiving a user input selecting the affordance for invoking the extended view; and in response to the user input, displaying, in the extended view of the candidate display area, the respective output characters in the first category and respective output characters in at least a second category of the two or more categories which were not previously displayed in the initial view of the candidate display area.
In some embodiments, a method of providing real-time handwriting recognition includes: receiving a handwriting input from a user, the handwriting input comprising a plurality of handwritten strokes provided in an handwriting input area of a handwriting input interface; recognizing, based on a handwriting recognition model, a plurality of output characters from the handwriting input, the output characters including at least a first emoji character and at least a first character from a script of a natural human language; and displaying a recognition result comprising the first emoji character and the first character from the script of the natural human language in a candidate display area of the handwriting input interface.
In some embodiments, a method of providing handwriting recognition includes: receiving a handwriting input from a user, the handwriting input comprising a plurality of handwritten strokes provided in a touch-sensitive surface coupled to the device; rendering, in real-time, the plurality of handwritten strokes in a handwriting input area of a handwriting input interface; receiving one of a pinch gesture input and a expand gesture input over the plurality of handwritten strokes; upon receiving a pinch gesture input, generating a first recognition result based on the plurality of handwritten strokes by treating the plurality of handwritten strokes as a single recognition unit; upon receiving a expand gesture input, generating a second recognition result based on the plurality of handwritten strokes by treating the plurality of handwritten strokes as two separate recognition units pulled apart by the expand gesture input; and upon generating a respective one of the first and second recognition results, displaying the generated recognition result in a candidate display area of the handwriting input interface.
In some embodiments, a method of providing handwriting recognition, includes: receiving a handwriting input from a user, the handwriting input comprising a plurality of handwritten strokes provided in an handwriting input area of a handwriting input interface; identifying a plurality of recognition units from the plurality of handwritten strokes, each recognition unit including a respective subset of the plurality of handwriting strokes; generating a multi-character recognition result comprising respective characters recognized from the plurality of recognition units; displaying the multi-character recognition result in a candidate display area of the handwriting input interface; while the multi-character recognition result is displayed in the candidate display area, receiving a deletion input from the user; and in response to receiving the deletion input, removing an end character from the multi-character recognition result displayed in the candidate display area.
In some embodiments, a method of providing real-time handwriting recognition includes: determining an orientation of the device; providing a handwriting input interface on the device in a horizontal input mode in accordance with the device being in a first orientation, wherein a respective line of handwriting input entered in the horizontal input mode is segmented into one or more respective recognition units along a horizontal writing direction; and providing the handwriting input interface on the device in a vertical input mode in accordance with the device in a second orientation, wherein a respective line of handwriting input entered in the vertical input mode is segmented into one or more respective recognition units along a vertical writing direction.
In some embodiments, a method of providing real-time handwriting recognition includes: receiving a handwriting input from a user, the handwriting input comprising a plurality of handwritten strokes provided on a touch-sensitive surface coupled to the device; rendering the plurality of handwritten strokes in a handwriting input area of a handwriting input interface; segmenting the plurality of handwritten strokes into two or more recognition units, each recognition unit comprising a respective subset of the plurality of handwritten strokes; receiving an edit request from the user; in response to the edit request, visually distinguishing the two or more recognition units in the handwriting input area; and providing a means for individually deleting each of the two or more recognition units from the handwriting input area.
In some embodiments, a method of providing real-time handwriting recognition includes: receiving a first handwriting input from a user, the first handwriting input comprising a plurality of handwritten strokes, and the plurality of handwritten strokes forming multiple recognition units distributed along a respective writing direction associated with a handwriting input area of a handwriting input interface; rendering each of the plurality of handwritten strokes in the handwriting input area as the handwritten stroke is provided by the user; starting a respective fading process for each of the multiple recognition units after the recognition unit is completely rendered, wherein during the respective fading process, the rendering of the recognition unit in the first handwriting input are becomes increasingly faded; receiving a second handwriting input from the user over a region of the handwriting input area occupied by a faded recognition unit of the multiple recognition unit; and in response to receiving the second handwriting input: rendering the second handwriting input in the handwriting input area; and clearing all faded recognition units from the handwriting input area.
In some embodiments, a method of providing hand-writing recognition includes: separately training a set of spatially-derived features and a set of temporally-derived features of a handwriting recognition model, wherein: the set of spatially-derived features are trained on a corpus of training images each being an image of a handwriting sample for a respective character of an output character set, and the set of temporally-derived features are trained on a corpus of stroke-distribution profiles, each stroke-distribution profile numerically characterizing a spatial distribution of a plurality of strokes in a handwriting sample for a respective character of the output character set; and combining the set of spatially-derived features and the set of temporally-derived features in the handwriting recognition model; and providing real-time handwriting recognition for a user's handwriting input using the handwriting recognition model.
The details of one or more embodiments of the subject matter described in this specification are set forth in the accompanying drawings and the description below. Other features, aspects, and advantages of the subject matter will become apparent from the description, the drawings, and the claims.
Like reference numerals refer to corresponding parts throughout the drawings.
Many electronic devices have graphical user interfaces with soft keyboards for character entry. On some electronic devices, a user may also be able to install or enable a handwriting input interface that allows the user to input characters via handwriting on a touch-sensitive display screen or a touch-sensitive surface coupled to the devices. Conventional handwriting recognition input methods and user interfaces have a number of issues and shortcomings. For example,
In general, conventional handwriting input functionality is enabled language-by-language or script-by-script. Each additional input language requires installation of a separate handwriting recognition model that takes-up separate storage space and memory. Little synergy is provided by combining the handwriting recognition models for different languages, and mixed-language or mixed-script handwriting recognition conventionally took a very long time due to a complex disambiguation process.
In addition, because conventional handwriting recognition systems rely heavily on language-specific or script-specific characteristics for character recognition. Recognition of mixed language handwriting input had a poor accuracy. Furthermore, available combinations of recognized languages are very limited. Most systems required the user to manually specify the desired language-specific handwriting recognizer before providing handwriting input in each non-default language or script.
Many existing real-time handwriting recognition models require temporal or sequence information on a stroke-by-stroke level, which produce inaccurate recognition results when dealing with the high variability of how a character can be written (e.g., high variability in the shape, length, tempo, segmentation, order, and direction of strokes due to writing styles and personal habits). Some systems also require users to adhere to strict spatial and temporal criteria (e.g., with built-in assumptions on the size, sequence, and timeframe of each character input) when providing a handwriting input. Any deviation from these criteria caused inaccurate recognition results that were difficult to correct.
Currently, most real-time handwriting input interfaces only allow the user to enter a few characters at a time. Entry of long phrases or sentences are broken down into short segments and inputted separately. This stilted input not only places cognitive burden on the user to maintain the flow of the composition, but also makes it difficult for the user to correct or revise an earlier entered character or phrase.
The embodiments described below address these and related issues.
Reference will now be made in detail to embodiments, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, it will be apparent to one of ordinary skill in the art that the present invention may be practiced without these specific details. In other instances, well-known methods, procedures, components, circuits, and networks have not been described in detail so as not to unnecessarily obscure aspects of the embodiments.
It will also be understood that, although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first contact could be termed a second contact, and, similarly, a second contact could be termed a first contact, without departing from the scope of the present invention. The first contact and the second contact are both contacts, but they are not the same contact.
The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the description of the invention and the appended claims, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term “and/or” as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. It will be further understood that the terms “includes,” “including,” “comprises,” and/or “comprising,” when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
As used herein, the term “if” may be construed to mean “when” or “upon” or “in response to determining” or “in response to detecting,” depending on the context. Similarly, the phrase “if it is determined” or “if [a stated condition or event] is detected” may be construed to mean “upon determining” or “in response to determining” or “upon detecting [the stated condition or event]” or “in response to detecting [the stated condition or event],” depending on the context.
Embodiments of electronic devices, user interfaces for such devices, and associated processes for using such devices are described. In some embodiments, the device is a portable communications device, such as a mobile telephone, that also contains other functions, such as PDA and/or music player functions. Exemplary embodiments of portable multifunction devices include, without limitation, the IPHONE®, IPOD TOUCH®, and IPAD® devices from Apple Inc. of Cupertino, Calif. Other portable electronic devices, such as laptops or tablet computers with touch-sensitive surfaces (e.g., touch screen displays and/or touch pads), may also be used. It should also be understood that, in some embodiments, the device is not a portable communications device, but is a desktop computer with a touch-sensitive surface (e.g., a touch screen display and/or a touch pad).
In the discussion that follows, an electronic device that includes a display and a touch-sensitive surface is described. It should be understood, however, that the electronic device may include one or more other physical user-interface devices, such as a physical keyboard, a mouse and/or a joystick.
The device typically supports a variety of applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disk authoring application, a spreadsheet application, a gaming application, a telephone application, a video conferencing application, an e-mail application, an instant messaging application, a workout support application, a photo management application, a digital camera application, a digital video camera application, a web browsing application, a digital music player application, and/or a digital video player application.
The various applications that may be executed on the device may use at least one common physical user-interface device, such as the touch-sensitive surface. One or more functions of the touch-sensitive surface as well as corresponding information displayed on the device may be adjusted and/or varied from one application to the next and/or within a respective application. In this way, a common physical architecture (such as the touch-sensitive surface) of the device may support the variety of applications with user interfaces that are intuitive and transparent to the user.
Attention is now directed toward embodiments of portable devices with touch-sensitive displays.
It should be appreciated that device 100 is only one example of a portable multifunction device, and that device 100 may have more or fewer components than shown, may combine two or more components, or may have a different configuration or arrangement of the components. The various components shown in
Memory 102 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state memory devices. Access to memory 102 by other components of device 100, such as CPU 120 and the peripherals interface 118, may be controlled by memory controller 122.
Peripherals interface 118 can be used to couple input and output peripherals of the device to CPU 120 and memory 102. The one or more processors 120 run or execute various software programs and/or sets of instructions stored in memory 102 to perform various functions for device 100 and to process data.
In some embodiments, peripherals interface 118, CPU 120, and memory controller 122 may be implemented on a single chip, such as chip 104. In some other embodiments, they may be implemented on separate chips.
RF (radio frequency) circuitry 108 receives and sends RF signals, also called electromagnetic signals. RF circuitry 108 converts electrical signals to/from electromagnetic signals and communicates with communications networks and other communications devices via the electromagnetic signals.
Audio circuitry 110, speaker 111, and microphone 113 provide an audio interface between a user and device 100. Audio circuitry 110 receives audio data from peripherals interface 118, converts the audio data to an electrical signal, and transmits the electrical signal to speaker 111. Speaker 111 converts the electrical signal to human-audible sound waves. Audio circuitry 110 also receives electrical signals converted by microphone 113 from sound waves. Audio circuitry 110 converts the electrical signal to audio data and transmits the audio data to peripherals interface 118 for processing. Audio data may be retrieved from and/or transmitted to memory 102 and/or RF circuitry 108 by peripherals interface 118. In some embodiments, audio circuitry 110 also includes a headset jack (e.g., 212,
I/O subsystem 106 couples input/output peripherals on device 100, such as touch screen 112 and other input control devices 116, to peripherals interface 118. I/O subsystem 106 may include display controller 156 and one or more input controllers 160 for other input or control devices. The one or more input controllers 160 receive/send electrical signals from/to other input or control devices 116. The other input control devices 116 may include physical buttons (e.g., push buttons, rocker buttons, etc.), dials, slider switches, joysticks, click wheels, and so forth. In some alternate embodiments, input controller(s) 160 may be coupled to any (or none) of the following: a keyboard, infrared port, USB port, and a pointer device such as a mouse. The one or more buttons (e.g., 208,
Touch-sensitive display 112 provides an input interface and an output interface between the device and a user. Display controller 156 receives and/or sends electrical signals from/to touch screen 112. Touch screen 112 displays visual output to the user. The visual output may include graphics, text, icons, video, and any combination thereof (collectively termed “graphics”). In some embodiments, some or all of the visual output may correspond to user-interface objects.
Touch screen 112 has a touch-sensitive surface, sensor or set of sensors that accepts input from the user based on haptic and/or tactile contact. Touch screen 112 and display controller 156 (along with any associated modules and/or sets of instructions in memory 102) detect contact (and any movement or breaking of the contact) on touch screen 112 and converts the detected contact into interaction with user-interface objects (e.g., one or more soft keys, icons, web pages or images) that are displayed on touch screen 112. In an exemplary embodiment, a point of contact between touch screen 112 and the user corresponds to a finger of the user.
Touch screen 112 may use LCD (liquid crystal display) technology, LPD (light emitting polymer display) technology, or LED (light emitting diode) technology, although other display technologies may be used in other embodiments. Touch screen 112 and display controller 156 may detect contact and any movement or breaking thereof using any of a plurality of touch sensing technologies now known or later developed, including but not limited to capacitive, resistive, infrared, and surface acoustic wave technologies, as well as other proximity sensor arrays or other elements for determining one or more points of contact with touch screen 112. In an exemplary embodiment, projected mutual capacitance sensing technology is used, such as that found in the IPHONE®, IPOD TOUCH®, and IPAD® from Apple Inc. of Cupertino, Calif.
Touch screen 112 may have a video resolution in excess of 100 dpi. In some embodiments, the touch screen has a video resolution of approximately 160 dpi. The user may make contact with touch screen 112 using any suitable object or appendage, such as a stylus, a finger, and so forth. In some embodiments, the user interface is designed to work primarily with finger-based contacts and gestures, which can be less precise than stylus-based input due to the larger area of contact of a finger on the touch screen. In some embodiments, the device translates the rough finger-based input into a precise pointer/cursor position or command for performing the actions desired by the user. Handwriting input may be provided on the touch screen 112 via locations and movements of finger-based or stylus-based contacts. In some embodiments, the touch screen 112 renders the finger-based or stylus-based input as instantaneous visual feedback to the current handwriting input, and provides the visual effect of actual writing on a writing surface (e.g., a sheet of paper) with a writing instrument (e.g., a pen).
In some embodiments, in addition to the touch screen, device 100 may include a touchpad (not shown) for activating or deactivating particular functions. In some embodiments, the touchpad is a touch-sensitive area of the device that, unlike the touch screen, does not display visual output. The touchpad may be a touch-sensitive surface that is separate from touch screen 112 or an extension of the touch-sensitive surface formed by the touch screen.
Device 100 also includes power system 162 for powering the various components. Power system 162 may include a power management system, one or more power sources (e.g., battery, alternating current (AC)), a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator (e.g., a light-emitting diode (LED)) and any other components associated with the generation, management and distribution of power in portable devices.
Device 100 may also include one or more optical sensors 164.
Device 100 may also include one or more proximity sensors 166.
Device 100 may also include one or more accelerometers 168.
In some embodiments, the software components stored in memory 102 include operating system 126, communication module (or set of instructions) 128, contact/motion module (or set of instructions) 130, graphics module (or set of instructions) 132, text input module (or set of instructions) 134, Global Positioning System (GPS) module (or set of instructions) 135, and applications (or sets of instructions) 136. Furthermore, in some embodiments, memory 102 stores handwriting input module 157, as shown in
Operating system 126 (e.g., Darwin, RTXC, LINUX, UNIX, OS X, WINDOWS, or an embedded operating system such as VxWorks) includes various software components and/or drivers for controlling and managing general system tasks (e.g., memory management, storage device control, power management, etc.) and facilitates communication between various hardware and software components.
Communication module 128 facilitates communication with other devices over one or more external ports 124 and also includes various software components for handling data received by RF circuitry 108 and/or external port 124. External port 124 (e.g., Universal Serial Bus (USB), FIREWIRE, etc.) is adapted for coupling directly to other devices or indirectly over a network (e.g., the Internet, wireless LAN, etc.).
Contact/motion module 130 may detect contact with touch screen 112 (in conjunction with display controller 156) and other touch sensitive devices (e.g., a touchpad or physical click wheel). Contact/motion module 130 includes various software components for performing various operations related to detection of contact, such as determining if contact has occurred (e.g., detecting a finger-down event), determining if there is movement of the contact and tracking the movement across the touch-sensitive surface (e.g., detecting one or more finger-dragging events), and determining if the contact has ceased (e.g., detecting a finger-up event or a break in contact). Contact/motion module 130 receives contact data from the touch-sensitive surface. Determining movement of the point of contact, which is represented by a series of contact data, may include determining speed (magnitude), velocity (magnitude and direction), and/or an acceleration (a change in magnitude and/or direction) of the point of contact. These operations may be applied to single contacts (e.g., one finger contacts) or to multiple simultaneous contacts (e.g., “multitouch”/multiple finger contacts). In some embodiments, contact/motion module 130 and display controller 156 detect contact on a touchpad.
Contact/motion module 130 may detect a gesture input by a user. Different gestures on the touch-sensitive surface have different contact patterns. Thus, a gesture may be detected by detecting a particular contact pattern. For example, detecting a finger tap gesture includes detecting a finger-down event followed by detecting a finger-up (lift off) event at the same position (or substantially the same position) as the finger-down event (e.g., at the position of an icon). As another example, detecting a finger swipe gesture on the touch-sensitive surface includes detecting a finger-down event followed by detecting one or more finger-dragging events, and subsequently followed by detecting a finger-up (lift off) event.
Contact/motion module 130 is optionally utilized by the handwriting input module 157 to register input of handwritten strokes within a handwriting input area of a handwriting input interface displayed on the touch-sensitive display screen 112 (or within an area of the touch-pad 355 corresponding to the handwriting input area displayed on display 340 in
Graphics module 132 includes various known software components for rendering and displaying graphics on touch screen 112 or other display, including components for changing the intensity of graphics that are displayed. As used herein, the term “graphics” includes any object that can be displayed to a user, including without limitation text, web pages, icons (such as user-interface objects including soft keys), digital images, videos, animations and the like.
In some embodiments, graphics module 132 stores data representing graphics to be used. Each graphic may be assigned a corresponding code. Graphics module 132 receives, from applications etc., one or more codes specifying graphics to be displayed along with, if necessary, coordinate data and other graphic property data, and then generates screen image data to output to display controller 156.
Text input module 134, which may be a component of graphics module 132, provides soft keyboards for entering text in various applications (e.g., contacts 137, e-mail 140, IM 141, browser 147, and any other application that needs text input). In some embodiments, the handwriting input module 157 is optionally invocated through a user interface of the text input module 134, e.g., though a keyboard selection affordance. In some embodiments, the same or similar keyboard selection affordance is also provided in the handwriting input interface to invoke the text input module 134.
GPS module 135 determines the location of the device and provides this information for use in various applications (e.g., to telephone 138 for use in location-based dialing, to camera 143 as picture/video metadata, and to applications that provide location-based services such as weather widgets, local yellow page widgets, and map/navigation widgets).
Applications 136 may include the following modules (or sets of instructions), or a subset or superset thereof: contacts module 137 (sometimes called an address book or contact list); telephone module 138; video conferencing module 139; e-mail client module 140; instant messaging (IM) module 141; workout support module 142; camera module 143 for still and/or video images; image management module 144; browser module 147; calendar module 148; widget modules 149, which may include one or more of: weather widget 149-1, stocks widget 149-2, calculator widget 149-3, alarm clock widget 149-4, dictionary widget 149-5, and other widgets obtained by the user, as well as user-created widgets 149-6; widget creator module 150 for making user-created widgets 149-6; search module 151; video and music player module 152, which may be made up of a video player module and a music player module; notes module 153; map module 154; and/or online video module 155.
Examples of other applications 136 that may be stored in memory 102 include other word processing applications, other image editing applications, drawing applications, presentation applications, JAVA-enabled applications, encryption, digital rights management, voice recognition, and voice replication.
In conjunction with touch screen 112, display controller 156, contact module 130, graphics module 132, handwriting input module 157, and text input module 134, contacts module 137 may be used to manage an address book or contact list (e.g., stored in application internal state 192 of contacts module 137 in memory 102 or memory 370), including: adding name(s) to the address book; deleting name(s) from the address book; associating telephone number(s), e-mail address(es), physical address(es) or other information with a name; associating an image with a name; categorizing and sorting names; providing telephone numbers or e-mail addresses to initiate and/or facilitate communications by telephone 138, video conference 139, e-mail 140, or IM 141; and so forth.
In conjunction with RF circuitry 108, audio circuitry 110, speaker 111, microphone 113, touch screen 112, display controller 156, contact module 130, graphics module 132, handwriting input module 157, and text input module 134, telephone module 138 may be used to enter a sequence of characters corresponding to a telephone number, access one or more telephone numbers in address book 137, modify a telephone number that has been entered, dial a respective telephone number, conduct a conversation and disconnect or hang up when the conversation is completed. As noted above, the wireless communication may use any of a plurality of communications standards, protocols and technologies.
In conjunction with RF circuitry 108, audio circuitry 110, speaker 111, microphone 113, touch screen 112, display controller 156, optical sensor 164, optical sensor controller 158, contact module 130, graphics module 132, handwriting input module 157, text input module 134, contact list 137, and telephone module 138, videoconferencing module 139 includes executable instructions to initiate, conduct, and terminate a video conference between a user and one or more other participants in accordance with user instructions.
In conjunction with RF circuitry 108, touch screen 112, display controller 156, contact module 130, graphics module 132, handwriting input module 157, and text input module 134, e-mail client module 140 includes executable instructions to create, send, receive, and manage e-mail in response to user instructions. In conjunction with image management module 144, e-mail client module 140 makes it very easy to create and send e-mails with still or video images taken with camera module 143.
In conjunction with RF circuitry 108, touch screen 112, display controller 156, contact module 130, graphics module 132, handwriting input module 157, and text input module 134, the instant messaging module 141 includes executable instructions to enter a sequence of characters corresponding to an instant message, to modify previously entered characters, to transmit a respective instant message (for example, using a Short Message Service (SMS) or Multimedia Message Service (MMS) protocol for telephony-based instant messages or using XMPP, SIMPLE, or IMPS for Internet-based instant messages), to receive instant messages and to view received instant messages. In some embodiments, transmitted and/or received instant messages may include graphics, photos, audio files, video files and/or other attachments as are supported in a MMS and/or an Enhanced Messaging Service (EMS). As used herein, “instant messaging” refers to both telephony-based messages (e.g., messages sent using SMS or MMS) and Internet-based messages (e.g., messages sent using XMPP, SIMPLE, or IMPS).
In conjunction with RF circuitry 108, touch screen 112, display controller 156, contact module 130, graphics module 132, handwriting input module 157, text input module 134, GPS module 135, map module 154, and music player module 146, workout support module 142 includes executable instructions to create workouts (e.g., with time, distance, and/or calorie burning goals); communicate with workout sensors (sports devices); receive workout sensor data; calibrate sensors used to monitor a workout; select and play music for a workout; and display, store and transmit workout data.
In conjunction with touch screen 112, display controller 156, optical sensor(s) 164, optical sensor controller 158, contact module 130, graphics module 132, and image management module 144, camera module 143 includes executable instructions to capture still images or video (including a video stream) and store them into memory 102, modify characteristics of a still image or video, or delete a still image or video from memory 102.
In conjunction with touch screen 112, display controller 156, contact module 130, graphics module 132, handwriting input module 157, text input module 134, and camera module 143, image management module 144 includes executable instructions to arrange, modify (e.g., edit), or otherwise manipulate, label, delete, present (e.g., in a digital slide show or album), and store still and/or video images.
In conjunction with RF circuitry 108, touch screen 112, display system controller 156, contact module 130, graphics module 132, handwriting input module 157, and text input module 134, browser module 147 includes executable instructions to browse the Internet in accordance with user instructions, including searching, linking to, receiving, and displaying web pages or portions thereof, as well as attachments and other files linked to web pages.
In conjunction with RF circuitry 108, touch screen 112, display system controller 156, contact module 130, graphics module 132, handwriting input module 157, text input module 134, e-mail client module 140, and browser module 147, calendar module 148 includes executable instructions to create, display, modify, and store calendars and data associated with calendars (e.g., calendar entries, to do lists, etc.) in accordance with user instructions.
In conjunction with RF circuitry 108, touch screen 112, display system controller 156, contact module 130, graphics module 132, handwriting input module 157, text input module 134, and browser module 147, widget modules 149 are mini-applications that may be downloaded and used by a user (e.g., weather widget 149-1, stocks widget 149-2, calculator widget 149-3, alarm clock widget 149-4, and dictionary widget 149-5) or created by the user (e.g., user-created widget 149-6). In some embodiments, a widget includes an HTML (Hypertext Markup Language) file, a CSS (Cascading Style Sheets) file, and a JavaScript file. In some embodiments, a widget includes an XML (Extensible Markup Language) file and a JavaScript file (e.g., Yahoo! Widgets).
In conjunction with RF circuitry 108, touch screen 112, display system controller 156, contact module 130, graphics module 132, handwriting input module 157, text input module 134, and browser module 147, the widget creator module 150 may be used by a user to create widgets (e.g., turning a user-specified portion of a web page into a widget).
In conjunction with touch screen 112, display system controller 156, contact module 130, graphics module 132, handwriting input module 157, and text input module 134, search module 151 includes executable instructions to search for text, music, sound, image, video, and/or other files in memory 102 that match one or more search criteria (e.g., one or more user-specified search terms) in accordance with user instructions.
In conjunction with touch screen 112, display system controller 156, contact module 130, graphics module 132, audio circuitry 110, speaker 111, RF circuitry 108, and browser module 147, video and music player module 152 includes executable instructions that allow the user to download and play back recorded music and other sound files stored in one or more file formats, such as MP3 or AAC files, and executable instructions to display, present or otherwise play back videos (e.g., on touch screen 112 or on an external, connected display via external port 124). In some embodiments, device 100 may include the functionality of an MP3 player, such as an iPod (trademark of Apple Inc.).
In conjunction with touch screen 112, display controller 156, contact module 130, graphics module 132, handwriting input module 157, and text input module 134, notes module 153 includes executable instructions to create and manage notes, to do lists, and the like in accordance with user instructions.
In conjunction with RF circuitry 108, touch screen 112, display system controller 156, contact module 130, graphics module 132, handwriting input module 157, text input module 134, GPS module 135, and browser module 147, map module 154 may be used to receive, display, modify, and store maps and data associated with maps (e.g., driving directions; data on stores and other points of interest at or near a particular location; and other location-based data) in accordance with user instructions.
In conjunction with touch screen 112, display system controller 156, contact module 130, graphics module 132, audio circuitry 110, speaker 111, RF circuitry 108, handwriting input module 157, text input module 134, e-mail client module 140, and browser module 147, online video module 155 includes instructions that allow the user to access, browse, receive (e.g., by streaming and/or download), play back (e.g., on the touch screen or on an external, connected display via external port 124), send an e-mail with a link to a particular online video, and otherwise manage online videos in one or more file formats, such as H.264. In some embodiments, instant messaging module 141, rather than e-mail client module 140, is used to send a link to a particular online video.
Each of the above identified modules and applications correspond to a set of executable instructions for performing one or more functions described above and the methods described in this application (e.g., the computer-implemented methods and other information processing methods described herein). These modules (i.e., sets of instructions) need not be implemented as separate software programs, procedures or modules, and thus various subsets of these modules may be combined or otherwise re-arranged in various embodiments. In some embodiments, memory 102 may store a subset of the modules and data structures identified above. Furthermore, memory 102 may store additional modules and data structures not described above.
In some embodiments, device 100 is a device where operation of a predefined set of functions on the device is performed exclusively through a touch screen and/or a touchpad. By using a touch screen and/or a touchpad as the primary input control device for operation of device 100, the number of physical input control devices (such as push buttons, dials, and the like) on device 100 may be reduced.
Device 100 may also include one or more physical buttons, such as “home” or menu button 204. As described previously, menu button 204 may be used to navigate to any application 136 in a set of applications that may be executed on device 100. Alternatively, in some embodiments, the menu button is implemented as a soft key in a GUI displayed on touch screen 112.
In one embodiment, device 100 includes touch screen 112, menu button 204, push button 206 for powering the device on/off and locking the device, volume adjustment button(s) 208, Subscriber Identity Module (SIM) card slot 210, head set jack 212, and docking/charging external port 124. Push button 206 may be used to turn the power on/off on the device by depressing the button and holding the button in the depressed state for a predefined time interval; to lock the device by depressing the button and releasing the button before the predefined time interval has elapsed; and/or to unlock the device or initiate an unlock process. In an alternative embodiment, device 100 also may accept verbal input for activation or deactivation of some functions through microphone 113.
Each of the above identified elements in
Attention is now directed towards embodiments of handwriting input methods and user interfaces (“UI”) that may be implemented on a multifunction device (e.g., device 100).
In some embodiments, the input processing module 502 communicates with the I/O interface module 500 (e.g., I/O interface 330 in
In some embodiments, as the data representing each handwritten stroke is received by the input processing module 502, the temporal and sequence information associated with multiple consecutive strokes is also recorded. For example, the data optionally includes a stack showing the shape, size, spatial saturation of the individual strokes with respective stroke sequence numbers, and relative spatial locations of the strokes along a writing direction of the entire handwriting input, etc. In some embodiments, the input processing module 502 provides instructions back to the I/O interface modules 500 to render the received strokes on a display 518 (e.g., display 340 in
In some embodiments, the input processing module 502 processes the strokes currently accumulated in the handwriting input area to assign the strokes into one or more recognition units. In some embodiments, each recognition unit corresponds to a character that is to be recognized by the handwriting recognition model 504. In some embodiments, each recognition unit corresponds to an output character or a radical that is to be recognized by the handwriting recognition model 504. A radical is a recurring component that is found in multiple composite logographic characters. A composite logographic character may include two or more radicals arranged in accordance with a common layout (e.g., a left-right layout, a top-bottom layout, etc.). In one example, a single Chinese character “” is constructed using two radicals, i.e., a left radical “” and a right radical “”.
In some embodiments, the input processing module 502 relies on the segmentation module to assign or divide the currently accumulated handwritten strokes into one or more recognition units. For example, when segmenting the strokes for the handwritten character “”, the segmentation module 508 optionally assigns the strokes clustered on the left side of handwriting input to one recognition unit (i.e., for the left radical “”), and the strokes clustered on the right side of the handwriting input to another recognition unit (i.e., for the right radical “”). Alternatively, the segmentation module 508 may also assign all of the strokes into a single recognition unit (i.e., for the character “”).
In some embodiments, the segmentation module 508 segments the currently accumulated handwriting input (e.g., one or more handwritten strokes) into a group of recognition units in several different ways to create a segmentation lattice 520. For example, suppose a total of nine strokes have been accumulated in the handwriting input area so far. According to a first segmentation chain of the segmentation lattice 520, strokes 1, 2, 3 are grouped into a first recognition unit 522, and strokes 4, 5, 6 are grouped into a second recognition unit 526. According to a second segmentation chain of the segmentation lattice 520, all of strokes 1-9 are grouped into one recognition unit 526.
In some embodiments, each segmentation chain is given a segmentation score to measure the likelihood that the particular segmentation chain is a correct segmentation of the current handwriting input. In some embodiments, factors that are optionally used to calculate the segmentation score of each segmentation chain include: absolute and/or relative size of the stroke, relative and/or absolute span of the stroke in various directions (e.g., x, y, z directions), average of and/or variations in the saturation level of the stroke, absolute and/or relative distances to adjacent strokes, absolute and/or relative locations of the strokes, the order or sequence by which the strokes are entered, the duration of each stroke, average of and/or variations in the speed (or tempo) by which each stroke has been entered, the intensity profile of each stroke along the length of the stroke, etc. In some embodiments, one or more functions or transformations are optionally applied to one or more of these factors to generate the segmentation scores of the different segmentation chains in the segmentation lattice 520.
In some embodiments, after the segmentation module 508 has segmented the current handwriting input 516 received from the user, the segmentation module 508 passes the segmentation lattice 520 to the normalization module 510. In some embodiments, the normalization module 510 generates an input image (e.g., input images 528) for each recognition unit (e.g., recognition units 522, 524, and 526) specified in the segmentation lattice 520. In some embodiments, the normalization module performs the necessary or desired normalization (e.g., stretching, cropping, down-sample or up-sampling) to the input image, such that the input image can be provided to the handwriting recognition model 504 as input. In some embodiments, each input image 528 includes the strokes assigned to one respective recognition unit, and corresponds to one character or radical that is to be recognized by the handwriting recognition module 504.
In some embodiments, the input images generated by the input processing module 502 does not include any temporal information associated with the individual strokes, and only spatial information (e.g. information represented by the location and density of pixels in the input image) are preserved in the input image. A handwriting recognition model trained purely on spatial information of the training writing samples is capable of handwriting recognition based on spatial information alone. As a result, the handwriting recognition model is stroke-order and stroke-direction independent, without exhaustively enumerating all possible permutations of stroke-orders and stroke-directions for all characters in its vocabulary (i.e., all output classes) during training. In fact, in some embodiments, the handwriting recognition module 502 does not differentiate the pixels belonging to one stroke versus another within the input image.
As will be explained in more detail later (e.g., with respect to
In some embodiments, the input image generated by the input processing module 502 for one recognition unit does not overlap with the input image of any other recognition unit in the same segmentation chain. In some embodiments, input images generated for different recognition units may have some overlap. In some embodiments, some overlap between input images is permitted for recognizing handwriting input written in a cursive writing style and/or including run-on characters (e.g., one stroke connecting two adjacent characters).
In some embodiments, some normalization is performed before segmentation. In some embodiments, the functions of the segmentation module 508 and the normalization module 510 may be performed by the same module or two or more other modules.
In some embodiments, as the input image 528 of each recognition unit is provided to the handwriting recognition model 504 as input, the handwriting recognition model 504 produces an output consisting of different likelihood of the recognition unit being a respective output character in the repertoire or vocabulary (i.e., the list of all characters and radicals recognizable by the handwriting recognition module 504) of handwriting recognition model 504. As will be explained in more detail later, the handwriting recognition model 504 has been trained to recognize a large number of characters in multiple scripts (e.g., at least three non-overlapping scripts that have been encoded by the Unicode standard). Examples of non-overlapping scripts include the Latin script, Chinese characters, Arabic letters, Farsi, Cyrillic, and artificial scripts such as emoji characters. In some embodiments, the handwriting recognition model 504 produces one or more output characters for each input image (i.e., for each recognition unit), and assigns a respective recognition score for each output character based on the confidence level associated with the character recognition.
In some embodiments, the handwriting recognition model 504 generates a candidate lattice 530 in accordance with the segmentation lattice 520, where each are in a segmentation chain (e.g., corresponding to a respective recognition unit 522, 524, 526) in the segmentation lattice 520 is expanded into one or more candidate arcs (e.g., arcs 532, 534, 536, 538, 540 each corresponding to a respective output character) within the candidate lattice 530. Each candidate chain within the candidate lattice 530 is scored according to the respective segmentation score of the segmentation chain underlying the candidate chain, and the recognition scores associated with the output characters in the character chain.
In some embodiments, after the handwriting recognition model 504 produces the output characters from the input images 528 of the recognition units, the candidate lattice 530 is passed to the result generation module 506 to generate one or more recognition results for the currently accumulated handwriting input 516.
In some embodiments, the result generation module 506 utilizes the radical clustering module 512 to combine one or more radicals in a candidate chain into a composite character. In some embodiments, the result generation module 506 uses one or more language models 514 to determine whether a character chain in the candidate lattice 530 is a likely sequence in a particular language represented by the language models. In some embodiments, the result generation module 506 generates a revised candidate lattice 542 by eliminating particular arcs or combining two or more arcs in the candidate lattice 530.
In some embodiments, the result generation module 506 generates an integrated recognition score for each character sequence still remaining in the revised candidate lattice 542 (e.g., character sequences 544 and 546), based on the recognition scores of the output characters in the character sequence, as modified (e.g., augmented or diminished) by the radical clustering module 512 and language models 514. In some embodiments, the result generation module 506 ranks the different character sequences remaining in the revised candidate lattice 542 based on their integrated recognition scores.
In some embodiments, the result generation module 506 sends the top-ranked character sequences as ranked recognition results 548 to the I/O interface module 500 to display to the user. In some embodiments, the I/O interface module 500 displays the received recognition results 548 (e.g., “” and “”) in a candidate display area of the handwriting input interface. In some embodiments, the I/O interface module displays multiple recognition results (e.g., “” and “”) for the user, and allows the user to select a recognition result to enter as a text input for a relevant application. In some embodiments, the I/O interface module automatically enters a top-ranked recognition result (e.g., “”) in response to other inputs or indications of user confirmation of the recognition result. Effective automatic entry of a top-ranked result can improve the efficiency of the input interface and provide a better user experience.
In some embodiments, the result generation module 506 uses other factors to alter the integrated recognition scores of the candidate chains. For example, in some embodiments, the result generation module 506 optionally maintains a log of most frequently used characters for a particular user, or a multitude of users. The result generation module 506 optionally boosts the integrated recognition scores of particular candidate characters or character sequences, if the particular candidate characters or character sequences are found among the list of most frequently used characters or character sequences.
In some embodiments, the handwriting input module 157 provides real-time updates for the recognition results displayed to the user. For example, in some embodiments, for each additional stroke entered by the user, the input processing module 502 optionally re-segments the currently accumulated handwriting input, and revises the segmentation lattice and input images provided to the handwriting recognition model 504. In turn, the handwriting recognition model 504 optionally revises the candidate lattice provided to the result generation module 506. As a result, the result generation module 506 optionally updates the recognition results presented to the user. As used in this specification, real-time handwriting recognition refers to handwriting recognition in which handwriting recognition results are presented to the user instantaneously or within a short time period (e.g., within tens of milliseconds to seconds). Real-time handwriting recognition differs from offline recognition (e.g., as in offline optical character-recognition (OCR) applications) in that recognition is initiated immediately and performed substantially contemporaneously with receipt of the handwriting input, rather than at a time after the current user session from a recorded image that is saved for later retrieval. In addition, offline character recognition is performed without any temporal information regarding individual strokes and stroke sequences, and thus segmentation is performed without the benefit of such information. Further disambiguation between similar-looking candidate characters are also without the benefit of such temporal information.
In some embodiments, the handwriting recognition model 504 is implemented as a convolutional neural network (CNN).
As shown in
As shown in
When an input image 614 is processed through the different layers of the neural network, different spatial features embedded in the input image 614 are extracted by the convolutional layers 610. Each convolutional layer 610 is also referred to as a set of feature maps and act as filters for picking out particular features in the input image 614 for differentiating between the images corresponding to different characters. The sub-sampling layers 612 ensure that features on an increasingly larger scale are captured from the input image 614. In some embodiments, the sub-sampling layers 612 are implemented using a max-pooling technique. The max-pooling layers create position invariance over larger local regions and down samples the output image of the preceding convolutional layer by a factor of Kx and Ky along each direction, Kx and Ky being the size of the max-pooling rectangle. Max-pooling leads to a faster convergence rate by selecting superior invariant features which improves generalization performances. In some embodiments, sub-sampling is achieved using other methods.
In some embodiments, after the last set of convolutional layer 610n and sub-sampling layer 612n and before the output plane 608 resides a fully-connected layer, namely the hidden layer 614. The fully-connected hidden layer 614 is a multi-layer perceptron that fully connects the nodes in the last sub-sampling layer 612n and the nodes in the output plane 608. The hidden layer 614 takes the output images received from the layer before and through logistic regression reaches one of the output characters in the output layer 608.
During training of the convolutional neural network 602, features and respective weights associated with the features in the convolutional layers 610, as well as weights associated with the parameters in the hidden layer 614 are tuned such that classification errors are minimized for the writing samples with known output classes in the training corpus 604. Once the convolutional neural network 602 has been trained, and the optimal set of parameters and associated weights have been established for the different layers in the network, the convolutional neural network 602 can be used to recognize new writing samples 618 that are not part of the training corpus 604, such as input images generated based on real-time handwriting input received from the user.
As described in herein, the convolutional neural network of a handwriting input interface is trained using a multi-script training corpus to enable multi-script or mixed-script handwriting recognition. In some embodiments, the convolutional neural network is trained to recognize a large repertoire of 30 thousand to over 60 thousand characters (e.g., all characters encoded by the Unicode standard). Most state-of-the-art handwriting recognition systems are based on stroke-order dependent Hidden Markov Methods (HMMs). In addition, most existing handwriting recognition models are language-specific, and include a small repertoire of tens of characters (e.g., characters of the English alphabet, the Greek alphabet, all ten digits, etc.), up to a few thousand of characters (e.g., a set of most commonly used Chinese character). As such, the universal recognizer described herein can handle orders of magnitudes more characters than most existing systems.
Some conventional handwriting systems may include several individually trained handwriting recognition models, each tailored for a particular language or a small set of characters. A writing sample is propagated through the different recognition models until a classification can be made. For example, the handwriting sample may be provided to a series of concatenated language-specific or script-specific character recognition models, if the handwriting sample cannot be conclusively classified by a first recognition model, it is provided to a next recognition model, which attempts to classify the handwriting sample within its own repertoire. The approach for classification is time consuming, and the memory requirement increases quickly with each additional recognition model that needs to be employed.
Other state-of-the art models require the user to specify a preferred language, and use the selected handwriting recognition model to classify the current input. Such implementations not only are cumbersome to use and consume significant memory, but also cannot be used to recognize mixed language input. Requiring the user to switch language preferences in the middle of inputting a mixed-language or mixed-script input is impractical.
The multi-script or universal recognizer described herein addresses at least some of the above issues with the conventional recognition systems.
In some embodiments, the training of the handwriting recognition model is performed on a server device, and the trained handwriting recognition model is then provided to a user device. The handwriting recognition model optionally performs real-time handwriting recognition locally on the user device without requiring further assistance from the server. In some embodiments, both the training and the recognition is provided on the same device. For example, a server device can receive the user's handwriting input from a user device, performs the handwriting recognition, and sends the recognition results to the user device in real-time.
In the exemplary process 700, at a device having one or more processors and memory, the device trains (702) a multi-script handwriting recognition model based on spatially-derived features (e.g., stroke-order independent features) of a multi-script training corpus. In some embodiments, the spatially-derived features of the multi-script training corpus are (704) stroke-order independent and stroke-direction independent. In some embodiments, the training of the multi-script handwriting recognition model is (706) independent of temporal information associated with respective strokes in the handwriting samples. Specifically, images of the handwriting samples are normalized to a predetermined size, and the images do not include any information on the order by which individual strokes are entered to form the image. Furthermore, the images also do not include any information on the direction by which individual strokes are entered to form the image. In fact, during training, features are extracted from the handwriting images without regard to how the images are temporally formed by the individual strokes. Therefore, during recognition, no temporal information related to the individual strokes is needed. As a result, the recognition robustly provides consistent recognition results despite of delayed, out-of-order strokes, and arbitrary stroke directions in the handwriting input.
In some embodiments, the multi-script training corpus includes handwriting samples corresponding to characters of at least three non-overlapping scripts. As shown in
In some embodiments, the at least three non-overlapping scripts include (708) Chinese characters, emoji characters, and Latin script. In some embodiments, the multi-script handwriting recognition model has (710) at least thirty thousand output classes, representing thirty thousand characters spanning at least three non-overlapping scripts.
In some embodiments, multi-script training corpus includes respective writing samples for each character of all Chinese characters encoded in the Unicode standard (e.g., all or a substantial portion of all CJK (Chinese-Japanese-Korean) unified ideographs). The Unicode standard defines a total of about seventy-four thousand CJK unified ideographs. The basic block (4E00-9FFF) of the CJK unified ideographs includes 20,941 basic Chinese characters, which are used in the Chinese language, as well as in Japanese, Korean, and Vietnamese languages. In some embodiments, the multi-script training corpus includes writing samples for all characters in the basic block of the CJK unified ideographs. In some embodiments, the multi-script training corpus further includes writing samples for CJK radicals that can be used to structurally compose one or more composite Chinese characters. In some embodiments, the multi-script training corpus further includes writing samples for less frequently used Chinese characters, such as the Chinese characters encoded in one or more of the CJK unified ideograph extensions.
In some embodiments, the multi-script training corpus further includes respective writing samples for each character of all characters in the Latin script encoded by the Unicode standard. The characters in the basic Latin script include capital and small Latin letters, as well as various basic symbols and digits commonly used on a standard Latin keyboard. In some embodiments, the multi-script training corpus further includes characters in the extended Latin script (e.g., various accented forms of the basic Latin letters).
In some embodiments, the multi-script training corpus includes writing samples that correspond to each character of an artificial script that is not associated with any natural human language. For example, in some embodiments, a set of emoji characters is optionally defined in an emoji script, and writing samples corresponding to each of the emoji characters are included in the multi-script training corpus. For example, a hand-drawn heart-shaped symbol is a handwriting sample for the emoji character “♥” in the training corpus. Similarly, a hand-drawn smiley face (e.g., two dots above an upturned arc) is a handwriting sample for the emoji character “” in the training corpus. Other emoji characters includes categories of icons showing different emotions (e.g., happy, sad, angry, embarrassed, shocked, laughing, crying, frustrated, etc.), different objects and characters (e.g., cat, dog, bunny, heart, fruit, eye, lips, gift, flowers, candle, moon, star, etc.), and different actions (e.g., handshake, kiss, run, dance, jump, sleep, eat, meet, love. like, vote, etc.), etc. In some embodiments, the strokes in the handwriting sample corresponding to an emoji character are simplified and/or stylized lines of the actual lines forming the corresponding emoji character. In some embodiments, each device or application may use a different design for the same emoji character. For example, a smiley emoji character presented to a female user may be different from a smiley emoji character presented to a male user, even if the handwriting inputs received from the two users are substantially the same.
In some embodiments, the multi-script training corpus also includes writing samples for characters in other scripts, such as the Greek script (e.g., including Greek letters and symbols), the Cyrillic script, the Hebrew script, and one or more other scripts encoded according to the Unicode standard. In some embodiments, the at least three non-overlapping scripts included in the multi-script training corpus include Chinese characters, emoji characters, and characters in the Latin script. Chinese characters, emoji characters, and Characters in the Latin script are naturally non-overlapping scripts. Many other scripts may overlap with one another for at least some characters. For example, some characters (e.g., A, Z) in the Latin script may be found in many other scripts (e.g., Greek, and Cyrillic). In some embodiments, the multi-script training corpus includes Chinese characters, Arabic script, and Latin script. In some embodiments, the multi-script training corpus includes other combinations of overlapping and/or non-overlapping scripts. In some embodiments, the multi-script training corpus includes writing samples for all characters encoded by the Unicode standard.
As shown in
In some embodiments, the device provides (716) real-time handwriting recognition for a user's handwriting input using the multi-script handwriting recognition model that has been trained on the spatially-derived features of the multi-script training corpus. In some embodiments, providing real-time handwriting recognition for a user's handwriting input includes continuously revising a recognition output for the user's handwriting input as the user continues to provide additions and revisions of the handwriting input. In some embodiments, providing real-time handwriting recognition for a user's handwriting input further includes (718) providing the multi-script handwriting recognition model to a user device, where the user device receives a handwriting input from a user, and locally performs handwriting recognition on the handwriting input based on the multi-script handwriting recognition model.
In some embodiments, the device provides the multi-script handwriting recognition model to a plurality of devices that have no existing overlap in their respective input languages, and the multi-script handwriting recognition model is used on each of the plurality of devices for handwriting recognition of a different language associated with said each user device. For example, when the multi-script handwriting recognition model has been trained to recognize characters in many different scripts and languages, the same handwriting recognition model can be used worldwide to provide handwriting input for any of those input languages. A first device for a user who only wishes to input in English and Hebrew can use the same handwriting recognition model to provide handwriting input functionality as a second device for another user who only wishes to input in Chinese and emoji characters. Instead of requiring the user of the first device to separately install a English handwriting input keyboard (e.g., implemented with an English-specific handwriting recognition model), and a separate Hebrew handwriting input keyboard (e.g., implemented with a Hebrew-specific handwriting recognition model), the same universal multi-script handwriting recognition model can be installed once on the first device, and used to provide handwriting input function for both English, Hebrew, as well as mixed input in both languages. Furthermore, instead of requiring the second user to install a Chinese handwriting input keyboard (e.g., implemented with a Chinese-specific handwriting recognition model), and a separate emoji handwriting input keyboard (e.g., implemented with an emoji handwriting recognition model), the same universal multi-script handwriting recognition model can be installed once on the second device, and used to provide handwriting input function for both Chinese, emoji, as well as mixed input in both scripts. Using the same multi-script handwriting model to handle a large repertoire spanning multiple scripts (e.g., a substantial portion or all of the characters encoded in nearly one hundred different scripts) improves the utility of the recognizer without substantial burden on part of the device suppliers and the users.
The multi-script handwriting recognition model training using a large multi-script training corpus differ from conventional HMM-based handwriting recognition system, and does not rely on temporal information associated with individual strokes of the characters. In addition, the resource and memory requirement for the multi-script recognition system does not increase linearly with the increase of symbols and languages covered by the multi-script recognition system. For example, in a conventional handwriting system, increasing the number of languages means adding another independently trained model, and the memory requirement would be at least doubled to accommodate the increasing capability of the handwriting recognition system. In contrast, when the multi-script model is trained by a multi-script training corpus, increasing language coverage requires retraining the handwriting recognition model with additional handwriting samples, and increasing the size of the output plane, but the amount of increase is very moderate. Suppose that the multi-script training corpus includes handwriting samples corresponding to n different languages, and the multi-script handwriting recognition model occupies a memory of size m, when increasing the language coverage to N languages (N>n), the device re-trains the multi-script handwriting recognition model based on spatially-derived features of a second multi-script training corpus, the second multi-script training corpus including second handwriting samples corresponding to the N different languages. The changes in M/m remain substantially constant within a range of 1-2, with the changes in N/n from 1 to 100. Once the multi-script handwriting recognition model has been retrained, the device can provide real-time handwriting recognition for a user's handwriting input using the re-trained multi-script handwriting recognition model.
In some embodiments, the handwriting input area 804 is a touch-sensitive area for receiving handwriting input from the user. A sustained contact and its associated motion path on the touch screen within the handwriting input area 804 are registered as a handwritten stroke. In some embodiments, the handwritten stroke registered by the device is visually rendered within the handwriting input area 804 at the same locations traced by the sustained contact. As shown in
In some embodiments, the candidate display area 806 displays one or more recognition results (e.g., 810 and 812) for the handwriting input currently accumulated in the handwriting input area 804. In general, the top-ranked recognition result (e.g., 810) is displayed in the first position in the candidate display area. As shown in
In some embodiments, the text input area 808 is an area that displays text input provided to a respective application that is employing the handwriting input interface. As shown in
In some embodiments, a user can select a particular recognition result displayed in the candidate display area 806, e.g., by an explicit selection input (e.g., a tap gesture on one of the displayed recognition result), or an implicit confirmation input (e.g., a tap gesture on the “Enter” button or a double tap gesture in the handwriting input area). As shown in
In some embodiments (not shown in
In some embodiments, the user device receives (908) a handwriting input from a user, the handwriting input including one or more handwritten strokes provided on a touch-sensitive surface coupled to the user device. For example, the handwriting input includes respective data on the location and movement of a contact between a finger or stylus and the touch-sensitive surface coupled to the user device. In response to receiving the handwriting input, the user device provides (910) in real-time one or more handwriting recognition results to the user based on the multi-script handwriting recognition model that has been trained on the spatially-derived features of the multi-script training corpus (912).
In some embodiments, when providing real-time handwriting recognition results to the user, the user device segments (914) the user's handwriting input into one or more recognition units, each recognition unit including one or more of the handwritten strokes provided by the user. In some embodiments, the user device segments the user's handwriting input according to the shape, location, and size of the individual strokes made by the contact between the user's finger or stylus and the touch-sensitive surface of the user device. In some embodiments, the segmentation of the handwriting input further takes into account of the relative order, and relative position of the individual strokes made by the contact between the user's finger or stylus and the touch-sensitive surface of the user device. In some embodiments, the user's handwriting input is in a cursive writing style, and each continuous stroke in the handwriting input may correspond to multiple strokes in a recognized character in print form. In some embodiments, the user's handwriting input may include a continuous stroke spanning multiple recognized characters in printed form. In some embodiments, the segmentation of the handwriting input generates one or more input images each corresponding to a respective recognition unit. In some embodiments, some of the input images optionally include some overlapping pixels. In some embodiments, the input images do not include any overlapping pixels. In some embodiments, the user device generates a segmentation lattice, each segmentation chain of the segmentation lattice represents a respective way of segmenting the current handwriting input. In some embodiments, each are in a segmentation chain corresponds to a respective group of strokes in the current handwriting input.
As shown in
In some embodiments, the user device displays (918) both the first output character and the second output character in a candidate display area of the handwriting input interface of the user device. In some embodiments, the user device selectively displays (920) one of the first output character and the second output character based on which one of the first and second scripts is a respective script used in a soft keyboard currently installed on the user device. For example, suppose the handwriting recognition model has identified the Chinese character “” and the Greek letter “λ.” as the output characters for the current handwriting input, the user device determines whether the user has installed a Chinese soft keyboard (e.g., a keyboard using the Pinyin input method) or the Greek input keyboard on the user device. If the user device determines that only the Chinese soft keyboard has been installed, the user device optionally displays only the Chinese character “” and not the Greek letter “λ” as the recognition result to the user.
In some embodiments, the user device provides real-time handwriting recognition and input. In some embodiments, the user device continuously revises (922) one or more recognition results for the user's handwriting input in response to continued additions to or revisions of the handwriting input by the user, before the user makes an explicit or implicit selection of a recognition result displayed to the user. In some embodiments, in response to each revision of the one or more recognition results, the user displays (924) the respective revised one or more recognition results to the user in a candidate display area of the handwriting input user interface.
In some embodiments, the multi-script handwriting recognition model is (926) trained to recognize all characters of at least three non-overlapping scripts including Chinese characters, emoji characters, and the Latin script encoded according to the Unicode standard. In some embodiments, the at least three non-overlapping scripts include Chinese characters, the Arabic script, and the Latin script. In some embodiments, the multi-script handwriting recognition model has (928) at least thirty thousand output classes, representing at least thirty characters spanning the at least three non-overlapping scripts.
In some embodiments, the user device allows the user to enter a multi-script handwriting input, such as a phrase that includes characters in more than one script. For example, the user may write continuously and receives handwriting recognition results including characters in more than one script, without stopping in the middle of writing to manually switch the recognition language. For example, the user may write the multi-script sentence “Hello means “” in Chinese.” in the handwriting input area of the user device, without having to switch the input language from English to Chinese before writing the Chinese characters “” or switching the input language back from Chinese to English when writing the English words “in Chinese.”
As described herein, the multi-script handwriting recognition model is used to provide real-time handwriting recognition for a user's input. In some embodiments, the real-time handwriting recognition is used to provide real-time multi-script handwriting input functionality on a user's device.
In some embodiments, stroke-order independent handwriting recognition on a character level requires that the handwriting recognition model provides the same recognition result for a particular handwritten character, regardless of the sequence by which the individual strokes of the particular character has been provided by the user. For example, Individual strokes of a Chinese character are typically written in a particular order. Although native speakers of Chinese are often trained to write each character in a particular order in school, many users have later adopted personalized styles and stroke sequences that depart from the conventional stroke order. In addition, cursive writing styles are highly individualized, and multiple strokes in a printed form of a Chinese character are often merged into a single stylized stroke that twists and turns, and sometimes even runs on to a next Character. A stroke-order independent recognition model is trained based on images of writing samples that is free of temporal information associated with individual strokes. Therefore, the recognition is independent of stroke-order information. For example, for the Chinese character “”, the same recognition result “” will be given by the handwriting recognition model regardless of whether the user wrote the horizontal stroke first or the vertical stroke first.
As show in
In some embodiments, the user device generates (1004) an input image based on the plurality of handwritten strokes. In some embodiments, the user device provides (1006) the input image to a handwriting recognition model to perform real-time handwriting recognition of the handwritten character, where the handwriting recognition model provides stroke-order independent handwriting recognition. The user device then displays (1008) in real-time of receiving the plurality of handwritten strokes, an identical first output character (e.g., the character “” in printed form) irrespective of a respective order by which the plurality of handwritten strokes (e.g., the horizontal stroke and the vertical stroke) have been received from the user.
Although some conventional handwriting recognition system permits minor stroke-order variations in a small number of characters, by specifically including such variations in the training of the handwriting recognition system. Such conventional handwriting recognition systems are not scalable to accommodate arbitrary stroke-order variations in a large number of complex characters, such as Chinese characters, because even a Character of moderate complexity would already give rise to a large number of variations in stroke order. Furthermore, by merely including more permutations of acceptable stroke orders for particular characters, the conventional recognition systems still would not be able to handle handwriting inputs in which multiple strokes are combined into a single stroke (e.g., as in writing of a super cursive style) or in which one stroke is broken down into multiple sub-strokes (e.g., as in a character captured with super coarse sampling of the input stroke). Therefore, the multi-script handwriting system that is trained on spatially-derived features as described herein provides advantages over the conventional recognition systems.
In some embodiments, stroke-order independent handwriting recognition is performed independent of temporal information associated with individual strokes within each handwritten character. In some embodiments, stroke-order independent handwriting recognition is performed in conjunction with stroke-distribution information which takes into account of spatial distribution of individual strokes before they are merged into a flat input image. More details on how the temporally-derived stroke-distribution information is used to augment the stroke-order independent handwriting recognition described above are provided later in the specification (e.g., with respect to
In some embodiments, the handwriting recognition model provides (1010) stroke-direction independent handwriting recognition. In some embodiments, stroke-direction independent recognition requires that the user device displays in response to receiving the plurality of handwriting inputs, the identical first output character irrespective of a respective stroke direction by which each of the plurality of handwritten strokes have been provided by the user. For example, if the user has written the Chinese character “” in the handwriting input area of the user device, the handwriting recognition model would output the same recognition result, regardless of whether the user has drawn the horizontal stroke from left to right or from right to left. Similarly, the handwriting recognition model would output the same recognition result, regardless of whether the user has drawn the vertical stroke in the downward direction or in the upward direction. In another example, many Chinese characters are structurally made of two or more radicals. Some Chinese characters each include a left radical and a right radical, and people customarily write the left radical first, and the right radical second. In some embodiments, the handwriting recognition model would provide the same recognition result regardless of whether the user has written the right radical or the left radical first, as long as the resulting handwriting input shows the left radical to the left of the right radical when the user completes the handwritten character. Similarly, some Chinese characters each include a top radical and a bottom radical, and people customarily write the top radical first, and the bottom radical last. In some embodiments, the handwriting recognition model would provide the same recognition result regardless of whether the user has written the top radical or the bottom radical first, as long as the resulting handwriting input shows the top radical above the bottom radical. In other words, the handwriting recognition model does not rely on the directions by which the user provides the individual strokes of the handwritten character to determine the identity of the handwritten character.
In some embodiments, the handwriting recognition model provides handwriting recognition based on the image of a recognition unit, regardless of the number of sub-strokes by which the recognition unit has been provided by the user. In other words, in some embodiments, the handwriting recognition model provides (1014) stroke-count independent handwriting recognition. In some embodiments, the user device displays in response to receiving the plurality of handwritten strokes, the identical first output character irrespective of how many handwritten strokes are used to form a continuous stroke in the input image. For example, if the user has written the Chinese character “” in the handwriting input area, the handwriting recognition model outputs the same recognition result, regardless of whether the user has provided four strokes (e.g., two short horizontal strokes and two short vertical strokes to make up the cross-shaped character), or two strokes (e.g., an L-shaped stroke and a 7-shaped stroke, or a horizontal stroke and a vertical stroke), or any other number of strokes (e.g., hundreds of extremely short strokes or dots) to make up the shape of the character “”.
In some embodiments, not only is the handwriting recognition model capable of recognizing the same character regardless of the order, direction, and stroke-count by which each single character has been written, the handwriting recognition model is also capable of recognizing multiple characters regardless of the temporal order by which the strokes of the multiple characters have been provided by the user.
In some embodiments, the user device has not only received the first plurality of handwritten strokes, but also received (1016) a second plurality of handwritten strokes from the user, where the second plurality of handwritten strokes correspond to a second handwritten character. In some embodiments, the user device generates (1018) a second input image based on the second plurality of handwritten strokes. In some embodiments, the user device provides (1020) the second input image to the handwriting recognition model to perform real-time recognition of the second handwritten character. In some embodiments, the user device displays (1022) in real-time of receiving the second plurality of handwritten strokes, a second output character corresponding to the second plurality of handwritten strokes. In some embodiments, the second output character and the first output character are concurrently displayed in a spatial sequence independent of a respective order by which the first plurality of handwritten strokes and the second plurality of handwritten strokes have been provided by the user. For example, if the user has written two Chinese characters (e.g., “” and “”) in the handwriting input area of the user device, the user device will display the recognition result “” regardless of whether the user has written strokes of the character “” or the strokes of the character “” first, as long as the handwriting input currently accumulated in the handwriting input area shows the strokes for the character “” to the left of the strokes for the character “”. In fact, even if the user has written some of the strokes (e.g., the left-slanted stroke) for the character “” before some of the strokes (e.g., the vertical stroke) for the character “”, as long as the resulting image of the handwriting input in the handwriting input area shows all the strokes for the character “” to the left of all the strokes for the character “”, the user device will show the recognition result “” in the spatial sequence of the two handwritten characters.
In other words, as shown in
In some embodiments, the handwriting recognition model provides stroke-order independent recognition on a sentence to sentence level. For example, even if the handwritten character “” is in a first handwritten sentence and the handwritten character “” is in a second handwritten sentence, and the two handwritten characters are separated by one or more other handwritten characters and/or words in the handwriting input area, the handwriting recognition model would still provide the recognition result showing the two characters in the spatial sequence “”. The recognition result and the spatial sequence of the two recognized characters remain the same regardless of the temporal order by which the strokes of the two characters have been provided by the user, provided that the recognition units for the two characters are spatially arranged in the sequence “ . . . ” when the user completes the handwriting input. In some embodiments, the first handwritten character (e.g., “”) is provided by the user as part of a first handwritten sentence (e.g., “” is a number.”), and the second handwriting character (e.g., “” is provided by the user as part of a second handwritten sentence (e.g., “ is another number.”) and the first and the second handwritten sentences are concurrently displayed in a handwriting input area of the user device. In some embodiments, when the user confirms that the recognition result (e.g., “ is a number. is another number.”) is the correct recognition result, the two sentences will be entered into a text input area of the user device, and the handwriting input area will be cleared for the user to enter another handwriting input.
In some embodiments, since the handwriting recognition model is stroke-order independent not only on a character-level, but also on a phrase level and a sentence level, the user can make corrections to a previously uncompleted character after subsequent characters have been written. For example, if the user has forgotten to write a particular stroke for a character before moving on to write one or more subsequent characters in the handwriting input area, the user can still put down the missing stroke later at the right location in the particular character to receive the correct recognition result.
In conventional stroke-order dependent recognition systems (e.g., an HMM-based recognition system), once a character is written, it is committed, and the user can no longer make any changes to it. If the user wishes to make any changes, the user has to delete the character and all subsequent characters to start all over again. In some conventional recognition systems, the user is required to complete a handwritten character within a short, predetermined time window, and any strokes entered outside of the predetermined time window would not be included in the same recognition unit as other strokes provided during the time window. Such conventional systems are difficult to use and cause much frustration for the user. A stroke-order independent system does not suffer from these shortcomings, and the user can complete a character in any order and any time frame as the user seems fit. The user may also make a correction (e.g., add one or more strokes) to an earlier written character after having subsequently written one or more characters in the handwriting input interface. In some embodiments, the user may also individually delete (e.g., using the methods described later with respect to
As shown in
In some embodiments, the handwriting recognition module recognizes the handwriting input written in a default writing direction from left to right. For example, the user can write characters from left to right, and in one or more rows. In response to the handwriting input, the handwriting input module presents recognition results that include characters in a spatial sequence from left to right, and in one or more rows as necessary. If the user selects a recognition result, the selected recognition result is inputted into the text input area of the user device. In some embodiments, the default writing direction is from top to bottom. In some embodiments, the default writing direction is from right to left. In some embodiments, the user optionally changes the default writing direction to an alternative writing direction after a recognition result has been selected and the handwriting input area has been cleared.
In some embodiments, the handwriting input module allows the user to enter multiple-character handwriting input in the handwriting input area and allows deletion of strokes from the handwriting input one recognition unit at a time, rather than all recognition units at once. In some embodiments, the handwriting input module allows deletion from the handwriting input one stroke at a time. In some embodiments, the deletion of recognition unit proceeds one by one in the direction opposite to the default writing direction, regardless of the order by which the recognition units or strokes have been entered to produce the current handwriting input. In some embodiments, the deletion of strokes proceeds one by one in the reverse order it has been entered within each recognition unit, and when the strokes in one recognition unit have all been deleted, the deletion of strokes proceed to the next recognition unit in the direction opposite to the default writing direction.
In some embodiments, while the third output character and the second output character are concurrently displayed as a candidate recognition result in the candidate display area of the handwriting input interface, the user device receives a deletion input from the user. In response to the deletion input, the user device deletes the second output character from the recognition result, while maintaining the third output character in the recognition result displayed in the candidate display area.
In some embodiments, as shown in
In some embodiments, the handwritten character is a multi-stroke Chinese character. In some embodiments, the first plurality of handwriting input is provided in a cursive writing style. In some embodiments, the first plurality of handwriting input is provided in a cursive writing style and the handwritten character is a multi-stroke Chinese character. In some embodiments, the handwritten characters are written in Arabic in a cursive style. In some embodiments, the handwritten characters are written in other scripts in a cursive style.
In some embodiments, the user device establishes respective predetermined constraints on a set of acceptable dimensions for a handwritten character input, and segments a currently accumulated plurality of handwritten strokes into a plurality of recognition units based on the respective predetermined constraints, where a respective input image is generated from each of the recognition units, provided to the handwriting recognition model, and recognized as a corresponding output character.
In some embodiments, the user device receives an additional handwritten stroke from the user after having segmented the currently accumulated plurality of handwritten strokes. The user device assigns the additional handwritten stroke to a respective one of the plurality of recognition units based on a spatial position of the additional handwritten stroke relative to the plurality of recognition units.
Attention is now turned to exemplary user interfaces for providing handwriting recognition and input on a user device. In some embodiments, the exemplary user interfaces are provided on a user device based on a multi-script handwriting recognition model that provides real-time, stroke-order independent handwriting recognition of a user's handwriting input. In some embodiments, the exemplary user interfaces are user interfaces of an exemplary handwriting input interface 802 (e.g., shown in
As described herein, the multi-script handwriting recognition model is capable of having a very large repertoire of tens of thousands of characters in many different scripts and languages. As a result, it is very likely that for a handwriting input, the recognition model will identify a large number of output characters that all have a reasonably good likelihood of being the character intended by the user. On a user device having a limited display area, it is advantageous to provide only a subset of the recognition results initially, while keeping the other results available upon user request.
As shown in
In some embodiments, the top-ranked candidate result (e.g., “/”) is tentatively displayed in the text input area 808, e.g., within a box 1118. The user can optionally confirm that the top-ranked candidate is the intended input with a simple confirmation input (e.g., by pressing the “Enter” key, or providing a double-tap gesture in the handwriting input area).
As shown in
In some embodiments, the initially displayed normal view of the candidate display area 806 only shows the most commonly used characters used in a respective script or language, while the extended view shows all candidate characters, including characters that are rarely used in a script or language. The extended view of the candidate display area may be designed in different ways.
As shown in
In
In some embodiments, the characters displayed in the initial candidate display area 806 include only characters from a set of commonly used characters associated with a script (e.g., all characters in the basic block of the CJK script, as encoded according to the Unicode standard). In some embodiments, the characters displayed in the extended candidate display area 1128 further include a set of rare characters associated with the script (e.g., all characters in the extended block of the CJK script, as encoded according to the Unicode standard). In some embodiments, the extended candidate display area 1128 further includes candidate characters from other scripts that are not commonly used by the user, e.g., the Greek script, the Arabic script, and/or the emoji script.
In some embodiments, as shown in
In some embodiments, the extended candidate display area 1128 further includes one or more affordances to sort the candidate characters in a respective tabbed page based on a respective criterion (e.g., based on phonetic spelling, based on number of strokes, and based on radicals, etc.). The ability to sort the candidate characters in each category according to a criterion other than the recognition confidence scores provides the user with additional ability to quickly find the desired candidate character for text input.
In some embodiments, to address the above issues, the user device identifies candidate characters that have a great resemblance to one another (e.g., according to a concordance or dictionary of similar-looking characters, or some image-based criteria), and group them into a respective group. In some embodiments, one or more groups of similar-looking characters may be identified from a set of candidate characters for a given handwriting input. In some embodiments, the user device identified a representative candidate character from among a plurality of similar-looking candidate characters in the same group, and only displays the representative candidate in the initial candidate display area 806. If a commonly used character does not look similar enough to any other candidate characters, it is displayed by itself. In some embodiments, as shown in
In some embodiments, once the representative character(s) are displayed to the user, the user can optionally expand the candidate display area 806 to show the similar-looking candidate characters in an expanded view. In some embodiments, the selection of a particular representative character can cause the expanded view of only those candidate characters in the same group as the selected representative character.
Various designs for providing the expanded view of the similar-looking candidates are possible.
As shown in
As shown in
In some embodiments, if the user does not see a desired candidate character in the expanded view of the first representative candidate character 1142, the user can optionally use the same gesture to expand other representative characters displayed in the candidate display area 806. In some embodiments, expanding another representative character in the candidate display area 806 automatically restores the currently presented expanded view to a normal view. In some embodiments, the user optionally uses a contraction gesture to restore the currently expanded view to a normal view. In some embodiments, the user can scroll the candidate display area 806 (e.g., to the left or to the right) to reveal other candidate characters that are not visible in the candidate display area 806.
As shown in
In some embodiments, the user device displays (1210), in an initial view of a candidate display area (e.g., 806 as shown in
In some embodiments, the user device receives (1212) a user input selecting the affordance for invoking the extended view, e.g., as shown in
In some embodiments, the respective characters in the first category are characters found in a dictionary of commonly used characters, and respective characters in the second category are characters found in a dictionary of rare characters. In some embodiments, the dictionary of commonly used characters and the dictionary of rare characters are dynamically adjusted or updated based on a usage history associated with the user device.
In some embodiments, the user device identifies (1216) from the plurality of output characters, a group of characters that are visually similar to one another in accordance with a predetermined similarity criterion (e.g., based on a dictionary of similar characters or based on some spatially-derived features). In some embodiments, the user device selects from the group of visually similar characters a representative character based on a predetermined selection criterion (e.g., based on historic usage frequency). In some embodiments, the predetermined selection criterion is based on a relative usage frequency of the characters in the group. In some embodiments, the predetermined selection criterion is based on a preferred input language associated with the device. In some embodiments, the representative candidate is selected based on other factors indicative of the likelihood that each candidate is the intended input by the user. These factors include, for example, whether the candidate character belongs to a script for a soft keyboard that is currently installed on the user's device, or whether the candidate character is among a set of most commonly used characters in a particular language associated with the user or user device, etc.
In some embodiments, the user device displays (1220) the representative character (e.g., “”) in the initial view of the candidate display area (e.g., 806 in
In some embodiments, the predetermined expansion input is an expand gesture detected over the representative character displayed in the candidate display area. In some embodiments, the predetermined expansion input is a contact that is detected over the representative character displayed in the candidate display area and that is sustained for longer than a predetermined threshold time. In some embodiments, the sustained contact for expanding the group has a longer threshold duration than a tap gesture of selecting the representative character for text input.
In some embodiments, each representative character is displayed concurrently with a respective affordance (e.g., a respective expand button) to invoke the extended view of its group of similar-looking candidate characters. In some embodiments, the predetermined expansion input is a selection of the respective affordance associated with the representative character.
As described herein, in some embodiments, the repertoire of the multi-script handwriting recognition model includes an emoji script. The handwriting input recognition module can recognizes an emoji character based on a user's handwriting input. In some embodiments, the handwriting recognition module presents both emoji characters identified directly from the handwriting, and a character or word in a natural human language representing the identified emoji character. In some embodiments, the handwriting input module recognizes a character or word in a natural human language based on a user's handwriting input, and presents both the recognized character or word, and an emoji character that corresponds to the recognized character or word. In other words, the handwriting input module provides ways for entering an emoji character without switching from the handwriting input interface to an emoji keyboard. In addition, the handwriting input module also provides a way to enter regular natural language characters and words, by drawing an emoji character by hand.
As shown in
As shown in
As shown in
As shown in
In the process 1400, the user device receives (1402) a handwriting input from a user. The handwriting input includes a plurality of handwritten strokes provided in an handwriting input area of a handwriting input interface. In some embodiments, the user device recognizes (1404), based on a handwriting recognition model, a plurality of output characters from the handwriting input. In some embodiments, the output characters include at least a first emoji character (e.g., the stylized exclamation point “” or the emoji character “♥” in
In some embodiments, based on the handwriting recognition model, the user device optionally recognizes (1408) at least a first semantic unit (e.g., the word—thanks”) from the handwriting input, wherein the first semantic unit comprises a respective character, word or phrase that is capable of conveying a respective semantic meaning in a respective human language. In some embodiments, the user device identifies (1410) a second emoji character (e.g., a “handshake” emoji character) associated with the first semantic unit (e.g., the word “Thanks”) recognized from the handwriting input. In some embodiments, the user device displays (1412), in the candidate display area of the handwriting input interface, a second recognition result (e.g., a recognition result showing a “handshake” emoji character followed by the “” and a “♥” emoji characters) comprising at least the second emoji character identified from the first semantic unit (e.g., the word “Thanks”). In some embodiments, displaying the second recognition result further includes concurrently displaying the second recognition result with a third recognition result (e.g., a recognition result “Thanks♥”) comprising at least the first semantic unit (e.g., the word “Thanks”).
In some embodiments, the user receives a user input selecting the first recognition result displayed in the candidate display area. In some embodiments, in response to the user input, the user device enters text of the selected first recognition result in a text input area of the handwriting input interface, where the text includes at least the first emoji character and the first character from the script of the natural human language. In other words, the user is able to enter a mixed-script text input using a single handwriting input (albeit, a handwriting input comprising multiple strokes) in the handwriting input area, without switching between a natural language keyboard and an emoji character keyboard.
In some embodiments, the handwriting recognition model has been trained on a multi-script training corpus comprising writing samples corresponding to characters of at least three non-overlapping scripts, and the three non-overlapping scripts includes a set of emoji characters, Chinese characters, and Latin script.
In some embodiments, the user device identifies (1414) a second semantic unit (e.g., the word “Love”) corresponding to the first emoji character (e.g., the “♥” emoji character) recognized directly from the handwriting input. In some embodiments, the user device displays (1416) in the candidate display area of the handwriting input interface, a fourth recognition result (e.g., 1328 in
In some embodiments, the user device allows the user to enter regular text by drawing an emoji character. For example, if the user does not know how to spell the word “elephant,” the user optionally draw a stylized emoji character for “elephant” in the handwriting input area, and if the user device can correctly recognize the handwriting input as an emoji character for “elephant,” the user device optionally also presents the word “elephant” in normal text as one of the recognition results displayed in the candidate display area. In another example, the user may draw a stylized cat in the handwriting input area, in lieu of writing the Chinese character “”. If the user device identifies the emoji character for “cat” based on the handwriting input provided by the user, the user device optionally also presents the Chinese character “” which means “cat” in Chinese, along with the emoji character for “cat” in the candidate recognition results. By presenting normal text for a recognized emoji character, the user device provides an alternative way of entering complex characters or words using a few stylized strokes commonly associated with a well-known emoji character. In some embodiments, the user device stores a dictionary linking emoji characters with their corresponding normal text (e.g., characters, words, phrases, symbols, etc.) in one or more preferred scripts or languages (e.g., English or Chinese).
In some embodiments, the user device recognizes an emoji character based on a visual resemblance of the emoji character to an image generated from the handwriting input. In some embodiments, to enable the recognition of emoji characters from a handwriting input, the handwriting recognition model used on the user device is trained using a training corpus that include both handwriting samples corresponding to characters of a script of a natural human language and also handwriting samples corresponding to a set of artificially designed emoji characters. In some embodiments, the emoji characters related to the same semantic concept may have different appearance when used in a mixed input with text of different natural languages. For example, an emoji character for the semantic concept of “Love” may be a “heart” emoji character when presented with normal text of one natural language (e.g., Japanese), and a “kiss” emoji character when presented with normal text of another natural language (e.g., English or French).
As described herein, when performing recognition of a multi-character handwriting input, the handwriting input module performs segmentation of the handwriting input currently accumulated in the handwriting input area, and divides the accumulated strokes into one or more recognition units. One of the parameters used to determine how to segment a handwriting input may be how the strokes are clustered in the handwriting input area and the distance between the different clusters of strokes. Since people have different writing styles. Some people tend to write very sparsely with large distances between strokes or different parts of the same character, while other people tend to write very densely with very small distances between strokes or different characters. Even for the same user, due to imperfect planning, a handwritten character may depart from a balanced appearance and be lopsided, stretched, or squeezed in different ways. As described herein, the multi-script handwriting recognition model provides stroke-order independent recognition, therefore, the user may write characters or parts of characters out of sequence. As a result, spatial uniformity and balance in a handwriting input between characters may be difficult to attain.
In some embodiments, the handwriting input model described herein provides a way for the user to inform the handwriting input module whether to merge two adjacent recognition units into a single recognition unit or to divide a single recognition unit into two separate recognition units. With the user's help, the handwriting input module can revise the initial segmentation, and generate a result intended by the user.
As shown in
In this example, suppose that the user in fact intended the handwriting input to be recognized as a single character, but unintentionally left too much space between the left portion (e.g., the left radical “”) and the right portion (e.g., the right radical “”) of the handwritten character (e.g., “”). Having seen the results (e.g., 1512, 1514, 1516, and 1518) presented in the candidate display area 806, the user would realize that the user device has incorrectly segmented the current handwriting input into two recognition units. Although the segmentation may be based on an objective standard, it would not be desirable for the user to delete the current handwriting input and rewrite the whole character again with a smaller distance between the left and the right portions.
Instead, as shown in
As shown in
Following the handwritten strokes 1530, the user continues to write more strokes 1536 (e.g., three more strokes) to the right of the strokes 1530, as shown in
In this example, suppose that the last two sets of strokes 1530 and 1536 are in fact intended as two separate characters (e.g., “” and “”). After the user sees that the user device has incorrectly combined the two sets of strokes 1530 and 1536 into a single recognition unit, the user proceeds to provide an expand gesture to notify the user device that the two sets of strokes 1530 and 1536 should be divided into two separate recognition units. As shown in
As shown in
In some embodiments, the user device receives (1602) a handwriting input from a user. The handwriting input includes a plurality of handwritten strokes provided in a touch-sensitive surface coupled to the device. In some embodiments, the user device renders (1604), in real-time, the plurality of handwritten strokes in a handwriting input area (e.g., handwriting input area 806 of
In some embodiments, upon receiving a pinch gesture input, the user device generates (1606) a first recognition result based on the plurality of handwritten strokes by treating the plurality of handwritten strokes as a single recognition unit, e.g., as illustrated in
In some embodiments, upon receiving a expand gesture input, the user device generates (1608) a second recognition result based on the plurality of handwritten strokes by treating the plurality of handwritten strokes as two separate recognition units pulled apart by the expand gesture input, e.g., as illustrated in
In some embodiments, upon generating a respective one of the first and second recognition results, the user device displays the generated recognition result in a candidate display area of the handwriting input interface, e.g., as shown in
In some embodiments, the pinch gesture input comprises two simultaneous contacts on the touch-sensitive surface that converge toward each other in an area occupied by the plurality of handwritten strokes. In some embodiments, the expand gesture input comprises two simultaneous contacts on the touch-sensitive surface that diverge from each other in an area occupied by the plurality of handwritten strokes.
In some embodiments, the user device identifies (e.g., 1614) two adjacent recognition units from the plurality of handwritten strokes. The user device displays (1616), in the candidate display area, an initial recognition result (e.g., results 1512, 1514, 1516, and 1518 in
In some embodiments, the user device identifies (1624) a single recognition unit from the plurality of handwritten strokes. The user device displays (1626), in the candidate display area, an initial recognition result (e.g., result 1538 or 1540 of
In some embodiments, the user optionally provides a pinch gesture to inform the user device to treat a plurality of strokes as a single recognition unit, immediately after the user has provided the strokes and realized that the strokes may be too spread out for a correct segmentation based on a standard segmentation process. The user device can distinguish the pinch gesture from a regular stroke based on the two simultaneous contacts present in a pinch gesture. Similarly, in some embodiments, the user optionally provides an expand gesture to inform the user device to treat a plurality of strokes two separate recognition units, immediately after the user has provided the strokes and realized that the strokes may be too close together for a correct segmentation based on a standard segmentation process. The user device can distinguish the expand gesture from a regular stroke based on the two simultaneous contacts present in a pinch gesture.
In some embodiments, the motion direction of the pinch or expand gesture is optionally used to provide additional guidance on how to segment the strokes under the gesture. For example, if multi-line handwriting input is enabled for the handwriting input area, a pinch gesture with two contacts moving in the vertical direction can inform the handwriting input module to merge two recognition units identified in two adjacent lines into a single recognition unit (e.g., as a top radical and a bottom radical). Similarly, an expand gesture with two contacts moving in the vertical direction can inform the handwriting input module to divide a single recognition unit into two recognition units in two adjacent lines. In some embodiments, the pinch and expand gestures can also provide segmentation guidance in a sub-portion of a character input, e.g., merging two sub-components or divide a single component in a composite character (, , , , , etc.), in different parts (e.g., upper, lower, left, or right portions) of the composite character. This is particularly helpful for recognizing complex composite Chinese characters, because users tends to lose the correct proportions and balance when writing a complex composite character by hand. Being able to adjust the proportions and balance of the handwriting input, e.g., by way of the pinch and expand gestures, after the completion of the handwriting input is particular helpful for the user to input the correct character without having to make several attempts to get at the correct proportions and balance.
As described herein, the handwriting input module allows a user to enter a multi-character handwriting input, and allows out-of-order strokes for the multi-character handwriting input within a character, across multiple characters, and even across multiple phrases, sentences, and/or lines in the handwriting input area. In some embodiments, the handwriting input module also provides character-by-character deletion in the handwriting input area, where the order of character deletion is in the reverse writing direction, and independent of when the strokes for each character has been provided in the handwriting input area. In some embodiments, the deletion of each recognition unit (e.g., character or radical) in the handwriting input area is optionally performed stroke-by-stroke, where the strokes are deleted in a reverse temporal order by which they were provided within the recognition unit.
As shown in
In some embodiments, when the user's finger first touches the delete button 1732 on the touch-sensitive screen, the last recognition unit (e.g., the recognition unit for the character “”) in the default writing direction (e.g., from left to right) is visually highlighted (e.g., highlighted with a border 1734, or lightened background, etc.) relative to the other recognition unit(s) concurrently displayed within the handwriting input area 804, as shown in
In some embodiments, when the user device detects that the user has maintained the contact 1730 on the delete button 1732 for more than a threshold duration, the user device removes the highlighted recognition unit (e.g., in box 1734) from the handwriting input area 806, as shown in
As shown in
In some embodiments, the user device renders (1814) the plurality of handwritten strokes in the handwriting input area of the handwriting input interface as the plurality of handwritten strokes are provided by the user in real-time, e.g., as illustrated in
In some embodiments, the end recognition unit does not include (1818) a temporally final handwritten stroke among the plurality of handwritten strokes provided by the user. For example, if the user had provided the stroke 1718 after he or she has provided the strokes 1726 and 1710, the end recognition unit including the strokes 1726 and 1710 would still be deleted first.
In some embodiments, in response to receiving an initial portion of the deletion input, the user device visually distinguishes (1820) the end recognition unit from other recognition units identified in the handwriting input area, e.g., as illustrated in
In some embodiments, the end recognition unit corresponds to a handwritten Chinese character. In some embodiments, the handwriting input is written in a cursive writing style. In some embodiments, the handwriting input corresponds to multiple Chinese characters written in a cursive writing style. In some embodiments, at least one of the handwritten strokes is divided into two adjacent recognition units of the plurality of recognition units. For example, sometimes, a user may use a long stroke that runs on into multiple characters, and in such cases, the segmentation module of the handwriting input module optionally divides the long stroke into several recognition units. When the deletion of handwriting input is performed character-by-character (or recognition unit by recognition unit), only a segment of the long stroke is deleted at a time (e.g., the segment within a corresponding recognition unit).
In some embodiments, the deletion input is (1824) a sustained contact on a deletion button provided in the handwriting input interface, and removing the respective subset of the plurality of handwritten strokes further includes removing the subset of handwritten strokes in the end recognition unit from the handwriting input area, stroke-by-stroke in a reverse temporal order by which the subset of handwritten strokes has been provided by the user.
In some embodiments, the user device generates (1826) a partial recognition result comprising a subset of the respective characters recognized from the plurality of recognition units, where each of the subset of the respective characters meets a predetermined confidence threshold, e.g., as illustrated in
In some embodiments, the partial recognition result does not include at least the end character in multi-character recognition result. In some embodiments, the partial recognition result does not include at least an initial character in multi-character recognition result. In some embodiments, the partial recognition result does not include at least an intermediate character in multi-character recognition result.
In some embodiments, the smallest unit of deletion is a radical, and handwriting inputs are deleted one radical at a time whenever a radical happens to be the last recognition unit in the handwriting inputs still remaining in the handwriting input area.
As described herein, in some embodiments, the user device provides both a horizontal writing mode and a vertical writing mode. In some embodiments, the user device allows the user to enter text in one or both of a left-to-right writing direction and a right-to-left direction in the horizontal writing mode. In some embodiments, the user device allows the user to enter text in one or both of a top-down writing direction and a bottom-up direction in the vertical writing mode. In some embodiments, the user device provides various affordances (e.g., a writing mode or writing direction button) on the user interface to invoke a respective writing mode and/or writing direction for the current handwriting inputs. In some embodiments, the text input direction in the text input area is the same as the handwriting input direction in the handwriting input direction by default. In some embodiments, the user device allows the user to manually set the input direction in the text input area and the writing direction in the handwriting input area. In some embodiments, the text display direction in the candidate display area is the same as the handwriting input direction in the handwriting input area by default. In some embodiments, the user device allows the user to manually set the text display direction in the text input area independent of the handwriting input direction in the handwriting input area. In some embodiments, the user device associates the writing mode and/or writing direction of a handwriting input interface with a corresponding device orientation, and changes in the device orientation automatically triggers a change in writing mode and/or writing direction. In some embodiments, a change in writing direction automatically causes entry of a top-ranked recognition result to be entered into the text input area.
In the horizontal input mode, the user can provide handwritten characters in a horizontal writing direction (e.g., with a default writing direction going from left to right, or a default writing direction going from right to left). In the horizontal input mode, the user device performs segmentation of the handwriting input into one or more recognition units along the horizontal writing direction.
In some embodiments, the user device only permits single-line input in the handwriting input area. In some embodiments, as shown in
As shown in
In this example, as shown in
In some embodiments, the change in input mode is optionally triggered by the user touching the special input mode selection affordance 1908. In some embodiments, the input mode selection affordance is a graphical user interface element that also shows the current writing mode, the current writing direction, and/or the current paragraph direction. In some embodiments, the input mode selection affordance can cycle through all available input modes and writing directions provided by the handwriting input interface 802. As shown in
As shown in
In some embodiments, the user device allows the user to separately establish preferred writing directions, paragraph directions for each of the handwriting input area 804, the candidate display area 806, and the text input area 808. In some embodiments, the user device allows the user to establish the preferred writing direction and paragraph direction for each of the handwriting input area 804, the candidate display area 806, and the text input area 808, to be associated with each device orientation.
In some embodiments, the user device determines (2002) an orientation of the device. The orientation of the device and the changes in device orientation can be detected by the accelerometer and/or other orientation sensing element in the user device. In some embodiments, the user device provides (2004) a handwriting input interface on the device in a horizontal input mode in accordance with the device being in a first orientation. A respective line of handwriting input entered in the horizontal input mode is segmented into one or more respective recognition units along a horizontal writing direction. In some embodiments, the device provides (2006) the handwriting input interface on the device in a vertical input mode in accordance with the device in a second orientation. A respective line of handwriting input entered in the vertical input mode is segmented into one or more respective recognition units along a vertical writing direction.
In some embodiments, while operating in the horizontal input mode (2008): the device detects (2010) a change in device orientation from the first orientation to the second orientation. In some embodiments, in response to the change in device orientation, the device switches (2012) from the horizontal input mode to the vertical input mode. This is illustrated, for example, in
In some embodiments, while operating in the horizontal input mode (2020): the user device receives (2022) a first multi-word handwriting input from the user. In response to the first multi-word handwriting input, the user device presents (2024) a first multi-word recognition result in a candidate display area of the handwriting input interface in accordance with the horizontal writing direction. This is illustrated, for example, in
In some embodiments, the user device receives (2032) a first user input selecting the first multi-word recognition result, e.g., as shown in
In some embodiments, the handwriting input area accepts multiple lines of handwriting input in the horizontal writing direction and has a default top-down paragraph direction. In some embodiments, the horizontal writing direction is from left to right. In some embodiments, the horizontal writing direction is from right to left. In some embodiments, the handwriting input area accepts multiple lines of handwriting input in the vertical writing direction and has a default left-to-right paragraph direction. In some embodiments, the handwriting input area accepts multiple lines of handwriting input in the vertical writing direction and has a default right-to-left paragraph direction. In some embodiments, the vertical writing direction is from top to bottom. In some embodiments, the first orientation is a landscape orientation by default, and the second orientation is a portrait orientation by default. In some embodiments, the user device provides a respective affordance in the handwriting input interface for manually switching between the horizontal input mode and the vertical input mode, irrespective of the device orientation. In some embodiments, the user device provides a respective affordance in the handwriting input interface for manually switching between two alternative writing directions. In some embodiments, the user device provides a respective affordance in the handwriting input interface for manually switching between two alternative paragraph directions. In some embodiments, the affordance is a toggle button that rotates through each available combination of the input and paragraph directions, when invoked one or more consecutive times.
In some embodiments, the user device receives (2038) a handwriting input from a user. The handwriting input includes a plurality of handwritten strokes provided in the handwriting input area of the handwriting input interface. In response to the handwriting input, the user device displays (2040) one or more recognition results in a candidate display area of the handwriting input interface. While the one or more recognition results are displayed in the candidate display area, the user device detects (2042) a user input for switching from a current handwriting input mode to an alternative handwriting input mode. In response to the user input (2044): the user device switches (2046) from the current handwriting input mode to the alternative handwriting input mode. In some embodiments, the user device clears (2048) the handwriting input from the handwriting input area. In some embodiments, the user device automatically enters (2050) a top-ranked recognition result of the one or more recognition results displayed in the candidate display area into a text input area of the handwriting input interface. This is illustrated in
As described herein, the handwriting input module allows the user to enter handwritten strokes and/or characters in any temporal order. Thus, deleting an individual handwritten character in a multi-character handwriting input, and rewriting the same or a different handwritten character in the same location as the deleted character is advantageous, because it would help the user revise a long handwriting input without having to delete the whole handwriting input.
As shown in
In this example, after the user has written the two handwriting characters, the user realizes that the first recognition unit is incorrectly written, and as a result, the user device has not identified and presented the desired recognition result in the candidate display area.
In some embodiments, when the user provides a tap gesture (e.g. a contact followed with an immediate lift-off at the same location) on the touch-sensitive display, the user device interprets the tap gesture as an input to cause visually highlighting of individual recognition units that are currently identified in the handwriting input area. In some embodiments, another predetermined gesture (e.g., a multi-finger wiping gesture over the handwriting input area) is used to cause the user device to highlight the individual recognition units in the handwriting input area 804. A tap gesture is sometimes preferred because it is relatively easy to distinguish from a handwritten stroke, which usually involves a sustained contact of a longer duration and with movement of the contact within the handwriting input area 804. A multi-touch gesture is sometimes preferred because it is relatively easy to distinguish from a handwritten stroke, which usually involves a single contact within the handwriting input area 804. In some embodiments, the user device provides an affordance 2112 in the user interface that can be invoked (e.g., via a contact 2114) by the user to cause the individual recognition units to be visually highlighted (e.g., as shown by boxes 2108 and 2110). In some embodiments, the affordance is preferred when there is sufficient screen space to accommodate such an affordance. In some embodiments, the affordance can be invoked multiple consecutive times by the user, which causes the user device to visually highlight recognition unit(s) identified according to a different segmentation chain in the segmentation lattice and for the highlighting to be turned off when all segmentation chains have been shown.
As shown in
As shown in
In the exemplary process 2200, the user device receives (2202) a handwriting input from a user. The handwriting input includes a plurality of handwritten strokes provided on a touch-sensitive surface coupled to the device. In some embodiments, the user device renders (2204) the plurality of handwritten strokes in a handwriting input area (e.g., handwriting input area 804) of a handwriting input interface. In some embodiments, the user device segments (2206) the plurality of handwritten strokes into two or more recognition units, each recognition unit comprising a respective subset of the plurality of handwritten strokes.
In some embodiments, the user device receives (2208) an edit request from the user. In some embodiments, the edit request is (2210) a contact detected over a predetermined affordance (e.g., affordance 2112 in
In some embodiments, in response to the edit request, the user device visually distinguishes (2214) the two or more recognition units in the handwriting input area, e.g., using the boxes 2108 and 2110 in
In some embodiments, the user device provides (2218) a means for individually deleting each of the two or more recognition units from the handwriting input area. In some embodiments, the means for individually deleting each of the two or more recognition units is a respective delete button displayed in proximity to the each recognition unit, e.g., as shown by delete buttons 2116 and 2118 in
In some embodiments, the user device receives (2224), from the user and through the provided means, a deletion input for individually deleting a first recognition unit of the two or more recognition units from the handwriting input area, e.g., as shown in
In some embodiments, the user device generates (2228) a segmentation lattice from the plurality of handwritten strokes, the segmentation lattice includes a plurality of alternative segmentation chains each representing a respective set of recognition units identified from the plurality of handwriting strokes. For example,
As described herein, in some embodiments, the user device provides a continuous input mode in the handwriting input area. Since the area of the handwriting input area is limited on a portable user device, it is sometimes desirable to provide a way to cache the handwriting inputs provided by the user, and allow the user to reuse the screen space without commit the previously provided handwriting inputs. In some embodiments, the user device provides a scrolling handwriting input area, where input area gradually shifts by a certain amount (e.g., one recognition unit at a time) when the user is getting sufficiently close to the end of the handwriting input area. In some embodiments, since shifting the existing recognition units in the handwriting input area may interfere with the user's writing process, and possibly interfere with the correct segmentation of the recognition units, it is sometimes advantageous to recycle a previously used region of the input area without dynamically shifting the recognition units. In some embodiments, when the user reuses an area that is occupied by a handwriting input that has not yet been entered into the text input area, a top recognition result for the handwriting input area is automatically entered into the text input area, such that the user can continue providing a new handwriting input without explicitly selecting the top-ranked recognition result.
In some conventional systems, the user is allowed to write over an existing handwriting input that is still shown in the handwriting input area. In such systems, temporal information is used to determine whether a new stroke is part of an earlier recognition unit or a new recognition unit. Such temporal-information dependent systems place stringent requirements on the speed and tempo by which the user provides the handwriting input, which is difficult to meet by many users. In addition, the visual rendering of the handwriting input can be a jumble that is difficult to for the user to decipher. Thus, the writing process can be frustrating, and confusing for the user, leading to a bad user experience.
As described herein, a fading process is used to indicate when the user can reuse an area occupied by a previously written recognition unit, and continue writing in the handwriting input area. In some embodiments, the fading process gradually reduces the visibility of each recognition unit that has been provided in the handwriting input area for a threshold amount of time, such that when new strokes are written over it, the existing text does not visually compete with the new strokes. In some embodiments, writing over a faded recognition unit automatically causes a top-ranked recognition result for the recognition unit to be entered into the text input area, without requiring the user to stop writing and to explicitly provide a selection input for the top-ranked recognition result. This implicit and automatic confirmation of the top-ranked recognition result improves the input efficient and speed of the handwriting input interface, and reduces the cognitive burden placed on the user to maintain the thought flow of the current text composition. In some embodiments, writing over a faded recognition unit does not cause automatic selection of the top-ranked search result. Instead, the faded recognition units are cached in a handwriting input stack, and combined with the new handwriting input as the current handwriting input. The user can see a recognition results generated based on all of the recognition units accumulated in the handwriting input stack before making a selection.
As shown in
In some embodiments, the user device allows new handwriting input to be provided over the region occupied by a faded recognition unit immediate upon the start of the fading animation. In some embodiments, the user device allows new handwriting input to be provided over the region occupied by a faded recognition unit only after the fading has progressed to a certain stage (e.g., to the faintest level or until the recognition is completely invisible in the region).
As shown in
In some embodiments, when the strokes 2312 is provided over the area occupied by a faded recognition unit (e.g., the recognition unit for the letter “I”) in the handwriting input area, the text of the top-ranked recognition result (e.g., result 2314) for the handwriting input made before the strokes 2312 are not automatically entered into the text input area 808. Instead, the currently handwriting input (both faded and un-faded) in the handwriting input area 804 is cleared, and cached in the handwriting input stack. The new strokes 2312 appended to the cached handwriting input in the handwriting input stack. The user device determines the recognition results based on the entirety of the handwriting input currently accumulated in the handwriting input stack. The recognition results are displayed in the candidate display area. In other words, even though only a part of the currently accumulated handwriting input is shown in the handwriting input area 804, the recognition results are generated based on the entire handwriting input cached in the handwriting input stack (both the portion that is visible and the portions that are no longer visible).
In some embodiments, the user optionally provides a handwriting input in multiple lines. In some embodiments, the same fading process can be used to clear the handwriting input area for a new handwriting input, when multi-line input is enabled.
In some embodiments, the device receives (2402) a first handwriting input from a user. The first handwriting input includes a plurality of handwritten strokes, and the plurality of handwritten strokes form multiple recognition units distributed along a respective writing direction associated with a handwriting input area of a handwriting input interface. In some embodiments, the user device renders (2404) each of the plurality of handwritten strokes in the handwriting input area as the handwritten stroke is provided by the user.
In some embodiments, the user device starts (2406) a respective fading process for each of the multiple recognition units after the recognition unit is completely rendered. In some embodiments, during the respective fading process, the rendering of the recognition unit in the first handwriting input fades away. This is illustrated in
In some embodiments, the user device receives (2408) a second handwriting input from the user over a region of the handwriting input area occupied by a faded recognition unit of the multiple recognition unit, e.g., as illustrated in
In some embodiments, the user device generates (2416) one or more recognition results for the first handwriting input. In some embodiments, the user device displays (2418) the one or more recognition results in a candidate display area of the handwriting input interface. In some embodiments, in response to receiving the second handwriting input, the user device, automatically, without user selection, enters (2420) a top-ranked recognition result displayed in the candidate display area into a text input area of the handwriting input interface. This is illustrated in
In some embodiments, the user device stores (2422) an input stack including the first handwriting input and the second handwriting input. In some embodiments, the user device generates (2424) one or more multi-character recognition results each comprising a respective spatial sequence of characters recognized from a concatenation of the first handwriting input and the second handwriting input. In some embodiments, the user device displays (2426) the one or more multi-character recognition results in a candidate display area of the handwriting input interface, while the rendering of the second handwriting input has replaced the rendering of the first handwriting input in the handwriting input area.
In some embodiments, the respective fading process for each recognition unit is started when a predetermined time period has elapsed after the recognition unit is completed by the user.
In some embodiments, fading process for each recognition unit is started when the user has started inputting the strokes for a next recognition unit after the recognition unit.
In some embodiments, an end state of the respective fading process for each recognition unit is a state with a predetermined minimum visibility for the recognition unit.
In some embodiments, an end state of the respective fading process for each recognition unit is a state with zero visibility for the recognition unit.
In some embodiments, after a last recognition unit in the first handwriting input has become faded, the user device receives (2428) a predetermined revival input from the user. In response to receiving the predetermined revival input, the user device reverts (2430) the last recognition unit from the faded state to an un-faded state. This is illustrated in
As described herein, the multi-script handwriting recognition model performs stroke-order independent, and stroke-direction independent recognition of handwritten characters. In some embodiments, the recognition model is trained on only spatially-derived features contained in flat images of writing samples corresponding to different characters in the vocabulary of the handwriting recognition model. Since the images of the writing sample do not contain any temporal information related to individual strokes contained in the images, the resulting recognition model is stroke-order independent and stroke-direction independent.
As illustrated above, stroke-order and stroke-direction independent handwriting recognition provide many advantages over conventional recognition systems that rely on information related to the temporal generation of the characters (e.g., temporal sequences of strokes in the characters). However, in real-time handwriting recognition scenarios, temporal information related to individual strokes is available, and it is sometimes beneficial to utilize this information to improve recognition accuracy of the handwriting recognition system. The follow describe a technique that integrates temporally-derived stroke-distribution information into the spatial feature extraction of a handwriting recognition model, where the use of the temporally-derived stroke-distribution information does not destroy the stroke-order and/or stroke direction independence of the handwriting recognition system. Based on the stroke-distribution information related to different characters, disambiguation between similar-looking characters that are produced with distinctively different set of strokes becomes possible.
In some embodiments, when a handwriting input is converted to an input image (e.g., an input bitmap image) for the handwriting recognition model (e.g., a CNN), the temporal information associated with individual strokes is lost. For example, for a Chinese character “”, eight strokes (e.g., labeled #1-#8 in
As described herein, the temporal information associated with a character is extracted by computing a variety of pixel distributions to characterize each handwritten stroke. Every handwritten stroke of a character gives rise to a deterministic pattern (or profile) when projected onto a given direction. While this pattern in and of itself may be insufficient to recognize the stroke unambiguously, when combined with other similar patterns, it may be adequate to capture certain characteristics inherent to this particular stroke. Integrating this kind of stroke representation alongside spatial feature extraction (e.g., feature extraction based on input images in a CNN) in turn provides orthogonal information that can be useful to disambiguate between similar-looking characters in the repertoire of the handwriting recognition model.
In the exemplary process 2500, the device separately trains (2502) a set of spatially-derived features and a set of temporally-derived features of a handwriting recognition model, where the set of spatially-derived features are trained on a corpus of training images each being an image of a handwriting sample for a respective character of an output character set, and the set of temporally-derived features are trained on a corpus of stroke-distribution profiles, each stroke-distribution profile numerically characterizing a spatial distribution of a plurality of strokes in a handwriting sample for a respective character of the output character set.
In some embodiments, separately training the set of spatially-derived features further includes (2504) training a convolutional neural network having an input layer, an output layer, and a plurality of convolutional layers including a first convolutional layer, a last convolutional layer, zero or more intermediate convolutional layers between the first convolutional layer and the last convolutional layer, and a hidden layer between the last convolutional layer and the output layer. An exemplary convolutional network 2602 is shown in
In some embodiments, separately training the set of temporally-derived features further includes (2506) providing the plurality of stroke-distribution profiles to a statistical model to determine a plurality of temporally-derived parameters and respective weights for the plurality of temporally-derived parameters for classifying the respective characters of the output character set. In some embodiments, as shown in
In some embodiments, the device combines (2508) the set of spatially-derived features and the set of temporally-derived features in the handwriting recognition model. In some embodiments, combining the set of spatially-derived features and the set of temporally-derived features in the handwriting recognition model includes (2510) injecting the plurality of spatially-derived parameters and the plurality of temporally-derived parameters into one of the convolutional layers or the hidden layer of the convolutional neural network. In some embodiments, the plurality of temporally-derived parameters and respective weights for the plurality temporally-derived parameters are injected into the last convolutional layer (e.g., the last convolutional layer 2610n in
In some embodiments, the device provides (2512) real-time handwriting recognition for a user's handwriting input using the handwriting recognition model.
In some embodiments, the device generates (2514) the corpus of stroke-distribution profiles from a plurality writing samples. In some embodiments, each of the plurality of handwriting samples corresponds (2516) to a character in the output character set and separately preserves respective spatial information for each constituent stroke of the handwriting sample as it was written. In some embodiments, to generate the corpus of stroke-distribution profiles, the device performs (2518) the following steps:
For each of the plurality of handwriting samples (2520): the device identifies (2522) constituent strokes in the handwriting sample; for each of the identified strokes of the handwriting sample, the device calculates (2524) a respective occupancy ratio along each of a plurality of predetermined directions, occupancy ratio being a ratio between a projected span of said each stroke direction and a maximum projected span of said writing sample; for each of the identified strokes of the handwriting sample, the device also calculates (2526) a respective saturation ratio for said each stroke based on a ratio between a respective number of pixels within said each stroke and an overall number of pixels within said writing sample. The user device then generates (2528) a feature vector for the handwriting sample as the stroke-distribution profile of the writing sample, the feature vector including the respective occupancy ratios and the respective saturation ratio of at least N strokes in the handwriting sample, wherein N is a predetermined natural number. In some embodiments, N is less than a maximum stroke count observed in any single writing sample within the plurality of writing samples.
In some embodiments, for each of the plurality of handwriting samples: the device sorts the respective occupancy ratios of the identified strokes in each of the predetermined directions in a descending order; and includes only N top-ranked occupancy ratios and saturation ratios of writing sample in the feature vector of the writing sample.
In some embodiments, the plurality of predetermined directions include a horizontal direction, a vertical direction, a positive 45 degree direction, and a negative 45 degree direction of the writing sample.
In some embodiments, to provide real-time handwriting recognition for a user's handwriting input using the handwriting recognition model, the device receives the user's handwriting input; and in response to receiving the user's handwriting input, provides a handwriting recognition output to the user substantially contemporaneously with the receipt of the handwriting input.
Using the character “” shown in
In some embodiments, once the above spans have been measured for all strokes 1 through S, where S is the number of individual handwritten strokes associated with the input image, the respective occupancy ratio along each projection direction is computed. For example, the respective occupancy ratio Rx(i) along the x-direction for the stroke Si is calculated as Rx(i)=xspan (i)/xspan. Similarly, the respective occupancy ratios along the other projection directions can be calculated, Ry(i)=yspan (i)/yspan, Rc(i)=cspan (i)/cspan, Rd(i)=dspan (i)/dspan.
In some embodiments, the occupancy ratios of all strokes in each direction is sorted separately in decreasing order, and a respective ranking of all strokes in the input image is thus obtained for each projection direction in terms of their occupancy ratios in that direction. The ranking of strokes in each projection direction reflects the relative importance of each stroke along the associated projection direction. This relative importance is irrespective of the order and the direction by which the stroke has been produced in the writing sample. Thus, this ranking based on occupancy ratios is temporally-derived information that is stroke-order and stroke-direction independent.
In some embodiments, a relative weight is given to each stroke, indicating the importance of the stroke relative to the entire character. In some embodiments, the weight is measured by the ratio of the number of pixels in each stroke to the overall number of pixels in the character. This ratio is referred to as a saturation ratio associated with each stroke.
In some embodiments, based on the occupancy ratios and saturation ratio of each stroke, a feature vector can be created for each stroke. For each character, a set of feature vectors including 5S number of features is created. This set of features is referred to as a stroke-distribution profile of the character.
In some embodiments, only a predetermined number of top-ranked strokes are used in constructing the stroke-distribution profile of each character. In some embodiments, the predetermined number of strokes is 10. Based on the top ten strokes, 50 stroke-derived features can be generated for each character. In some embodiments, these features are injected either at the last convolutional layer of a convolutional neural network, or at the subsequent hidden layer.
In some embodiments, during real-time recognition, an input image of a recognition unit is provided to the handwriting recognition mode that has been trained with both the spatially-derived features and the temporally-derived features. The input image is processed through each layer of the handwriting recognition model shown in
The foregoing description, for purpose of explanation, has been described with reference to specific embodiments. However, the illustrative discussions above are not intended to be exhaustive or to limit the invention to the precise forms disclosed. Many modifications and variations are possible in view of the above teachings. The embodiments were chosen and described in order to best explain the principles of the invention and its practical applications, to thereby enable others skilled in the art to best utilize the invention and various embodiments with various modifications as are suited to the particular use contemplated.
This application claims priority to U.S. Provisional Patent Application No. 61/832,942, filed Jun. 9, 2013, which is incorporated herein in its entirety.
Number | Name | Date | Kind |
---|---|---|---|
5438631 | Dai | Aug 1995 | A |
5491758 | Bellegarda et al. | Feb 1996 | A |
5812697 | Sakai et al. | Sep 1998 | A |
5991441 | Jourjine | Nov 1999 | A |
6212298 | Yoshii et al. | Apr 2001 | B1 |
6438631 | Kawase | Aug 2002 | B1 |
7720316 | Shilman et al. | May 2010 | B2 |
8010901 | Rogers | Aug 2011 | B1 |
20030086611 | Loudon et al. | May 2003 | A1 |
20030099398 | Izumi et al. | May 2003 | A1 |
20030212961 | Soin et al. | Nov 2003 | A1 |
20040230912 | Clow | Nov 2004 | A1 |
20060050962 | Geiger et al. | Mar 2006 | A1 |
20060092128 | Gao et al. | May 2006 | A1 |
20070005537 | Abdulkader | Jan 2007 | A1 |
20090161958 | Markiewicz et al. | Jun 2009 | A1 |
20090256808 | Kun et al. | Oct 2009 | A1 |
20090326918 | Georgiev | Dec 2009 | A1 |
20100066691 | Li | Mar 2010 | A1 |
20100329562 | Zhu | Dec 2010 | A1 |
20110279379 | Morwing et al. | Nov 2011 | A1 |
20120095748 | Li | Apr 2012 | A1 |
20120216141 | Li et al. | Aug 2012 | A1 |
20130002553 | Colley | Jan 2013 | A1 |
20130212511 | Kim et al. | Aug 2013 | A1 |
20130251247 | Khorsheed | Sep 2013 | A1 |
20140085215 | Och et al. | Mar 2014 | A1 |
20140143721 | Suzuki et al. | May 2014 | A1 |
20140214398 | Sanders | Jul 2014 | A1 |
20140245221 | Dougherty | Aug 2014 | A1 |
20140361983 | Dolfing | Dec 2014 | A1 |
20140363082 | Dixon | Dec 2014 | A1 |
20140363083 | Xia et al. | Dec 2014 | A1 |
20140365949 | Xia | Dec 2014 | A1 |
Number | Date | Country |
---|---|---|
101676838 | Mar 2010 | CN |
102243570 | Nov 2011 | CN |
102455911 | May 2012 | CN |
103294257 | Sep 2013 | CN |
201142627 | Dec 2011 | TW |
201201113 | Jan 2012 | TW |
201216124 | Apr 2012 | TW |
201234280 | Aug 2012 | TW |
201237764 | Sep 2012 | TW |
201305925 | Feb 2013 | TW |
Entry |
---|
Office Action received for Taiwanese Patent Application No. 103119279, mailed on Sep. 24, 2015, 21 pages (9 pages of English Translation and 12 pages of Official Copy). |
Office Action received for Taiwanese Patent Application No. 103119951, mailed on Nov. 20, 2015, 3 pages (Official Copy Only) (See Communication under 37 CFR § 1.98(a)(3)). |
Office Action received for Taiwanese Patent Application No. 103119952, mailed on Oct. 8, 2015, 16 pages (7 pages of English Translation and 9 pages of Official Copy). |
Non-Final Office action received for U.S. Appl. No. 14/290,945, mailed on Jul. 16, 2015, 11 pages. |
Non-Final Office Action received for U.S. Appl. No. 14/292,138, mailed on Sep. 10, 2015, 29 pages. |
K. C. et al., “A Comprehensive Survey on On-Line Handwriting Recognition Technology and its Real Application to the Nepalese Natural Handwriting”, Kathmandu University Journal of Science, Engineering, and Technology, vol. 5, No. 1, Jan. 2009, pp. 31-55. |
Kessentini et al., “A Multi-Stream HMM-based Approach for Off-line Multi-Script Handwritten Word Recognition”, Proceedings of the ICFHR'08, Jan. 1, 2011, 6 pages. |
Natarajan et al., “Multilingual Machine Printed OCR”, International Journal of Pattern Recognition and Artificial Intelligence, vol. 15, No. 1, 2001, pp. 43-63. |
Natarajan et al., “Multi-lingual Offline Handwriting Recognition using Hidden Markov Models: A Script-Independent Approach”, Arabic and Chinese Handwriting Recognition, Lecture Notes in Computer Science, Sep. 27, 2006, pp. 231-250. |
International Search Report and Written Opinion received for PCT Patent Application No. PCT/US2014/040417, mailed on Sep. 25, 2014, 10 pages. |
Wikipedia,“Framebuffer” [online], 2015, Retrieved from the Internet <URL:https://en.wikipedia.org/wiki/Framebuffer > on Dec. 7, 2015, pp. 1-7. |
Final Office Action received for U.S. Appl. No. 14/290,945, mailed on Jan. 21, 2016, 12 pages. |
International Preliminary Report on Patentability received for PCT Patent Application No. PCT/US2014/040417, mailed on Dec. 23, 2015, 8 pages. |
Number | Date | Country | |
---|---|---|---|
20140363074 A1 | Dec 2014 | US |
Number | Date | Country | |
---|---|---|---|
61832942 | Jun 2013 | US |