Method for character correction

A computer program product is provided and includes a non-transitory tangible storage medium readable by a processing circuit and on which instructions are stored for execution by the processing circuit for performing a method. The method includes enabling retrieval of a keyboard pressed sequence of characters of a first type, permitting a re-selection of characters of a second type, which are associated with the keyboard pressed sequence of the characters of the first type and permitting modification of the keyboard pressed sequence of the characters of the first type to initiate a search for and retrieval of characters of the second type.

BACKGROUND

The present invention relates to a method for character correction and, more particularly, to a method for lightweight Chinese character correction with pinyin input.

It is often difficult to make corrections to a document when typing Chinese characters. Currently, users are permitted to make corrections and modifications only if they have not yet hit the enter key after typing a consecutive number of pinyin letters. For purposes of this disclosure, pinyin refers to a system to transcribe Chinese characters into the Roman alphabet and is used to spell Chinese names in foreign publications and as an input method to enter Chinese characters into computers.

When inputting Chinese phrases, prior to sending Chinese characters/sentences to an editor program (by hitting the enter key, or hitting the white space key, etc), users can modify input content and make selections to correct text. However, once users hit the enter key, the pinyin letters are converted into corresponding Chinese characters and, at this point, the Chinese characters are saved and editors generally prohibit users to make further modifications. If a mistake has been made, however, existing correction methods require users to delete the wrong text inside the editor and re-input them from the scratch using the input method. This requires repeated operations until the user arrives at the right text. Thus, for users who get used to typing long pinyin phrases or sentences before sending Chinese characters/sentences to the editor (by hitting the enter key, or hitting the white space key, etc), the impact of typographical mistakes (typos) can be significant since even one typo of pinyin lettering can negatively affect the Chinese character translation after the users hit the enter key.

Another problem using the current pinyin input methods is that multiple possible Chinese characters can be mapped to the same pinyin letters. This is due to the fact that the same pinyin letters can generate four possible tones or sounds and each tone can map to different Chinese characters that ultimately have different meanings. A typo on the pinyin characters or correct pinyin characters but with a wrong selection of tone will generate a wrong Chinese character as a result.

SUMMARY

According to one embodiment of the present invention, a computer program product is provided and includes a non-transitory tangible storage medium readable by a processing circuit and on which instructions are stored for execution by the processing circuit for performing a method. The method includes enabling retrieval of a keyboard pressed sequence of characters of a first type, permitting a re-selection of characters of a second type, which are associated with the keyboard pressed sequence of the characters of the first type and permitting modification of the keyboard pressed sequence of the characters of the first type to initiate a search for and retrieval of characters of the second type.

A system is also provided and includes a processing circuit configured to perform a method. The method includes enabling retrieval of a keyboard pressed sequence of characters of a first type, permitting a re-selection of characters of a second type, which are associated with the keyboard pressed sequence of the characters of the first type and permitting modification of the keyboard pressed sequence of the characters of the first type to initiate a search for and retrieval of characters of the second type.

A method for character correction for a program presenting an editor window displaying a sequence of characters of a first type is also provided. The method includes opening an input window of a computing device in response to a command with respect to a questionable character of the first type in the sequence, displaying in the input window a character of a second type, which is associated with the questionable character, and various selections for the user, each including characters of the first type, which are respective candidate characters for association with the character of the second type and, upon a selection of one of the various selections, closing the input window and displaying the sequence of the characters of the first type in the editor window with the questionable character replaced by the candidate characters corresponding to the selection.

A method for character correction for a program presenting an editor window displaying a sequence of characters of a first type is also provided. The method includes opening an input window of a computing device in response to a command with respect to a questionable character of the first type in the sequence, displaying in the input window a character of a second type, which is associated with the questionable character, and various selections for the user, each including characters of the first type, which are respective candidate characters for association with the character of the second type, permitting the user to modify the character of the second type and updating the various selections in accordance with modifications made to the character of the second type.

A method for character correction for a program presenting an editor window displaying a sequence of characters of a first type is also provided. The method includes opening an input window of a computing device in response to a command with respect to a questionable character of the first type in the sequence, displaying in the input window a modifiable character of a second type, which is associated with the questionable character, and various selections for the user, each including characters of the first type, which are respective candidate characters for association with the modifiable character of the second type and each being updateable in accordance with modifications of the modifiable character of the second type and upon a selection of one of the various selections, closing the input window and displaying the sequence of the characters of the first type in the editor window with the questionable character replaced by the candidate characters corresponding to the selection.

DETAILED DESCRIPTION

