[background technology]
The computer user will be input to computer with Chinese character, needs to use input in Chinese software.At present, input in Chinese software can be divided into keyboard input and non-keyboard input, wherein comparative maturity and the widest input in Chinese software that is based on keyboard of use.Input in Chinese software is a tool software that runs on the operating system, and it converts the coding of keyboard input or the media data of other non-keyboard input to the Chinese character input.
The keyboard input in Chinese is to utilize keyboard, 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, therefore, for English, does not have what Input Software, and directly inputting English letter gets final product.And the number of words of Chinese character has several ten thousand, they and keyboard are without any corresponding relation, to in computer, import Chinese character, 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 is existing hundreds of, and that has wherein moved on computers just has tens kinds, and 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 substantially all is to adopt sound, shape, justice and specific key are interrelated, and makes up the input of finishing Chinese character according to different Chinese character again.
Non-keyboard input in Chinese software then comprises handwriting input software, phonetic entry software, optical character identification (OCR) Input Software etc.Wherein, 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 be discerned display process with it; Phonetic entry software is by using a kind of Input Software that converts literal to behind the microphone sound import; And the OCR Input Software is the manuscript of input to be converted into figure by scanner could discern.
Present most of people adopts five or spelling input method input Chinese character in computer.And when using five-stroke input method, through regular meeting run into not can five fractionations speech or word, then need to import these Chinese characters by phonetic.Mix under the defeated pattern phonetic and five, the user is in five of inputs, input string also may be regarded as pinyin string, and when the user wants the input Pinyin string,, in dictionary, also search pinyin word less than correspondence if the pinyin string of user's input is also imperfect, then when being input to the 4th character, can directly go up screen according to five inputs, five speech that output is corresponding, thus cause interference for user's phonetic input.
[summary of the invention]
Based on this, be necessary to provide a kind of character input method, can carry out the phonetic expansion to input string, thereby can reduce the interference between five strings and the pinyin string.
A kind of character input method said method comprising the steps of:
Obtain input string, judge that can input string carry out the phonetic expansion, if then input string is carried out the phonetic expansion; From dictionary, search the pinyin word of the input string correspondence after the expansion; Show that five corresponding speech of pinyin word and output string are as candidate word.
This method also can comprise: when input string can not carry out phonetic when expansion, show that five speech of described input string correspondence or pinyin word are as candidate word.
This method also can comprise: when searching less than the pinyin word of input string correspondence after the expansion from dictionary, five speech that show the input string correspondence are as candidate word.
And specifically can be: obtain the ultima of input string, search that to obtain with described ultima be the expansion syllable of phonetic prefix to the step that input string is expanded.
In addition, described method also can comprise: when input string is input to the 4th character, obtain input string, judge that can input string carry out the phonetic expansion, if then input string is carried out the phonetic expansion; From dictionary, search the pinyin word of the input string correspondence after the expansion; Five speech that show described pinyin word and/or described input string correspondence are as candidate word.
In addition, also be necessary to provide a kind of character input system, can carry out the phonetic expansion to input string, thereby can reduce the interference between five strings and the pinyin string.
A kind of character input system, described system comprises: the expansion judge module, be used to obtain input string, judge that can input string carry out the phonetic expansion; The phonetic expansion module can carry out phonetic when expansion when the expansion judge module determines input string, and input string is carried out the phonetic expansion; Search module, be used for from dictionary search with described expansion after the corresponding pinyin word of input string; The candidate word output module, five speech that show pinyin word and input string correspondence are as candidate word.
This candidate word output module can be further used for can not carrying out phonetic when expansion when the expansion judge module determines input string, shows that five speech of input string correspondence or pinyin word are as candidate word.
This candidate word load module can be further used for when search module when searching less than the pinyin word of input string correspondence after the expansion from dictionary, and five speech that show the input string correspondence are as candidate word.
This phonetic expansion module comprises: the syllable acquisition module, obtain the ultima of input string; Module searched in syllable, and searching with the ultima is the expansion syllable of phonetic prefix; Expansion syllable memory module, the expansion syllable that storage sets in advance.
In addition, this expansion judge module can be further used for when input string is input to the 4th character, obtain input string and judge that can input string carry out the phonetic expansion, when described candidate word output module is further used for the pinyin word of the input string correspondence after described input string can carry out phonetic expansion and can find expansion from dictionary, show that described five speech of the pinyin word that obtains and/or input string correspondence of searching are as candidate word.
Above-mentioned character input method and system, by obtaining input string and judging that can input string carry out the phonetic expansion, when input string can carry out the phonetic expansion, then input string is carried out the phonetic expansion, and from dictionary, search the pinyin word of the input string correspondence after the expansion, and show that this pinyin word is as candidate word.So then can guarantee not import when complete in pinyin string, correct the identifying of pinyin string energy, avoided then directly going up when four yards unique five speech should be arranged the situation of screen when input string, reduced the interference between pinyin string and five strings as much as possible, when not using five fractionations, input string can not be up to phonetic immediately, then can not be considered to pinyin string in the time of splitting with five, thereby improve the fluency of literal input.
[embodiment]
Fig. 1 shows the flow process of an embodiment Chinese words input method, and this method flow detailed process is as follows:
In step S10, obtain input string.
In step S20, judge that can input string carry out the phonetic expansion, if then enter step S30, otherwise enter step S40.In one embodiment, input string is carried out syllabification, input string is carried out syllabification can realize, obtain ultima after the syllabification, judge that according to ultima can input string carry out the phonetic expansion according to existing syllabification method.When the ultima of input string may be phonetic prefix of certain expansion syllable, judge that then input string can carry out the phonetic expansion.For example, get access to ultima after the syllabification and be " on ", it may be the phonetic prefix of " ong ", then can carry out the phonetic expansion; Again for example, get access to ultima after the syllabification and be " h ", it may be the phonetic prefix of " he ", " hong " etc., judges that then it can carry out the phonetic expansion.
In step S30, show that five speech of input string correspondence or pinyin word are as candidate word.In one embodiment,, then mix defeated mode and handle, show that five speech of input string correspondence or pinyin word are as candidate word according to normal five phonetics when input string can not carry out phonetic when expansion.
In step S40, input string is carried out the phonetic expansion.Usually, the character string of user's input is not imported fully, for example user's input " wozho ", that it may want to import is " wozhong ", " wozhou " etc., but can not find the pinyin word corresponding with input string this moment in dictionary, and when the user is input to the 4th yard, mix under the defeated pattern at five phonetics, because five four yards unique, then can directly shield on five speech with the input string correspondence, want the pinyin word imported and can't export the user.Therefore need carry out the phonetic expansion to input string.Fig. 2 shows the method flow that among the embodiment input string is carried out the phonetic expansion, and detailed process is:
In step S402, obtain the ultima of input string.Because the syllable user of front only imports simplicity or input spelling usually, input string is carried out syllabification after, only need expand getting final product to the ultima of input string.
In step S404, search that to obtain with the ultima be the expansion syllable of phonetic prefix.In one embodiment, the syllable tabulation after all expansions and the phonetic prefix list of expansion syllable have been set in advance and have stored.For example, be that syllable after the corresponding expansion of prefix has " ao ", " ai ", " an ", " ang " or the like with syllable " a ".After getting access to the ultima of input string, then searching with the ultima the tabulation of the syllable after the expansion of prior storage is the expansion syllable of phonetic prefix.For example, input string is " wzho ", and finding with ultima " zho " is that the expansion syllable of phonetic prefix is " zhong ", " zhou " etc.
In step S50, from dictionary, search the pinyin word of the input string correspondence after the expansion, judge the pinyin word that whether has the input string correspondence after the expansion in the dictionary, if, then enter step 70, otherwise, step S60 entered.In one embodiment, after the ultima of input string expanded, the input string after being expanded.For example, in the last example, the input string after the expansion is " wzhong ", " wzhou ".Search from dictionary before the pinyin word of the input string correspondence after the expansion, need carry out syllabification to the input string after the expansion, for example " wzhong " is divided into " w ' zhong ", and " wzhou " is divided into " w ' zhou ".Input string is carried out syllabification can be realized according to existing syllabification method, then repeats no more at this.And, can search all simple or compound vowel of a Chinese syllable of its correspondence to the simplicity in the input string, for example " w " finds " wo ", " wai ", " wa " or the like.Afterwards, from dictionary, search obtain with expand after the corresponding pinyin word of input string.
In step S60, five speech that show the input string correspondence are as candidate word.In one embodiment, when search in the dictionary less than with expansion after the corresponding pinyin word of input string the time, illustrate that input string can't phonetic identification, then handle according to normal five-stroke input method, five speech of demonstration input string correspondence are as candidate word.
In step S70, five speech that show described pinyin word and described input string correspondence are as candidate word.In one embodiment, when can find in the dictionary with expand after the corresponding pinyin word of input string the time, show that then the pinyin word that finds as candidate word, mixes under the defeated pattern at five phonetics, five speech that show described input string correspondence simultaneously are as candidate word.
After demonstrating candidate word, corresponding Chinese character can be exported according to user's selection.
Fig. 3 shows the flow process of another embodiment Chinese words input method, and this method flow detailed process is as follows:
In step S100, obtain input string.
In step S200, judge whether input string is input to the 4th character, if then enter step S400, otherwise enter step S300.
In step S300, show that five speech of input string correspondence or pinyin word are as candidate word.Owing to, be input in the 4th yard according to five-stroke input method, if four yards are unique, then can directly go up screen (being about to candidate word output), when being input to the 5th yard, then will shield on four yards the acquiescence candidate word automatically.Therefore, input string outputed to before the 4th, all can mix defeated mode according to normal five phonetics and handle, thereby show that five speech of input string correspondence or pinyin word are as candidate word.
In step S400, judge that can input string carry out the phonetic expansion, if then enter step S500, otherwise return step S300.When input string can not carry out the phonetic expansion, then also mix defeated mode and handle according to normal five phonetics.
In step S500, input string is carried out the phonetic expansion.Can then repeat no more at this with reference to as mentioned above about the method for input string being carried out the phonetic expansion.
In step S600, from dictionary, search the pinyin word of the input string correspondence after the phonetic expansion, judge the pinyin word that whether has the input string correspondence after the expansion in the dictionary, if then enter step S800, otherwise enter step S700.
In step S700, five speech that show the input string correspondence are as candidate word.
In step S800, show that five speech searching the pinyin word that obtains and/or described input string correspondence are as candidate word.Because input string has been input to four yards, four yards five speech that have unique correspondence, five speech that then show the input string correspondence simultaneously, show that the pinyin word of searching the input string correspondence after the phonetic that obtains is expanded is as candidate word as candidate word.Like this, then avoided, but five four yards unique screens of then going up, thereby can not get the situation that the user wants the pinyin word imported because when being input to four yards, pinyin string is not imported complete and do not had corresponding pinyin word.
Fig. 4 shows a character input system among the embodiment, and this system comprises expansion judge module 10, phonetic expansion module 20, searches module 30, dictionary 40 and candidate word output module 50, wherein:
Expansion judge module 10 is used to obtain input string, judges that can input string carry out the phonetic expansion; Phonetic expansion module 20 is used for carrying out phonetic when expansion when expansion judge module 10 determines input string, and input string is carried out the phonetic expansion; Search module 30 be used for from dictionary search with expand after the corresponding pinyin word of input string; Dictionary 40 is used to store five speech and pinyin word, and candidate word output module 50 is used to show that five speech of the pinyin word that finds and input string correspondence are as candidate word.
In one embodiment, expansion judge module 10 judges that can input string carry out the phonetic expansion, if can, then notify 20 pairs of input strings of phonetic expansion module to carry out the phonetic expansion, otherwise, mix defeated mode according to normal five phonetics and handle, by five speech of candidate word output module 50 output input string correspondences or pinyin word as candidate word.
Fig. 5 shows a phonetic expansion module 20 among the embodiment, and this phonetic expansion module 20 comprises that syllable acquisition module 200, syllable search module 202 and expansion syllable memory module 204, wherein:
Syllable acquisition module 200 is used to obtain the ultima of input string; Syllable is searched module 202 and is used to search that to obtain with the ultima be the expansion syllable of phonetic prefix; Expansion syllable memory module 204 has been stored the expansion syllable that sets in advance.In one embodiment, set in advance syllable tabulation after all expansions and all phonetic prefix lists of expansion syllable, and it has been stored in the expansion syllable memory module 204.After getting access to the ultima of input string, then searching with the ultima the tabulation of the syllable after the expansion of prior storage is the expansion syllable of phonetic prefix.
In one embodiment, search module 30 and from dictionary 40, search the pinyin word of the input string correspondence after the expansion, and judge the pinyin word that whether has the input string correspondence after the expansion in the dictionary 40, if exist, then 50 of candidate word output modules show that corresponding pinyin word is as candidate word, mix under the defeated pattern at five phonetics, five speech that show the input string correspondence simultaneously are as candidate word; Otherwise, illustrate input string can't phonetic identification, then handle according to normal five-stroke input method, candidate word output module 50 shows that five corresponding speech are as candidate word.Afterwards, the candidate word output that the user can be selected.
In one embodiment, expansion judge module 10 is further used for when input string is input to the 4th character, obtains input string and judges that can described input string carry out the phonetic expansion.Because according to five-stroke input method, be input in the 4th yard, if four yards unique, then can directly go up screen (being about to candidate word output), when being input to the 5th yard, then will shield on four yards the acquiescence candidate word automatically, therefore, input string outputed to before the 4th, all can mix defeated mode according to normal five phonetics and handle, thereby show that five speech of input string correspondence or pinyin word are as candidate word.When input string is imported the 4th character, the pinyin string of user's input may be imperfect, 10 of expansion judge modules judge that can described input string carry out the phonetic expansion, carry out the phonetic expansion according to judged result notice phonetic expansion module 20, when described candidate word output module 50 is further used for the pinyin word of the input string correspondence after described input string can carry out phonetic expansion and can find expansion from dictionary, show that described five speech of the pinyin word that obtains and/or input string correspondence of searching are as candidate word.
The above embodiment has only expressed several embodiment of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to claim of the present invention.Should be pointed out that for the person of ordinary skill of the art without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.