CN108959224A - A kind of text handling method - Google Patents
A kind of text handling method Download PDFInfo
- Publication number
- CN108959224A CN108959224A CN201810599559.9A CN201810599559A CN108959224A CN 108959224 A CN108959224 A CN 108959224A CN 201810599559 A CN201810599559 A CN 201810599559A CN 108959224 A CN108959224 A CN 108959224A
- Authority
- CN
- China
- Prior art keywords
- character
- display area
- text
- display
- phonetic
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/169—Annotation, e.g. comment data or footnotes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
Abstract
The present invention relates to a kind of text handling methods, comprising the following steps: step S100 obtains text to be processed, includes N number of first kind Chinese character set C={ c in the text1,c2,...,cN};Step S200, to any one character c in Ci, retrieval obtains corresponding P the second class Chinese character A in character and phonetic notation databasei={ ai1,ai2,...,aiPAnd Q phonetic character Bi={ bi1,bi2,...,biQ};Step S300, in AiAnd BiMiddle determination and ciThe a shown jointlyijAnd bik, wherein the value range of j is 1 ..., and the value range of P, k are 1 ... Q;Step S400, as display character ciWhen, in ciThe left side or the right display area in show a simultaneouslyijAnd bik;The ciDisplay area be side length lcSquare.
Description
Technical field
The present invention relates to field of information processing more particularly to a kind of text handling methods.
Background technique
There are kinds of words expression way, i.e., the same Chinese characters to have difference in the different periods of history for ancient Chinese Chinese character
Ways of writing, and now people more get used to using simplified Hanzi, this make present people cognition ancient times Chinese character on exist
Difficulty, and then influence to read the papery being made of ancient times Chinese character or electronics article and books.Two kinds of technical sides that can be thought deeply
Case includes increasing phonetic annotation to ancient times Chinese character or simplified Hanzi annotating, but there is also following technologies to ask in many cases
Topic:
1, phonetic annotation watch sound is not expressed the meaning, although this makes reader that can know the pronunciation of ancient times Chinese character, still
Its meaning of indigestion;
2, simplified Hanzi the case where there are polyphones, so that reader is for the pronunciation of part ancient times Chinese character, there are discriminations
Justice, and there is also difficulties in terms of the pronunciation for knowing simplified Hanzi by children's reading person;
3, lack using computer realize automation annotation means, when being annotated to a large amount of ancient times Chinese characters efficiency compared with
It is low;
4, location of annotated information is more random, lacks reasonable arrangement, so that can in same range (such as in one-page)
The content of presentation is relatively limited, and it is more low that efficiency is presented.
Summary of the invention
In order to solve the above technical problems, the present invention provides a kind of text handling methods, comprising the following steps:
Step S100 obtains text to be processed, includes N number of first kind Chinese character set C={ c in the text1,
c2,...,cN}。
Step S200, to any one character c in Ci, retrieval obtains corresponding P the in character and phonetic notation database
Two class Chinese character Ai={ ai1,ai2,...,aiPAnd Q phonetic character Bi={ bi1,bi2,...,biQ};The character and phonetic notation
Database includes first kind Chinese character, the second class Chinese character and phonetic character.
Step S300, in AiAnd BiMiddle determination and ciThe a shown jointlyijAnd bik, wherein the value range of j be 1 ... P, k's
Value range is 1 ... Q.
Step S400, as display character ciWhen, in ciThe left side or the right display area in show a simultaneouslyijAnd bik;Institute
State ciDisplay area be side length lcSquare.
Wherein, N >=1, P >=1, Q >=1.
Detailed description of the invention
Fig. 1 is flow chart of the method for the present invention;
Fig. 2 is the schematic diagram of character and phonetic notation database purchase content of the invention;
Fig. 3 be in one embodiment of the present of invention and meanwhile show the first and second class Chinese character and phonetic character schematic diagram.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, the present invention will be made further in conjunction with attached drawing
Detailed description.This description is to describe specific implementation consistent with the principles of the present invention by way of example, and not limitation
Mode, the description of these embodiments is detailed enough, so that those skilled in the art can practice the present invention, is not being taken off
Other embodiments can be used in the case where from scope and spirit of the present invention and can change and/or replace each element
Structure.Therefore, the following detailed description should not be understood from restrictive sense.
As shown in Figure 1, the present invention provides a kind of text handling methods, comprising the following steps:
Step S100 obtains text to be processed, includes N number of first kind Chinese character set C={ c in text1,c2,...,
cN}.In the present invention, text to be processed physically can be the Chinese character set being introduced directly into, or be derived from TXT, WORD etc.
General or specialized text file;The article of one or more ancient literatures is typically embodied as in literature, i.e. the value of N is to meet text
The natural number of chapter number of words, but this does not imply that the present invention cannot handle the case where N is smaller natural number, such as character set C can
To be the first kind Chinese character set in a word.In the present invention, preferred first kind Chinese character is non-simplified Chinese character,
It illustratively include but is not limited to a variety of Chinese ancient Chinese prose characters such as the inscriptions on bones or tortoise shells, inscription on ancient bronze objects, an ancient style of calligraphy, the lesser seal character, lishu, i.e. literal type
Difference will not influence protection scope of the present invention.
Step S200, to each of C character ci, retrieval obtains corresponding P the in character and phonetic notation database
Two class Chinese character Ai={ ai1,ai2,...,aiPAnd Q phonetic character Bi={ bi1,bi2,...,biQ, the second class Chinese character
Preferably simplified Chinese character, but may be the traditional Chinese character that China Taiwan or Hong Kong and Macao use;Phonetic notation word
Symbol is preferably the Chinese phonetic alphabet, but may be phonetic or phonetic symbol that China Taiwan or Hong Kong and Macao use.
As shown in Fig. 2, illustrative character and phonetic notation database include (such as the non-letter of first kind Chinese character in the present invention
Body Chinese character), the second class Chinese character (such as simplified Chinese character) and phonetic character.It further, further include the second class
Number AN1 (initial value 0) that Chinese character occurs in text to be processed, the total degree occurred in history processing text
Number BN1 (initial value 0) that AN2 and phonetic character occur in text to be processed, occur in history processing text
Total degree BN2.In Fig. 2, the specific value of AN1, AN2, BN1, BN2 are not shown.
For shown in Fig. 2, if ciFor c1, then 1 (P=1) the second class character a11 and 1 (Q=will be retrieved
1) phonetic character b11;If ci2 (P=2) second class character a21, a22 and 2 (Q=2) phonetic notations will be so retrieved for c2
Character b21, b22.
Step S300, in AiAnd BiMiddle determination and ciThe a shown jointlyijAnd bik, wherein the value range of j be 1 ... P, k's
Value range is 1 ... Q.
According to an aspect of the present invention, if P=1, illustrate and ciCorresponding second class character only has 1, then j=
1, and aijDisplay area have first display feature;If Q=1, illustrate and ciCorresponding phonetic character only has 1, then k
=1, and bikDisplay area have first display feature.ciWhen corresponding second class character and/or phonetic character only have 1,
Greatly a possibility that, is necessarily correctly (although there is also include incomplete situation because of character and phonetic notation database and lead to mistake
A possibility that), therefore, the first display feature is the display feature for being not easy that user (such as editor of publication) is caused to pay attention to,
To accelerate the browsing correction efficiency of user.
According to the second aspect of the invention, if P > 1, illustrate and ciCorresponding second class character have it is multiple, then j=
1, i.e., by first in multiple second class characters as with ciThe character shown jointly, and aijDisplay area have be different from
Second display feature of the first display feature;It is similar, if Q > 1, illustrate and ciCorresponding phonetic character have it is multiple, then k
=1, i.e., by first in multiple phonetic characters as with ciThe character shown jointly, and bikDisplay area have be different from
Second display feature of the first display feature.For example, if ciTo so be retrieved for c2 2 (P=2) the second class character a21,
A22 and 2 (Q=2) phonetic character b21, b22, using a21 and b21 as with ciThe character shown jointly.In this case, in ci
In locating context environmental, possible a21 and b21 are to ciThe mark of mistake, and correctly marking is a22 and b22.Therefore,
It is necessary to show some prompt informations to user.Therefore, the second display feature is to easily cause the display feature of user's attention, example
As prompted user in a flashing manner, perhaps with the font hinting user bigger compared with font in the first display feature or with compared with
More eye-catching color tips user etc. in first display feature.Further, aijDisplay area can also respond user couple
Display area first operation (such as using mouse click display area or other realize the side of identical function in the prior art
Formula), for A to be presented to useriIn remove aijP-1 the second class Chinese characters in addition, and receive user to P-1 except aijWith
Second operation of the second outer class Chinese character (such as clicks one, and point using mouse from multiple second class Chinese characters
Hit " determination " button or other realize the mode of identical function in the prior art), the second operation is for therefrom selection and ciJointly
The a of displayij2.Similar, bikDisplay area can also respond user to the first of display area the operation, for being in user
Existing BiIn remove bikQ-1 phonetic character in addition, and receive user to Q-1 except bikThe of the second class Chinese character in addition
Two operations, the second operation is for therefrom selection and ciThe b shown jointlyik2。
According to the third aspect of the present invention, if P > 1, illustrate and ciCorresponding second class character have it is multiple, then aij
Display area have be different from first display feature second display feature;aijDisplay area can also respond user to aobvious
The first operation for showing region, for A to be presented to useriIn remove aijP-1 the second class Chinese characters in addition.Similar, if Q
> 1, illustrate and ciCorresponding phonetic character have it is multiple, then bikDisplay area have be different from first display feature second
Show feature;bikDisplay area can also respond user to the first of display area the operation, for B to be presented to useriIn remove
bikQ-1 phonetic character in addition.
Further, text handling method further comprises the following steps for not distinguishing sequencing:
Step S510 receives user to P-1 except a as P > 1ijSecond operation of the second class Chinese character in addition, the
Two operations are for therefrom selection and ciThe a shown jointlyij2;Also, by aij2Corresponding AN1, AN2 add 1.
Step S520 other than being shown according to the second aspect of the invention, receives user to Q-1 as Q > 1
Except bikSecond operation of the second class Chinese character in addition, the second operation is for therefrom selection and ciThe b shown jointlyik2;And
And by bik2Corresponding BN1, BN2 add 1.
A according to the third aspect of the present inventionijAnd bikMethod of determination it is as follows:
Determine aij, so thatValue it is maximum, wherein
AN1jAnd AN2jFor aijCorresponding A N1 and AN2, min (AN1j) and max (AN1j) it is Ai={ ai1,ai2,...,aiPIn all second
The minimum value and maximum value of class Chinese character corresponding A N1;λ1And λ2For parameter preset, and λ1+λ2=1.
Determine bik, so thatValue it is maximum, wherein
BN1kAnd BN2kFor bikCorresponding BN1 and BN2, min (BN1k) and max (BN1k) it is Bi={ bi1,bi2,...,biQIn all second
Class phonetic character corresponds to the minimum value and maximum value of BN1;λ3And λ4For parameter preset, and λ3+λ4=1.
Step S400, as shown in figure 3, as display character ciWhen, in ciThe left side or the right display area in show simultaneously
aijAnd bik;ciDisplay area be side length lcSquare.As known to those skilled in the art, Fig. 3 is exemplary, aijAnd bik
C can also be located atiThe right, and aijAnd bikUpper and lower relation can be interchanged.
In the above content of the invention, N >=1, P >=1, Q >=1.
In this way, when showing non-simplified Chinese character, corresponding phonetic and simplified Hanzi can be shown simultaneously,
I.e. so that reader easily understands its sound, its meaning.Moreover, can quickly be realized by using character and phonetic notation database
For the mark of ancient Chinese prose article most contents, and user is focused on and is likely to occur an ancient Chinese prose and corresponds to multiple simplified characters
And/or the case where multiple phonetics, greatly improve text-processing efficiency.
Further, aijDisplay area be side length laIt is square;bikDisplay area be rectangle, and meet following
Relationship:Wherein hbAnd wbRespectively bikDisplay area height and width.Under normal circumstances, display screen
The origin of curtain is located at the upper left corner of screen, aij、bikDisplay area center abscissa xa、xbMeet following relationship: xa=xb,Wherein, xcFor ciDisplay area center abscissa.aijThe center ordinate of display areabikDisplay area center ordinateAnd ya> yb;Alternatively, aijViewing area
The center ordinate in domainbikDisplay area center ordinateAnd ya<
yb;ycFor ciDisplay area center ordinate.With the above arrangement, the position of three characters is enabled to put more adduction
Reason, places more characters using space in the single page to the greatest extent, and visual impression is more attractive.It is worth noting that,
For showing the origin of screen in the case where screen other positions (such as lower left corner), those skilled in the art be understand that pair
In aij、bikAnd ciDisplay area coordinate calculation, and these modes will also fall into protection scope of the present invention.
In addition, according to disclosed specification of the invention, other realizations of the invention are for those skilled in the art
Significantly.The various aspects of embodiment and/or embodiment can be used for system of the invention individually or with any combination
In method.Specification and example therein should be only be regarded solely as it is exemplary, the actual scope of the present invention and spirit by appended
Claims indicate.
Claims (10)
1. a kind of text handling method, which comprises the following steps:
Step S100 obtains text to be processed, includes N number of first kind Chinese character set C={ c in the text1,c2,...,
cN};
Step S200, to any one character c in Ci, retrieval obtains in corresponding P the second class in character and phonetic notation database
Chinese character Ai={ ai1,ai2,...,aiPAnd Q phonetic character Bi={ bi1,bi2,...,biQ};The character and phonetic notation database
Including first kind Chinese character, the second class Chinese character and phonetic character;
Step S300, in AiAnd BiMiddle determination and ciThe a shown jointlyijAnd bik, the value of P, k that wherein the value range of j is 1 ...
Range is 1 ... Q;
Step S400, as display character ciWhen, in ciThe left side or the right display area in show a simultaneouslyijAnd bik;The ci
Display area be side length lcSquare;
Wherein, N >=1, P >=1, Q >=1.
2. text handling method according to claim 1, wherein the first kind Chinese character is non-simplified form of Chinese Character word
Symbol, the second class Chinese character are simplified Chinese character.
3. text handling method according to claim 2, wherein the phonetic character is the Chinese phonetic alphabet.
4. text handling method according to claim 3, which is characterized in that aijDisplay area be side length laJust
It is rectangular;The bikDisplay area be rectangle, and meet following relationship:Wherein hbAnd wbRespectively bik
Display area height and width.
5. text handling method according to claim 4, which is characterized in that aij、bikDisplay area center it is horizontal
Coordinate xa、xbMeet following relationship: xa=xb,Wherein, xcFor ciDisplay area center abscissa;
The aijThe center ordinate of display areaThe bikDisplay area center ordinateAnd ya> yb;Alternatively,
The aijThe center ordinate of display areaThe bikDisplay area center ordinateAnd ya< yb;
Wherein, ycFor ciDisplay area center ordinate.
6. according to any text handling method of claim 5, which is characterized in that if P=1, j=1, and aij
Display area have first display feature;If Q=1, k=1, and bikDisplay area have first display feature.
7. text handling method according to claim 6, which is characterized in that if P > 1, aijDisplay area have
Different from the second display feature of the first display feature, aijDisplay area can also respond user to the of display area
One operation, for A to be presented to useriIn remove aijP-1 the second class Chinese characters in addition;
If Q > 1, bikDisplay area have be different from first display feature second display feature, the bikDisplay
Region can also respond first operation of the user to display area, for B to be presented to useriIn remove bikQ-1 phonetic notation in addition
Character.
8. text handling method according to claim 7, which is characterized in that the character and phonetic notation database further include
Number AN1 (initial value 0) that two class Chinese characters occur in text to be processed, total time occurred in history processing text
Number AN2 and phonetic character occur in text to be processed number BN1 (initial value 0), history processing text in occur
Total degree BN2;
The text handling method further comprises the following steps for not distinguishing sequencing:
Step S510 receives user to P-1 except a as P > 1ijSecond operation of the second class Chinese character in addition, described the
Two operations are for therefrom selection and ciThe a shown jointlyij2;Also, by aij2Corresponding AN1, AN2 add 1;
Step S520 receives user to Q-1 except b as Q > 1ikSecond operation of the second class Chinese character in addition, described the
Two operations are for therefrom selection and ciThe b shown jointlyik2;Also, by bik2Corresponding BN1, BN2 add 1.
9. text handling method according to claim 8, which is characterized in that in the step S300, determine aij, so thatValue it is maximum, wherein AN1jAnd AN2jFor aijCorresponding A N1
And AN2, min (AN1j) and max (AN1j) it is Ai={ ai1,ai2,...,aiPIn all second class Chinese character corresponding A N1 most
Small value and maximum value;λ1And λ2For parameter preset, and λ1+λ2=1;
Determine bik, so thatValue it is maximum, wherein BN1kWith
BN2kFor bikCorresponding BN1 and BN2, min (BN1k) and max (BN1k) it is Bi={ bi1,bi2,...,biQIn all second class phonetic notations
Character corresponds to the minimum value and maximum value of BN1;λ3And λ4For parameter preset, and λ3+λ4=1.
10. text handling method according to claim 6, which is characterized in that if P > 1, j=1, and aijDisplay
Region has the second display feature for being different from the first display feature;If Q > 1, k=1, and bikDisplay area have
Different from the second display feature of the first display feature.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810599559.9A CN108959224A (en) | 2018-06-12 | 2018-06-12 | A kind of text handling method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810599559.9A CN108959224A (en) | 2018-06-12 | 2018-06-12 | A kind of text handling method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108959224A true CN108959224A (en) | 2018-12-07 |
Family
ID=64488285
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810599559.9A Pending CN108959224A (en) | 2018-06-12 | 2018-06-12 | A kind of text handling method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108959224A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS57174256A (en) * | 1981-04-22 | 1982-10-26 | Toshiba Corp | Typesetting system |
JP2000003363A (en) * | 1998-06-12 | 2000-01-07 | Omron Corp | Device and method for pronunciation notation and recording medium for recording pronunciation notation program |
CN1499357A (en) * | 2002-11-01 | 2004-05-26 | ���Ծ | Method for lablling united character and word as well as character patterns and character picture |
CN102222419A (en) * | 2011-06-27 | 2011-10-19 | 陈宇慧 | Method for displaying electronic text |
CN103136186A (en) * | 2011-12-05 | 2013-06-05 | 北大方正集团有限公司 | Method and device of pinyin type setting |
-
2018
- 2018-06-12 CN CN201810599559.9A patent/CN108959224A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS57174256A (en) * | 1981-04-22 | 1982-10-26 | Toshiba Corp | Typesetting system |
JP2000003363A (en) * | 1998-06-12 | 2000-01-07 | Omron Corp | Device and method for pronunciation notation and recording medium for recording pronunciation notation program |
CN1499357A (en) * | 2002-11-01 | 2004-05-26 | ���Ծ | Method for lablling united character and word as well as character patterns and character picture |
CN102222419A (en) * | 2011-06-27 | 2011-10-19 | 陈宇慧 | Method for displaying electronic text |
CN103136186A (en) * | 2011-12-05 | 2013-06-05 | 北大方正集团有限公司 | Method and device of pinyin type setting |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11074397B1 (en) | Adaptive annotations | |
JP4295602B2 (en) | Method for associating a language with a nib ID, method for inputting electronic ink into a processing device using an input device, and device for receiving electronic ink | |
US8381119B2 (en) | Input device for pictographic languages | |
US8229252B2 (en) | Electronic association of a user expression and a context of the expression | |
US10614300B2 (en) | Formatting handwritten content | |
WO2019154197A1 (en) | Electronic book handwritten note display method, computing device and computer storage medium | |
CN102722476A (en) | A method and device for marking electronic documents | |
KR102075433B1 (en) | Handwriting input apparatus and control method thereof | |
CN107368198A (en) | Input and display device and input display method | |
KR20150028627A (en) | Method of coverting user handwriting to text information and electronic device for performing the same | |
JP5021856B1 (en) | Content display device, content display method, program, and recording medium | |
CN104978577B (en) | Information processing method, device and electronic equipment | |
CN105808514A (en) | Information processing method and electronic device | |
US20230409171A1 (en) | Ink annotation sharing method and system | |
JP2016085547A (en) | Electronic apparatus and method | |
TWI291669B (en) | Method of learning to write Chinese characters | |
CN108959224A (en) | A kind of text handling method | |
CN108829655A (en) | A kind of text handling method | |
WO2013051077A1 (en) | Content display device, content display method, program, and recording medium | |
US20180210871A1 (en) | Claim resolving device | |
TW201437986A (en) | Chinese traditional characters learning system and its operation method | |
JP2014224876A (en) | Learning support system, learning support method, program, and information storage medium | |
EP3128412A1 (en) | Natural handwriting detection on a touch surface | |
TW201809974A (en) | Pinyin display device and method capable of separating each Chinese pinyin for easy reading | |
JP3780023B2 (en) | Character recognition apparatus and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20181207 |