Background technology
The computer user wants Chinese character is input to computer, will use input in Chinese software.Input in Chinese software just runs on a tool software on the operating system, the media data of the coding of keyboard input or the input of other non-keyboards is converted to the software of Chinese character input.
Present comparative maturity and the most popular input in Chinese software that just is based on keyboard.
1) keyboard input in Chinese software:
Keyboard input in Chinese software utilizes keyboard exactly, imports a kind of method of Chinese character according to certain coding rule.
English alphabet has only 26, and their correspondences 26 letters on the keyboard, so, for input is English, be not have what Input Software, directly inputting English letter just can.The number of words of Chinese character has several ten thousand, they and keyboard are without any corresponding relation, but in order in computer, to import Chinese character, we must encode to Chinese character, and with these the coding with keyboard on binding be, just can make us import the coding of certain Chinese character, become Chinese character according to code conversion then by keyboard.
At present, Hanzi coding scheme has had hundreds of, that has wherein moved on computers just has tens kinds, as a kind of pictograph, Chinese character is to come co expression by the sound of word, shape, justice, the coding method of Chinese character input all is to adopt sound, shape, justice and specific key are interrelated basically, makes up the input of finishing Chinese character according to different Chinese character again.
2) non-keyboard input in Chinese software
Non-keyboard input in Chinese software comprises handwriting input software, phonetic entry software, OCR (opticalcharacter recognition optical character, character recognition) Input Software etc.
Handwriting input software is the hand-written Chinese identification Input Software under a kind of pen type environment, meets Chinese's custom of word that writes with a pen, as long as write by usual custom on handwriting pad, computer just can show its identification.Handwriting input software needs supporting hardware handwriting pad, writes the typing Chinese character with pen (can be the hard-tipped pen of any kind) on supporting handwriting pad, and is not only convenient, fast, and character error rate is also lower.Also can write word in the appointed area with mouse, use hand-written software to convert Chinese character to then, just mouse action requires very skilled.
Phonetic entry software is to use a kind of Input Software that converts literal to then by the microphone sound import.Though use easily, character error rate is still than higher, particularly some unbred professional term and rarely used words.Phonitic entry method requires your computer must be equipped with the sound card that can carry out normal recording at hardware aspect, and microphone has been got well in debugging then, and you just can carry out words input with mandarin pronunciation facing to microphone.If your mandarin accent is nonstandard, the voice training program that provides with it is provided for you, carries out the training of a period of time, allows it be familiar with your accent, can realize the literal input by speech too.
The OCR optical character recognition, it requires at first the manuscript that will import to be converted into figure by scanner and could discern, so scanner is necessary, and the printing quality of original copy is high more, the accuracy rate of identification is just high more, the general preferably literal of block letter is such as books, magazine etc., if the paper of original copy is thinner, might come at the figure of when scanning back side of paper, literal also transmission so, disturb last recognition effect.
Though various input is arranged, a GPRS using method of keyboard Input Software, it is convenient, fast to make it remain most widely used Input Software with characteristic accurately.And present when the user of keyboard Input Software uses, discovery wants to cancel the letter or the character of current input, and the most frequently used way is exactly repeatedly to trigger delete command, each letter of deletion or character of triggering.
With the spelling input method is example, when the user wants input " Chinese people ", has imported " zhongguomen " so several combinations that the candidate word window that shows will show below owing to carelessness in the time of input:
1. Chinese; 2. Chinese; 3. planted; 4. plant fruit; 5. many states.
In order to obtain correct input, at first to trigger delete command deletion " men ", but need to trigger 3 delete commands.
Deletion " men " back is remaining " zhongguo " only, obtains following several combination: 1. China; 2. planted; 3. plant fruit; 4. many states; 5. in.And then re-enter " renmin ", from candidate word, select " people ".
Another method is for having imported " zhongguomen " so several combinations that the candidate word window that shows will show below owing to carelessness when importing:
1. Chinese; 2. Chinese; 3. planted; 4. plant fruit; 5. many states.
Select 1 and imported " China ", deletion " " then, input " renmin " is selected again again.
Though more than the work of deleting can both solve input error time of two kinds of methods, first method need repeatedly trigger delete command could be with the pinyin string or the character string deletion of input error, under the long situation of input Pinyin string, the efficient of this method is not high; When using second method, need to select wrong Chinese character combination, will re-enter again, select behind the unwanted word deletion, need to repeat multi-pass operations like this, in case make user's input error, the work of modification is very complicated, use very inconvenience, the speed of influence input.
Summary of the invention
The technical problem to be solved in the present invention provides a kind of
For solving the problems of the technologies described above, the objective of the invention is to realize by the following method:
Obtain storage of current input character string and demonstration;
If get access to the delete command that presets, then with described current input character string deletion.
Wherein, obtain the show candidate speech instruction of presetting, the candidate word and the demonstration of described current input character string correspondence are provided;
After obtaining the delete command that presets, further the candidate word cancellation with described current input character string correspondence shows and deletion.
Wherein, said method also comprises: obtain the select command that presets, the candidate word of selecting to determine is replaced pairing input of character string demonstration;
Further, described cancellation input of character string is specially: deletion is not determined the input of character string that candidate word is replaced.
Wherein, with the candidate's dictionary that presets described input of character string is matched corresponding candidate word by syllable phrase fuzzy matching algorithm.
Wherein, the current input character string is phonetic or stroke.
The present invention also provides a kind of character input system, and this system comprises: input block, character storage unit, judging unit, display unit;
Input block is used to obtain the information of user's input, comprising: current input character string, the delete command that presets;
The character storage unit is stored described current input character string when being used to receive hold-over command, when receiving delete command, the current input character string is deleted;
Judging unit is used to judge whether the information that the user imports is the current input character string, is then to send hold-over command to the character storage unit; Whether the information of judging user's input is described delete command, is then to send delete command to the character storage unit;
Display unit is used to show the current input character string.
Wherein, this system further comprises: the candidate word generation unit;
The information of user's input that described input block obtains further comprises the order of the show candidate speech that presets;
Described judging unit judges further whether the information that the user imports is the order of show candidate speech, is then to send the order of matching candidate speech to the candidate word generation unit, sends hold-over command to the character storage unit, sends the order of show candidate speech to display unit; Whether the information of judging user's input is described delete command, is then further to send the cancellation display command of cancellation candidate word and send delete command to the character storage unit to display unit;
When the character storage unit is further used for receiving hold-over command, candidate word is preserved; When receiving delete command candidate word is deleted.
The candidate word generation unit is used to store the candidate word dictionary of every kind of character string correspondence, with the current input character string information and the candidate word dictionary coupling generation candidate word of character cell stores;
Display unit is further used for the show candidate speech, when receiving the cancellation display command, the candidate word cancellation is shown.
Wherein, described input block is further used for obtaining the select command that presets;
Judging unit is further used for judging whether the information that the user imports is described select command, be then to send the candidate word that to select to determine to replace the order that pairing current input character string shows, and send the instruction of the input of character string of the described correspondence of deletion to the character storage unit to display unit;
The candidate word that display unit is further used for selecting is replaced the corresponding characters string and is shown.
Wherein, input block obtains phonetic or stroke character string.
Above technical scheme as can be seen, the present invention has adopted when having the current input character string in character input process, trigger the method that delete command just can once be cancelled the pinyin string of current input, make the user when carrying out the literal input, improve speed.
Further when the user has triggered the order of deletion current input character string,, improved the utilization factor of system memory space simultaneously with the current input character string information deletion of system's storage.
Embodiment
In the implementation procedure of each character input method, all need a series of determination methods to input of character string.With the Chinese character coding input method is example, import continuously under the polysyllabic situation the user, and the Chinese character syllable table of system by setting in advance, the syllable partitioning algorithm is cut apart the continuous multisyllable of user's input; After obtaining the result that syllable cuts apart,, finish jointly candidate's phrase selected in the syllable that is partitioned into by syllable phrase fuzzy matching algorithm and the phrase storehouse that stores every kind of syllable phrase information.
More than to import continuous multisyllable from the user all be the scheme that has realized the present input method to selecting candidate's phrase, do not describing in detail at this.
The present invention is on the basis of the input method that has realized, whether import delete command by detecting the user, owing to there is the notion of current string rather than single character, this delete command can show the disposable cancellation of the character string of current input so, and the current input character string information that deletion has been stored from system.
Referring to Fig. 1, describe implementation procedure of the present invention in detail by specific embodiment.
Step 101: the information of obtaining user's input;
Step 102: judge that the information that the user imports is the order of current input character string or the described character string of deletion, if import then execution in step 103 of current string, if then execution in step 105 of described character string is deleted in input.
Current input character string described in this step specifically refers to: be example with the spelling input method, the pinyin string of input is " pinyinchuan ", and corresponding that show also is " pinyinchuan ", so current input character string " pinyinchuan " that just be meant.
Whether the user that judges described in this step imports the order of the described character string of deletion, and what promptly refer to judges that the user whether by triggering input media, triggers deletion current input character string command; For example can be " TAB " key, not limit it herein, just can as long as can trigger deletion current input character string command.
Step 103: obtain the user inputs character string, the character string of user's input is stored.
Step 104: after having stored described character string, this character string is shown back execution in step 101.
Step 105: described current input character string cancellation is shown and deletion, continue execution in step 101.
With user input " zhongguorenmin " be example, and what at first user's input was judged by system is character string command, so just should " zhongguorenmin " preservation and show to the user;
Continue then to judge whether the user continues input of character string or input delete command, if import delete command, then " zhongguorenmin " cancellation is shown, and " zhongguorenmin " information deletion that will store.
To should method, the present invention also provides a kind of character input system, and referring to Fig. 4, this system comprises: input block 01, character storage unit 02, judging unit 03, display unit 04;
Input block 01 is used to obtain the information of user's input, comprising: current input character string, the delete command that presets;
Character storage unit 02 is stored described current input character string when being used to receive hold-over command, when receiving delete command, the current input character string is deleted;
Judging unit 03 is used to judge whether the information that the user imports is the current input character string, is then to send hold-over command to character storage unit 02; Whether the information of judging user's input is described delete command, is then to send the cancellation display command of cancellation current input character string and send delete command to character storage unit 02 to display unit 04;
Display unit 04 is used to show the current input character string, when receiving cancellation current input character string display command, the cancellation of current input character string is shown.
After the order that generates candidate word, during the order of input delete character string, implementation procedure of the present invention is referring to Fig. 2:
Step 201: the information of obtaining user's input;
Step 202: the information of judging user's input is the current input character string, delete the order of described character string, still generate the instruction of candidate word, if input of character string is execution in step 203 then, if the instruction of input generation candidate word is execution in step 205 then, if import then execution in step 206 of the described character string of deletion.
Current input character string described in this step specifically refers to: not through selecting the character string of candidate word.With the spelling input method is example, and when the state of input be " pinyinchuan ", the candidate word of corresponding demonstration is: 1. pinyin string; 2. phonetic is worn; 3. phonetic; 4. piece together; 5. product.This moment also non-selected candidate word, current input character string " pinyinchuan " that just be meant so.
Whether the user that judges described in this step imports the order of the described character string of deletion, and what promptly refer to judges that the user whether by triggering input media, triggers deletion current input character string command; For example can be " TAB " key, not limit it herein, just can as long as can trigger deletion current input character string command.
Step 203: obtain the character string of user's input, the character string of user's input is stored;
Step 204: after having stored described character string, this character string is shown back execution in step 201.
Step 205: obtain the corresponding candidate word of current input character string according to stored candidate speech dictionary in advance with syllable phrase fuzzy matching algorithm, and show the candidate word of described character string correspondence, back execution in step 201 to the user.
Step 206: described current input character string, candidate word cancellation are shown and deletion, continue execution in step 201.
For example think input " Chinese people " as the user, and input time because carelessness when having imported " zhongguomen ", and the trigger command of default deletion current input character string is user's triggering " TAB " key, according to above-mentioned step, the process of execution is as follows:
At first the user imports " zhongguomen " character string, and system preserves this character string;
Behind the character of storage input, the user continues to key in and generates the candidate word order, and system makes up as follows according to stored candidate speech dictionary in advance with the character string corresponding character that syllable phrase fuzzy matching algorithm obtains receiving: 1. China; 2. Chinese; 3. planted; 4. plant fruit; 5. many states.
System judges that the user triggers the instruction of deletion current string, i.e. the order of input deletion current input character string " zhongguomen ".
System's current input character string " zhongguomen " and corresponding candidate word 1. China that will show in advance so; 2. Chinese; 3. planted; 4. plant fruit; 5. the cancellation of many states shows.
To should method, the present invention also provides a kind of character input system, and referring to Fig. 5, this system comprises: input block 11, character storage unit 12, candidate word generation unit 15, judging unit 13, display unit 14;
Input block 11 is used to obtain the information of user's input, comprising: the order of current input character string, the delete command that presets, the show candidate speech that presets;
Character storage unit 12 is stored described current input character string, candidate word when being used to receive hold-over command, when receiving delete command, with current input character string, candidate word deletion.
Judging unit 13 is used to judge whether the information that the user imports is the current input character string, is then to send hold-over command to character storage unit 11; Whether the information of judging user's input is the order of show candidate speech, is then to send the order of matching candidate speech to candidate word generation unit 15, sends hold-over command to character storage unit 12, sends the order of show candidate speech to display unit 14; Whether the information of judging user's input is described delete command, is then to send the cancellation display command of cancellation current input character string, candidate word and send delete command to character storage unit 12 to display unit 14;
Candidate word generation unit 15 is used to store the candidate word dictionary of every kind of character string correspondence, with the current input character string information and the candidate word dictionary coupling generation candidate word of character storage unit 12 storages;
Display unit 14 is used to show current input character string, show candidate speech, when receiving the cancellation display command, current input character string, candidate word cancellation is shown.
Select the instruction of candidate word when input after, implementation procedure of the present invention is referring to Fig. 3:
Step 301: the information of obtaining user's input;
Step 302: the information of judging user's input is the order of current input character string, the described character string of deletion, to the select command of candidate word, still generate the instruction of candidate word, if input of character string is execution in step 303 then, if the instruction that input generates candidate word is execution in step 305 then, if the select command of input candidate word execution in step 306 then; If the described character string of input deletion is execution in step 307 then.
Current input character string described in this step specifically refers to: not through selecting the character string of candidate word.With the spelling input method is example, and when the state of input be " pinyinchuan ", the candidate word of corresponding demonstration is: 1. pinyin string; 2. phonetic is worn; 3. phonetic; 4. piece together; 5. product.This moment also non-selected candidate word, current input character string " pinyinchuan " that just be meant so.
If current input state is: " phonetic chuan ", the corresponding candidate word that shows is: 1. go here and there; 2. wear; 3. pass; 4. river; 5. ship." phonetic " had advanced the candidate word selection in " phonetic chuan ", and so current input of character string just is meant " chuan ".
Whether the user that judges described in this step imports the order of the described character string of deletion, and what promptly refer to judges that the user whether by triggering input media, triggers deletion current input character string command; For example can be " TAB " key, not limit it herein, just can as long as can trigger deletion current input character string command.
Step 303: obtain the character string of user's input, the character string of user's input is stored;
Step 304: after having stored described character string, this character string is shown back execution in step 301.
Step 305: obtain the corresponding candidate word of current input character string according to stored candidate speech dictionary in advance with syllable phrase fuzzy matching algorithm, and show the candidate word of described character string correspondence, back execution in step 301 to the user.
Step 306: the candidate word that will select to determine is replaced pairing input of character string demonstration, and will be determined the input of character string canned data deletion of replacement, continues execution in step 301.
Step 307: described current input character string, candidate word cancellation are shown and deletion, continue execution in step 301.
For example think input " Chinese people " as the user, and input time because carelessness when having imported " zhongguomen ", according to above-mentioned step, the process of execution is as follows:
At first the user imports " zhongguomen " character string, and system preserves this character string;
Behind the character of storage input, the user continues to key in and generates the candidate word order, and system makes up as follows according to stored candidate speech dictionary in advance with the character string corresponding character that syllable phrase fuzzy matching algorithm obtains receiving: 1. China; 2. Chinese; 3. planted; 4. plant fruit; 5. many states.
User's candidate word " China ".
Candidate word " China " replacement of selecting " zhongguo " is shown, promptly be shown as " Chinese men " to the user.
If the user triggers the order of deletion current input character string, the i.e. order of input deletion current input character string " men " again.
With the current input character string " men " that shows in advance and corresponding candidate word " 1.; 2. vexed; 3. lay one's hand on; 4. depressed and discontented; 5. door " cancellation shows.
To should method, the present invention also provides a kind of character input system, and this system comprises: input block, character storage unit, candidate word generation unit, judging unit, display unit;
Input block is used to obtain the information of user's input, comprising: the order of current input character string, the delete command that presets, the show candidate speech that presets, the select command that presets;
The character storage unit is stored described current input character string, candidate word when being used to receive hold-over command, when receiving delete command, with current input character string, candidate word deletion.
Judging unit is used to judge whether the information that the user imports is the current input character string, is then to send hold-over command to the character storage unit; Whether the information of judging user's input is the order of show candidate speech, is then to send the order of matching candidate speech to the candidate word generation unit, sends hold-over command to the character storage unit, sends the order of show candidate speech to display unit; Whether the information of judging user's input is described delete command, is then to send the cancellation display command of cancellation current input character string, candidate word and send delete command to the character storage unit to display unit; Be used to judge whether the information that the user imports is described select command, be then to send the candidate word that to select to determine to replace the replacement display command of pairing current input character string, and send the delete command of the input of character string canned data that has been determined replacement to the character storage unit to display unit;
The candidate word generation unit is used to store the candidate word dictionary of every kind of character string correspondence, with the current input character string information and the candidate word dictionary coupling generation candidate word of character cell stores;
Display unit is used to show current input character string, show candidate speech, when receiving the cancellation display command, current input character string, candidate word cancellation are shown, receive when replacing display command, the candidate word of selecting to determine is replaced pairing current input character string show.
More than in a kind of input method provided by the present invention the cancellation character string method and character input system be described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.