Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
In embodiments of the present invention, when the user adopts Chinese character coding input method input Chinese character, can be according to the candidate word of user's input, the related term of this candidate word of search from the related term dictionary that presets, and show the related term of this candidate word, the user selects one from the related term of the candidate word of demonstration, can realize the input of the related term of candidate word in the input method.
Fig. 1 shows the realization flow of the related term input method of candidate word in the input method that the embodiment of the invention provides, and details are as follows:
In step S101, receive the candidate word of user's input.Wherein candidate word can be phonetic or the definite candidate word of stroke according to the Chinese character of user's input.
In step S102, according to the candidate word of user's input, the related term of this candidate word in the related term dictionary that search is preset.
In an embodiment of the present invention, the related term dictionary comprises core related term dictionary and user's related term dictionary.Wherein core related term dictionary comprises core related term dictionary, stores the related term of candidate word in the core related term dictionary, and the related term of this candidate word is the related term of pre-configured candidate word.User's related term dictionary comprises user's related term dictionary, stores the related term of candidate word in user's related term dictionary, and the related term of this candidate word is user when importing candidate word, the related term of the candidate word of selecting.Search for the related term dictionary of candidate word according to the candidate word that the user selects.The related term of candidate word can be the synonym of candidate word, the antonym of candidate word, one or more in other perhaps relevant with candidate word speech.
In step S103, the related term of the candidate word that searches is sorted.
When the related term to candidate word sorts, can sort according to the frequency of utilization (the following word frequency that all is called) of the related term of candidate word.When the related term of candidate word being sorted according to word frequency, " memory recently " ranking method that can adopt prior art to provide, " memory farthest " ranking method, " high word frequency " ranking method, one or more in " low word frequency " ranking method make up and sort.Be owing to realize the purpose of the related term input of candidate word, make the computer user can use the vocabulary that is of little use with the common wordss similar import to carry out communication exchange, reach the vocabulary that enlarges the computer user, improve the purpose of computer user's language talent.Therefore, if according to " memory recently " ranking method and " high word frequency " ranking method the related term of candidate word is sorted, then the related term owing to candidate word does not often use, and is arranged to the end, is not easy to the user select, and is difficult to play guiding user's effect.If the related term of candidate word is sorted according to " memory farthest " ranking method and " low word frequency " ranking method, then because some related term of candidate word, be that the user does not want to select, but wilfully because import fewly, perhaps do not import, and always come the foremost, also be not easy to the user and select.
The more excellent sort method of Cai Yonging is to adopt " non-nearest memory " and " non-high word frequency " ranking method that the related term of candidate word is sorted in embodiments of the present invention, and it puts in order as shown in Figure 2, and its detailed process is as follows:
To from core related term dictionary, search, and the related term that is not included in the candidate word in user's related term dictionary sorts from high to low according to word frequency.When the word frequency of the related term of candidate word sorts to the candidate word that searches, if the user is after the input candidate word, selected the related term of this candidate word, if promptly the related term of candidate word is also contained in user's related term dictionary in the core related term dictionary, then the related term of this candidate word does not participate in this minor sort.
The related term of the candidate word that will search from user's related term dictionary is inserted into the end of the related term sequence of the candidate word after the above-mentioned ordering from low to high according to word frequency.Wherein the word frequency of the related term of candidate word is according in input during candidate word in user's related term dictionary, selects the number of times of the related term of this candidate word to calculate.
The related term (being also referred to as the related term of the candidate word of last memory) of the candidate word selected for the last time is inserted into the centre position of the related term sequence of the candidate word after the above-mentioned arrangement.Wherein the centre position is meant when the related term of this candidate word of Pagination Display, the related term of the candidate word of the last memory of inserting is positioned at first page, guarantee under the situation of not page turning, can select the related term of the candidate word of this last memory, it specifically is positioned at which of first page and can be provided with in advance.As the related term that sets in advance the candidate word of last memory is positioned at the 4th of first page, and then the related term of the candidate word that will remember at last is inserted into the 4th position of the related term sequence of the candidate word after the above-mentioned ordering; As the related term that sets in advance the candidate word of last memory is positioned at second of first page, and then the related term of the candidate word that will remember at last is inserted into second position of the related term sequence of the candidate word after the above-mentioned ordering.This sort method is described this sort method in order better to illustrate below in conjunction with a concrete example.
Suppose that the candidate word that the user selects is A, according to candidate word A, the related term of the A that finds from core related term dictionary comprises B, C, D, E, F, G, H, I, and also is B, C, D, E, F, G, H, I according to word frequency order from high to low; When if the user once imported A, selected its related term B, C, D, promptly comprise related term B, C, the D of A in user's related term dictionary; And the word frequency order from high to low according to B, C, D in user's related term dictionary also is B, C, D; During A, the related term of Ji Yi A is B to the user at last in input, and during the related term of Pagination Display A, four vocabulary of every page of demonstration, the related term of the candidate word of the last memory that sets in advance is presented at first page the 4th.When then the related term of the candidate word that searches being sorted, the related term of the A that will search from core related term dictionary sorts from high to low according to word frequency earlier, because the user is behind input A, related term B, C, the D of A have been selected, B, the C, the D that have then selected do not participate in this minor sort, therefore, the sequence after the ordering is E, F, G, H, I.The related term of the A that will search from user's related term dictionary is inserted into the end of the related term sequence of the A after the above-mentioned ordering from low to high according to word frequency again, and the sequence after the ordering is E, F, G, H, I, D, C, B.The related term B of A of memory at last is inserted into centre position after the above-mentioned arrangement.Because when showing the related term of A, every page of related term that shows four A, therefore, the related term B of the A of memory at last is inserted into centre position after the above-mentioned arrangement after, the sequence after the ordering is E, F, G, B, H, I, D, C.
In step S104, show the related term of this candidate word or the related term of the candidate word after the ordering.When showing the related term of this candidate word, can carry out Pagination Display, also can once show the related term of all candidate word according to demonstration setting in advance.
In step S105, receive the related term selection instruction of user's candidate word, export the related term of the candidate word corresponding with the related term selection instruction of this candidate word.
The user can pass through the related term selection instruction that numerical key on mouse, the keyboard or directionkeys etc. send candidate word, with the related term of candidate word that need to select output.
In step S106, the related term of the candidate word that the user was selected is stored to user's related term dictionary.
When the related term of the candidate word that the user was selected was stored in user's related term dictionary, the related term to the last candidate word of remembering of user carried out mark simultaneously, and recomputates the word frequency of the related term of candidate word in user's related term dictionary.In embodiments of the present invention, select the related term of candidate word for the ease of the user, the related term storage of the candidate word that the user was selected, formation belongs to user's related term dictionary of individual subscriber, and the related term that is about to the candidate word of above-mentioned selection is added in the related term dictionary in user's related term dictionary.As suppose that the user is behind input candidate word A, selected the related term B of A, the related term that whether has A in the related term dictionary of then first inquiring user related term dictionary, if there is no, then in the related term dictionary of user's related term dictionary, create the related term of A, if exist,, be added in the related term dictionary of user's related term dictionary then with the related term of B as A.
In embodiments of the present invention,, export the related term of this candidate word, thereby the user as chatting or writing article etc., feels that no longer language is pale and weak when needs input Chinese character, do not have new meaning by candidate word according to user's input.
Fig. 3 shows the realization flow of the related term input method of candidate word in the input method that another embodiment of the present invention provides, and details are as follows:
In step S301, receive the candidate word of user's input.Wherein candidate word is phonetic or the definite candidate word of stroke according to the Chinese character of user's input.
In step S302, receive the scene that the user selects.Wherein scene includes but not limited to spoken scene, popular word scene, academic scene, classic scene, professional scene etc.Can also be subdivided into the literature scene according to the difference of specialty in the wherein professional scene, medical scene, computing machine scene, physics scene etc.Concrete scene classification as shown in Figure 4.The user can select one or more scene simultaneously.
In step S303, according to the candidate word of user's input, the related term of this candidate word in the related term dictionary that the scene with user's selection that search is preset is mated.
In embodiments of the present invention, different scene couplings have corresponding related term dictionary.As relevant spoken lexicon being arranged for spoken scene coupling; For popular word scene coupling related streams lang lexicon is arranged; And the like.According to the candidate word that the user selects, the related term dictionary that the scene with user's selection that search is preset is mated.Wherein with the related term dictionary of scene coupling comprise with the core related term dictionary of scene coupling and with scene match user related term dictionary.Wherein the core related term dictionary with the scene coupling comprises the core related term dictionary that mates with scene, with the related term that stores in the core related term dictionary of scene coupling with the candidate word of scene coupling, the related term of this candidate word is the related term of pre-configured candidate word.Comprise the user's related term dictionary that mates with scene with user's related term dictionary of scene coupling, with the related term that stores candidate word in user's related term dictionary of scene coupling, the related term of this candidate word is user when importing candidate word, the related term of that selected and the candidate word scene coupling.The related term of candidate word can be the synonym of candidate word, the antonym of candidate word, one or more in other perhaps relevant with candidate word speech.
Step S304, step S305, step S306 and step S307 step S103, step S104, step S105 and the step S106 with shown in Figure 1 respectively are identical, do not repeat them here.
In embodiments of the present invention, can be according to the candidate word of user input, the related term of this candidate word in the related term dictionary of the scene coupling of selecting with the user that search is preset, thus can satisfy user's needs to the related term of candidate word under different scenes.As when chatting, can adopt colloquial vocabulary, and when office, can adopt academic vocabulary, when making professional document, can adopt specialized vocabulary.
The user that Fig. 5 shows the embodiment of the invention to be provided imports the realization flow of candidate word, and details are as follows:
In step S501, receive the character of user's input.Wherein the character of user's input can be a pinyin string, also can be stroke string.
In step S502, according to the character of user input, in the character database that search is preset with all candidate word of this character match.The character database that wherein presets comprises the phonetic dictionary, perhaps the stroke dictionary.
When the character of user's input is pinyin string,, before all candidate word of mating with this pinyin string in the character database that search is preset, the pinyin string of user's input is carried out syllabification by default syllabification rule in pinyin string according to user's input.Wherein Yu She syllabification rule belongs to prior art, does not repeat them here.Again according to the syllabification result, in the phonetic dictionary of the character database that search is preset, with all candidate word of this pinyin string coupling.
When the character of user's input is stroke string, in the stroke dictionary of the character database that search is preset, with all candidate word of this stroke string coupling.
In step S503, show all candidate word that search.When showing the candidate word that generates, can Pagination Display be set according to the demonstration of Chinese character, also can once show all candidate word.
In step S504, receive user's candidate word selection instruction, candidate word that will be corresponding with this instruction is as the candidate word of user's input.The user can pass through numerical key on mouse, the keyboard or directionkeys etc. and send the candidate word selection instruction, need to select the candidate word of input.In candidate word, import the related term of this candidate word according to the related term input method of Fig. 1 or candidate word shown in Figure 3 according to user input.
Fig. 6 shows the structure of the related term input system 60 of candidate word in the input method that the embodiment of the invention provides, and for the better explanation embodiment of the invention, only shows the part relevant with the embodiment of the invention.
Candidate word load module 61 receives the candidate word of user's input, and this candidate word is according to the phonetic of the Chinese character of user's input or the definite candidate word of stroke.
The candidate word that related term search module 62 receives according to candidate word load module 61, the related term of this candidate word in the related term dictionary 63 that search is preset.The related term of candidate word can be the synonym of candidate word, the antonym of candidate word, one or more in other perhaps relevant with candidate word speech.
Related term dictionary 63 stores the related term of candidate word, when related term search module 62 searches the related term of this candidate word, to the related term of related term search module 62 these candidate word of output.In embodiments of the present invention, select the related term of the candidate word exported for the ease of the user, related term dictionary 63 comprises core related term dictionary and user's related term dictionary.Wherein core related term dictionary comprises the related term dictionary, stores the related term of candidate word in the related term dictionary, and the related term of this candidate word is the related term of pre-configured candidate word.User's related term dictionary comprises the related term dictionary, stores the related term of candidate word in the related term dictionary, and the related term of this candidate word is user when importing candidate word, the related term of the candidate word of selecting.
All candidate word that related term window interactive module 64 searches related term search module 62 are shown to the user and receive user's operational order.Send the related term selection instruction of candidate word by directionkeys on mouse, the keyboard or numerical key as the user, during with the related term of the candidate word that select to show, related term window interactive module 64 is exported the related term of the candidate word chosen as the related term of the candidate word that need import with the user.
In another embodiment of the present invention, in order to make the user at the different scene inputs and the vocabulary of scene coupling, to improve user's language talent.The system that the embodiment of the invention provides also comprises scene selection module (scheming not shown).Scene selects module to receive the scene that the user selects.Wherein scene includes but not limited to spoken scene, popular word scene, academic scene, classic scene, professional scene etc.Can also be subdivided into the literature scene according to the difference of specialty, medical scene, computing machine scene, physics scene etc. in the specialty scene.Concrete scene classification as shown in Figure 4.The user can select one or more scene simultaneously.Accordingly, different scene couplings have corresponding related term dictionary.At this moment, the candidate word that related term search module 62 receives according to candidate word load module 61, the related term of this candidate word in the related term dictionary that the scene with the reception of scene selection module that search is preset is mated.
In another embodiment of the present invention, select the related term of candidate word in order to guide the user, the system that the embodiment of the invention provides also comprises related term order module (scheming not shown), its related term to the candidate word that the related term search module searches sorts.At this moment, related term search module 62 is searched for the related term of this candidate word in the core related term dictionary in the related term dictionary 63 and the candidate word in user's related term dictionary simultaneously.Wherein concrete sequencer procedure does not repeat them here as mentioned above.
In another embodiment of the present invention, select the related term of candidate word for the ease of the user, the system that the embodiment of the invention provides also comprises related term memory module (scheming not shown), and its related term with the candidate word of related term window interactive module 66 output is stored in user's related term dictionary in the related term dictionary 63.Concrete storing process does not repeat them here as mentioned above.
Fig. 7 shows the structure of the candidate word load module 61 that the embodiment of the invention provides.
Candidate word load module 61 comprises character load module 611, candidate word search module 612, character database 613 and candidate word window interactive module 614.Character load module 611 receives the character of user's input, the character that candidate word search module 612 receives according to character load module 611, in the character database 613 that presets of search with all candidate word of this character match, character database 613 is to candidate word search module 612 outputs all candidate word with this character match, and all candidate word that candidate word window interactive module 614 show candidate speech search modules 612 are submitted to also receive the operational order that the user imports.
Wherein the character of character load module 611 receptions can be a pinyin string of determining candidate word, also can be the stroke string of determining candidate word.When this character was stroke string, character database 613 comprised the unicursal dictionary.At this moment, the stroke string that candidate word search module 612 receives according to character load module 611, all candidate word of mating with this stroke string in the stroke dictionary of the character database 613 that search is preset, character database 613 is to candidate word search module 612 outputs all candidate word with this stroke string coupling.The character that receives when character load module 611 is pinyin string (this pinyin string can be the simplicity pinyin string, also can be the spelling pinyin string).The time, character database 613 comprises a phonetic dictionary, candidate word load module 61 also comprises syllabification module 615, it carries out syllabification by default syllabification principle to the pinyin string that candidate word load module 61 receives, at this moment, candidate word search module 612 is according to the syllabification result of syllabification module 615, all candidate word corresponding with the syllabification result of this pinyin string in the phonetic dictionary of searching character database 613.
For better explanation the present invention, the present invention will be described below in conjunction with a concrete example.When the related term of supposing the candidate word that the user need import was the synonym of candidate word, then this related term dictionary was the synonym dictionary, comprises core synonym dictionary and user's synonym dictionary in this synonym dictionary.Wherein include synonymicon in core synonym dictionary and the user's synonym dictionary, suppose candidate word synonymicon data structure as shown in Figure 8, and suppose that the synonymicon of this candidate word and spoken scene mate.When the user need import the related term of candidate word according to scene, then corresponding stored had the related term dictionary that mates with each scene in the related term dictionary.
When the user on keyboard during input Pinyin string " zzh ", 615 pairs of above-mentioned pinyin string of syllabification module are carried out syllabification, obtain the pinyin string " z ' zh " after the syllabification, all candidate word corresponding in the phonetic dictionary of candidate word search module 612 search storage in advance with the syllabification result of this pinyin string (as tissue, final, be employed, autonomy, respect etc.), show above-mentioned candidate word by candidate word window interactive module 613, the user selects one of them candidate word by numerical key, as respecting, as the candidate word of user's input.
When the user selects module to select current scene to be spoken scene by scene, related term search module 62 is according to the candidate word " respect " of user's input, the synonym of " respect " in the synonymicon as shown in Figure 8 of search and spoken scene coupling, the synonym of " respect " that then searches comprises " respect ", " honorable ", " respect ", " admiring ", " loving and respecting " etc.
The related term order module adopts " non-nearest memory " and " non-high word frequency " ranking method that the synonym of " respect " that search is sorted.Suppose that default Chinese character is shown as Pagination Display, and four vocabulary of every page of demonstration, and in the synonym of " respect " that search, be " respect ", " honorable ", " respect ", " loving and respecting ", " admiring " by word frequency order just; Wherein " admire ", " respect " be the user once in input when " respect ", the related term of selecting, and it is " admiring ", " respect " by word frequency order from low to high; " respect " is the related term of the last memory of user.After then adopting " non-nearest memory " and " non-high word frequency " ranking method that the synonym of " respect " that search is sorted, its put in order for, " honorable ", " respect ", " loving and respecting ", " respect ", " admiring ".Related term window interactive module 64 shows according to said sequence when the synonym of Pagination Display " respect ".When the user by keyboard on numerical key send the related term selection instruction of candidate word, when the related term of the candidate word of selection " is admired ", 64 outputs " admiring " of related term window interactive module.Simultaneously the related term memory module " is admired the related term of " respect " of this output " in the user's related term dictionary that is added into the related term dictionary, as the synonym of the nearest memory of " respect ".
In embodiments of the present invention, candidate word according to user's input, all related terms of this candidate word in the search related term dictionary, and according to the related term selection instruction of user's candidate word, export the related term of the candidate word corresponding, thereby expanded user's vocabulary, improved user's voice talent and ability of language expression with the related term selection instruction of this candidate word, make user's language abundanter, individual character is more arranged.By the scene of selecting according to the user, the related term of the candidate word of output and this scene coupling, thus satisfy the demand of user to specialized vocabulary.Before showing the related term of the candidate word search, adopt certain sortord that the related term of the candidate word that searches is sorted, thereby improved user's text input speed, efficient and accuracy greatly to the user.And the related term of the candidate word that the storage user selected through long-term Chinese character input, can form the related term dictionary of the nearest memory that belongs to user oneself, is convenient to the user selects satisfactory candidate word in the related term of numerous candidate word related term.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.