Using remote words in data streams from remote devices to autocorrect input text

Provided are a computer program product, system, and method for using remote words in data streams from remote devices to autocorrect input text. Remote words included in a at least one data stream are accessed from at least one remote device over a network to store in a remote word corpus. User input text is received in a text entry field in a user interface rendered by the computer device. Local words are maintained in a local word corpus stored in the computer device. The local words and the remote words are used to autocorrect and validate the user input text.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a computer program product, system, and method for using remote words in data streams from remote devices to autocorrect input text.

2. Description of the Related Art

Autocorrect technologies provide replacement words for user inputted text when the user inputted text does not match a word in a word corpus at the computer device in which the user is inputting text. The autocorrect program performs an auto spell check to automatically correct the spelling of user input text based on a corpus of recognized words in a language. The autocorrect program may also determine words at an edit distance from the user input text and then determine a probability value or relevancy score for the determined words within the edit distance indicating the likelihood the word within the edit distance is the correct word for the user input text.

There is a need in the art for improved techniques for determining correct words to autocorrect and validate user entered text.

SUMMARY

Provided are a computer program product, system, and method for using remote words in data streams from remote devices to autocorrect input text. Remote words included in a at least one data stream are accessed from at least one remote device over a network to store in a remote word corpus. User input text is received in a text entry field in a user interface rendered by the computer device. Local words are maintained in a local word corpus stored in the computer device. The local words and the remote words are used to autocorrect and validate the user input text.

DETAILED DESCRIPTION

Autocorrect programs assist users in correcting the spelling of text being entered in a user interface. However, users often use vernacular, slang and short hand terms and codes that are not represented in a local dictionary used for autocorrect. Further, the words the user is intending to enter may be currently rendered in proximate devices to the user, such as televisions, field voice controllers, and other electronic devices available via the Internet of Things. There is a need in the art to incorporate into the autocorrect corpus words from proximate devices in an Internet of Things to increase the likelihood of properly correcting or validating user input text with the user intended word and to not be limited by the words in the local corpus.

Described embodiments provide improvements to computer technology for autocorrect programs by incorporating into the word corpus remote words from a remote data stream from remote network devices over a network. Upon receiving user input text in a text entry field, both local words from a local word corpus and remote words from the remote word corpus are used to autocorrect and validate the user input text. In this way, the autocorrect is more likely to validate or autocorrect user input text with the correct intended word by incorporating words being rendered in remote devices that may be rendering terms from an expanded corpus used by the particular user.

Further, embodiments improve the computer technology for calculating a relevancy score for remote words in a set of possible correct words that differ from the user input text by an edit distance by considering attributes of the remote device from which the remote word originated that could affect relevancy. Embodiments may increase the autocorrect relevancy score for remote words that are from remote devices that are physically closer to the user computing device because such closer remote device providing the remote word may be more likely to have been observed by the user. Further, remote words that have been more recently rendered at the remote device would further increase the relevancy score because the user input text is more likely to be related to remote words rendered closer in time to when the user entered the input text. Still further, the relevancy score of possible correct remote words may also be increased for remote words found more frequently in remote data streams from remote devices. In this way, remote words from remote devices may be used to supplement the corpus used to determine possible correct words for user input text and to modify the relevancy score of remote words based on attributes of the remote devices and the remote words rendered at the remote devices.

FIG. 1illustrates an embodiment of a computing device100including a processor102, a main memory104, and a communication transceiver106to communicate (via wireless communication or a wired connection) with remove devices over a network108, such as the Internet, a cellular network, etc.; a microphone110to receive as input sound or user voice input to the personal computing device100; a display screen112to render display output to a user of the personal computing device100; a speaker114to generate sound output to the user; input controls116such as buttons and other software or mechanical buttons, to receive user input; and a global positioning system (GPS) module118to determine a GPS position of the personal computing device100. The components102-118may communicate over one or more bus interfaces121.

The main memory104may include various program components including a text editor120in which the user may enter text and an autocorrect program122to autocorrect the user input. The text editor120may render a user interface124, displayed on the display screen112, that renders a user input field126in which to receive user input text128to form a word.

The text editor120may comprise a standalone word processor or be part of another application, such as a messaging application, email client, notes or task manager application, social network application, etc. The autocorrect program122may be included within the text editor120code or may comprise a separate program or operating system library function called by the text editor120and any other text editing program or application in the computer device100.

