EDITING TEXT BASED ON INPUT MODE
Meltem Oktem, Jakob Foerster, Glen Shires · 2016
This text editing system initially detects a user’s cursor placement within a selection of text. The system can then receive a text input from the user using a particular input mode. Accordingly, the system modifies the selection of text based on the received text input and the particular input mode. If the received text input is a character or the particular input mode is character-based, the system inserts the character at a point of the selection of text. If the received text input is a word or the particular input mode is word-based, the system replaces the selection of text with the received word. PROBLEM STATEMENT Typing on small digital keyboards on touchscreen devices can be error prone and produce typos or input of incorrect words. While mapping a user’s motions across a digital keyboard into letters and words, a text input system of the device determines the most likely words given the observed data points. This mapping often fails due to a variety of reasons and the user must then correct the mistyped word. The user can select the mistyped word, by clicking or tapping on the word, in order to correct the spelling or replace the mistyped word. When the user selects the mistyped word, a cursor appears between two letters of the mistyped word. At this point, if the user types or speaks via voice input a single letter or character, the character will be inserted where the cursor was placed. However, if the user types or speaks via voice input a complete word, the word will be inserted in the middle of the mistyped word, which might not be what the user wanted. Accordingly, a method and system that edits a selection of text based on a received text input and a particular input mode is disclosed. 2 Oktem et al.: EDITING TEXT BASED ON INPUT MODE Published by Technical Disclosure Commons, 2016 TEXT EDITING SYSTEM The system and techniques described in this disclosure relate to a text editing system. The text editing system can be implemented for use by an electronic device. The device may be a stand-alone electronic device or may be connected to one or more other devices via the Internet, an intranet, or in any networked environment. The text editing system can include program instructions implemented locally on a client device or implemented across a client device and server environment. The client device can be any electronic device such as a mobile device, a smartphone, a tablet, a handheld electronic device, a wearable device, etc. Fig. 1 illustrates an example method 100 for editing a selection of text based on a received text input and a particular input mode. Method 100 can be performed by an electronic device implementing a text editing system. Electronic devices can include touch interfaces, e.g., digital keyboards, for users to input text and/or microphones to input text via natural language speech. While inputting text, the user may want to edit some portion of the inputted text. The user can tap or click on the desired text in order to identify for the system where the user wants to edit. The system detects (110) a selection of text from the user. As visual feedback for the detection, the system can place a cursor at a location within the text that corresponds to where the user selected the text, e.g., where the user tapped at the text editing user interface. In an example scenario, as shown in Fig. 2A, a user writing an email may type “fst” by mistake. The user can tap or click on “fst” in order to edit the text “fst.” The system, on receiving the selection of “fst” from the user, places a cursor between the letters “f” and “s” and underline the entire text, i.e., “fst,” as shown in Fig. 2A. After making the selection of text, the user provides text input using the keyboard or speech input. The user can provide the text input using a particular input mode. The particular 3 Defensive Publications Series, Art. 110 [2016] http://www.tdcommons.org/dpubs_series/110 input mode can be character-based where the user inputs individual characters or letters. For example, the user may tap on individual letters of the keyboard in order to enter a character, i.e., touch typing, or the user may speak a letter via voice input, i.e., voicespelling. Alternatively, the particular input mode can be word-based where the user inputs a complete word. For example, the user may speak a word via voice input, i.e., voicedictation, or the user can input words using a swipe based input mechanism, i.e., drawing a path on the keyboard that covers a combination of letters within a word. The system receives (120) the text input from the user using the particular input mode. The system identifies (130) the particular input mode, i.e., character-based or wordbased, the user used to generate the text input. The system can also make available different mechanisms for the user to identify the particular input mode for the system. In one implementation, the user can set one or more predetermined gestures, e.g., a double -tap or long -press corresponding to the particular input methods. For example, when the user wants to utilize a word-based input method, the user can double tap in the user interface to identify to the system that he is using a word-based input system. The one or more predetermined gestures may be stored in a memory of the electronic device, in the settings of the system, or in an account associated with the user at a cloud database. In additional implementations, the user can select/toggle settings perform physical motions at the device, e.g., flipping or shaking the device, or input gestures, e.g., swiping right or left to identify for the system particular input modes the user is engaging. The system may also use visual cues for displaying which particular input mode is currently engaged. For example, the system can highlight a complete word when the user is using word-based input mode. 4 Oktem et al.: EDITING TEXT BASED ON INPUT MODE Published by Technical Disclosure Commons, 2016 The system modifies (140) the selection of text based on the received text input and the particular input mode. If the received text input is a character or the particular input mode is character-based, the system inserts (150) the received character at the point where the text was selected by the user. For example, as shown in Fig. 2B, the user inputs a single letter “a” via a virtual keyboard. The system can receive the text input, i.e., “a,” and may determine that the particular input mode is character-based. Accordingly, the system modifies the selection of text, i.e., “fst,” by inserting the character “a” in between letters “f” and “s.” Therefore, as shown in Fig. 2B, the system modifies the mistyped text “fst” to “fast.” If the received text input is a word or the particular input mode is word-based, the system replaces (160) the selection of text with the received word. For example, as shown in Fig. 2C, the user inputs the complete word “quick” using a swipe based input mechanism. The system can receive the text input, i.e., “quick,” and may determine that the particular input mode is wordbased. Accordingly, the system modifies the selection of text, i.e., “fst,” by replacing “fst” with “quick,” as shown in Fig. 2C. Hence, the method 100 provides a user text input method that differentiates when to insert characters and when to replace words while the user is editing text. Fig. 3 is a block diagram of an exemplary environment that shows components of a system for implementing the techniques described in this disclosure. The environment includes client devices 310, servers 330, and network 340. Network 340 connects client devices 310 to servers 330. Client device 310 is an electronic device. Client device 310 may be capable of requesting and receiving data/communications over network 340. Example client devices 310 are personal computers (e.g., laptops), mobile communication devices, (e.g. smartphones, tablet computing devices), set-top boxes, game-consoles, embedded systems, and other devices 310’ that can send and receive data/communications over network 340. The client device 310 further 5 Defensive Publications Series, Art. 110 [2016] http://www.tdcommons.org/dpubs_series/110 includes a touch screen 350 that is capable of determining user inputs. The touch screen may include text editing area 352, e.g., virtual keyboard. The client device 310 also includes a microphone 370 for capturing audio inputs such as voice inputs. A text editing system 360, as described above, utilizes the touch screen 350 and microphone 370 for editing a selection of text based on a received text input and a particular input mode. The client device 310 also includes other components, e.g., loudspeaker 380, camera, or battery. The client device 310 connects to server(s) 330 or client device 310’ using a connection module 390. The connection module 390 may utilize wired or wireless connections for connecting to other device. Resources 318’ may be, for example, memory or storage resources; a text, image, video, audio, JavaScript, CSS, or other file or object; or other relevant resources. Network 340 may be any network or combination of networks that can carry data communication. The subject matter described in this disclosure can be implemented in software and/or hardware (for example, computers, circuits, or processors). The subject matter can be implemented on a single device or across multiple devices (for example, a client device and a server device). Devices implementing the subject matter can be connected through a wired and/or wireless network. Such devices can receive inputs from a user (for example, from a mouse, keyboard, or touchscreen) and produce an output to a user (for example, through a display). Specific examples disclosed are provided for illustrative purposes and do not limit the scope of the disclosure. 6 Oktem et al.: EDITING TEXT BASED ON INPUT MODE Published by Technical Disclosure Commons, 2016