Summary of the invention
In order to solve the use habit that character word stock of the prior art can only can't be directed against different user to common situation, the embodiment of the invention has proposed the user's speech adding method and the system of a kind of spelling input method and spelling input method.Said technical scheme is following:
The embodiment of the invention has proposed a kind of user's speech adding method of spelling input method, comprising:
The character string of input error when obtaining the user through the spelling input method input;
Obtain the words of selecting when the user imports correct character string;
With the character string of said input error and said words corresponding stored in dictionary.
Preferred as technique scheme, the character string of input error comprised when the said user of obtaining imported through spelling input method:
Read the daily record of presetting, obtain all character strings of user's input in the daily record;
Obtain all character strings of importing between two words that the user selects in the daily record, and obtain all deletion actions wherein; And with this deletion action as separation, obtain each section character string wherein.
Preferred as technique scheme, said method also comprises:
Judge whether said each character string has identical record in said dictionary, if then ignore this character string.
Preferred as technique scheme, said method also comprises:
Judge the access times of the character string in the said dictionary, when access times are lower than predetermined threshold value, with said character string deletion.
The embodiment of the invention has also proposed a kind of user's speech add-on system of spelling input method, comprising:
Acquisition module, the character string of input error when being used to obtain the user through the spelling input method input;
Logging modle is used to obtain the words of selecting when the user imports correct character string;
The Word library updating module is used for character string and said words corresponding stored with said input error.
Preferred as technique scheme, said acquisition module comprises:
Log unit is used to read preset daily record, obtains all character strings of user's input in the daily record;
Split cells is used for obtaining all character strings of importing between two words of daily record user selection, to obtain all deletion actions wherein; And with this deletion action as separation, obtain each section character string wherein.
Preferred as technique scheme, said acquisition module also comprises:
Matching unit is used for judging whether said each character string has identical record at said dictionary, if then ignore this character string.
Preferred as technique scheme, said system also comprises:
Removing module is used for obtaining the number of times that character string that said dictionary adds and corresponding words use; When said number of times is lower than predetermined threshold value, with said character string deletion.
The embodiment of the invention has also proposed a kind of spelling input method, comprising: load module, display module, dictionary; Also comprise:
Acquisition module, the character string of input error when being used to obtain the user through the spelling input method input;
Logging modle is used to obtain the words of selecting when the user imports correct character string;
The Word library updating module is used for character string and said words corresponding stored with said input error.
Preferred as technique scheme, said acquisition module comprises:
Log unit is used to read preset daily record, obtains all character strings of user's input in the daily record;
Split cells is used for obtaining all character strings of importing between two words of daily record user selection, to obtain all deletion actions wherein; And with this deletion action as separation, obtain each section character string wherein.
Preferred as technique scheme, said acquisition module also comprises:
Matching unit is used for judging whether said each character string has identical record at said dictionary, if then ignore this character string.
Preferred as technique scheme, said spelling input method also comprises:
Removing module is used for obtaining the number of times that character string that said dictionary adds and corresponding words use; When said number of times is lower than predetermined threshold value, with said character string deletion.
The beneficial effect of the technical scheme that the embodiment of the invention provides is: the embodiment of the invention stores through the character string with user's input error, and itself and user are imported correct words corresponding stored in dictionary.Can make spelling input method need not to be provided with in advance a plurality of fuzzy words and fallibility speech like this, to reduce the shared space of dictionary of spelling input method, effectiveness of retrieval when improving input.Simultaneously, can generate individual's dictionary again to the use habit of different user, with the individual character use habit of more being close to the users.
Embodiment
For making the object of the invention, technical scheme and advantage clearer, will combine accompanying drawing that embodiment of the present invention is done to describe in detail further below.
The mentality of designing of the embodiment of the invention is: the user if do not have required words in the prepare word that the character string mistake of input causes showing, can delete the character string of input, and re-enter other character strings, and select required words when input.For example: " Mongolian oak " word (hu) much human in Cai Zhiheng " mistletoe " at the beginning all mistake be combined into " jie ".The user generally can do following deletion and rewrite behavior: input jie->can not find " Mongolian oak "-deletion jie-in the candidate>input hu->select target word " Mongolian oak ".Be exactly to have utilized this process to upgrade user's dictionary in the embodiment of the invention, that is: character string of recording user deletion, and the character string that will delete and correct target word are mapped and store in the dictionary.The dictionary that generates like this is more near user's use habit,
Below through embodiment the present invention is further explained.
Embodiment 1
First embodiment of the invention has proposed a kind of user's speech adding method of spelling input method, and its flow process is as shown in Figure 1, comprising:
The character string of step 101, input error when obtaining the user through the spelling input method input;
Step 102, obtain the words of selecting when the user imports correct character string;
Step 103, with the character string of said input error and said words corresponding stored in dictionary.
The embodiment of the invention stores through the character string with user's input error, and itself and user are imported correct words corresponding stored in dictionary.Can make spelling input method need not to be provided with in advance a plurality of fuzzy words and fallibility speech like this, to reduce the shared space of dictionary of spelling input method, effectiveness of retrieval when improving input.Simultaneously, can generate individual's dictionary again to the use habit of different user, with the individual character use habit of more being close to the users.
Embodiment 2
Second embodiment of the invention has proposed a kind of user's speech adding method of spelling input method, is on the first embodiment basis, to improve, and its flow process is as shown in Figure 2, comprising:
The character string of step 201, input error when obtaining the user through the spelling input method input.Wherein, the character string of input error can obtain in the following manner:
Character string when obtaining the user, and the words of selecting through the spelling input method input.Can obtain all character strings between the words that two users select like this.If comprise user's deletion action in this character string, then can think the character string that has comprised user's input error in this character string.
In one embodiment of the invention, a daily record can be set in spelling input method, with the character string of recording user input.For example: when this spelling input method starts, start the process of a supervisory user keyboard input simultaneously.This process is stored user's all character strings through the keyboard input in daily record.
This be since the user through spelling input method when input, if because when not having the required words of user in the inaccurate words that causes demonstrating of character string of input, the character string that the delete key deletion has been imported.The user delete this character string method can for:
When the user imports one section character string, for example user input " ze ", demonstration be " thief ", and the words of the actual required selection of user is " this ", then the user can import " ze " through the delete key deletion, or deletion " e " wherein only.Because each button of keyboard is all to there being the key assignments of standard; System translates into electric signal that system can set with the user for the operation of keyboard through this key assignments, so can adopt mode of the prior art to obtain the button of user's input in the embodiment of the invention.
Wherein, this delete key can be the esc key on the keyboard or delete key or backspace key.That is: after the user imports one section character string, find that this section character string of input is wrong, can be by all character strings of esc key cancellation input; Can delete one section character string wherein through the delete key, or through backspace key deletion one section character string wherein.
Wherein, if the user has only inputed by mistake once, then the character string of deletion has only one section.For example, the user imports " ze ", when finding input error then, has deleted " e " and has re-entered " he " through the backspace key.The result who then in daily record, writes down is:
ze
←backspace
he
This
Just can confirm that the ze of user's input is the character string of input error this moment, its pairing words should be " this ".
Because possibly there is the situation of repeatedly input error in the user, so just need all select words to be mapped with the user respectively the character string that the user repeatedly deletes, and be stored in the dictionary.For example, continue and go up example, after the user has imported " this " word, import words " Mongolian oak " again.Input error is found in input of character string " jie " back, has deleted " jie " through the backspace key; Re-enter " xie " back then and find still to be wrong, deleted " xie " through the backspace key; Re-enter " hu " and select required words " Mongolian oak ".The result who then in daily record, writes down is:
ze
←backspace
he
This
jie
←backspace
xie
←backspace
hu
Mongolian oak
Then step 201 can be specially:
Step 2011, read the daily record of presetting, obtain all character strings of user's input in the daily record;
Step 2012, obtain all character strings of importing between two words that user in the daily record selects, to obtain all deletion actions wherein; And with this deletion action as separation, obtain each section character string wherein;
Example with the front is an example, has comprised between two words " this " and " Mongolian oak " two deletion actions all character strings being divided into three sections, is respectively " jie ", " xie ", " hu ".So just can be with all corresponding respectively " Mongolian oak " word of these three sections character strings.
Further, the final stage character string of in step 2032, obtaining " hu " is the correct character string of last input, therefore can this section character string be ignored.
Step 2013, judge whether said each character string has identical record in said dictionary, if then ignore this character string.
Can prevent like this to be stored many identical records in the dictionary, cause dictionary too too fat to move, to improve the dictionary effectiveness of retrieval.
Certainly, above-mentioned steps just illustrates, and can also adopt other modes to obtain the multistage character string of user's deletion in the embodiment of the invention, for example: when the user deletes, insert a mark, so also can very easily the multistage character string be distinguished.
Step 202, obtain the words of selecting when the user imports correct character string.
Same above example is the example explanation, and " Mongolian oak " wherein is the correct words of input.
Step 203, with the character string of said user deletion, and the words corresponding stored that the user selects is in dictionary.This dictionary can be the user thesaurus of spelling input method, or an independent fuzzy word dictionary of spelling input method, also can be other dictionaries in the operating system, and the embodiment of the invention is not made qualification to this.
When being a plurality of to the character string of the user described in the step 201 deletion, then step 203 can be specially:
Step 203 ', said each section character string is mapped with the words that said user selects respectively, and store in the dictionary.
That is: can " hu " be ignored after, " jie ", " xie " are mapped with " Mongolian oak " respectively, and are stored in the dictionary.
The foregoing description can be through daily record mode with all character strings storages of user's deletion, and through obtaining the correct words that the user selects, with the character string of these deletions and this words corresponding stored in dictionary.The mode that presets in the user thesaurus storage fuzzy word of the prior art of comparing so both can reduce the size and the user thesaurus of spelling input method, can generate corresponding dictionary according to the use habit of different user again, to improve user's input efficiency.
Further, the foregoing description also comprises:
Step 204, obtain in the said dictionary number of times that the character string of adding according to abovementioned steps 201-203 and corresponding words use; When said number of times is lower than predetermined threshold value, with said character string deletion.
This is because the user character string occurs inputing by mistake to cause this character string to be added in the dictionary accidentally, can cause dictionary too too fat to move like this.Therefore through the mode that long-time obsolete character string is deleted dictionary is upgraded in the embodiment of the invention, renewal can be every interval one Preset Time.
Owing to increased deleting mechanism, the mode of a large amount of fuzzy words of indication can greatly reduce the storage space that input method takies in the prior art of comparing in the embodiment of the invention, and the system overhead when reducing the retrieval user dictionary simultaneously also improves recall precision.
Embodiment 3
Third embodiment of the invention has proposed a kind of user's speech add-on system of spelling input method, and its structure is as shown in Figure 2, comprising:
Acquisition module 1, the character string of input error when being used to obtain the user through the spelling input method input;
Logging modle 2 is used to obtain the words of selecting when the user imports correct character string;
Word library updating module 3 is used for character string and said words corresponding stored with said input error.
The embodiment of the invention stores through the character string with user's input error, and itself and user are imported correct words corresponding stored in dictionary.Can make spelling input method need not to be provided with in advance a plurality of fuzzy words and fallibility speech like this, to reduce the shared space of dictionary of spelling input method, effectiveness of retrieval when improving input.Simultaneously, can generate individual's dictionary again to the use habit of different user, with the individual character use habit of more being close to the users.
Embodiment 4
Fourth embodiment of the invention has proposed a kind of user's speech add-on system of spelling input method, is on the 3rd embodiment basis, to improve, and its structure is as shown in Figure 4, comprising:
Acquisition module 1, the character string of input error when being used to obtain the user through the spelling input method input.Wherein, the character string of input error can obtain in the following manner:
Character string when obtaining the user, and the words of selecting through the spelling input method input.Can obtain all character strings between the words that two users select like this.If comprise user's deletion action in this character string, then can think the character string that has comprised user's input error in this character string.
In one embodiment of the invention, a daily record can be set in spelling input method, with the character string of recording user input.For example: when this spelling input method starts, start the process of a supervisory user keyboard input simultaneously.This process is stored user's all character strings through the keyboard input in daily record.
This be since the user through spelling input method when input, if because when not having the required words of user in the inaccurate words that causes demonstrating of character string of input, the character string that the delete key deletion has been imported.The user delete this character string method can for:
When the user imports one section character string, for example user input " ze ", demonstration be " thief ", and the words of the actual required selection of user is " this ", then the user can import " ze " through the delete key deletion, or deletion " e " wherein only.Because each button of keyboard is all to there being the key assignments of standard; System translates into electric signal that system can set with the user for the operation of keyboard through this key assignments, so can adopt mode of the prior art to obtain the button of user's input in the embodiment of the invention.
Wherein, this delete key can be the esc key on the keyboard or delete key or backspace key.That is: after the user imports one section character string, find that this section character string of input is wrong, can be by all character strings of esc key cancellation input; Can delete one section character string wherein through the delete key, or through backspace key deletion one section character string wherein.
Wherein, if the user has only inputed by mistake once, then the character string of deletion has only one section.For example, the user imports " ze ", when finding input error then, has deleted " e " and has re-entered " he " through the backspace key.The result who then in daily record, writes down is:
ze
←backspace
he
This
Just can confirm that the ze of user's input is the character string of input error this moment, its pairing words should be " this ".
Because possibly there is the situation of repeatedly input error in the user, so just need all select words to be mapped with the user respectively the character string that the user repeatedly deletes, and be stored in the dictionary.For example, continue and go up example, after the user has imported " this " word, import words " Mongolian oak " again.Input error is found in input of character string " jie " back, has deleted " jie " through the backspace key; Re-enter " xie " back then and find still to be wrong, deleted " xie " through the backspace key; Re-enter " hu " and select required words " Mongolian oak ".The result who then in daily record, writes down is:
ze
←backspace
he
This
jie
←backspace
xie
←backspace
hu
Mongolian oak
Then acquisition module 1 can be specially:
Log unit 11 is used to read preset daily record, obtains all character strings of user's input in the daily record;
Split cells 12 is used for obtaining all character strings of importing between two words of daily record user selection, to obtain all deletion actions wherein; And with this deletion action as separation, obtain each section character string wherein;
Example with the front is an example, has comprised between two words " this " and " Mongolian oak " two deletion actions all character strings being divided into three sections, is respectively " jie ", " xie ", " hu ".So just can be with all corresponding respectively " Mongolian oak " word of these three sections character strings.
Further, the final stage character string " hu " that split cells 12 obtains is the correct character string of last input, therefore can this section character string be ignored.
Matching unit 13, judge whether said each character string has identical record in said dictionary, if then ignore this character string.
Can prevent like this to be stored many identical records in the dictionary, cause dictionary too too fat to move, to improve the dictionary effectiveness of retrieval.
Certainly, said system just illustrates, and can also adopt other modes to obtain the multistage character string of user's deletion in the embodiment of the invention, for example: when the user deletes, insert a mark, so also can very easily the multistage character string be distinguished.
Logging modle 2 is used to obtain the words of selecting when the user imports correct character string.
Same above example is the example explanation, and " Mongolian oak " wherein is the correct words of input.
Word library updating module 3 be used for the character string with said user's deletion, and the words corresponding stored that the user selects is in dictionary.This dictionary can be the user thesaurus of spelling input method, or an independent fuzzy word dictionary of spelling input method, also can be other dictionaries in the operating system, and the embodiment of the invention is not made qualification to this.
When being a plurality of to the character string of described user deletion, then Word library updating module 3 also is used for said each section character string is mapped with the words that said user selects respectively, and stores in the dictionary.
That is: can " hu " be ignored after, " jie ", " xie " are mapped with " Mongolian oak " respectively, and are stored in the dictionary.
The foregoing description can be through daily record mode with all character strings storages of user's deletion, and through obtaining the correct words that the user selects, with the character string of these deletions and this words corresponding stored in dictionary.The mode that presets in the user thesaurus storage fuzzy word of the prior art of comparing so both can reduce the size and the user thesaurus of spelling input method, can generate corresponding dictionary according to the use habit of different user again, to improve user's input efficiency.
Further, the foregoing description also comprises:
Removing module 4 is used for obtaining the number of times that character string that said dictionary adds and corresponding words use; When said number of times is lower than predetermined threshold value, with said character string deletion.
This is because the user character string occurs inputing by mistake to cause this character string to be added in the dictionary accidentally, can cause dictionary too too fat to move like this.Therefore through the mode that long-time obsolete character string is deleted dictionary is upgraded in the embodiment of the invention, renewal can be every interval one Preset Time.
Owing to increased deleting mechanism, the mode of a large amount of fuzzy words of indication can greatly reduce the storage space that input method takies in the prior art of comparing in the embodiment of the invention, and the system overhead when reducing the retrieval user dictionary simultaneously also improves recall precision.
The system of the embodiment of the invention third and fourth embodiment, identical with the design of the method for aforesaid first and second embodiment with principle, so in third and fourth embodiment to first and second embodiment in identical part repeat no more.
Embodiment 5
Fifth embodiment of the invention has proposed a kind of spelling input method, and its structure is as shown in Figure 5, comprising: load module 5, display module 6, dictionary 7 also comprise:
Acquisition module 1, the character string of input error when being used to obtain the user through the spelling input method input;
Logging modle 2 is used to obtain the words of selecting when the user imports correct character string;
Word library updating module 3 is used for character string and said words corresponding stored with said input error.
The embodiment of the invention stores through the character string with user's input error, and itself and user are imported correct words corresponding stored in dictionary.Can make spelling input method need not to be provided with in advance a plurality of fuzzy words and fallibility speech like this, to reduce the shared space of dictionary of spelling input method, effectiveness of retrieval when improving input.Simultaneously, can generate individual's dictionary again to the use habit of different user, with the individual character use habit of more being close to the users.
Embodiment 6
Sixth embodiment of the invention has proposed a kind of user's speech add-on system of spelling input method, is on the 5th embodiment basis, to improve, and its structure is as shown in Figure 6, comprising: load module 5, display module 6, dictionary 7 also comprise:
Acquisition module 1, the character string of input error when being used to obtain the user through the spelling input method input.Wherein, the character string of input error can obtain in the following manner:
Character string when obtaining the user, and the words of selecting through the spelling input method input.Can obtain all character strings between the words that two users select like this.If comprise user's deletion action in this character string, then can think the character string that has comprised user's input error in this character string.
In one embodiment of the invention, a daily record can be set in spelling input method, with the character string of recording user input.For example: when this spelling input method starts, start the process of a supervisory user keyboard input simultaneously.This process is stored user's all character strings through the keyboard input in daily record.
This be since the user through spelling input method when input, if because when not having the required words of user in the inaccurate words that causes demonstrating of character string of input, the character string that the delete key deletion has been imported.The user delete this character string method can for:
When the user imports one section character string, for example user input " ze ", demonstration be " thief ", and the words of the actual required selection of user is " this ", then the user can import " ze " through the delete key deletion, or deletion " e " wherein only.Because each button of keyboard is all to there being the key assignments of standard; System translates into electric signal that system can set with the user for the operation of keyboard through this key assignments, so can adopt mode of the prior art to obtain the button of user's input in the embodiment of the invention.
Wherein, this delete key can be the esc key on the keyboard or delete key or backspace key.That is: after the user imports one section character string, find that this section character string of input is wrong, can be by all character strings of esc key cancellation input; Can delete one section character string wherein through the delete key, or through backspace key deletion one section character string wherein.
Wherein, if the user has only inputed by mistake once, then the character string of deletion has only one section.For example, the user imports " ze ", when finding input error then, has deleted " e " and has re-entered " he " through the backspace key.The result who then in daily record, writes down is:
ze
←backspace
he
This
Just can confirm that the ze of user's input is the character string of input error this moment, its pairing words should be " this ".
Because possibly there is the situation of repeatedly input error in the user, so just need all select words to be mapped with the user respectively the character string that the user repeatedly deletes, and be stored in the dictionary.For example, continue and go up example, after the user has imported " this " word, import words " Mongolian oak " again.Input error is found in input of character string " jie " back, has deleted " jie " through the backspace key; Re-enter " xie " back then and find still to be wrong, deleted " xie " through the backspace key; Re-enter " hu " and select required words " Mongolian oak ".The result who then in daily record, writes down is:
ze
←backspace
he
This
jie
←backspace
xie
←backspace
hu
Mongolian oak
Then acquisition module 1 can be specially:
Log unit 11 is used to read preset daily record, obtains all character strings of user's input in the daily record;
Split cells 12 is used for obtaining all character strings of importing between two words of daily record user selection, to obtain all deletion actions wherein; And with this deletion action as separation, obtain each section character string wherein;
Example with the front is an example, has comprised between two words " this " and " Mongolian oak " two deletion actions all character strings being divided into three sections, is respectively " jie ", " xie ", " hu ".So just can be with all corresponding respectively " Mongolian oak " word of these three sections character strings.
Further, the final stage character string " hu " that split cells 12 obtains is the correct character string of last input, therefore can this section character string be ignored.
Matching unit 13, judge whether said each character string has identical record in said dictionary, if then ignore this character string.
Can prevent like this to be stored many identical records in the dictionary, cause dictionary too too fat to move, to improve the dictionary effectiveness of retrieval.
Certainly, said system just illustrates, and can also adopt other modes to obtain the multistage character string of user's deletion in the embodiment of the invention, for example: when the user deletes, insert a mark, so also can very easily the multistage character string be distinguished.
Logging modle 2 is used to obtain the words of selecting when the user imports correct character string.
Same above example is the example explanation, and " Mongolian oak " wherein is the correct words of input.
Word library updating module 3 be used for the character string with said user's deletion, and the words corresponding stored that the user selects is in dictionary.This dictionary can be the user thesaurus of spelling input method, or an independent fuzzy word dictionary of spelling input method, also can be other dictionaries in the operating system, and the embodiment of the invention is not made qualification to this.
When being a plurality of to the character string of described user deletion, then Word library updating module 3 also is used for said each section character string is mapped with the words that said user selects respectively, and stores in the dictionary.
That is: can " hu " be ignored after, " jie ", " xie " are mapped with " Mongolian oak " respectively, and are stored in the dictionary.
The foregoing description can be through daily record mode with all character strings storages of user's deletion, and through obtaining the correct words that the user selects, with the character string of these deletions and this words corresponding stored in dictionary.The mode that presets in the user thesaurus storage fuzzy word of the prior art of comparing so both can reduce the size and the user thesaurus of spelling input method, can generate corresponding dictionary according to the use habit of different user again, to improve user's input efficiency.
Further, the foregoing description also comprises:
Removing module 4 is used for obtaining the number of times that character string that said dictionary adds and corresponding words use; When said number of times is lower than predetermined threshold value, with said character string deletion.
This is because the user character string occurs inputing by mistake to cause this character string to be added in the dictionary accidentally, can cause dictionary too too fat to move like this.Therefore through the mode that long-time obsolete character string is deleted dictionary is upgraded in the embodiment of the invention, renewal can be every interval one Preset Time.
Owing to increased deleting mechanism, the mode of a large amount of fuzzy words of indication can greatly reduce the storage space that input method takies in the prior art of comparing in the embodiment of the invention, and the system overhead when reducing the retrieval user dictionary simultaneously also improves recall precision.
The system of the embodiment of the invention the 5th and the 6th embodiment; Be to use the spelling input method of system of method and third and fourth embodiment of aforesaid first and second embodiment; Its design is identical with first, second, third, fourth embodiment with principle, and therefore wherein identical part repeats no more.
If the said integrated unit of the embodiment of the invention is realized with the form of SFU software functional unit and during as independently production marketing or use, also can be stored in the computer read/write memory medium.Based on such understanding; The part that technical scheme of the present invention contributes to prior art in essence in other words can be come out with the embodied of software product; This computer software product is stored in the storage medium; Comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out all or part of of the said method of each embodiment of the present invention.And aforesaid storage medium comprises: various media that can be program code stored such as USB flash disk, portable hard drive, ROM (read-only memory) (ROM, Read-Only Memory), RAS (RAM, Random Access Memory), magnetic disc or CD.
More than be merely preferred embodiment of the present invention, or not all within spirit of the present invention and principle in order to restriction the present invention, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.