Background technology
The computer user will be input to computer with literal, except that English-speaking country directly uses Qwerty keyboard can import, non-English speaking country generally all needs to use input method software, with the input in Chinese is example, at present, Chinese character coding input method software has tens kinds, all is basically to adopt the sound of Chinese character, shape, justice and specific key are interrelated, and makes up the input of finishing Chinese character according to different Chinese character again.General input method software all can add functions such as frequency adjustment, association, self-defined dictionary, the interpolation of individual character phrase, to improve the input speed of character/word/sentence.The frequency adjustment technology is meant that input method software dynamically adjusts character/word/sentence according to the frequency of utilization of character/word/sentence and select priority position in the window in input, and the character/word that frequency is high more/sentence row's is forward more, selects to import to make things convenient for the user.Association function is meant, after the part of the part of the part of user's input word, speech or sentence, input method software can demonstrate possible complete word, speech or sentence automatically in the input choice box, association function is the basis that word frequency is adjusted, promptly meeting on the basis of matching condition, the position that the word that frequency of utilization is high more, speech or sentence are arranged is forward more.Self-defined dictionary technology is meant, input method software allows user oneself to specify employed dictionary file, and described dictionary literature kit contains the setting of user individual, comprises that the phrase of using always that meets user's use habit and word frequency are provided with etc.The individual character phrase adds function and is meant that permission user oneself adds function personalized, that give tacit consent to the character/word/sentence that does not have in the dictionary, and individual character phrase adding technique is the basis of self-defined dictionary technology.
Though existing input method software has certain intelligent characteristic, but have adjustment or replacing dictionary that input method software can only be manual now, can't change dictionary dynamically according to input method place application scenarios, and adjust characteristics such as word frequency dynamically according to the characteristics of application scenarios, therefore can't satisfy the demand of user's displaying fully.
Summary of the invention
In view of this, fundamental purpose of the present invention is to provide a kind of method that realizes the input of displaying literal, can solve the technological deficiency that input method software can not dynamically be adjusted characteristics such as dictionary, word frequency according to application scenarios by the present invention.For achieving the above object, technical scheme of the present invention is achieved in that
A kind of method that realizes the input of displaying literal comprises the steps:
A, obtain the scene key word of current application;
B, retrieval scene mapping table obtain the scene setting sign; Wherein, described scene setting is designated the word frequency adjustment configuration file of dictionary;
C, execution displaying setting are carried out corresponding word frequency and are adjusted configuration file.
Further, in the steps A, obtain described scene key word as follows:
A1, obtain scene properties by operating system;
A2, the scene key word that comprises in the scene mapping table and described scene properties are mated the scene key word that current application is determined in the back.
Further, among the step B, obtain described scene setting sign thereby in described scene mapping table, retrieve by the scene key word that uses described current application.
Further, described scene properties is meant the window title or the application name of current application.
Further, among the step C, described displaying setting comprises:
C11, the employed word frequency of the current dictionary of unloading are adjusted configuration file;
The word frequency of C12, loading current application correspondence is adjusted configuration file.
Further, if can't determine the scene key word of current application, then use the scene key word of acquiescence or direct end scene that flow process is set.
The present invention obtains the scene type of current application program by distributing operation system interface function, coupling by the scene mapping table dynamically disposes input characteristics such as dictionary, adjustment word frequency, with demand, raising input efficiency, the enhancing user experience that satisfies user individual.
Embodiment
Core concept of the present invention is, the current affiliated scene type of application software of using input method of input method software real-time judge, inquire about characteristic settings such as the dictionary of described scene type correspondence or word frequency according to the scene mapping table, carry out corresponding scene setting, as: change corresponding scene lexicon, adjust word frequency etc., adjust input method automatically to strengthen the purpose of user experience, raising input efficiency to reach according to application scenarios.
Fig. 1 example the present invention carry out the processing flow chart that the input method displaying is provided with according to application scenarios, below each step is elaborated:
Step 1, obtain the scene properties of current application;
In the present invention's one specific embodiment, obtain the scene properties of current application by the call operation system function.The application program that runs on the operating system is general all with the interface of window as man-machine interaction, in operating system, each window all is an example of window class, window class includes various attributes, wherein relevant with application scenarios type attribute comprises window class title, window title etc., also can obtain information such as application file name by system function.For example, when using the newly-built document of Microsoft's Word document process software, can demonstrate window title " document 1-Microsoft Word " in forms title bar topmost, application name is called " WINWORD.EXE ".
Step 2, mate and retrieve the scene mapping table;
According to the scene properties that obtains in the step 1,, obtain the scene setting sign thereby mate back retrieval scene mapping table as window title, application name etc.Described scene mapping table has been preserved the corresponding relation between scene properties and the scene setting sign, and example is as follows:
Chat |
Talk? |
Word? |
Document? |
Mail |
Mail? |
Outlook |
Mail? |
As above shown in the table, the window key word comprises that the equivalent library name of " chat " key word is called " Talk ", and the equivalent library name was called " Document " when the window key word comprised " Word " key word." document 1-Microsoft Word " is example with the aforementioned window title, use the scene key word in the scene mapping table to carry out fuzzy matching with this window title one by one, owing to comprise " Word " this scene key word in this window title, therefore, input method software can be thought the correlativity maximum of this key word and this window title, so use " Word " to retrieve, thereby obtain corresponding scene identity as the scene key word.
Why the present invention will distinguish different application scenarioss, be because the frequency of occurrences of character/word/sentence is different under different scenes, and at some special occasions, for example in some instant chat softwares, can often use a lot of unconventional character/word/sentence, and these unconventional character/word/sentences can not find in traditional dictionary or seldom use, the user imports the non-english languages literal under different scenes for convenience, custom-made of the present invention the character library of suitable different scenes, and provide interface to allow the user to add neologisms, and set up the scene mapping table according to the hobby of oneself.
Step 3, mapping relations have been judged whether, if then execution in step 4 of corresponding relation is arranged, if then do not finish this scene setting flow process;
The Rule of judgment of this step represents then that corresponding mapping relations are arranged for whether obtaining the scene key word and whether get access to the title of displaying dictionary according to the scene key word if obtain the title of displaying dictionary; Do not represent also there are not corresponding mapping relations if obtain the title of displaying dictionary, then the input method software systems can be used the acquiescence dictionary or not do any operation according to setting.
Step 4, execution displaying setting.
Input method software at first unloads the displaying dictionary of original use, and then dynamically loads the displaying dictionary of going up current application correspondence.
Below be example with the chat software, the concrete effect of present embodiment is described, comprise two dictionaries in the following example, one is " Document " dictionary, be used for using under conventional document input or the system default situation, another is " Talk " dictionary, is used for using in chat software.Suppose the current document Input Software that using of user, as WORD or WPS, write paper or Press release, when if input method software does not carry out displaying and is provided with, when the user when document Input Software window switches to the chat software window, input method software still uses " Document " dictionary, and when supposing that then the user uses spelling input method input " niyouba ", the candidate word that shows in input method selection window is as follows:
1. you have 2. your 3. your 4. Buddhist nuns again
Because in traditional dictionary, there is not " you have " this speech, therefore select not show in the window in input.After if the method according to this invention has been carried out being provided with of displaying, after the user switches to the chat software window from the document Input Software, input method software loads " Talk " dictionary automatically, the dictionary of promptly chatting, when the user used spelling input method input " niyouba ", the candidate word that shows in input method selection window was as follows:
You have 2. you have 3. you again 4. you
As can be seen, " you have " do not exist in " Document " dictionary, and comprises at " Talk " dictionary, and the order of its speech commonly used in chat scenario is adjusted to the front demonstration, helps the user so more and imports fast.
In another specific embodiment of the present invention, the following setting of scene mapping table:
The scene key word |
Scene setting sign (displaying dictionary title) |
The scene key word |
Scene setting sign (word frequency adjustment configuration file) |
Chat |
The chat configuration file |
Word,WPS? |
The document configuration file |
Mail |
The mail configuration file |
Outlook |
The mail configuration file |
Different with last specific embodiment is, what preserve in the scene mapping table is that scene key word and word frequency are adjusted the mapping relations between the configuration file, when reality execution displaying is provided with, be different from last specific embodiment, present embodiment is not the dictionary that more renews, but under the constant situation of dictionary, the word frequency that dynamic load is different is adjusted configuration file, to be fit to the application of different scenes.
Below be example with the chat software, the concrete effect of present embodiment is described, when the user when document input forms switch to the chat software window, if do not load the chat configuration file, when the user uses spelling input method input " shiya ", the phrase that obtains ordering is:
1. 2. yes refined 5. pressure testings of 3. stone precipices, 4. poems of exerting pressure
If load the chat configuration file, then the order of Xian Shiing is:
1. yes 2. refined 5. pressure testings of 3. stone precipices, 4. poems of exerting pressure
As can be seen, in chat scenario, loaded the chat configuration file after, will in chat, use always " yes " word frequency of this speech heightened, and makes it be arranged in the front, made things convenient for user's input.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.