The autocorrect program122may determine possible correct words for the user input text128from a local word corpus200maintained locally in the computing device100and a remote word corpus300including words from remote data streams130generated in remote devices132that are accessible over the network108. The autocorrect program122includes code that when executed is to validate text128the user enters as a recognized word and provide autocorrect suggestions or a set of possible correct words400based on an edit distance, such as the Damerau-Levenshtein edit distance, between the user input text128and words in the corpus200,300. The autocorrect program122may further calculate a relevancy score for each of the possible correct words within the edit distance indicating the likelihood a possible correct word is the correct word intended by the user input text. The autocorrect program122may use various techniques to determine the relevancy score, such Bayesian probability, principle component analysis (PAC), and other suitable techniques for determining a relatedness of a possible correct words from a corpus to user input text128that does not form a recognized word in the corpuses200,300.

A data stream130generated at a remote device132may include words as they are rendered or processed at the remote device132, along with a time the word was added to the data stream130. The autocorrect program122may access the remote data streams130over the network108and include the words from the remote data streams130into the remote word corpus300to use for possible correct words for auto-correction operations. For instance, if the remote device132comprises a television or cable box, then the remote data stream130may include terms from the current guides being rendered in the cable box, words in closed caption subtitles for programs, and words rendered in the program descriptions as programs are selected by the user. The remote device132may further comprise an appliance in the room or building in which the user is located, such as an office or home, and may comprise a device part of the Internet of Things. The remote device132may also comprise a far field voice control device to allow a user to use natural language expressions via voice to control hardware devices, access online cloud services, etc., such as Amazon® Alexa®. (Amazon and Alexa are registered trademarks of Amazon Technologies, Inc. throughout the world)

The main memory104may further include an operating system142to manage the personal computing device100operations and interface with device components102and106-118.

The computing device100may comprise a smart phone, personal digital assistance (PDA), wearable computer, laptop computer, desktop computer, network appliance, or device part of the Internet of Things (IoT). The memory104may comprise non-volatile and/or volatile memory types, such as a Flash Memory (NAND dies of flash memory cells), a non-volatile dual in-line memory module (NVDIMM), DIMM, Static Random Access Memory (SRAM), ferroelectric random-access memory (FeTRAM), Random Access Memory (RAM) drive, Dynamic RAM (DRAM), storage-class memory (SCM), Phase Change Memory (PCM), resistive random access memory (RRAM), spin transfer torque memory (STM-RAM), conductive bridging RAM (CBRAM), nanowire-based non-volatile memory, magnetoresistive random-access memory (MRAM), and other electrically erasable programmable read only memory (EEPROM) type devices, hard disk drives, removable memory/storage devices, etc.

Generally, program modules, such as the program components120,122,124,142, etc., may comprise routines, programs, objects, components, logic, data structures, and so on that perform particular tasks or implement particular abstract data types. The program modules may be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.

The program components and hardware devices of the personal computing device100and remote devices132ofFIG. 1may be implemented in one or more computer systems, where if they are implemented in multiple computer systems, then the computer systems may communicate over a network.

The program components120,122,124,142may be accessed by the processor102from the memory104to execute. Alternatively, some or all of the program components120,122,124,142may be implemented in separate hardware devices, such as Application Specific Integrated Circuit (ASIC) hardware devices.

The functions described as performed by the program components120,122,124,142may be implemented as program code in fewer program modules than shown or implemented as program code throughout a greater number of program modules than shown.

FIG. 2illustrates an embodiment of a local word entry200iin the local word corpus200, and includes an established word202, such as a word in a language, and a frequency of use204of the word, indicating a number of times the word was used within a time interval. The local word corpus200may be included with the autocorrect program122and updated with updates to the autocorrect program122.

FIG. 3illustrates an embodiment of a remote word entry300iin the remote word corpus300including a remote word302captured from the remote data stream130from a remote device132; a frequency of use304in one or more data streams130of the word; a time the word was added to a data stream306, which may comprise a most recent time if the word has been in multiple data streams130; and a proximity to a remote device308having the most recent data stream130from which the word was captured. The information in fields304,306, and308on the remote word302may be used to adjust the relevancy score for remote words being considered as possible correct words for user input text128. For instance, words more frequently used in one or more data streams130will increase the relevancy score for the word302, words added more recently to a data stream130, as indicated by the time306, will also increase the relevancy score for the word302, and words captured from a remote device132closer in distance to the computing device100will also increase the relevancy score. The reason being is that devices more proximate to the user are more likely to be rendering words the user has recently perceived, remote words more recently rendered are likely to have been perceived by the user when entering the input text, and more frequent words in the data stream of the remote devices132are also more likely to be words likely to be the topic of the user input text.