In accordance with aspects of the invention, users are enabled to retrieve a keyboard pressed sequence and to modify that sequence so as to input the correct text they want. At least two kinds of mechanisms are supported to this end: one permits a user to re-select correct Chinese characters from an input window and another permits a user to modify the original keyboard pressed sequence directly to get the correct Chinese characters after they are retrieved. More particularly, the present invention is a computer program product that enables retrieval of a keyboard pressed sequence of characters of a first type, permits a re-selection of characters of a second type, which are associated with the keyboard pressed sequence of the characters of the first type and permits modification of the keyboard pressed sequence of the characters of the first type to initiate a search for and retrieval of characters of the second type.

With reference toFIG. 1, a computing system10is illustrated and includes a processing circuit20, a computer or machine readable non-transitory tangible storage medium (“storage medium”)30and a bus40by which the processing circuit20and the storage medium30are coupled. The storage medium30may include various types of read only and read/write memory units on which executable instructions are stored. These executable instructions, when executed, are configured to cause the processing circuit20to execute the methods and programs described herein. The computing system10further includes a user input device50, such as a mouse51and a keyboard52, by which a user can input various commands and text, and a display unit60, such as a monitor on which the processing circuit20displays various graphical user interfaces as instructed by the executable instructions. In accordance with embodiments, the computing system10may be configured and programmed to run various types of applications, such as a word processing applications stored in the storage medium30. These word processing applications may include a pinyin editor program as described herein.

With reference toFIG. 2, when the user of the computing system10runs the word processing applications with the pinyin editor program (hereinafter referred to as the “program”) and enters pinyin letters in a keyboard pressed sequence, the program generates an internal list of Input Information Objects (IIO)300and establishes the internal list in the storage medium30to track the user's input, the user's selections and to track the generated output characters. As shown inFIG. 2, each IIO300includes a pinyin input sequence301that is input by the user via the program, the user's selection of Chinese characters302and generated Chinese character outputs303, which will be output into the pinyin editor program.

In accordance with embodiments, a structural example of an IIO300implemented in C language is as follows:

Each time the editor is run, a list for the IIOs300is initialized and monitoring of the user's special keyboard input combinations is conducted (this can be customized by the user). Each time the user inputs one pinyin sequence, one IIO300is added to the end of the list. The combination of the user's pinyin sequence and his selection of Chinese characters will be saved in accordance with the user's preferences so that the user can be prompted with related candidate words next time a same or similar pinyin sequence is entered.

For the correction of typos, when the user realizes he has inputted incorrect pinyin sequences or made incorrect selections of the Chinese characters for the correct pinyin sequences, he can highlight the incorrect characters that have been input or displayed in an editor window (seeFIGS. 4-21) and press a predefined keyboard input combination to indicate that he would like to make a correction. The program then searches for the highlighted characters in all the IIOs300. If the selection is found in one of the stored IIOs300(i.e., in the output_str of one of the IIOs300), the program displays its input window (seeFIGS. 4-21) with the user's last selection. To make the correction, the user can easily re-edit the pinyin sequence or the Chinese characters/words as desired. If more than two IIOs300are found to match successfully, the newly added IIO300may be used by the program by default. The user can either enter the new pinyin sequence for the typo and re-select the Chinese characters, or use the existing pinyin sequence (if it is correct) and re-select the Chinese characters. Once the user has made the correction, the IIOs300of the original phrase will be updated with new combination selections of the pinyin sequence and the Chinese character selections.

To replace multiple incidents of typos, the user can have the option to fix either one copy of the typos or multiple copies of the typos. Multiple copies of the same typo would imply that the same pinyin sequence and the Chinese characters selection are the same. When the user decides to replace multiple copies of the same typo, all the IIOs300that match the typo will be affected. Once the user corrects one instance of the typo, the stored IIOs300of the rest of the typos will be replaced with the correction. Alternatively, there could be cases that the user has entered the same pinyin sequence in multiple places of the document, but the user selected different Chinese characters for the same pinyin sequence. In these cases, the program also enables the user to replace all the pinyin sequences with the same selection of Chinese characters.

With reference toFIG. 3, a user initiates the computer program product and generates a keyboard press sequence of characters of a first type that are entered into an editor window as mapped characters of a second type. The user then notices that a change needs to be made and inputs a predefined special keyboard press sequence and command at operation310and grasps or highlights selected text in the characters of the second type I the editor window at operation320. At this point, the program automatically searches for the keyboard press sequence of the characters of the first type in the IIOs300, which are each stored in the storage medium30as a user input history database330. At operation340, it is determined whether the keyboard press sequence of the characters of the first type is stored in one or more of the IIOs300. In an event the keyboard press sequence of characters of the first type is stored, the program rolls back to the input history at operation350for the keyboard press sequence of the characters of the first type and displays it in an input window whereby the user can conduct an analysis and determine if a modification is required or if re-selection of candidate characters of the second type needs to be made. In an event the keyboard press sequence of characters of the first type is not stored, the text is mapped/translated into candidate characters of the second type at operation360.

