Input method principle decryption

  
Input method is a must-have tool for every worm online. Major IT companies, regardless of international IT giants Microsoft, Google, or domestic IT giants Baidu, Tencent, Sohu, have launched their own input method software to seize this market. So how does the input method achieve efficient input of text? As our ordinary users, can we write input methods ourselves? The most common one is the Pinyin input method. Let's take this input method as an example to find out. Text input To understand the code table file, let's first understand the text input process. For example, use the Sogou input method to enter the “computer” in Baidu search. First switch to "Sogou input method", and then type “diannao” on the keyboard. At this time, there will be multiple Chinese characters or phrases that match the "diannao" code in the input status bar. We select “computer&rdquo After that, the character input can be realized (Fig. 1). Figure 1 Selecting the character-input Chinese characters that match the encoding can be seen. The text input process is mainly the process of inputting the code and then selecting the desired character according to the code. Therefore, the Chinese character input method under Windows system is actually: convert the input standard ASCII string (English characters) into Chinese characters or phrases according to certain encoding rules. In the process of converting English characters into Chinese characters, the code table file (character library) plays a key role. The code table file is somewhat similar to the English-Chinese dictionary, and the English characters of a specific combination are in one-to-one correspondence with Chinese words. For example, if you open the Sogou font file, you can see that the <quo;dian’nao” input above corresponds to the Chinese "computer" (Fig. 2). Figure 2 Viewing how the input method font encoding is efficient Input method efficient input exploration An excellent input method must allow users to achieve efficient input, which requires each input method to have its own features. Fully accurate in daily use We need to input some uncommon words, network buzzwords, if the input method font is not comprehensive enough, you can not enter. On the one hand, the input method uses local fonts on the one hand, and on the other hand, it fully exploits the advantages of “cloud fonts”, which can completely smash uncommon words and online buzzwords. For example, the Bing input method uses the innovative research results of Microsoft Research Asia to optimize the core engine, plus the unlimited storage and computing power of the cloud server, even if we input a string similar to "weiruankinecttaicoolle" in Chinese Pinyin and English. It can also be intelligently identified (Figure 3). Figure 3 Bing input method powerful font and recognition ability input method "Guess what you like" good vocabulary also needs to be combined with intelligent algorithms, only rely on intelligent algorithms to fully play the function of the font. Most input methods now automatically analyze the user's input, select and adjust the priority of the next text display, which can greatly reduce the possibility of misspelling, and facilitate the user to select the input efficiently. The input method is implemented by a powerful algorithm in the background. For example, Sogou input method, after you first enter "ldahz" and select "computer enthusiasts", it will "memorize" your choice, and then enter "ldahz", it will judge intelligently. You may want to enter “computer enthusiasts", and then adjust the phrase to the preferred location. If you enter “dnahz” multiple times, but choose a different phrase, then the input algorithm will give you the most likely result you want based on the frequency you choose (the most selected). (Figure 4). Figure 4 Input method intelligent algorithm statistics is the core of the intelligent algorithm based on word frequency adjustment, has a preliminary learning function, and excellent input method can also intelligent association, intelligent error correction, intelligent group sentence. Sometimes we will find that just typing one or two letters, the input method has given us the long phrase we want, very intelligent. These seem a bit mysterious, but the core of their algorithm is actually very simple, that is, statistics. Chat, write, report, how many words you type every day, maybe you are not clear, but the input method you use is silently recorded. Every time you enter every choice, it will be included in its statistics. In the data, it is based on these data analysis to get the words you use, as well as your special preferences and choices. So, it's not the input method "smart”, but our own "selling" Figure 5: The smart phrase function provided by Google Pinyin input method can understand your intentions wisely. Even if you input long sentences that are not common content, it can intelligently group sentences for you to choose input method. "Part-time" In addition to identifying the input of the code, the extension function of the input method is now more and more. On the one hand, it is an extension character input method. For example, in order to facilitate the user to input Chinese characters that can not be read but written, the Sogou input method provides a handwriting component. After starting the component, the mouse can be used to write the word, and we can perform the identification in the identification box. Select the input (Figure 6). Figure 6: Handwriting input of Sogou Pinyin On the other hand, the input method is associated with other related functions. For example, Google Input method integrates its powerful search function. After inputting the keyword to be searched, just click the Google icon in the status bar. This will automatically open the Google search page for searching (Figure 7). Figure 7 Google input method with integrated search function You can also create your own input method. From the above, we know that the core of the input method is actually the code table file, so as long as we make the code table file ourselves, then use some input method generator. You can generate your own input method. If you feel that you are having trouble making it, you can also directly extract the font of the current input method, such as Sogou input method, open the setting properties window and switch to “ Thesaurus”, then select “ in the <; Thesaurus selection& drop; The text lexicon & rdquo;, this will get the code table source file (Figure 8). Figure 8 After extracting the current input method lexicon to obtain the source file of the code table, we can either use the “Input Method Generator” provided by Microsoft for free, or use the third-party “Multiple Input Method Generator” to generate itself. Input method! This article comes from [System Home] www.xp85.com
Copyright © Windows knowledge All Rights Reserved