FIG. 4illustrates an instance of a possible correct word400, in the set of possible correct words400determined to be an edit distance from user input text128, and includes the word402, a corpus location404in the corpus200,300including the possible correct word, and a calculated relevancy score406, based on relevancy to the user input text128, such as a statistical relevancy, e.g., naive Bayesian score.

FIG. 5illustrates an embodiment of operations performed by the autocorrect program122to process a word (at block500) in a remote data stream130received from a remote device132. If (at block502) the processed word from the data stream130is not in the remote word corpus300, then the processed word is added (at block504) as an instance300ito the remote word corpus300and the frequency304is set (at block506) to one. If (at block502) the processed word is in the remote word corpus300as an entry300i, then the autocorrect program122increments (at block508) the frequency use304. After setting the frequency use304at block506or508, the time added to the data stream306is set (at block510) to a time associated with the word in the data stream130, such as metadata for the data stream130indicating a time the processed word was added to the remote data stream130or processed in the remote device132. The proximity to the remote device308is set (at block512) to a determined distance of the computing device100to the remote device132that transmitted the data stream130having the processed word. The proximity308may be determined from Global Positioning System (GPS) information received from the remote device132with the data stream130and the GPS information for the computing device100received from the GPS module118.

With the embodiment ofFIG. 5, remote words in a data stream generated at a remote device132within proximity to the user that have been rendered or processed in the remote device are added to the remote word corpus300along with metadata indicating a relevancy of the word, such as the frequency of use in one or more data streams130from one or more remote devices132, a temporal indicator of how recently the word was used, and the proximity to the device. This metadata indicates a likelihood that a user had observed a word in a remote device132because words that are more frequently rendered, that have been more recently rendered, and that have been rendered closer in proximity to the user are more likely to have been observed by a user than words having the opposite of those attributes, such as words less frequently rendered, not recently rendered, and rendered in devices not within relative proximity to the user. Thus, the gathered information on remote rendering attributes of remote words may be used to adjust the relevancy score of remote words received from remote devices132as described below.

FIGS. 6aand 6billustrate an embodiment of operations performed by the autocorrect program122to use the words in the local word corpus200and remote word corpus300to validate user input text128in the user input field126and provide suggested correct words if the user input text128does not match a word in the local200and remote300word corpuses. Upon processing (at block600) user input text128in the user input field126, the autocorrect program122determines (at block602) whether the user input text128matches a local word200iin the local word corpus200, a remote word300iin the remote word corpus300or no match with any word in either corpus200,300. If (at602) the user input text128matches a remote word300i, the matching remote word302is added to the local word corpus as a local word entry200iindicating the remote word as local word202and a frequency use204set to the remote use frequency304. The remote word entry300imay then be removed from the remote corpus300after the word is added to the local corpus200. After adding the matching remote word to the local word corpus200(at block604) or if the user input text128matches a local word200iin the local word corpus200(from the local word branch of block602), the autocorrect program122validates (at block606) the user input text128, such as indicate correct or accept. The frequency use204,304in the local word entry200ior remote word entry300iis incremented (at block608).

If (at block602) there is no match of the user input text128with a word in the local200and remote300word corpus, then the autocorrect program122determines (at block608) a set of possible correct words400for the user input text128from the determined local200and remote300words at an edit distance from the user input text greater than one. The set of possible correct words400may comprise words in the corpuses200and300that are an edit distance from the user input text128formed by modifying or adding a letter to the user input text128, such as a Damerau-Levenshtein edit distance. The autocorrect program122determines (at block610) a relevancy score406for each possible correct word400, in the set, e.g., such as based on naïve Bayes algorithm, principle component analysis, etc, with respect to the user input text128. For each local word200iin the set of possible correct words, the relevancy score406of the word is adjusted (at block612) by a frequency weighting based on the frequency use204for the local word200i.

