A kind of wrongly written character font editor, coding and input system and method
Technical field
The present invention relates to wrongly written character shape editor, printing and Plate making printing field, particularly common wrongly written character input system and method in the digitizing teaching Chinese as a foreign language is specially a kind of wrongly written character font editor, coding and input system and method.
Background technology
Utilize computing machine to carry out the Chinese character input, set type and printing; It is extremely usual thing of present office automation and print field; But if the Chinese character that does not have in input and the printing computer character library, the user often will make a great fuss; Common way has two kinds: the one, utilize the EUDC Editor manufacturing, and the 2nd, make a Chinese character picture temporarily and come temporary transient substituting.Wrongly written character belongs to the word that does not have in the character library; A spot of wrongly written character can carry out with above-mentioned method; But along with the particularly development of teaching Chinese as a foreign language of China's Chinese teaching, the people that the foreigner learns writing of Chinese characters gets more and more, because the complicacy of Chinese character learning; Error type and the quantity of the foreigner when writing Chinese characters occurred and be doubled and redoubled, the mode of using character library to make wrongly written character and editor's wrongly written character picture can not adapt to the needs of digitizing Chinese teaching far away.
Many for this reason scholars begin studying aspect wrongly written character editor and the identification, and have obtained some achievements." based on the wrongly written character processing scheme of international standard " that the little Khanh Hoa woods of Lee of the Inner Mongol Normal University teacher people is more typically arranged, in this scheme, two teachers.(ideographic variation sequences IVS), has designed and Implemented based on ideograph variant sequence standard in Unicode 5.1 standards.With a standardized form of Chinese charcters is central tissue and management wrongly written character, uses a standardized form of Chinese charcters to add IVS variant selector and representes the wrongly written character coding, uses OpenType font technology and carries out input and output wrongly written character processing scheme.
The method of more than handling wrongly written character all is on the basis of original character library, to utilize the clear area in the standard character library or wrongly written character is deposited in the Hanzi internal code zone of seldom using, and the maximum deficiency of these methods is to have taken the valuable space encoder of Chinese character, along with the expansion of wrongly written character scale; These spaces very book run out; For example, Chinese GBK GB is [AAA1-AFFE], [F8A1-FEFE] and [A140-A7A0]; Only these 3 sections just have 4636, and Unicode is encoded to [E000-F8FF] totally 6400.Even each Chinese character is got a wrongly written character and deposited also and to need 6400, and actual conditions, the quantity of wrongly written character far is not that a Chinese character has only a wrongly written character, because of a little above wrongly written characters are imported and processing scheme is also having a lot of defectives aspect the process mass wrongly written character.
For this reason; Need find a kind of wrongly written character input and editor's method, can open editor's quantity of wrongly written character, make things convenient for the user to import; The publication of better service Chinese character and printing, for Chinese teaching particularly teaching Chinese as a foreign language digitized wrongly written character editor and printing environment are provided.
Summary of the invention
To the deficiency that exists in the prior art, the invention provides a kind ofly through self-built wrongly written character font storehouse, and can carry out wrongly written character font editor, coding and the input system and the method for dynamic editing.
Technical scheme of the present invention is achieved in that a kind of wrongly written character font editor, coding and input system; It is characterized in that; Comprise the wrongly written character font storehouse editor module that is used to create wrongly written character font storehouse; Be used for extracting the wrongly written character characteristic extracting module of the unique point of wrongly written character font storehouse wrongly written character font, be used for wrongly written character coding module that the unique point of wrongly written character is encoded, and be used for wrongly written character load module the input of the wrongly written character behind coding computing machine.
Above-mentioned wrongly written character font editor, coding and input system; The wrongly written character that wrongly written character font storehouse editor module suspended time editing user need import is to create wrongly written character font storehouse; For edited wrongly written character, wrongly written character font storehouse editor module passes to the wrongly written character characteristic extracting module to the wrongly written character characteristic of wrongly written character text structure; The wrongly written character characteristic that the analysis of wrongly written character characteristic extracting module receives adopts the wrongly written character feature extraction algorithm to extract the characteristic point information in the wrongly written character characteristic, and characteristic point information is passed to the wrongly written character coding module; The wrongly written character coding module carries out encoding process through wrongly written character dynamic coding algorithm with the characteristic point information that extracts in the wrongly written character characteristic extracting module, and the wrongly written character after the encoding process is stored; The wrongly written character load module receives the correct Chinese character of user's input, finds the corresponding wrongly written character coding of this word through the font retrieval, and the wrongly written character that will pass through wrongly written character coding module coding is input to and makes a plate in the editing machine and print.
Above-mentioned wrongly written character font editor, coding and input system; The wrongly written character suspended time editing module that also comprises the wrongly written character information that reception need be adjusted and edit; Wrongly written character suspended time editing module invokes wrongly written character font storehouse editor module is handled the wrongly written character suspended time editing in the document, and passes to the wrongly written character characteristic extracting module to the wrongly written character characteristic of wrongly written character text structure.
Utilize wrongly written character font editor, coding and the input method of above-mentioned wrongly written character font editor, coding and input system, comprise the steps:
A. utilize wrongly written character font storehouse editor module to create wrongly written character font storehouse: correct Chinese character of storage and the pairing wrongly written character of each correct Chinese character in the wrongly written character font storehouse;
B. through the characteristic extract minutiae information of wrongly written character characteristic extracting module to wrongly written character font in the wrongly written character font storehouse;
C. utilize the wrongly written character coding module that wrongly written character is encoded: the characteristic point information according to the wrongly written character font is encoded to wrongly written character, creates key;
D. realize the input of wrongly written character font through the wrongly written character load module: according to the correct Chinese character of input, in wrongly written character font storehouse, find the pairing wrongly written character of correct Chinese character of input through key, the wrongly written character font can be imported in the wrongly written character font of selections needs.
Above-mentioned wrongly written character font editor, coding and input method; In steps A: through the wrongly written character of drawing and copying compiles user to import; The stroke structure of wrongly written character is carried out visual modification and combination, be included in hand-written increase wrongly written character in the wrongly written character font storehouse, copy revise wrongly written character, select and copy object, increase the wrongly written character stroke, move stroke position, the deletion stroke, increase stroke reference mark, deletion stroke reference mark, preserve wrongly written character, wrongly written character parts and stroke behind the editor and copy that into selection, wrongly written character parts and the stroke of background transparent degree are copied, the wrongly written character stroke changes thickness and the wrongly written character font of storage edit-modify.
Wrongly written character font editor, coding and input method; In step B: the wrongly written character characteristic extracting module adopts the wrongly written character feature extraction algorithm to extract the characteristic point information of wrongly written character; The wrongly written character feature extraction algorithm adopts the pen unit of definition wrongly written character and the method extract minutiae information of unique point and man-machine interaction; Adopt a unit to define the wrongly written character stroke: the complete stroke structure that pen unit is made up of one or more oriented pen sections; If a pen unit is made up of n oriented pen section, the oriented pen section in the unit is called the characteristic of wrongly written character font; Pen unit is described as: SS
n={ BS
1, BS
2, BS
3..., BS
nOr SS
n={ (X
I1, Y
I1) | (X
J1, Y
J1), (X
I2, Y
I2) | (X
J2, Y
J2) ..., (X
In, Y
In) | (X
Jn, Y
Jn); BS
nRepresent n oriented pen section; (X
In, Y
In) individual oriented section starting point coordinate of expression n, be called for short the gesture point; (X
Jn, Y
Jn) individual oriented section end point coordinate of expression n, be called for short the stationary point; The initial boundary point of pen unit is called beginning circle's point, and the termination circle point of pen unit is called whole boundary point, the unique point that all gesture points in the wrongly written character pen unit and stationary point are called wrongly written character.
Above-mentioned wrongly written character font editor, coding and input method, in step C: adopt wrongly written character dynamic coding algorithm that the wrongly written character font is encoded with sequence number and each characteristic point coordinates of wrongly written character of being expert at, creating one simultaneously is the key of index with capable number.
Above-mentioned wrongly written character font editor, coding and input method, the algorithm steps of wrongly written character dynamic coding algorithm is following:
Step 1: set up or open wrongly written character font storehouse, and initializing variable;
The initialization of variable will be carried out initialization operation to separation D, beginning circle's point H, whole boundary's point T, the first number ele_num of pen and font description storehouse ZXDATA (i), and separation is used for adjacent two pen units are separated;
Open ZXscript//open font description storehouse
INT?ele_num←0,m;
POINT?D←(m,0),H←(m,0),D←(m,m);
ZXDATA (i) ← { m, 0, m, m} // description library initialization
Step 2: selection operation type:, then change step 2.1 if action type is " Ins "; If action type is " Mov ", then change step 2.2; If action type is " Del ", then change step 2.3; If action type is " Edit ", then turn to step 2.4; If action type is " NoOper ", then turn to step 3;
Step 2.1: insert pen unit;
The first En of pen that insertion has n pen section realizes that through the pen section of inserting this unit one by one establishing the insertion position is pos:
Step 2.1.1 inserts a separation (m, 0) in the insertion position; I puts 1 with pen section counting variable; Insertion position pos is from adding 1;
Step 2.1.2 inserts i the pen section of the first En of pen in the insertion position, that is: B [i] .x, B [i] .y, Z [i] .x and Z [i] .y; B [i] and Z [i] are respectively the gesture point and the stationary point of i pen section; Setting-out section between B [i] and Z [i]; Insertion position pos is from adding 2; Hop count i is from adding 1;
Step 2.1.3 is if i<n changes step 2.1.2; Otherwise the first number ele num of pen changes step 2 from adding 1;
Step 2.2: the whole pen unit that moves;
The whole pen unit that moves realizes through revising in the unit except that begin boundary's point and whole boundary's point the coordinate of each point; If Vertex [i] waits to move i point in the unit; Dx and dy are respectively horizontal increment and vertical increment, and VerCount waits to move counting except that beginning circle's point and whole boundary's point in the unit:
It is 1 that step 2.2.1 puts i;
Step 2.2.2Vertex [i] .x and Vertex [i] .y increase dx and dy respectively; I is from adding 1;
Step 2.2.3 is if i<VerCount changes step 2.2.2; Otherwise, change step 2;
Step 2.3: deletion pen unit;
Deletion pen unit puts through first each of deletion pen to realize; If Vertex [i] waits to move i point in the unit, VerCount waits to delete counting except that beginning circle's point and whole boundary's point in the unit;
Step 2.3.1 deletes a separation (m, 0); Putting i is 1;
Step 2.3.2 deletes Vertex [i]; I is from adding 1;
Step 2.2.3 is if i<VerCount changes step 2.3.2; Otherwise, change step 2;
Step 2.4: editor's pen unit;
Editor's pen unit mainly is meant certain section that moves in the unit, and this mainly answers the gesture point or the stationary point of pen section to realize through mobile phase; If the gesture point or the stationary point of pen section to be moved are Vertex [i], dx and dy are respectively horizontal increment and vertical increment, and the method that moves this point is:
Vertex[i].x=Vertex[i].x+dx;
Vertex[i].y=Vertex[i].y+dy;
Change step 2;
Step 3: preserve and revise, close the font description storehouse.
Above-mentioned wrongly written character font editor, coding and input method; In step D: the user imports correct Chinese character in editing machine, and through the row that key finds wrongly written character to belong to, all wrongly written characters tabulations that wrongly written character is expert at show; The user selects institute and uses a wrong word, and can import the wrongly written character font.
The invention has the beneficial effects as follows: through self-defined wrongly written character character library, with correcting a wrongly written character or a misspelt word and wrongly written character carries out the mapping code of one-to-many, and each wrongly written character in the character library can in use be edited dynamically and revise; Edit and revise each wrongly written character and can use dynamic drafting, increase and decrease stroke and imitation, amended wrongly written character can also encode and store again.
The present invention can carry out the input operation of wrongly written character, thereby has solved the difficulty of the wrongly written character input that exists for many years in puzzlement wrongly written character printing and the digitizing Chinese teaching; In addition; The structure that has made full use of modern Chinese character is changeable, and the characteristic that font is complicated organically combines the editor in wrongly written character storehouse and the imitation of modification and Chinese character; Guaranteed under the situation that does not change original font structure; The dynamic wrongly written character font of making various ways for digitized Chinese teaching and wrongly written character print publishing provide a kind of wrongly written character to obtain the source, is a kind of simple and convenient and wrongly written character input method efficiently.
Description of drawings
Fig. 1 is the module composition diagram of wrongly written character font editor of the present invention, coding and input system.
Among the figure: 1-wrongly written character font storehouse editor module, 2-wrongly written character characteristic extracting module, 3-wrongly written character coding module, 4-wrongly written character load module, 5-wrongly written character suspended time editing module.
Embodiment
In conjunction with accompanying drawing the present invention is done further explanation:
Present embodiment wrongly written character font editor, coding and input system; Comprise the wrongly written character font storehouse editor module 1 that is used to create wrongly written character font storehouse; Be used for extracting the wrongly written character characteristic extracting module 2 of the unique point of wrongly written character font storehouse wrongly written character font; Be used for wrongly written character coding module 3 that the unique point of wrongly written character is encoded, and be used for wrongly written character load module 4 input of the wrongly written character behind coding computing machine.
The wrongly written character that wrongly written character font storehouse editor module 1 suspended time editing user need import is to create wrongly written character font storehouse, and for edited wrongly written character, wrongly written character font storehouse editor module 1 passes to wrongly written character characteristic extracting module 2 to the wrongly written character characteristic of wrongly written character text structure;
Wrongly written character characteristic extracting module 2 is analyzed the wrongly written character characteristic that receives, and adopts the wrongly written character feature extraction algorithm to extract the characteristic point information in the wrongly written character characteristic, and characteristic point information is passed to wrongly written character coding module 3;
Wrongly written character coding module 3 carries out encoding process through wrongly written character dynamic coding algorithm with the characteristic point information that extracts in the wrongly written character characteristic extracting module 2, and the wrongly written character after the encoding process is stored;
Wrongly written character load module 4 receives the correct Chinese character of user's input; Find the corresponding wrongly written character coding of this correct Chinese character through the font retrieval; Find all corresponding wrongly written characters of this correct Chinese character; Select corresponding wrongly written character by the user then, and the wrongly written character that will pass through wrongly written character coding module 3 codings is input to and makes a plate in the editing machine and print.
The wrongly written character suspended time editing module 5 that also comprises the wrongly written character information that reception need be adjusted and edit; Wrongly written character suspended time editing module 5 is called wrongly written character font storehouse editor module 1 the wrongly written character suspended time editing in the document is handled; Amended wrongly written character can join in the wrongly written character font table again, and passes to wrongly written character characteristic extracting module 2 to the wrongly written character characteristic of wrongly written character text structure.Wrongly written character suspended time editing module 5 is stored the wrongly written character in the document through after selecting the wrongly written character of appointment, call wrongly written character font editor module 1 once more to edit storage again.
Utilize wrongly written character font editor, coding and the input method of above-mentioned wrongly written character font editor, coding and input system, it is characterized in that, comprise the steps:
A. utilize wrongly written character font storehouse editor module 1 to create wrongly written character font storehouse: correct Chinese character of storage and the pairing wrongly written character of each correct Chinese character in the wrongly written character font storehouse;
Through the wrongly written character of drawing and copying compiles user to import; The stroke structure of wrongly written character is carried out visual modification and combination, be included in hand-written increase wrongly written character in the wrongly written character font storehouse, copy revise wrongly written character, select and copy object, increase the wrongly written character stroke, move stroke position, the deletion stroke, increase stroke reference mark, deletion stroke reference mark, preserve wrongly written character, wrongly written character parts and stroke behind the editor and copy that into selection, wrongly written character parts and the stroke of background transparent degree are copied, the wrongly written character stroke changes thickness and the wrongly written character font of storage edit-modify.
B. pass through the characteristic extract minutiae information of wrongly written character font in 2 pairs of wrongly written character fonts of wrongly written character characteristic extracting module storehouse;
Wrongly written character characteristic extracting module 2 adopts the wrongly written character feature extraction algorithm to extract the characteristic point information of wrongly written character; The wrongly written character feature extraction algorithm adopts the pen unit of definition wrongly written character and the method extract minutiae information of unique point and man-machine interaction; Adopt a unit to define the wrongly written character stroke: the complete stroke structure that pen unit is made up of one or more oriented pen sections; If a pen unit is made up of n oriented pen section, the oriented pen section in the unit is called the characteristic of wrongly written character font; Pen unit is described as: SS
n={ BS
1, BS
2, BS
3..., BS
nOr SS
n={ (X
I1, Y
I1) | (X
J1, Y
J1), (X
I2, Y
I2) | (X
J2, Y
J2) ..., (X
In, Y
In) | (X
Jn, Y
Jn); BS
nRepresent n oriented pen section; (X
In, Y
In) individual oriented section starting point coordinate of expression n, be called for short the gesture point; (X
Jn, Y
Jn) individual oriented section end point coordinate of expression n, be called for short the stationary point; The initial boundary point of pen unit is called beginning circle's point, and the termination circle point of pen unit is called whole boundary point, the unique point that all gesture points in the wrongly written character pen unit and stationary point are called wrongly written character.
C. utilize 3 pairs of wrongly written character codings of wrongly written character coding module: the characteristic point information according to the wrongly written character font is encoded to wrongly written character, creates key;
Adopt wrongly written character dynamic coding algorithm that the wrongly written character font is encoded with sequence number and each characteristic point coordinates of wrongly written character of being expert at, creating one simultaneously is the key of index with capable number.
The algorithm steps of wrongly written character dynamic coding algorithm is following:
Step 1: set up or open wrongly written character font storehouse, and initializing variable;
The initialization of variable will be carried out initialization operation to separation D, beginning circle's point H, whole boundary's point T, the first number ele_num of pen and font description storehouse ZXDATA (i), and separation is used for adjacent two pen units are separated;
Open ZXscript//open font description storehouse
INT?ele_num←0,m;
POINT?D←(m,0),H←(m,0),D←(m,m);
ZXDATA (i) ← { m, 0, m, m} // description library initialization
Step 2: selection operation type:, then change step 2.1 if action type is " Ins "; If action type is " Mov ", then change step 2.2; If action type is " Del ", then change step 2.3; If action type is " Edit ", then turn to step 2.4; If action type is " NoOper ", then turn to step 3;
Step 2.1: insert pen unit;
The first En of pen that insertion has n pen section realizes that through the pen section of inserting this unit one by one establishing the insertion position is pos:
Step 2.1.1 inserts a separation (m, 0) in the insertion position; I puts 1 with pen section counting variable; Insertion position pos is from adding 1;
Step 2.1.2 inserts i the pen section of the first En of pen in the insertion position, that is: B [i] .x, B [i] .y, Z [i] .x and Z [i] .y; B [i] and Z [i] are respectively the gesture point and the stationary point of i pen section; Setting-out section between B [i] and Z [i]; Insertion position pos is from adding 2; Hop count i is from adding 1;
Step 2.1.3 is if i<n changes step 2.1.2; Otherwise the first number ele_num of pen changes step 2 from adding 1;
Step 2.2: the whole pen unit that moves;
The whole pen unit that moves realizes through revising in the unit except that begin boundary's point and whole boundary's point the coordinate of each point; If Vertex [i] waits to move i point in the unit; Dx and dy are respectively horizontal increment and vertical increment, and VerCount waits to move counting except that beginning circle's point and whole boundary's point in the unit:
It is 1 that step 2.2.1 puts i;
Step 2.2.2Vertex [i] .x and Vertex [i] .y increase dx and dy respectively; I is from adding 1;
Step 2.2.3 is if i<VerCount changes step 2.2.2; Otherwise, change step 2;
Step 2.3: deletion pen unit;
Deletion pen unit puts through first each of deletion pen to realize; If Vertex [i] waits to move i point in the unit, VerCount waits to delete counting except that beginning circle's point and whole boundary's point in the unit;
Step 2.3.1 deletes a separation (m, 0); Putting i is 1;
Step 2.3.2 deletes Vertex [i]; I is from adding 1;
Step 2.2.3 is if i<VerCount changes step 2.3.2; Otherwise, change step 2;
Step 2.4: editor's pen unit;
Editor's pen unit mainly is meant certain section that moves in the unit, and this mainly answers the gesture point or the stationary point of pen section to realize through mobile phase; If the gesture point or the stationary point of pen section to be moved are Vertex [i], dx and dy are respectively horizontal increment and vertical increment, and the method that moves this point is:
Vertex[i].x=Vertex[i].x+dx;
Vertex[i].y=Vertex[i].y+dy;
Change step 2;
Step 3: preserve and revise, close the font description storehouse.
D. realize the input of wrongly written character fonts through wrongly written character load module 4: according to the correct Chinese character of input, in wrongly written character font storehouse, find the pairing wrongly written character of correct Chinese character of input through key, the wrongly written character font can be imported in the wrongly written character font of selections needs.The user imports correct Chinese character in editing machine, through the row that key finds wrongly written character to belong to, all wrongly written characters tabulations that wrongly written character is expert at show that the user selects institute and uses a wrong word, and can import the wrongly written character font.
The present invention can carry out the input operation of wrongly written character, thereby has solved the difficulty of the wrongly written character input that exists for many years in puzzlement wrongly written character printing and the digitizing Chinese teaching; In addition; The structure that has made full use of modern Chinese character is changeable, and the characteristic that font is complicated organically combines the editor in wrongly written character storehouse and the imitation of modification and Chinese character; Guaranteed under the situation that does not change original font structure; The dynamic wrongly written character font of making various ways for digitized Chinese teaching and wrongly written character print publishing provide a kind of wrongly written character to obtain the source, is a kind of simple and convenient and wrongly written character input method efficiently.
The foregoing description only be for explain clearly that the invention does for example, and be not qualification to the invention embodiment.For the those of ordinary skill in affiliated field, on the basis of above-mentioned explanation, can also make other multi-form variation or change.Here need not also can't give exhaustive to all embodiments.And conspicuous variation of being extended out thus or change still are among the protection domain of the invention claim.