With reference toFIGS. 4-8, an exemplary operation of the program to correct a short phrase in which the pinyin sequence is correct but the selection of the Chinese characters is incorrect is illustrated. In this example, “Ctrl+F10” is set as the special key combination and the user wants to input the Chinese text associated with choice #1, which is offered along with choices #1-#8 of candidate characters in the input window upon the keyboard input sequence ‘ddy’ being pressed as shown inFIG. 4. The mistake occurs when the user presses #4 such that the text associated with choice #4 is entered and the input window disappears. At this point, one IIO300is added to the list with the following attribute values:*keyboard_input=‘ddy’;*output_str=the Chinese text associated with choice #4,
and the Chinese text is generated with the text associated with choice #4 in the editor window, which is incorrect, as shown inFIG. 5.

In order to modify that incorrect text, the user needs to highlight the text in the editor window, as shown inFIG. 6, and press “Ctrl+F10”. The program then responds by checking the IIO300list and finds that the stored IIO300has an *output_str value of the text associated with choice #4, which was highlighted previously. The input window thus reappears with a *keyboard_input value of ‘ddy’, as shown inFIG. 7, and the user then can quickly re-select the correct choice (i.e., choice #2). Once this selection is made, the input window disappears and the correct text is included in the editor window, as shown inFIG. 8.

With reference toFIGS. 9-15, an exemplary operation of the program to correct a long phrase in which the pinyin sequence is correct but the selection of the Chinese characters is incorrect is illustrated. In this example, the user inputs the special key combination which causes the input window to appear over the editor window, as shown inFIG. 9, into which the user enters ‘jsyixiasmshifou’ as the pinyin sequence with its associated Chinese characters to be generated.FIGS. 10 and 11indicate that the user presses 2 and 2 again to express his candidate Chinese character selections but, in fact, the second time he presses 2 was a mistake. The user then hits the enter key to place the phrase into the editor window, as shown inFIG. 12.

At this point, one IIO300is added to the list with following attribute values:*keyboard_input=‘jsyixiasmshifou’;*phrase_select_input=‘22’;*output_str=the Chinese text associated with the input of ‘22’.
Here, the *phrase_select_input contains two characters with the second being incorrect. The user, therefore, wishes to correct the error and highlights the words to he corrected in the editor window and presses “Ctrl+F10,” as shown inFIG. 13. This action causes the input window to reappear, as shown inFIG. 14, whereby the user can change his choice to another candidate character and hit enter again. This will cause the input window to disappear and the editor window to show the newly selected candidate character and, hopefully, the correct text, as shown inFIG. 15.

With reference toFIGS. 16-21, an exemplary operation of the program to correct the pinyin sequence and the selection of the Chinese characters is illustrated. In this example, both the pinyin sequence and the selection of the Chinese characters are incorrect. As shown inFIG. 16, the user inputted the pinyin sequence ‘jintiantianqibocuo’ for the associated Chinese text into the editor window by mistake. The correct pinyin sequence should have been ‘jintiantianqibucuo’ and the user mistyped the ‘bu’ with ‘bo’.

The user selects candidate character choice #1 to choose the Chinese characters and the Chinese sentence with the incorrect wording goes into the editor window, as shown inFIG. 17. The user then finds the error and highlights the whole sentence, as shown inFIG. 18, and presses the predefined keyboard combination to activate the input window, as shown inFIG. 19. The user then corrects the incorrect pinyin sequence to ‘jintiantianqibucuo’ and selects candidate character choice #1, as shown inFIG. 20, and the whole sentence with the correct Chinese wording is placed in the editor window, as shown inFIG. 21.

In accordance with further aspects of the invention, it is to be understood that the editor window can be any word processing user interface by which a user is permitted to enter text into a document and is not limited to the above-described embodiments relating to pinyin sequences. That is, the invention can be used for various types of translations, such as the mapping of symbols to emoticons. In particular, the invention may be employed to correct a symbol sequence that is mapped to a certain incorrect emoticon instead of the user's intended emoticon. For example, if the user wants to indicate a smile, he may intend to input “:)” to generate “” but will instead input “:-*” to generate a kissing icon. In this case, the user could highlight the kissing icon in the editor window and press the predefined keyboard combination to activate the input window whereby the symbol sequence can be corrected.

Technical effects and benefits of the present invention include enabling retrieval of a keyboard pressed sequence of characters of a first type, permitting a re-selection of characters of a second type, which are associated with the keyboard pressed sequence of the characters of the first type and permitting modification of the keyboard pressed sequence of the characters of the first type to initiate a search for and retrieval of characters of the second type.