A quick disambiguation reconstruction correction method for pinyin input method
By using syllable sequence processing and a local window mechanism, the interruption problem of Pinyin input method when inputting low-frequency words and unconventional combination words is solved, realizing efficient input stream processing without cursor operation and improving input efficiency.
Patent Information
- Application Number
- CN202610556451.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-24
- Publication Date
- 2026-07-28
AI Technical Summary
Existing Pinyin input methods are prone to interruption when inputting low-frequency words, technical terms, or unconventional word combinations, resulting in a significant reduction in input efficiency and a lack of local structured reconstruction processing mechanisms.
By parsing the pinyin string into an ordered sequence of syllables, setting the current processing start pointer, generating a local syllable window using a trigger key, calling the candidate generation module to regenerate candidate words, and performing local replacement based on the mapping relationship, sequential processing of the input stream without cursor operation is achieved.
This reduces the search range for candidate words, avoids traversing and filtering the original candidate list, reduces input stream rollback operations, and improves input processing efficiency.
Smart Images

Figure CN122470059A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of input method technology, and in particular to a fast disambiguation reconstruction correction method for Pinyin input method. Background Technology
[0002] Existing Pinyin input methods typically parse the Pinyin string input by the user in real time and generate candidate words through dictionary matching and language models.
[0003] When candidate words do not meet the user's expectations, the user typically needs to flip through pages to find candidate words, delete the entered content and re-enter it, or move the cursor to enter edit mode to make modifications. Current technology relies on language models to guess the user's intent (implicitly). If the guess is wrong (such as ambiguity), the user needs to go back and delete (interrupting the flow).
[0004] According to Zipf's law, low-frequency words appear infrequently but in large numbers. Therefore, during input, one frequently encounters various low-frequency words and characters, such as low-frequency terms, abbreviations, names, and transliterated foreign words. The dynamic word frequency technology of input methods often misjudges and substitutes these for high-frequency words in the user's dictionary. Although such interference is rare, a single misselection can disrupt the momentum of continuous sentence input. This forces the user to switch from "focusing on brainstorming" to considering the potential misjudgments of the input method, thus forcing them to shorten input length or even input single characters, significantly weakening the smoothness of continuous input. This is analogous to obstacles scattered on a highway; even a small number can cause a driver to drastically reduce speed across the entire route and significantly increase their psychological burden.
[0005] The above operations will interrupt the input process, especially when inputting low-frequency words, technical terms, or unconventional word combinations, which will significantly reduce efficiency.
[0006] Furthermore, existing technologies mostly perform candidate optimization based on the entire string or sentence range, lacking a processing mechanism for local structured reconstruction of the input stream. Summary of the Invention
[0007] To address the aforementioned problems, the present invention aims to provide a fast disambiguation reconstruction correction method for Pinyin input methods, thereby resolving the issue in the prior art where the input process is easily interrupted, especially when inputting low-frequency words, technical terms, or unconventional word combinations, resulting in a significant reduction in efficiency.
[0008] A fast disambiguation reconstruction correction method for Pinyin input methods includes: (1) Parse the continuously input pinyin string of the user into an ordered syllable sequence according to the preset pinyin segmentation rules and / or the pinyin type in the legal pinyin table, and obtain the corresponding number of syllables. Then, filter the candidate words based on the number of syllables of the target word, exclude candidate words that do not match the number of characters in the target word group, and initially form candidate word groups corresponding to the characters. (2) Set the current processing start point pointer, initially pointing to the beginning position of the syllable sequence; (3) If it is the target text, select the text by pressing the OK button; If the text is not the target text, it will be triggered by the set trigger key and a trigger command will be issued. There are several trigger keys, and the trigger command sent by each trigger key is parameter N, which includes 1, 2, and 3. Upon receiving a trigger instruction, the window length parameter N is determined according to the trigger instruction, and N consecutive syllables are extracted from the syllable sequence to form a syllable prefix window, with the current processing starting point as the starting position. (4) Based on the syllable prefix window, the candidate generation module is called to regenerate the candidate word set, wherein the candidate generation module matches the syllable prefix window based on the mapping structure from pinyin to word and sorts the candidate words; (5) After receiving the user's selection instruction for candidate words, determine the output text interval corresponding to the syllable prefix window according to the mapping relationship, and replace the interval with the selected candidate word; (6) After the replacement is completed, update the mapping relationship and move the current processing start point pointer to the position corresponding to the end of the syllable prefix window; (7) Repeat steps (3) to (6) to process the remaining unprocessed syllable sequence continuously; The processing is completed without moving the input cursor or entering text editing mode.
[0009] Preferably, the pinyin segmentation rule uses 23 initials and 16 whole-syllable recognition as the segmentation basis. Each initial followed by a letter character is identified for secondary recognition. If it belongs to one of the 24 finals, it is paired with the initial to form a word syllable. If it is identified as a whole-syllable recognition, it is classified as a word syllable separately. During segmentation, finals that are not followed by initials are classified as word syllables separately.
[0010] Preferably, the mapping relationship is the correspondence between the syllable sequence index range and the output text character range, that is, a single syllable sequence corresponds to a single output syllable, which is used to directly locate the text segment to be replaced during the replacement operation.
[0011] Preferably, the current processing start point pointer is dynamically moved forward according to the length of the syllable prefix window after each replacement, so as to point to the starting position of the unprocessed syllable sequence.
[0012] Preferably, the candidate generation module includes a pinyin matching unit based on a prefix tree structure, used to retrieve the corresponding word set according to the syllable prefix window, and to sort the candidate words based on word frequency statistics or a language model.
[0013] Preferably, the triggering command is a key on a keyboard that the user has customized. The user triggers the command using the key and the window length parameter N is a discrete value of 1, 2 or 3. After receiving the parameter N, the syllable sequence is truncated according to the discrete value, and N syllables constitute a syllable prefix window.
[0014] Preferably, the triggering instruction is used to control the switching of candidate generation modes, enabling the system to switch between different syllable window lengths.
[0015] Preferably, the method performs multiple rounds of local replacement for the syllable sequence formed by the same input, according to different syllable segments, with each replacement based on the updated mapping relationship and the current processing starting point pointer.
[0016] Preferably, the candidate generation module also adjusts the probability of candidate words by combining the context information of the confirmed output text when generating candidate words.
[0017] Compared with the prior art, the present invention has the following beneficial effects: 1. By using syllable sequence caching and local window processing mechanisms, the search range for candidate words is reduced; 2. By using a candidate word reconstruction mechanism, the original candidate list can be traversed and filtered. 3. Local replacement is achieved through mapping relationships, reducing input stream rollback operations; 4. Sequential processing of the input stream is achieved through a dynamic pointer advance mechanism; 5. Complete input corrections without moving the cursor, improving input processing efficiency. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating the operation of the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention.
[0020] A classical homophonous text created by Zhao Yuanren, the "Father of Modern Linguistics", originally titled "Shi Shi Shi Shi Shi Shi Shi", is a dialectical presentation of extreme cases of pinyin homophones and phrases. The following uses a less common but not extreme case to illustrate the challenges of homophone combinations for current pinyin input methods. When continuously inputting a text "Li da mahao lao hao chi", in the most unfavorable situation, 7 disambiguation word segmentation selections need to be made.
[0021] 1 time: Li Dama's oyster omelette is delicious (common word combination, can be basically continuously input and continuously completed word selection determination) 3 times: Li Dama / oyster / very delicious 4 times: Li (Li, Li) / Dama / oyster omelette / delicious 5 times: Li / big / hemp / oyster omelette / delicious (The oyster omelette in the store of Li DamaZi is delicious) 5 times: Li / big / horse / Hao / very delicious (The food in the store of Hao Ma in the Polytechnic University is very delicious)
[0021] 1 time: Li Dama's oyster omelette is delicious (common word combination, can be basically continuously input and continuously completed word selection determination) 3 times: Li Dama / oyster / very delicious 4 times: Li (Li, Li) / Dama / oyster omelette / delicious 5 times: Li / big / hemp / oyster omelette / delicious (The oyster omelette in the store of Li DamaZi is delicious) 5 times: Li / big / horse / Hao / very delicious (The food in the store of Hao Ma in the Polytechnic University is very delicious) 6 times: Li / big / horse / Hao / laborious / delicious (Hao Maolao from the Polytechnic University is famous for being delicious) 7 times: Li / big / horse / Hao / laborious / good / fin (Hao Maolao from the Polytechnic University likes shark fin) If the instruction option of "specified number of syllables for word combination" is provided, the user can ignore the specific word situation, perform continuous input, and then use hotkeys to quickly and continuously complete disambiguation input. Otherwise, for low-frequency word combination sentences such as "Li Da Ma Hao Lao Chi", the optimal input strategy is to perform 7 independent single-character inputs This embodiment takes the input of "lidamahaolaohaochi" as an example. In the selection of N in this embodiment, the window length parameter Nd is selected through a preset key. In this embodiment, F1\F2\F3 are used as hotkeys for selection, that is, F1: N = 1, indicating to provide candidates by single character; F2: N = 2, indicating to provide candidate phrases by 2 syllables; F3: N = 3, indicating to provide candidates by 3 syllables; I. Syllable sequence parsing and caching This embodiment intends to input "Li Da Ma oyster omelette is delicious". After the user completes the input of "lidamahaolaohaochia", the system performs pinyin segmentation processing. Among them, l, d, m, h belong to initials and are segmented, chi belongs to a whole syllable and is segmented, i, a, ao respectively belong to single vowels and compound vowels in the finals. For i, a, ao that are vowels after initials, they respectively form the pinyin of li / da / ma / hao / lao / hao with the initials and are segmented here. There are no separate vowels without initials, so no further segmentation is performed After pinyin input, perform pinyin segmentation on the input string. After parsing based on the maximum matching rule of the combination of initials and finals, obtain the syllable sequence: li / da / ma / hao / lao / hao / chi At the same time, the system caches the above syllable sequence and initializes the syllable index: [0]=li, [1]=da, [2]=ma, [3]=hao, [4]=lao, [5]=hao, [6]=chi, II. Initialize the mapping relationship The system establishes an initial mapping relationship between the syllable sequence and the output text.
[0022] In the initial state, the output text can be the system's default candidate result. For example: 力大妈好唠好吃 Establish the mapping table M as follows: M: [0] li → 力 [1] da → 大 [2] ma → 妈 [3] hao → 好 [4] lao → 唠 [5] hao → 好 [6] chi → 吃 III. Initialize the current processing starting point Set the current processing starting point pointer P: P =[0], pointing to the syllable li, The initial prefix window is:
lidamahaolaohaochi①李大妈好捞好吃②李大妈③力大④丽达......
lidamahaolaohaochi①力②李③里④例⑤理......”
Li damahaolaohaochi ① Big mom is very old and delicious ② Big mom ③ Scold loudly ④ Marijuana......
Li damahaolaohaochi ① Big ② Hit...
Li da mahaolaohaochi "① Haohao is very old and delicious ② Code number ③ Haohao ④ Mhao ⑤......
Li da mahaolaohaochi ① Mom ② Marijuana ③ Horse ④ Code...
PolyU Malaysia haolaohaochi "① Good catch and delicious ② Good catch ③ Good old ④ Good啦 ⑤ Good spicy......
Li da ma haolaohaochi ① Good catch ② Good old ③ Good啦 ④ Good spicy ⑤ Oyster omelette…
[0023] It is worth noting that this invention processes syllable sequences rather than strings, and candidate words are regenerated by window triggers rather than the original candidate selection. Replacement is located through mapping relationships rather than cursor operations, and the input stream is processed sequentially by pointer advancement. No deletion or interruption of input is required throughout the process.
[0024] When the system selects candidate words for a target syllable, if it detects that there is no target word in the candidate word set corresponding to the target syllable that satisfies the user's input intention, it will respond to the trigger command and enter the extended word grouping mode. In the extended word grouping mode, a temporary semantic extension window is constructed based on the current target syllable, and auxiliary word items are received by the user; Based on the target syllable and the auxiliary word, a joint semantic constraint condition is constructed, and the word library is jointly matched according to the joint semantic constraint condition to generate a candidate word group set; After the user selects a candidate word group, only the word corresponding to the target syllable is written into the output result, and the output result of the auxiliary word is discarded, so that the auxiliary word only participates in the calculation process as a candidate generation constraint condition.
[0025] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A fast disambiguation reconstruction correction method for a pinyin input method, characterized in that, include: (1) Parse the continuously input pinyin string of the user into an ordered syllable sequence according to the preset pinyin segmentation rules and / or the pinyin type in the legal pinyin table, and obtain the corresponding number of syllables. Then, filter the candidate words based on the number of syllables of the target word, exclude candidate words that do not match the number of characters in the target word group, and initially form candidate word groups corresponding to the characters. (2) Set the current processing start point pointer, initially pointing to the beginning position of the syllable sequence; (3) If it is the target text, select the text by pressing the OK button; If the text is not the target text, it will be triggered by the set trigger key and a trigger command will be issued. There are several trigger keys, and the trigger command sent by each trigger key is parameter N, which includes 1, 2, and 3. Upon receiving a trigger instruction, the window length parameter N is determined according to the trigger instruction, and N consecutive syllables are extracted from the syllable sequence to form a syllable prefix window, with the current processing starting point as the starting position. (4) Based on the syllable prefix window, the candidate generation module is called to regenerate the candidate word set, wherein the candidate generation module matches the syllable prefix window based on the mapping structure from pinyin to word and sorts the candidate words; (5) After receiving the user's selection instruction for candidate words, determine the output text interval corresponding to the syllable prefix window according to the mapping relationship, and replace the interval with the selected candidate word; (6) After the replacement is completed, update the mapping relationship and move the current processing start point pointer to the position corresponding to the end of the syllable prefix window; (7) Repeat steps (3) to (6) to process the remaining unprocessed syllable sequence continuously; The processing is completed without moving the input cursor or entering text editing mode.
2. The fast disambiguation reconstruction and correction method for a Pinyin input method according to claim 1, characterized in that: The pinyin segmentation rule uses 23 initials and 16 whole-syllable recognition as the segmentation basis. Each initial followed by a letter character is identified twice. If it belongs to one of the 24 finals, it is paired with the initial to form a word syllable. If it is identified as a whole-syllable recognition, it is classified as a word syllable separately. During segmentation, finals that are not followed by initials are classified as word syllables separately.
3. The fast disambiguation reconstruction and correction method for a Pinyin input method according to claim 2, characterized in that: The mapping relationship is the correspondence between the syllable sequence index range and the output text character range, that is, a single syllable sequence corresponds to a single output syllable, which is used to directly locate the text segment to be replaced during the replacement operation.
4. The fast disambiguation reconstruction and correction method for a Pinyin input method according to claim 1, characterized in that: The current processing start pointer moves forward dynamically according to the length of the syllable prefix window after each replacement, so as to point to the starting position of the unprocessed syllable sequence.
5. The fast disambiguation reconstruction and correction method for a Pinyin input method according to claim 1, characterized in that: The candidate generation module includes a pinyin matching unit based on a prefix tree structure, which is used to retrieve the corresponding word set according to the syllable prefix window and sort the candidate words based on word frequency statistics or a language model.
6. The fast disambiguation reconstruction and correction method for a Pinyin input method according to claim 1, characterized in that: The trigger command is initiated by the user through a key on a custom keyboard. The user triggers the command window length parameter N through this key. The window length parameter N is a discrete value of 1, 2 or 3. After receiving the parameter N, the syllable sequence is truncated according to the discrete value, and N syllables constitute a syllable prefix window.
7. The fast disambiguation reconstruction and correction method for a Pinyin input method according to claim 5, characterized in that: The trigger command is used to control the switching of candidate generation modes, enabling the system to switch between different syllable window lengths.
8. The fast disambiguation reconstruction and correction method for a Pinyin input method according to claim 7, characterized in that: The method performs multiple rounds of local replacement on the same input sequence of syllables, according to different syllable segments. Each replacement is based on the updated mapping relationship and the current processing starting point pointer.
9. The fast disambiguation reconstruction correction method for a Pinyin input method according to claim 1, characterized in that: The candidate generation module also adjusts the probability of candidate words by combining the context information of the confirmed output text when generating candidate words.