The content of the invention
The technical problem to be solved in the present invention is, for the drawbacks described above of prior art, there is provided a kind of input method is alternative
Word sequence processing method, system and mobile terminal.There is provided a kind of alternative word sequence processing method of fast and reliable input method, energy
Enough alternative words of quickly resequencing, make the alternative word of user's needs come before relatively, improve word input efficiency for user carries
Convenience is supplied.
The technical proposal for solving the technical problem of the invention is as follows:
A kind of alternative word sequence processing method of input method, wherein, including:
A, two kinds of input methods for being provided previously by being shown for the alternative word of input method sequence:Primary input method, secondary input method;For
The alternative word display sequence of input method is carried out based on primary input method, supplemented by secondary input method;
B, the operational order for receiving user pre-sets and selectes two kinds of different input methods:Primary input method, secondary input method;
C, when Chinese character or phrase is input into, receive the coding input Chinese character of the operational order first according to primary input method of user
Or the coding of phrase, alternative word shows to sort and carry out sequencing display successively by primary input method custom first, and generation primary input method is standby
Word selection display sequence word table;
D, when Chinese character or phrase coding according to primary input method input after the completion of;The coding input according to time input method is received again
The coding of the Chinese character or phrase, and control that time input method coding will be conformed in the alternative word display sequence word table of the primary input method of generation
Chinese character or before phrase drains into most.
The alternative word sequence processing method of described input method, wherein, the step A also includes:Pre-set primary input method
Input coding and the input coding of secondary input method between be identified by a spcial character specified.
The alternative word sequence processing method of described input method, wherein, also including in the step D:
Whether D1, the primary input method coding to being input into are identified judging have specified in the code character for judging input
Special word;When a spcial character specified is recognized, then by time input method coding that is encoded to of follow-up input, control will be raw
Into primary input method alternative word display sequence word table in conform to time input method coding Chinese character or phrase drain into most before.
The alternative word sequence processing method of described input method, wherein, the step D1 is specifically included:
Whether D11, the primary input method coding to being input into are identified judging have specified in the code character for judging input
Special word;
D12, when a spcial character specified is recognized, then follow-up input is encoded to time input method coding, set
The input of primary input method finishes mark, and all corresponding input method codings of alternative word are all parsed;
D13, control will conform in the primary input method of generation alternative word display sequence word table time input method coding Chinese character or
Before phrase is drained into most.
The alternative word sequence processing method of described input method, wherein, also include after the step D11:
D21 then judges that primary input method has been input into again when the spcial character do not specified in the code character for judging input
Whether complete mark is configured, if it is performs D22, otherwise performs D23;
D22, secondary input method coding after the spcial character specified is listed, compiled in corresponding input method of all alternative words
Searched in code and meet this alternative word of input method coding;It is defeated with user to each corresponding input method coding of alternative word successively
The secondary input method coding for entering carries out character string comparison,SimilarityAlternative word higher drains into foremost;
In the incoming primary input method of D23, character, corresponding alternative word is gone out according to the code parsing by primary input method and is shown.
The alternative word sequence processing method of described input method, wherein, the step D22 is specifically included:
D220, the secondary input method coding for setting user input are character string X [], and some parsed in step D12 is standby
The secondary input method coding of word selection is character string Y [];
D221, the size for comparing character string X [] length and character string Y [] length, if character string X [] length is more than word
Symbol string Y [] length, then perform D222, and D223 is performed if both are equal, if character string X [] length is less than character string Y
[] length then performs D224;
D222, the similarity of the alternative word is set to 0;It is as dissimilar;
D223, compare character string X [] length and whether character string Y [] is just the same, if by the similar of the alternative word
Degree puts 1, as similar, otherwise sets to 0 the similarity of the alternative word;
D224, to set character string X [] length be XL, and XL character composition character string Z [], compares word before interception character string Y []
Whether symbol string X [] length is just the same with character string Z [], otherwise that this is alternative if the similarity of the alternative word put into 1
The similarity of word sets to 0;
D225, to each it is alternative peace calculate similarity by above step after, all alternative words are carried out by similarity
Rearrangement, similarity is more big, comes before more;When similarity is identical, before the alternative word for originally coming above still comes.
A kind of alternative word sequence processing system of input method, wherein, including:
Menu setting module, for being provided previously by two kinds of input methods for the alternative word display sequence of input method:Primary input
Method, secondary input method;For carrying out the alternative word display sequence of input method based on primary input method, supplemented by secondary input method;
Input method setup module, the operational order for receiving user pre-sets and selectes two kinds of different input methods:Master is defeated
Enter method, secondary input method;
Primary input method processing module, for when Chinese character or phrase is input into, receiving the operational order of user first according to master
The coding input Chinese character or the coding of phrase of input method, alternative word display sequence are sorted successively by primary input method custom first
It has been shown that, the alternative word display sequence word table of generation primary input method;
Secondary input method processing module, after the completion of when Chinese character or phrase coding according to the input of primary input method;Root is received again
According to the coding input of the secondary input method Chinese character or the coding of phrase, and control the alternative word display sequence word of primary input method that will be generated
Conformed in table time input method coding Chinese character or phrase drain into most before.
The alternative word sequence processing system of described input method, wherein, also include:
Module is pre-set, lead between the input coding of primary input method and the input coding of secondary input method for being pre-set
A spcial character specified is crossed to be identified;
Spcial character identification module, is identified judging for the primary input method coding to being input into, and judges the volume of input
Whether the special word specified is had in code character;It is when a spcial character specified is recognized, then being encoded to for follow-up input is secondary
Input method coding.
The alternative word sequence processing system of described input method, wherein, secondary input method processing module includes:
First judging unit, is identified judging for the primary input method coding to being input into, and judges the coded word of input
Whether the special word specified is had in symbol;
The input of primary input method finishes mark setting unit, for when a spcial character specified is recognized, then by subsequently
What is be input into is encoded to time input method coding, sets the input of primary input method and finishes mark, and all alternative words are corresponding secondary defeated
Enter method coding all to parse;
Rearrangement unit, for controlling that time input method will be conformed in the alternative word display sequence word table of the primary input method of generation
Before the Chinese character or phrase of coding are drained into most.
The alternative word sequence processing system of described input method, wherein, secondary input method processing module also includes
Second judging unit, for when the spcial character do not specified in the code character for judging input, then judging again
Whether the input of primary input method finishes mark configured;
Character string comparison sequencing unit, for listing the secondary input method coding after the spcial character specified, all standby
Searched in corresponding input method coding of word selection and meet this alternative word of input method coding;It is corresponding to each alternative word successively
Secondary input method coding carries out character string comparison with the secondary input method coding of user input,SimilarityBefore alternative word higher is drained into most
Face.
A kind of mobile terminal, wherein, including the alternative word sequence processing system of input method described in any of the above-described.
The alternative word sequence processing method of input method provided by the present invention, system and mobile terminal, as a result of advance
Two kinds of different input methods are selected in menu is set:Primary input method, secondary input method;In input Chinese character(Or phrase)When, first
Coding input Chinese character according to primary input method(Or phrase)Coding;Work as Chinese character(Or phrase)After the completion of coding input;User is again
Then it is input into time input method Chinese character(Or phrase)Coding, alternative Chinese character(Or phrase)In conform to the Chinese character of time input method coding
(Or phrase)Foremost will be drained into.Mobile terminal is set to increased New function:Primary input method and time input method successively ranking function, energy
Enough alternative words of quickly resequencing, make the alternative word of user's needs come before relatively, improve word input efficiency for user carries
Convenience is supplied.
Specific embodiment
To make the objects, technical solutions and advantages of the present invention clearer, clear and definite, develop simultaneously embodiment pair referring to the drawings
The present invention is further described.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and without
It is of the invention in limiting.
Fig. 1 is referred to, Fig. 1 is a kind of flow of the preferred embodiment of the alternative word sequence processing method of input method of the invention
Figure.The alternative word sequence processing method of a kind of input method shown in Fig. 1, comprises the following steps:
Step S10, two kinds of input methods for being provided previously by being shown for the alternative word of input method sequence:Primary input method, secondary input
Method;For carrying out the alternative word display sequence of input method based on primary input method, supplemented by secondary input method.
In the embodiment of the present invention, can be provided in input method menu for while taking into account two kinds of input methods i.e. primary input method
With the menu selection item of the alternative word display sequence of secondary input method.I.e. primary input method, secondary input method select menu;For with primary input
The alternative word display sequence of input method is carried out based on method, supplemented by secondary input method.For example, there is provided it is phonetic that selection sets primary input method,
Secondary input method is five.
Step S20, the operational order for receiving user pre-sets and selectes two kinds of different input methods:It is primary input method, secondary
Input method.
In the embodiment of the present invention, input methods can be provided in primary input method, secondary input method menu and selected for user.Example
As set, primary input method is phonetic, and secondary input method is five.The operational order that user can certainly be received sets primary input method
It is phonetic, secondary input method is stroke.
Step S30, when Chinese character or phrase is input into, coding of the operational order first according to primary input method for receiving user is defeated
Enter the coding of Chinese character or phrase, alternative word display sequence carries out sequencing display successively by primary input method custom first, and master is defeated for generation
Enter the alternative word display sequence word table of method.
In the embodiment of the present invention, because being provided with primary input method, secondary input method.When input Chinese character or phrase is needed, can
With elder generation according to the coding input Chinese character or the coding of phrase of primary input method, for example, " Zhu " word is got, primary input can be first passed through
Method Pinyin Input " zhu ".Then the alternative word display sequence of present invention meeting carries out sequencing display successively by primary input method custom first,
The alternative word display sequence word table of generation primary input method, " 1. lead the notes 4. of 2. work 3. and live in 5. Zhu ", subsequently into step S40.
Step S40, when Chinese character or phrase coding according to primary input method input after the completion of;The volume according to time input method is received again
Code is input into the coding of the Chinese character or phrase, and controls that time input will be conformed in the alternative word display sequence word table of the primary input method of generation
Before the Chinese character or phrase of method coding are drained into most.
As described above, " Zhu " is for example got, after the completion of Chinese character or phrase coding are according to the input of primary input method;Generation master
After input method alternative word display sequence word table, " 1. lead 2. write 3. notes 4. live in 5. Zhu ", the present invention further according to secondary input method such as
Five-stroke input method is input into five-stroke input method coding " RI " of Zhu again;After input, the primary input method that present invention control will be generated is standby
Conformed in word selection display sequence word table time input method coding Chinese character or phrase drain into most before." 1. lead 2. 3. notes 4. of work to live
5. the most preceding confession user selection of " Zhu " word row in Zhu ".
The present invention in the specific implementation, can pre-set the input coding of primary input method and the input coding of time input method
Between be identified by a spcial character specified.The spcial character specified be identified could be arranged to "=", "-",
"+", " * " or "/" etc., can be set as desired.It is identified with specified spcial character in the follow-up embodiment of the present invention
It is set to be illustrated as a example by "=".
In the present invention, after the spcial character for recognizing primary input method and time input method is set.When recognizing user
The coding of word is input into according to primary input method, successively the primary input method coding being input into is identified showing alternative word, work as knowledge
It is clipped to a spcial character specified(As previously described "="), then follow-up input is encoded to time input method coding, and control
Before Chinese character or phrase that time input method coding is conformed in the alternative word display sequence word table of the primary input method of generation are drained into most;So
User directly the word selection for needing to beat can stir back and forth without left and right, substantially increase file input speed.
It can be seen that, the invention provides a kind of alternative word sequence processing method of fast and reliable input method, can quickly again
Sort alternative word, the alternative word of user's needs is come before relatively, improves word input efficiency and provides users with the convenient.
Below by way of specific Application Example, the present invention is described in further details.
Set in this concrete application embodiment and include input methods, respectively including input method one, input method two, input method
3rd ...;Two kinds of input methods are selected in input method menu respectively as primary input method and time input method;This concrete application is implemented
Example is mainly included the following steps that:
Step S20, the operational order for receiving user pre-sets and selectes two kinds of different input methods:It is primary input method, secondary
Input method;As shown in Fig. 2 primary input method selection spelling input method, secondary input method selection five-stroke input method in this specific embodiment.
Step S30, when Chinese character or phrase is input into, coding of the operational order first according to primary input method for receiving user is defeated
Enter the coding of Chinese character or phrase.
In the inventive method specific embodiment, when input word or phrase is needed, can automatic detection and to parse user defeated
The character for entering, user is often input into a character, is carried out once following operation, as shown in Figure 3:
S100, judge input character whether be(The spcial character specified)"=", if it is performs step S200, otherwise
Perform S300.
Whether the character for judging user input is the special word "=" specified, and if it is performs step S200,
Otherwise perform S300.
S200, the primary input method input of setting finish mark, and by all corresponding input method coding wholes of alternative word
Parse;I.e. when the character for judging user input be the special word "=" specified, then the input of primary input method is set and is finished
Mark, and all corresponding input method codings of alternative word are all parsed.
A spcial character specified ought be recognized, then follow-up input is encoded to time input method coding, master is set
Input method input finishes mark, and all corresponding input method codings of alternative word are all parsed.
S300, judge that whether the input of primary input method finishes mark configured, if it is performs S400, otherwise perform
S500;Secondary input method coding after S400, the spcial character "=" specified, in all corresponding input method codings of alternative word
Middle lookup meets this alternative word of input method coding;Specifically, successively to each corresponding input method coding of alternative word with
The secondary input method coding of user input carries out character string comparison,SimilarityAlternative word higher drains into foremost.
In the incoming primary input method of S500, character, corresponding alternative word is gone out according to the code parsing by primary input method and is shown.
Wherein, as shown in Figure 4:The step S400 differentiates that similarity height specifically includes following steps,
Assuming that the secondary input method coding of user input is character string X [], some for parsing in step s 200 is alternative
The secondary input method coding of word is character string Y [];
S401, the size for comparing character string X [] length and character string Y [] length, if character string X [] length is more than word
Symbol string Y [] length, then perform S402, and S403 is performed if both are equal, if character string X [] length is less than character string Y
[] length then performs S404;
S402, the similarity of the alternative word is set to 0;It is as dissimilar.
S403, compare character string X [] length and whether character string Y [] is just the same, if by the similar of the alternative word
Degree puts 1(It is as similar), otherwise the similarity of the alternative word is set to 0;
S404, to set character string X [] length be XL, and XL character composition character string Z [], compares word before interception character string Y []
Whether symbol string X [] length is just the same with character string Z [], otherwise that this is alternative if the similarity of the alternative word put into 1
The similarity of word sets to 0;
After to each, alternative peace calculates similarity by above step, all alternative words are arranged again by similarity
Sequence, similarity is more big, comes before more;When similarity is identical, before the alternative word for originally coming above still comes.Specifically show
Under for example:
Fig. 5~Fig. 7 be using an example of above-described embodiment, if to get one usually fewer " ascending "
Word, Fig. 5 is with spelling input method input coding " zhi ", as shown in fig. 6, after "=" is input into, representing that spelling input method is compiled
Code input is finished." b " is input into afterwards, according to abovementioned steps, alternative word is resequenced, the alternative word of " duty ", " ascending " two
Similarity is 1, and remaining alternative word similarity is 0, and " duty ", " ascending " are discharged to foremost, as shown in Figure 7;F is input into afterwards, " ascending "
Similarity is 1, and remaining alternative word similarity is 0, and " ascending " is discharged to foremost.
It can be seen that, the alternative word sequence processing method of input method provided by the present invention, as a result of in advance in setting menu
In select two kinds of different input methods:Primary input method, secondary input method;In input Chinese character(Or phrase)When, first according to primary input
The coding input Chinese character of method(Or phrase)Coding;Work as Chinese character(Or phrase)After the completion of coding input;User is followed by input time
The input method Chinese character(Or phrase)Coding, alternative Chinese character(Or phrase)In conform to the Chinese character of time input method coding(Or phrase)Will
Drain into foremost.Mobile terminal is set to increased New function:Primary input method and time input method successively ranking function, can quickly again
Sort alternative word, the alternative word of user's needs is come before relatively, improves word input efficiency and provides users with the convenient.
Based on above-described embodiment, the embodiment of the processing system that sorted present invention also offers a kind of alternative word of input method, such as
Shown in Fig. 8, the system includes:
Menu setting module 810, for being provided previously by two kinds of input methods for the alternative word display sequence of input method:Master is defeated
Enter method, secondary input method;For carrying out the alternative word display sequence of input method based on primary input method, supplemented by secondary input method;Specifically such as
It is upper described.
Input method setup module 820, the operational order for receiving user pre-sets and selectes two kinds of different input methods:It is main
Input method, secondary input method;As detailed above.
Primary input method processing module 830, for when Chinese character or phrase is input into, receiving the operational order basis first of user
The coding input Chinese character or the coding of phrase of primary input method, alternative word display sequence are arranged successively by primary input method custom first
Sequence shows that the alternative word of generation primary input method shows sequence word table;As detailed above.
Secondary input method processing module 840, after the completion of when Chinese character or phrase coding according to the input of primary input method;Receive again
The coding of the coding input Chinese character or phrase according to secondary input method, and control the alternative word display sequence of primary input method that will be generated
Conformed in word table time input method coding Chinese character or phrase drain into most before;As detailed above.
Further, the alternative word sequence processing system of described input method, as shown in figure 8, also including:
Pre-set module 801, for pre-set primary input method input coding and time input method input coding it
Between be identified by a spcial character specified;As detailed above.
Spcial character identification module 802, is identified judging for the primary input method coding to being input into, and judges input
Whether the special word specified is had in code character;When a spcial character specified is recognized, then by being encoded to for being subsequently input into
Secondary input method coding;As detailed above.
Further, the alternative word sequence processing system of described input method, wherein, secondary input method processing module includes:
First judging unit, is identified judging for the primary input method coding to being input into, and judges the coded word of input
Whether the special word specified is had in symbol;As detailed above.
The input of primary input method finishes mark setting unit, for when a spcial character specified is recognized, then by subsequently
What is be input into is encoded to time input method coding, sets the input of primary input method and finishes mark, and all alternative words are corresponding secondary defeated
Enter method coding all to parse;As detailed above.
Rearrangement unit, for controlling that time input method will be conformed in the alternative word display sequence word table of the primary input method of generation
Before the Chinese character or phrase of coding are drained into most;As detailed above.
The alternative word sequence processing system of described input method, wherein, secondary input method processing module also includes
Second judging unit, for when the spcial character do not specified in the code character for judging input, then judging again
Whether the input of primary input method finishes mark configured;As detailed above.
Character string comparison sequencing unit, for listing the secondary input method coding after the spcial character specified, all standby
Searched in corresponding input method coding of word selection and meet this alternative word of input method coding;It is corresponding to each alternative word successively
Secondary input method coding carries out character string comparison with the secondary input method coding of user input,SimilarityBefore alternative word higher is drained into most
Face;As detailed above.
Based on above-described embodiment, present invention also offers a kind of mobile terminal, the mobile terminal of the present embodiment is including above-mentioned
The alternative word sequence processing system of input method described in any one.
In sum, the alternative word sequence processing method of input method provided by the present invention, system and mobile terminal, due to adopting
With selected two kinds of different input methods in menu is set in advance:Primary input method, secondary input method;In input Chinese character(Or phrase)
When, the coding input Chinese character first according to primary input method(Or phrase)Coding;Work as Chinese character(Or phrase)After the completion of coding input;
User is followed by the input time input method Chinese character(Or phrase)Coding, alternative Chinese character(Or phrase)In conform to time input method coding
Chinese character(Or phrase)Foremost will be drained into.Mobile terminal is set to increased New function:Primary input method and time input method sort successively
Function, can quickly resequence alternative word, the alternative word of user's needs is come before relatively, and improve word input efficiency is
User provides convenient.
It should be appreciated that application of the invention is not limited to above-mentioned citing, and for those of ordinary skills, can
To be improved according to the above description or converted, all these modifications and variations should all belong to the guarantor of appended claims of the present invention
Shield scope.