For each remote word in the set of possible correct words400in a remote corpus, the autocorrect program122performs a loop of operations at blocks614through624. At block616, the autocorrect program122determines a frequency weighting for the processed word based on the frequency use304. The autocorrect program122determines (at block618) a time decay weighting based on a difference of a time the user input text128was entered and the time the word was added to the data stream130. A proximity weighting is determined (at block620) based on a determined distance of the computing device100and the remote device132from which the remote word was accessed. The autocorrect program122may then adjust (at block622) the relevancy score406for the remote word402by the determined time decay weightings, the proximity weightings, and the frequency weightings.

A remote word having a higher frequency in the data streams130would increase the relevancy weighting because more frequently used words are more likely to be relevant to user input text. A remote word having a higher time decay weighting due to the remote word having a time306closer in time to the time the user input text128was entered would also likely be more relevant because it was rendered closer in time to the entry of the user input text128. A remote word having a high proximity weighting due to being closer in distance to the remote device132would also likely be more relevant because that word was rendered closer to the computing device100and likely to be used or observed by the user.

Control then proceeds to block626inFIG. 6bwhere the autocorrect program122uses (at block626) the adjusted relevancy scores406of the remote300iand local200iwords in the determined set of possible correct words400to determine a subset of possible correct words, such as a fixed number of local and remote words having the highest adjusted relevancy scores. The fixed number may be based on a words that can be rendered in the displayed space of the user interface124rendered on the display screen112. A user interface control may be provided to allow the user to scroll through further possible correct words. This subset of highly relevant possible correct words is presented (at block628) as a replacement list in the user interface124for the user to select to replace the user input text128and optionally autocorrect the user input text128with the possible correct word having the highest relevancy score406. The autocorrect program122receives (at block630) user selection of one of the subset of possible correct words by direct selection from the replacement list or implicit acceptance by the user proceeding to enter text for a next word. The user selected word, such as directly or implicitly selected, may then be added (at block632) to the local corpus200if the selected word comprises a remote word.

The described embodiments ofFIGS. 6aand 6bexpand the corpus of words available for word validation and auto-correction by considering words in data streams generated by remote devices. In this way the likelihood of a successful possible correct word suggestion is increased by utilizing words from remote devices with which the user is interacting and writing about. Further, the relevancy score of remote words may be weighted by a frequency of use in data streams in remote devices, a closeness or proximity of the remote devices to the computing device, and the time decay weightings, where the closer the remote word has been added to the data streams to the time the user entered the input text increases the relevancy score for that remote word because the user is more likely to be writing about words recently and more frequently presented at proximate remote devices.

As shown inFIG. 7, the computer system/server702is shown in the form of a general-purpose computing device. The components of computer system/server702may include, but are not limited to, one or more processors or processing units704, a system memory706, and a bus708that couples various system components including system memory706to processor704. Bus708represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnects (PCI) bus.

Computer system/server702typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer system/server702, and it includes both volatile and non-volatile media, removable and non-removable media.

Program/utility714, having a set (at least one) of program modules716, may be stored in memory706by way of example, and not limitation, as well as an operating system, one or more application programs, other program modules, and program data. Each of the operating system, one or more application programs, other program modules, and program data or some combination thereof, may include an implementation of a networking environment. The components of the computer702may be implemented as program modules716which generally carry out the functions and/or methodologies of embodiments of the invention as described herein. The systems ofFIG. 1may be implemented in one or more computer systems702, where if they are implemented in multiple computer systems702, then the computer systems may communicate over a network.

Computer system/server702may also communicate with one or more external devices718such as a keyboard, a pointing device, a display720, etc.; one or more devices that enable a user to interact with computer system/server702; and/or any devices (e.g., network card, modem, etc.) that enable computer system/server702to communicate with one or more other computing devices. Such communication can occur via Input/Output (I/O) interfaces722. Still yet, computer system/server702can communicate with one or more networks such as a local area network (LAN), a general wide area network (WAN), and/or a public network (e.g., the Internet) via network adapter724. As depicted, network adapter724communicates with the other components of computer system/server702via bus708. It should be understood that although not shown, other hardware and/or software components could be used in conjunction with computer system/server702. Examples, include, but are not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.

The letter designators, such as i and n, used to designate a number of instances of an element may indicate a variable number of instances of that element when used with the same or different elements.