CN101286097A - A Chinese character input method - Google Patents
A Chinese character input method Download PDFInfo
- Publication number
- CN101286097A CN101286097A CNA2008100584799A CN200810058479A CN101286097A CN 101286097 A CN101286097 A CN 101286097A CN A2008100584799 A CNA2008100584799 A CN A2008100584799A CN 200810058479 A CN200810058479 A CN 200810058479A CN 101286097 A CN101286097 A CN 101286097A
- Authority
- CN
- China
- Prior art keywords
- chinese character
- candidate
- stroke
- piece
- input
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Document Processing Apparatus (AREA)
Abstract
本发明是一种汉字输入方法。包括使用横、竖、撇、捺(点)、折五种基本笔画,按照汉字笔画书写顺序来输入汉字,根据输入的基本笔画序列,查找汉字字符的笔画书写顺序字典,找到对应的候选汉字,在候选汉字上进行点击或画线操作来输入汉字,其特征在于:通过包括基本笔画区、辅助符号区和汉字候选区在内的操作提示区进行操作提示,使用定位输入设备在操作提示区进行操作,输入基本笔画或辅助符号序列,在汉字候选区选择被输入汉字。方法尤其适合在掌上电脑、手机等小屏幕计算机上使用触笔输入汉字,具有使用简单,无需书写整个汉字的优点。The invention is a Chinese character input method. Including the use of five basic strokes: horizontal, vertical, left, right (dot), and folding, to input Chinese characters according to the writing order of Chinese characters, and according to the input basic stroke sequence, look up the stroke writing order dictionary of Chinese characters to find the corresponding candidate Chinese characters, Click or draw a line on the candidate Chinese character to input the Chinese character, which is characterized in that: the operation prompt area is provided through the operation prompt area including the basic stroke area, the auxiliary symbol area and the Chinese character candidate area, and the positioning input device is used in the operation prompt area. To operate, input basic strokes or auxiliary symbol sequences, and select the input Chinese character in the Chinese character candidate area. The method is especially suitable for using a stylus to input Chinese characters on computers with small screens such as handheld computers and mobile phones, and has the advantages of being simple to use and not needing to write entire Chinese characters.
Description
技术领域technical field
本发明涉及中文信息处理技术领域,具体地说是一种计算机的汉字输入方法。The invention relates to the technical field of Chinese information processing, in particular to a computer Chinese character input method.
背景技术Background technique
如何把汉字输入计算机一直是一个重要的问题。目前汉字输入的方法有很多,大致可以分为两类:一类是对汉字进行编码,然后通过计算机输入设备(如:键盘、鼠标等)将汉字对应的编码输入计算机,以达到输入汉字的目的;另一类是使用模式识别的方法对手写汉字、印刷汉字或汉字发音进行识别,从而把汉字输入计算机。尽管很多汉字模式识别方法有很高的识别率,但是使用模式识别的方法输入汉字总会存在识别不准确的问题。使用编码方式输入汉字,编码方式不同会导致汉字输入方法在输入效率、方法易用性等方面产生极大差别。有的编码方法输入效率高,但不易使用,有的正好相反。在具有标准键盘的计算机上,汉语拼音编码输入方法是使用最广泛的方法,其主要原因就是汉语拼音编码方法简单易用。但是,由于受显示和输入设备尺寸的限制,在掌上电脑和手机等移动计算机设备上,汉语拼音编码输入方法变得难于使用。在此类设备上使用最方便的汉字输入方法是联机手写汉字模式识别方法,但模式识别方法总会存在识别不准确的问题,而且完整地书写整个汉字本身就不是一种快捷的输入方法。How to input Chinese characters into computers has always been an important problem. There are many ways to input Chinese characters at present, which can be roughly divided into two categories: one is to encode Chinese characters, and then input the corresponding codes of Chinese characters into the computer through computer input devices (such as keyboards, mice, etc.) to achieve the purpose of inputting Chinese characters The other is to use the method of pattern recognition to recognize handwritten Chinese characters, printed Chinese characters or Chinese character pronunciation, so as to input Chinese characters into the computer. Although many Chinese character pattern recognition methods have a high recognition rate, there is always the problem of inaccurate recognition when using pattern recognition methods to input Chinese characters. Use the encoding method to input Chinese characters, and the different encoding methods will cause great differences in the input efficiency, ease of use, etc. of the Chinese character input methods. Some encoding methods have high input efficiency, but are not easy to use, and some are just the opposite. On a computer with a standard keyboard, the Chinese phonetic alphabet coding input method is the most widely used method, and its main reason is that the Chinese phonetic alphabet coding method is simple and easy to use. But, owing to being subjected to the limitation of display and input equipment size, on mobile computer equipments such as palmtop computer and mobile phone, Chinese phonetic alphabet coding input method becomes difficult to use. The most convenient Chinese character input method used on such devices is the online handwritten Chinese character pattern recognition method, but the pattern recognition method always has the problem of inaccurate recognition, and completely writing the entire Chinese character itself is not a fast input method.
发明内容Contents of the invention
本发明的目的是提供一种非常适合于在掌上电脑和手机等移动计算机设备上输入汉字的汉字输入方法,该输入方法简单快捷。The purpose of the present invention is to provide a Chinese character input method which is very suitable for inputting Chinese characters on mobile computer devices such as handheld computers and mobile phones, and the input method is simple and fast.
本发明的汉字输入方法是:将汉字编码为由横、竖、撇、捺(点)、折五种基本笔画按照汉字笔画书写顺序构成的序列,通过将此汉字编码输入计算机以达到将汉字输入计算机的目的。方法包括:通过操作提示区(如附图4所示)进行操作提示的方法和使用定位输入设备进行笔画输入的操作方法;操作提示通过笔画区(如附图5所示)和汉字候选区(如附图3所示)来完成,根据操作提示,使用定位输入设备操纵光标在操作提示区域内进行点击或画线操作,以完成基本笔画、辅助符号序列的输入;根据输入的序列,使用公知的方法查找汉字字符的笔画书写顺序字典,找到对应的候选汉字,并按照汉字候选区(如附图3所示)的位置和排列方式将候选汉字按使用频率从高到低的顺序排列在汉字候选区域的对应位置,同时使用不同的颜色标识出在候选区域内的汉字字形中当前已经输入的笔画、正在输入的笔画、跳过的笔画和尚未输入的笔画;在候选汉字上进行点击或画线操作,操作的结果为输入被操作的汉字。The Chinese character input method of the present invention is: the Chinese character coding is by the sequence that five kinds of basic strokes of horizontal, vertical, left, right (dot), folding are formed according to Chinese character stroke writing order, by this Chinese character coding input computer to reach the Chinese character input purpose of the computer. The method includes: a method for performing an operation prompt through the operation prompt area (as shown in accompanying drawing 4) and an operation method for using a positioning input device to perform stroke input; the operation prompt is passed through the stroke area (as shown in accompanying drawing 5) and the Chinese character candidate area ( As shown in accompanying drawing 3) to complete, according to the operation prompt, use the positioning input device to manipulate the cursor to click or draw a line in the operation prompt area to complete the input of basic strokes and auxiliary symbol sequences; according to the input sequence, use the known The method searches the stroke writing sequence dictionary of Chinese characters, finds the corresponding candidate Chinese characters, and arranges the candidate Chinese characters in the order of the frequency of use from high to low according to the position and arrangement of the Chinese character candidate areas (as shown in Figure 3) The corresponding position of the candidate area, while using different colors to identify the currently input strokes, the strokes being input, the skipped strokes and the strokes that have not been input in the Chinese character glyphs in the candidate area; click or draw on the candidate Chinese characters Line operation, the result of the operation is to input the operated Chinese character.
笔画区(如附图5所示)由基本笔画区(如附图2所示)和辅助符号区(如附图1所示)构成,基本笔画区由五个同样大小的扇形基本笔画块构成,各块呈中心对称分布,按顺时针顺序依次对应:“横”、“竖”、“撇”、“捺(点)”、“折”五种基本笔画(其中,“捺”和“点”归为同一类基本笔画“捺”),分别使用符号“一”、“丨”、“ノ”、“丶”、“フ”来标识,各块紧密连接,构成一个完整的环形区域。基本笔画区域用于笔画输入的提示,操作基本笔画块“一”,表示输入基本笔画“横”;操作基本笔画块“丨”,表示输入基本笔画“竖”;操作基本笔画块“ノ”,表示输入基本笔画“撇”;操作基本笔画块“丶”,表示输入基本笔画“捺(点)”;操作基本笔画块“フ”,表示输入基本笔画“折”。The stroke area (as shown in accompanying drawing 5) is made of basic stroke area (as shown in accompanying drawing 2) and auxiliary symbol area (as shown in accompanying drawing 1), and basic stroke area is made of five fan-shaped basic stroke blocks of the same size , each block is symmetrically distributed in the center, corresponding to the clockwise order: "horizontal", "vertical", "skimming", "捺 (dot)", "fold" five basic strokes (among them, "捺" and "dot) "Classified into the same type of basic strokes "捺"), respectively use the symbols "一", "丨", "ノ", "丨", "フ" to identify, and each block is closely connected to form a complete circular area. The basic stroke area is used for stroke input prompts. Operate the basic stroke block "一" to indicate the input of the basic stroke "horizontal"; operate the basic stroke block "丨" to indicate the input of the basic stroke "vertical"; operate the basic stroke block "ノ", Indicates the input of the basic stroke "插"; the operation of the basic stroke block "丝" represents the input of the basic stroke "捒(dot)"; the operation of the basic stroke block "フ" represents the input of the basic stroke "fold".
辅助符号区用于辅助基本笔画输入功能的提示,辅助符号区包含对应“?”、“*”、“□”、“■”、“←”五个符号的辅助块,其中“?”和“*”为统配符,“?”表示输入任意一个基本笔画,“*”表示输入任意多个基本笔画,“□”表示清除当已经输入的基本笔画,重新开始输入,“■”表示此前输入的笔画是末笔画,“←”表示删除刚输入的笔画。The auxiliary symbol area is used to assist the prompt of the basic stroke input function. The auxiliary symbol area contains auxiliary blocks corresponding to the five symbols "?", "*", "□", "■", and "←", among which "?" and " *" is a wild card, "?" means input any basic stroke, "*" means input any number of basic strokes, "□" means clear the basic strokes that have been input and start input again, "■" means input before The stroke in is the last stroke, and "←" means to delete the stroke just entered.
在笔画区的提示下,使用定位输入设备在基本笔画区、辅助符号区和汉字候选区进行操作的方法有:(1)使用定位设备进行画线操作,若所画曲线通过基本笔画区中的各基本笔画块,则该操作输入了该基本笔画块对应的基本笔画;若所画曲线通过辅助符号区中的辅助块,则该操作输入了该辅助块代表的符号或表达的操作;若所画曲线通过汉字候选区中的候选汉字块,则该操作输入了该汉字块代表的候选汉字;如果曲线在离开基本笔画块后再次通过基本笔画块,则该操作再次输入对应的基本笔画;(2)使用定位设备点击基本笔画区、辅助符号区或汉字候选区内部,表示输入了该区中对应的基本笔画或辅助符号区表达的操作或对应的候选汉字;画线操作可以一次输入一个或多个基本笔画,点击操作一次输入一个基本笔画,两种操作可以任意组合使用。Under the prompt of the stroke area, the methods of using the positioning input device to operate in the basic stroke area, auxiliary symbol area and Chinese character candidate area are as follows: (1) use the positioning device to draw a line, if the drawn curve passes through the basic stroke area each basic stroke block, the operation has input the basic stroke corresponding to the basic stroke block; if the drawn curve passes through the auxiliary block in the auxiliary symbol area, then the operation has input the symbol or expression operation represented by the auxiliary block; Draw a curve through the candidate Chinese character block in the Chinese character candidate area, then this operation has input the candidate Chinese character represented by this Chinese character block; If the curve passes through the basic stroke block again after leaving the basic stroke block, then this operation has input the corresponding basic stroke again; 2) Use the positioning device to click inside the basic stroke area, auxiliary symbol area or Chinese character candidate area, indicating that the operation expressed by the corresponding basic stroke or auxiliary symbol area in this area or the corresponding candidate Chinese character is input; the line drawing operation can be input one at a time or For multiple basic strokes, click to input one basic stroke at a time, and the two operations can be used in any combination.
对笔画区进行操作,输入对应的基本笔画和辅助符号或辅助动作序列,使用输入的序列,使用公知的方法查找汉字字符的笔画书写顺序字典,找到对应的候选汉字,将候选汉字在汉字候选区内显示出来。显示候选汉字时,使用不同的颜色标识出在候选区域内的汉字字形中当前已经输入的笔画、正在输入的笔画、跳过的笔画和尚未输入的笔画。Operate the stroke area, input the corresponding basic strokes and auxiliary symbols or auxiliary action sequences, use the input sequence, use known methods to search the stroke writing sequence dictionary of Chinese characters, find the corresponding candidate Chinese characters, and place the candidate Chinese characters in the Chinese character candidate area displayed within. When the candidate Chinese characters are displayed, different colors are used to identify strokes that are currently input, strokes that are being input, strokes that are skipped and strokes that have not yet been input in the Chinese character glyphs in the candidate area.
候选汉字区中候选汉字的位置与排列方式如附图3所示。汉字候选区包括九个候选汉字块(附图3中用数字1-9标出了候选汉字块1-9的位置)和两个翻页块,所有候选汉字块均为正方形区域,候选汉字块1位于汉字候选区中心,其余八个候选汉字块分布在候选汉字块1的四个边周围,与候选汉字块1的各边紧密相连,边长为候选汉字块1的一半;在候选汉字块1左边的是候选汉字块2和候选汉字块3,候选汉字块2在候选汉字块3的下方;在候选汉字块1上边的是候选汉字块4和候选汉字块5,候选汉字块4在候选汉字块5的左边;在候选汉字块1右边的是候选汉字块6和候选汉字块7,候选汉字块6在候选汉字块7的上方;在候选汉字块1下边的是候选汉字块8和候选汉字块9,候选汉字块8在候选汉字块9的右边;汉字候选区的左下角和右下角分别设有“<<”翻页块和“>>”翻页块,分别用于向前翻页和向后翻页。The positions and arrangements of the candidate Chinese characters in the candidate Chinese character area are shown in Figure 3. The Chinese character candidate area comprises nine candidate Chinese character blocks (marked the positions of the candidate Chinese character blocks 1-9 with numbers 1-9 in the accompanying drawing 3) and two page-turning blocks, and all candidate Chinese character blocks are square regions, and the candidate
候选汉字分为两类:与输入笔画完全匹配的候选汉字和与输入笔画部分匹配的汉字。完全匹配和部分匹配的准确表述见实施例的代码片段1,其中“find_exact”方法为查找完全匹配候选汉字的C++程序设计语言方法,“find”方法为查找部分匹配候选汉字的C++程序设计语言方法。每个候选汉字块中显示一个候选汉字,候选汉字按照以下排列顺序依次显示在候选汉字块1-9中:首先按照汉字使用频率从高到低的顺序列出完全匹配的汉字,然后再按照汉字使用频率从高到低的顺序列出部分匹配的汉字;当候选汉字的数量大于九时,候选汉字将被分页显示,汉字候选区的左下角的“<<”翻页块和右下角的“>>”翻页块分别用于向前翻页和向后翻页。Candidate Chinese characters are divided into two categories: Candidate Chinese characters that completely match the input strokes and Chinese characters that partially match the input strokes. The exact expression of complete match and partial match sees the
按照汉字的书写笔画顺序输入汉字时,既可以按笔画顺序完整输入汉字的所有笔画,也可以跳过部分笔画继续输入其余笔画,还可以对部分容易出错的笔画顺序进行容错处理,允许同一个汉字对应多种笔画顺序。When inputting Chinese characters according to the written stroke order of Chinese characters, you can input all the strokes of the Chinese characters completely according to the stroke order, you can also skip some strokes and continue to enter the rest of the strokes, and you can also perform fault-tolerant processing on some strokes that are prone to errors, allowing the same Chinese character Corresponds to various stroke sequences.
与现有技术相比,本发明更加适合在掌上电脑、手机等小屏幕计算机上使用触笔输入汉字,而且无需书写整个汉字,具有使用简单的优点。本发明也适用于一般的计算机设备。Compared with the prior art, the present invention is more suitable for using a stylus to input Chinese characters on computers with small screens such as handheld computers and mobile phones, and does not need to write the entire Chinese characters, and has the advantage of being simple to use. The invention is also applicable to general computer equipment.
附图说明Description of drawings
图1为本发明的汉字输入方法的辅助符号区示意图。Fig. 1 is a schematic diagram of the auxiliary symbol area of the Chinese character input method of the present invention.
图2为本发明的汉字输入方法的基本笔画区示意图。Fig. 2 is a schematic diagram of the basic stroke area of the Chinese character input method of the present invention.
图3为本发明的汉字输入方法的汉字候选区示意图,图中数字1-9标出了候选汉字块1-9的位置。Fig. 3 is a schematic diagram of the Chinese character candidate area of the Chinese character input method of the present invention, in which numbers 1-9 mark the positions of the candidate Chinese character blocks 1-9.
图4为本发明的汉字输入方法的操作提示区示意图。Fig. 4 is a schematic diagram of the operation prompt area of the Chinese character input method of the present invention.
图5为笔画区示意图。Fig. 5 is a schematic diagram of the stroke area.
图6为以“永”字为例,输入基本笔画时,用不同的颜色标识出在候选区域内的汉字字形示意图。Fig. 6 is a schematic diagram of Chinese character glyphs in the candidate area marked with different colors when basic strokes are input, taking the word "Yong" as an example.
图7为输入笔画“横”的操作以及该操作对应的汉字候选区的示意图。Fig. 7 is a schematic diagram of the operation of inputting the stroke "horizontal" and the corresponding Chinese character candidate area.
图8为输入笔画序列“横”、“竖”的操作以及该操作对应的汉字候选区的示意图。Fig. 8 is a schematic diagram of the operation of inputting the stroke sequence "horizontal" and "vertical" and the corresponding Chinese character candidate area.
图9为输入笔画序列“横”、“竖”的另外一种操作以及该操作对应的汉字候选区的示意图。Fig. 9 is a schematic diagram of another operation of inputting the stroke sequence "horizontal" and "vertical" and the corresponding Chinese character candidate area.
图10为输入笔画序列“横”、“竖”、“撇”、“捺”的操作以及该操作对应的汉字候选区的示意图。Fig. 10 is a schematic diagram of the operation of inputting the stroke sequence "horizontal", "vertical", "skimming" and "pressing" and the corresponding Chinese character candidate area.
图11为输入笔画序列“横”、“横”、“竖”、“横”的操作以及该操作对应的汉字候选区的示意图。Fig. 11 is a schematic diagram of the operation of inputting the stroke sequence "horizontal", "horizontal", "vertical" and "horizontal" and the corresponding Chinese character candidate area.
图7-图11为本发明在掌上电脑上的一种软件实现的屏幕截获图,该实现没有使用不同颜色来标识汉字候选区中的汉字字形中的笔画。7-11 are screenshots of a software implementation of the present invention on a handheld computer, which does not use different colors to identify strokes in Chinese character glyphs in the Chinese character candidate area.
具体实施方式Detailed ways
使用本发明的汉字输入方法输入汉字的具体实施例如下:The concrete embodiment that uses Chinese character input method of the present invention to input Chinese character is as follows:
1.在计算机显示设备上显示操作提示(或直接在输入设备的输入面板上事先印制操作提示中的笔画区域),操作提示由笔画区域和汉字候选区域构成,笔画区域包括基本笔画区(如附图2所示)和辅助符号区(如附图1所示);1. Display the operation prompt on the computer display device (or directly print the stroke area in the operation prompt in advance on the input panel of the input device), the operation prompt is composed of the stroke area and the Chinese character candidate area, and the stroke area includes the basic stroke area (such as shown in accompanying drawing 2) and auxiliary symbol area (as shown in accompanying drawing 1);
2.使用定位设备,如触笔、鼠标、压感笔、光笔等,操纵光标在显示设备的笔画区域进行点击或画线操作,操作的痕迹实时地显示在对应的区域,如附图7至附图11所示(如果笔画区域是事先印制在输入设备的输入面板上,则是操纵定位设备在输入面板上的笔画区域进行操作,操作的痕迹不显示)。点击操作因具体的定位设备的不同而略有差别,笔类型的定位设备的点击操作是指笔尖落下,接触到书写面,然后抬起笔尖;鼠标类的定位设备的点击操作是指按下鼠标按钮,然后放开鼠标按钮。对于笔类型的定位设备而言,画线操作是指:笔尖落下,接触到书写面,移动笔尖,然后抬起笔尖;鼠标类的定位设备的画线操作是指按下鼠标按钮,移动鼠标光标,放开鼠标按钮。上述操作方式的实现方法是领域内公知的方法。2. Use positioning devices, such as stylus, mouse, pressure-sensitive pen, light pen, etc., to manipulate the cursor to click or draw lines in the stroke area of the display device, and the traces of the operation are displayed in the corresponding area in real time, as shown in Figure 7 to Shown in accompanying drawing 11 (if the stroke region is to be printed on the input panel of input device in advance, be to manipulate the stroke region on the input panel to operate the positioning device, and the trace of operation does not show). The click operation is slightly different depending on the specific positioning device. The click operation of the pen-type positioning device means that the pen tip falls, touches the writing surface, and then lifts the pen tip; the click operation of the mouse-type positioning device refers to pressing the mouse. button, and then release the mouse button. For a pen-type positioning device, the line-drawing operation refers to: drop the pen tip, touch the writing surface, move the pen tip, and then lift the pen tip; the line-drawing operation of the mouse-type positioning device refers to pressing the mouse button, moving the mouse cursor , release the mouse button. The implementation method of the above operation mode is a well-known method in the field.
3.对基本笔画区的操作表示输入对应的基本笔画,例如附图7所示的操作为点击基本笔画区“一”,表示输入笔画“横”;附图8和附图9所示的操作为画线操作,所画曲线通过基本笔画区“一”和“丨”,表示输入笔画序列“横”和“竖”;附图10所示的操作为画线操作,所画曲线通过基本笔画区“一”、“丨”、“ノ”、“丶”,表示输入笔画序列“横”、“竖”、“撇”和“捺”;附图11所示的操作为画线操作,所画曲线通过基本笔画区“一”、“一”、“丨”、“一”,表示输入笔画序列“横”、“横”、“竖”和“横”。3. The operation on the basic stroke area represents the input of the corresponding basic strokes. For example, the operation shown in accompanying
4.使用输入的笔画序列查找汉字字符的笔画书写顺序字典,查找出的汉字显示在汉字候选区,如附图7、8、9、10、11所示。汉字字符的笔画书写顺序字典的实现是本领域内公知的方法,查找字典的方法也是本领域内公知的方法,代码片段1和2给出了一种实现方法。通过辅助符号区中“*”和“?”的使用以及在字典中增加同一个汉字的不同笔画书写顺序,就可以按笔画顺序完整输入汉字的所有笔画,也可以跳过部分笔画继续输入其余笔画,还可以对部分容易出错的笔画顺序进行容错处理。“?”表示输入任意一个基本笔画,“*”表示输入任意多个基本笔画,支持“?”和“*”的字典查找算法的标准C++程序设计语言源程序代码见代码片段1所示。4. Use the input stroke sequence to look up the stroke writing sequence dictionary of Chinese characters, and the found Chinese characters are displayed in the Chinese character candidate area, as shown in Figures 7, 8, 9, 10, and 11. The realization of the stroke writing sequence dictionary of Chinese characters is a well-known method in the art, and the method of looking up the dictionary is also a well-known method in the art.
5.将查找到的候选汉字在汉字候选区中进行显示,根据已经输入、正在输入和没有输入的笔画,使用不同颜色在汉字候选区中显示的汉字字形中进行不同的标识,以“永”字为例,见图6所示。在输入基本笔画“捺(点)”时,候选区中显示的“永”字如图6中的左起第一个永字所示;继续输入基本笔画“折”时,候选区中显示的“永”字如图6中的左起第二个永字所示;继续输入基本笔画“折”时,候选区中显示的“永”字如图6中的左起第三个永字所示;继续输入基本笔画“撇”时,候选区中显示的“永”字如图6中的左起第四个永字所示;继续输入基本笔画“捺”时,候选区中显示的“永”字如图6中的左起第五个永字所示。一种实现上述功能的方法是:为每个汉字制作所有可能的不同颜色的笔画字形数据,根据输入的笔画,查找这些字形数据,找到相应的数据进行显示。以“永”字为例,为“永”字制作好图6所示的五个字形数据,根据输入的笔画,选择对应的字形数据进行显示。5. Display the found candidate Chinese characters in the Chinese character candidate area, and use different colors to identify the Chinese character glyphs displayed in the Chinese character candidate area according to the strokes that have been input, are being input and have not been input, and use "Yong" Take the word as an example, as shown in Figure 6. When inputting the basic strokes "捕 (point)", the "Yong" word displayed in the candidate area is shown in the first Yong character from the left among Fig. 6; The character "Yong" is shown as the second character from the left in Figure 6; when continuing to input the basic stroke "fold", the character "Yong" displayed in the candidate area is shown in the third character from the left in Figure 6 When continuing to input the basic strokes "插", the "Yong" word displayed in the candidate area is shown in the fourth Yong character from the left in Figure 6; The word "Yong" is shown in the fifth word "Yong" from the left in Figure 6. A method for realizing the above function is: for each Chinese character, make all possible stroke glyph data of different colors, search for these glyph data according to the input strokes, and find the corresponding data for display. Taking the character "Yong" as an example, the five glyph data shown in Figure 6 are prepared for the character "Yong", and the corresponding glyph data is selected for display according to the input strokes.
6.在汉字候选区进行点击或画线操作,选中的汉字即为需要输入的汉字。6. Click or draw a line in the Chinese character candidate area, the selected Chinese character is the Chinese character to be input.
代码片段1(字典查找算法的标准C++程序设计语言源程序代码片段)Code Fragment 1 (Standard C++ Programming Language Source Code Fragment of Dictionary Lookup Algorithm)
////
//用于find_if,在str1中查找str2,如果找到,返回true,//For find_if, find str2 in str1, if found, return true,
////
//查找串str2中可以包含星号*,用于匹配任意长度字符//The search string str2 can contain an asterisk *, which is used to match characters of any length
//findDictltems为递归调用函数//findDictltems is a recursive call function
//每次以第一个*号为界,先查找左边的内容,找到后再对*号右边的内容进行递归//Every time the first * number is used as the boundary, first search for the content on the left, and then recurse the content on the right side of the * number
调用transfer
//查找串str2中可以包含问号?,匹配一个任意字符// Can the search string str2 contain question marks? , matches any character
////
bool findDictltems(string str1,string str2)bool findDictltems(string str1, string str2)
{{
string s1,s2;string s1, s2;
basic_string<char>::size_type indexCh1a,indexStar,indexQ;basic_string<char>::size_type indexCh1a, indexStar, indexQ;
//使用静态变量控制开始查找的位置!确保s2位于s1后!// Use static variables to control where to start looking! Make sure s2 is after s1!
static basic_string<char>::size_type index=0;static basic_string<char>::size_type index=0;
//查找串str2中可以包含星号*,用于匹配任意长度字符//The search string str2 can contain an asterisk *, which is used to match characters of any length
indexStar=str2.find(″*″,0);indexStar = str2.find("*", 0);
if(indexStar!=string::npos)if(indexStar!=string::npos)
{{
//每次以第一个*号为界,先查找左边的内容s1,找到后再对*号右边的内容s2进行递归调用// Each time the first * number is used as the boundary, first search for the content s1 on the left, and then recursively call the content s2 on the right side of the * number
if(indexStar==0)s1=″″;If (indexStar = = 0) s1 = "";
else s1=str2.substr(0,indexStar-1);`else s1=str2.substr(0, indexStar-1);
if((indexStar+1)==string::npos)s2=″″;If((indexStar+1)==string::npos)s2=″″;
else s2=str2.substr(indexStar+1);`else s2=str2.substr(indexStar+1);
if(s1.length()>0)If(s1. length()>0)
{{
if(findDictltems(str1,s1))`` if(findDictltems(str1,s1))
{{
//设置开始查找的初始位置,index为静态变量!//Set the initial position to start searching, index is a static variable!
index=str1.find(s1);Index = str1. find(s1);
index+=s1.length();`` index+=s1.length();
bool res;bool res;
if(s2.length()>0)If(s2.length()>0)
//对*号右边的内容s2进行递归调用// Recursively call the content s2 on the right side of *
res=findDictltems(str1,s2); res = findDictltems(str1, s2);
elseelse
res=true;res=true;
index=0;//重置静态变量index index=0;//Reset the static variable index
return res;return res;
}}
elseelse
return false;return false;
}}
elseelse
{{
if(s2.length()>0)If(s2. length()>0)
return findDictltems(str1,s2);`` return findDictltems(str1, s2);
elseelse
return true;return true;
}}
}}
elseelse
{{
//查找串str2中可以包含问号?,用于匹配长度为一的任意字符// Can the search string str2 contain question marks? , which matches any character of length one
indexQ=str2.find(″?″,0);indexQ=str2.find("?", 0);
if(indexQ!=string::npos)If(indexQ!=string::npos)
{{
string s1=str2.replace(indexQ,1,″1″); string s1=str2.replace(indexQ, 1, "1");
string s2=str2.replace(indexQ,1,″2″); string s2 = str2.replace(indexQ, 1, "2");
string s3=str2.replace(indexQ,1,″3″); string s3 = str2.replace(indexQ, 1, "3");
string s4=str2.replace(indexQ,1,″4″); string s4 = str2.replace(indexQ, 1, "4");
string s5=str2.replace(indexQ,1,″5″); string s5 = str2.replace(indexQ, 1, "5");
return findDictltems(str1,s1)|| return findDictltems(str1, s1) ||
findDictltems(str1,s2)||findDictltems(str1, s2) ||
findDictltems(str1,s3)||findDictltems(str1, s3) ||
findDictltems(str1,s4)||findDictltems(str1, s4) ||
findDictltems(str1,s5);findDictltems(str1, s5);
}}
elseelse
{{
indexCh1a=str1.find(str2,index); indexCh1a = str1. find(str2, index);
if(indexCh1a!=string::npos)If(indexCh1a!=string::npos)
return true;return true;
elseelse
return false;return false;
}}
}}
}}
////
//查找字典,找出以str开头的候选汉字//Look up the dictionary and find the candidate Chinese characters starting with str
////
string HZDic::find(string str,int & count)string HZDic::find(string str, int & count)
{{
count=0;count=0;
string res=″″;string res = "";
vector<string>::iterator begin,end,location;vector<string>::iterator begin, end, location;
begin=dic_data[get_index(str[0])].begin();begin = dic_data[get_index(str[0])].begin();
end=dic_data[get_index(str[0])].end();end = dic_data[get_index(str[0])].end();
location=begin;location=begin;
while(location!=end)while(location!=end)
{{
location=find_if(begin,end,bind2nd(ptr_fun(findDictltems),″[″+str));Location = find_if(begin, end, bind2nd(ptr_fun(findDictltems), "["+str));
if(location==end)break;If(location==end)break;
res+=location->substr(0,2); res+=location->substr(0, 2);
begin=location+1;begin=location+1;
count++;count++;
if(count>=MAX_RETURN)return res;If(count>=MAX_RETURN) return res;
}}
return res;return res;
}}
////
//查找字典,返回与str精确匹配的候选汉字//Look up the dictionary and return the candidate Chinese characters that exactly match str
////
string HZDic::find_exact(string str,int & count)string HZDic::find_exact(string str, int & count)
{{
int no=0;int no=0;
string res=″″;string res = "";
vector<string>::iterator begin,end,location;vector<string>::iterator begin, end, location;
begin=dic_data[get_index(str[0])].begin();begin = dic_data[get_index(str[0])].begin();
end=dic_data[get_index(str[0])].end();end = dic_data[get_index(str[0])].end();
location=begin;location=begin;
while(location!=end)while(location!=end)
{{
location=find_if(begin,end,bind2nd(ptr_fun(findDictltems),″[″+str+″]″));Location = find_if(begin, end, bind2nd(ptr_fun(findDictltems), "["+str+"]"));
if(location==end)break;If(location==end)break;
res+=location->substr(0,2); res+=location->substr(0, 2);
begin=location+1;begin=location+1;
no++;no++;
if(no>=MAX_RETURN-count)If(no>=MAX_RETURN-count)
{{
count=no;count=no;
return res;return res;
}}
}}
count=no;count=no;
return res;return res;
}}
代码片段2(字典构造算法的标准C++程序设计语言源程序代码片段)Code fragment 2 (standard C++ programming language source code fragment of dictionary construction algorithm)
int HZDic::get_index(char c)int HZDic::get_index(char c)
{{
switch(c)switch(c)
{{
case′*′:case '*':
case′?′:case'? ':
case′]′:return 0;case ']': return 0;
default:return c-′1′;default: return c-'1';
}}
}}
////
//读入字典文件strokeinput.dic,构造字典数据结构//Read in the dictionary file strokeinput.dic, and construct the dictionary data structure
//字典文件按汉字使用频度排序,包括六千多个汉字//Dictionary files are sorted by frequency of use of Chinese characters, including more than 6,000 Chinese characters
//每行形如:“的[32511354]”//Each line is like: "[32511354]"
////
HZDic::HZDic(void)HZDic::HZDic(void)
{{
char str[40];char str[40];
ifstream datafile(″\\windows\\strokeinput.dic″);ifstream datafile("\\windows\\strokeinput.dic");
if(datafile)if(datafile)
{{
while(datafile.getline(str,40))while(datafile. getline(str, 40))
{{
dic_data[get_index(str[3])].push_back(str);dic_data[get_index(str[3])].push_back(str);
}}
}}
datafile.close();datafile. close();
}}
本发明中的笔画区域有多种实现方法,一种实现方法是在计算机显示屏幕上绘制出笔画区域,使用定位输入设备操纵光标在笔画区域上进行操作,操作的痕迹实时地显示在计算机显示屏幕的笔画区域上。另外一种实现方法是不在计算机显示屏幕上绘制笔画区域,笔划区域事先印制在定位输入设备的输入板上,操作在笔画区域上进行,操作痕迹不显示。根据不同的情况,可以选择上述实现方法中的任意一种。在有的带有小尺寸显示设备的计算机上,无法完整地显示整个操作提示区,这时第二种实现方法会非常有效。The stroke area in the present invention has multiple realization methods, and a kind of realization method is to draw out the stroke area on the computer display screen, use the positioning input device to manipulate the cursor to operate on the stroke area, and the traces of the operation are displayed on the computer display screen in real time on the stroke area. Another implementation method is not to draw the stroke area on the computer display screen, the stroke area is printed on the input board of the positioning input device in advance, the operation is carried out on the stroke area, and the operation traces are not displayed. According to different situations, any one of the above implementation methods can be selected. On some computers with small-sized display devices, the entire operation prompt area cannot be completely displayed. At this time, the second implementation method will be very effective.
本发明经使用表明,完全达到设计要求。The use of the present invention shows that it fully meets the design requirements.
本发明不仅局限于上述实施例所限。The present invention is not limited to the above-mentioned embodiments.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2008100584799A CN101286097A (en) | 2008-06-02 | 2008-06-02 | A Chinese character input method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2008100584799A CN101286097A (en) | 2008-06-02 | 2008-06-02 | A Chinese character input method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101286097A true CN101286097A (en) | 2008-10-15 |
Family
ID=40058324
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNA2008100584799A Pending CN101286097A (en) | 2008-06-02 | 2008-06-02 | A Chinese character input method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101286097A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102171642A (en) * | 2011-04-11 | 2011-08-31 | 华为终端有限公司 | Information processing method and terminal device |
CN102414648A (en) * | 2009-04-28 | 2012-04-11 | 三菱电机株式会社 | Input device |
CN107247705A (en) * | 2010-07-30 | 2017-10-13 | 库比克设计工作室有限责任公司 | fill-in-the-blank system |
CN103941993B (en) * | 2013-01-23 | 2017-12-29 | 汪诗海 | A kind of annular menu formula sliding input method |
CN108038495A (en) * | 2017-12-04 | 2018-05-15 | 昆明理工大学 | A kind of incompleteness Chinese characters recognition method |
-
2008
- 2008-06-02 CN CNA2008100584799A patent/CN101286097A/en active Pending
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102414648A (en) * | 2009-04-28 | 2012-04-11 | 三菱电机株式会社 | Input device |
CN107247705A (en) * | 2010-07-30 | 2017-10-13 | 库比克设计工作室有限责任公司 | fill-in-the-blank system |
CN107247705B (en) * | 2010-07-30 | 2021-03-30 | 库比克设计工作室有限责任公司 | Filling-in-blank word filling system |
CN102171642A (en) * | 2011-04-11 | 2011-08-31 | 华为终端有限公司 | Information processing method and terminal device |
CN103941993B (en) * | 2013-01-23 | 2017-12-29 | 汪诗海 | A kind of annular menu formula sliding input method |
CN108038495A (en) * | 2017-12-04 | 2018-05-15 | 昆明理工大学 | A kind of incompleteness Chinese characters recognition method |
CN108038495B (en) * | 2017-12-04 | 2021-08-20 | 昆明理工大学 | A method for identifying incomplete Chinese characters |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7257528B1 (en) | Method and apparatus for Chinese character text input | |
KR101791929B1 (en) | Integrated keyboard for inputting multiple languages | |
CN101021763A (en) | Soft keyboard layout fast inputting method on touch screen | |
WO2007121673A1 (en) | Method and device for improving inputting speed of characters | |
CN102866826B (en) | A kind of characters input method and device thereof | |
CN103576886A (en) | Scheme of digital double-pinyin double-stroke input method and keyboard thereof | |
US20100245230A1 (en) | Handwriting recognition in electronic devices | |
CN106168859A (en) | A kind of key board unit for word input and method | |
TWI616760B (en) | Method and apparatus for inputting chinese characters | |
CN101286097A (en) | A Chinese character input method | |
Kristensson | Discrete and continuous shape writing for text entry and control | |
JP2004523034A (en) | Character generation system | |
US9563282B2 (en) | Brahmi phonemics based keyboard for providing textual inputs in indian languages | |
WO2000043861A1 (en) | Method and apparatus for chinese character text input | |
KR101319948B1 (en) | Method for inputting characters using a software keyboard | |
CN102750000A (en) | Binary syllabification input method | |
CN102455785A (en) | Method for inputting Chinese characters into computer | |
CN104834392B (en) | A kind of Chinese character input method of stroke dynamic group word | |
KR20090035409A (en) | Character input device | |
CN102156616B (en) | Touch screen key-writing input method | |
WO2001093180A1 (en) | World characters numerical coding input method and thereof its information handling system | |
JP3803253B2 (en) | Method and apparatus for Kanji input | |
JP2011028722A (en) | Character search method using stroke order | |
CN101261564A (en) | A virtual keyboard for inputting Chinese characters and its operating method | |
CN101498966B (en) | Chinese character input method by using shorthand notation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Open date: 20081015 |