CN102023965B - Bidirectional text distribution method and system suitable for display device - Google Patents

Bidirectional text distribution method and system suitable for display device Download PDF

Info

Publication number
CN102023965B
CN102023965B CN 200910190228 CN200910190228A CN102023965B CN 102023965 B CN102023965 B CN 102023965B CN 200910190228 CN200910190228 CN 200910190228 CN 200910190228 A CN200910190228 A CN 200910190228A CN 102023965 B CN102023965 B CN 102023965B
Authority
CN
China
Prior art keywords
type
participle
text
subordinate sentence
line
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.)
Active
Application number
CN 200910190228
Other languages
Chinese (zh)
Other versions
CN102023965A (en
Inventor
彭文剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Konka Holding Group Co Ltd
Original Assignee
Konka Group Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Konka Group Co Ltd filed Critical Konka Group Co Ltd
Priority to CN 200910190228 priority Critical patent/CN102023965B/en
Publication of CN102023965A publication Critical patent/CN102023965A/en
Application granted granted Critical
Publication of CN102023965B publication Critical patent/CN102023965B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a bidirectional text distribution method and system suitable for a display device, which is used for automatically distributing a bidirectional text into a format applicable to the display device. The distribution method comprises the following steps: splitting a bidirectional text into text lines according to character quantity contained in each line; splitting each text line into clauses according to pairing signs existing in each text line; determining and marking the direction type of each text line; determining and marking the direction type of each clause according to first strong direction participles of the clauses; determining and marking the direction type of each participle in each clause; combining continuous participles with the same direction type in the clause; and rearranging the text lines according to the direction types. In the invention, the participle is used as a unit to process the bidirectional text, thereby reducing the occupation of internal memory space and simplifying the treatment process; and the participles are classified as strong direction and weak direction types, thereby further simplifying the treatment process and improving the treatment efficiency.

Description

A kind of method and system that is applicable to the bidirectional text distribution of display device
Technical field
The present invention relates to field of broadcast televisions, relate in particular to a kind of method and system that is applicable to the bidirectional text distribution of display device.
Background technology
Continuous propelling along with the global broadcast TV tech, the current terminal presentation facilities such as TV can receive the program from countries in the world, and may there is the two-way text of following mixing in the text message of these programs: the text message of same paragraph, some words must from left to right be read, and some words must be read from right to left.This is that its presentation direction of word due to some language is from right to left, as Arabic, Hebrew etc., if these language be generally that the language from left to right write is while being blended in a paragraph in the world, will form two-way text, like this, reading direction also must change according to the difference of spoken and written languages presentation direction.For two-way text as above, if when multiple nested and multiple matching symbol (as single quotation marks, capital and small letter bracket etc.) is arranged in text, the terminal presentation facility processes and displays two-way text such as TV will become very complicated so.
At present, the terminal presentation facility processes and displays two-way text such as TV are generally taked following method: according to the category of language of the current selection of user, determine how to process two-way text, if the user selects, be the from left to right language of sequential write such as English, so all texts are all by from left to right carrying out Graphics Processing; If the user selects, be the language of sequential write from right to left such as Hebrew, so all texts are all by Graphics Processing from right to left.This disposal route is fairly simple, but in fact can't correctly show two-way text, this disposal route can only show text with a kind of selected direction, therefore the single order text that can only substantially not exist two-way text to cross one another and embed for display menu etc., as text is English entirely or is Hebrew entirely.
Except said method, the terminal presentation facility processes and displays two-way text such as current TV also have following method: adopt current two-way layout method, first section is split and embarks on journey, again row is split and forms a complete sentence, again sentence is split into to the level sentence, determine again the direction type of level sentence, calculate again the direction type of each character in the level sentence, carry out multi-level character reversion according to the direction type of each character and the level of nesting of place level sentence again, finally according to the attribute of some special characters, carry out last correction.Its general step is as follows:
A: section is split into to a line a line
B: row is split into to different sentences
C: sentence is split as to different level sentences
D: the level and the direction that determine each level sentence
E: the direction of each strong character in each level sentence of mark
F: the direction of weak character in each level sentence of mark
G: the direction of neutral character in each level sentence of mark
H: the level of each character in each level sentence of mark
I: according to level reversion character
J: special symbol correction
Although above-mentioned layout method can correctly show two-way text, but its processing procedure is too numerous and diverse, its major defect has: take character as calculating and reversion that unit carrys out the travel direction type, need to consume a large amount of internal memories, and need to do repeatedly traversal to text, the efficiency of method is not high; The division of epistasis, weak property, neutral these three kinds of character direction types, make disposal route become more complicated.
Summary of the invention
The object of the present invention is to provide a kind of method and system that is applicable to the bidirectional text distribution of display device, improve treatment effeciency, make the terminal presentation facility such as TV can correctly show two-way text.
A kind of method that is applicable to the bidirectional text distribution of display device disclosed by the invention, for automatically described bidirectional text distribution being become to the applicable form of display device, comprises the following steps:
Step 1: the character quantity that can hold according to every row splits into line of text by described two-way text; According to the matching symbol existed in described line of text, described line of text is split into to subordinate sentence again;
Step 2: determine and the direction type of each described line of text of mark according to the direction type of first subordinate sentence of described line of text; Determine the also direction type of each described subordinate sentence of mark according to first strong direction participle of described subordinate sentence; The direction type of each participle in definite also described subordinate sentence of mark; Merge the participle with equidirectional type continuous in described subordinate sentence;
Step 3: according to the direction type, reset described line of text.
A kind of method that is applicable to the bidirectional text distribution of display device disclosed by the invention also comprises following subordinate technical characterictic:
In described step 2, the described subordinate sentence that setting can't the directions type is consistent with the direction type of the described line of text at its place; Setting can't the directions type described participle consistent with the described direction type of the described subordinate sentence at its place.
In described step 2, if the direction type of the adjacent described participle in the unascertainable described participle of some direction types both sides is identical, the direction type that this participle is set is also identical; If the direction type of the described participle that the unascertainable described participle of some direction types both sides are adjacent is not identical, the direction type that this participle is set is identical with the direction type of described participle place subordinate sentence.
In described step 2, the character writing direction that described direction type includes the languages decision is L type from left to right, and presentation direction is R type from right to left.
Described step 3 further comprises:
The order of each the described subordinate sentence under resetting according to the direction type of each described line of text;
The order of each the described participle under resetting according to the direction type of each described subordinate sentence;
The order of each character under resetting according to the direction type of each participle.
The invention also discloses a kind of system that is applicable to the bidirectional text distribution of display device, comprising:
The text storage module, for the described two-way text information before storage layout;
Row splits module, splits and is marked as line of text for the two-way text information before the described layout that described text storage module is stored, and store in the line of text memory module;
Subordinate sentence splits module, for line of text described in described line of text memory module is split into to the subordinate sentence of different levels, and stores in the subordinate sentence memory module;
Participle type definition module, for storing the foundation of character calligraph direction corresponding to each languages as the direction type of judgement participle;
Participle direction type of process module, thereby for determine the direction type of the definite described participle of languages according to described participle type definition module;
Subordinate sentence direction type of process module, for the direction type of the subordinate sentence of determining described different levels;
Line direction type of process module, for the line direction type of every a line of determining described line of text;
The participle type merges module, the continuous participle that has the equidirectional type for merging;
The subordinate sentence reordering module, rearranged for the order of the subordinate sentence by described different levels;
The participle reordering module, rearranged for the order of the participle by described subordinate sentence;
The character reordering module, rearranged for the order of the character by described participle.
Compared with prior art, useful technique effect of the present invention is: 1, take participle as unit is processed two-way text, reduce taking of memory headroom, simplify processing procedure; 2, only participle is divided into to strong direction and two kinds of direction types of weak direction, further simplifies processing procedure, improve treatment effeciency.
The accompanying drawing explanation
Fig. 1 is the process flow diagram of a kind of embodiment of the method for the bidirectional text distribution that is applicable to display device of the present invention;
Fig. 2 is the detail flowchart of step S106 of a kind of embodiment of the method for the present invention's bidirectional text distribution of being applicable to display device;
Fig. 3 is the system construction drawing of the embodiment of the bidirectional text distribution that is applicable to display device of the present invention.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
In embodiments of the present invention, adopting participle is the layout again that unit carries out two-way text, participle refer to a string continuous character, a string continuous numeral or single punctuation mark (as.! Period and space).The present invention for convenience of description, show the language text that means from right to left (RTL) sequential write with large minuscule A-Z, means from left to right the language text of (LTR) sequential write with lowercase a-z.
The language of countries in the world generally adopts order from left to right to write, but the language of a few countries is also arranged, is to adopt order from right to left to write, as Arabic, Hebrew.The existence of this language sequential write difference has caused the difference on the reading direction, when the language of different sequential writes is blended in one piece of article or paragraph, will form two-way text.Participle in two-way text has some characters to write by order from right to left, has some characters to write by order from left to right, therefore to two-way text, must could show with correct order after treatment.
The present embodiment is L type and two kinds of direction types of R type by the direction type definition of participle, be about to the character writing direction and write formed participle by order from right to left and be called R type direction participle, the character writing direction is write to formed participle by order from left to right and be called L type direction participle.
The present embodiment also is divided into two kinds by the direction attribute of participle: strong direction participle and weak direction participle.Strong direction participle refers to the participle that possesses the specific direction type, as a string English character (L type), and a string Hebrew character (R type), string number (L type).Weak direction participle refers to itself not possess the participle that judges the direction type information, and its direction type judgement needs comprehensively judge according to upper and lower participle, as the participle of single punctuation mark formation.
Fig. 1 shows the flow process of the method for the bidirectional text distribution that the embodiment of the present invention provides.For convenience of description, only show part related to the present invention here.
In step S102, the described two-way text that the character quantity that can hold according to every row will be kept in described text storage module splits into line of text, and is kept in the line of text memory module.Due to two-way text is embarked on journey and only needed the character number that can hold in this line width of calculating to get final product as article or paragraph split, in conjunction with the instantiation disposal route of two-way text, will start to illustrate from each step below step S102.
Two-way text content 1:car means CAR.
Two-way text content 1 as above is as instantiation explanation of the present embodiment, in order to the direction type of expository writing one's own profession, is the disposition of non-nesting in L type and content of text.
In step S103, according to the quotation marks that exist in described line of text or bracket matching symbol, the every a line that is kept at the described line of text in described line of text memory module is split into to the subordinate sentence of different levels, and be kept in the subordinate sentence memory module.While having the matching symbol such as quotation marks or bracket in described line of text, subordinate sentence splits module and will partly split in matching symbol and the outer left and right of matching symbol, form 3 different levels; If also there is the pairing bracket in the subordinate sentence in the pairing bracket, continue to split.
In conjunction with two-way text content 1, analyzed, owing to there not being other matching symbols such as any quotation marks or bracket in this article one's own profession, so, without splitting line of text, the result after processing is still: car means CAR.
In step S104, according to first subordinate sentence direction type of every a line of described line of text, to determine and this line direction type of the described every a line of mark, first subordinate sentence direction type of direction type at once and this row is consistent.
In conjunction with two-way text content 1, analyzed, owing to only having a subordinate sentence, the direction of this subordinate sentence is the L type, so this line direction type is the L type.
In step S105, determine the also direction type of described each subordinate sentence of mark according to first strong participle direction type of each subordinate sentence, the direction type of subordinate sentence is consistent with the direction type of first strong direction participle of this subordinate sentence; If described subordinate sentence is without strong direction participle, when all participles all can't directions, it is consistent that subordinate sentence direction type is set to the direction type of being expert at described subordinate sentence;
In conjunction with two-way text content 1, analyzed, the strong participle of first of this subordinate sentence is car, and this participle direction type is the L type, therefore this subordinate sentence direction type is the L type.
In step S106, according to the character calligraph direction of the countries in the world language of storing in participle type definition module, determine the also direction type of each participle of mark; If the character writing direction that described participle comprises be from left to right the direction type of described participle be the L type, if the direction type that the character writing direction that described participle comprises is the described participle of right-to-left rule is the R type; For direction participle a little less than each, if the direction that the participle direction before and after it is same strong direction type arranges described weak direction participle be this strong direction type, if the participle direction before and after it is the type that the dissimilar direction that described weak direction participle is set is this participle place subordinate sentence; The continuous participle that will have the equidirectional type is merged into a participle;
In conjunction with two-way text content 1, analyzed, the present embodiment for convenience of description, has stipulated that its character writing direction of participle that lowercase forms is from left to right, and the direction of such participle is the L type; Stipulated that its character writing direction of participle that capitalization forms is from right to left, the direction of such participle is the R type; So participle car, the direction type of means is the L type, the direction type of participle CAR is the R type.For first space of weak direction participle, because participle car and means direction type before and after it are all the L types, so its type is also the L type; For the punctuate (.) of second space of weak direction participle and end of the sentence, due to the participle direction Type-Inconsistencies before and after it, so the participle type of the punctuate (.) of second space and end of the sentence is consistent with the direction type of its place subordinate sentence, be the L type; The continuative participle of last equidirectional type is merged, and has 3 participles [car means], [CAR] and [.].
In step S107, reset the order of each each subordinate sentence of level of described each row according to the type of each line direction, subordinate sentence is arranged by order reversion from right to left by original order arrangement or subordinate sentence.If the line direction type is the L direction, each subordinate sentence put in order constant; If the line direction type is the R direction, putting in order of each subordinate sentence will swap left and right, and subordinate sentence is arranged by order reversion from right to left.
Analyzed in conjunction with two-way text content 1, in row, only had a subordinate sentence, after rearrangement subordinate sentence order be still: car means CAR.
In step S108, reset the order of each participle of described each subordinate sentence according to the direction type of each subordinate sentence, participle is arranged by order reversion from right to left by original order arrangement or participle.If subordinate sentence direction type is the L direction, each participle put in order constant; If subordinate sentence direction type is the R direction, putting in order of each participle will swap left and right, and participle is arranged by order reversion from right to left.
In conjunction with two-way text content 1, analyzed, 6 participles were arranged in subordinate sentence originally, after being merged, step S107 have 3 participles to be respectively [car means], [CAR] and [.], analyze and know that the direction type of subordinate sentence is the L type from step S105, therefore putting in order of each participle is constant, after rearrangement minute word order, be: [car means] [CAR] [.]
In step S109, reset the order of each character of described each participle according to the direction type of each participle, character is arranged by order reversion from right to left by original order arrangement or character.If the direction type of participle is the L type, each character of participle put in order constant; If the direction type of participle is the R type, putting in order of each character of participle will swap left and right, and character is arranged by order reversion from right to left.
In conjunction with two-way text content 1, analyzed, the participle after completing steps S107 is: [car means] [CAR] [.] after rearrangement is: car means RAC.
The above is by the launched explanation that combines of the method for the bidirectional text distribution of a concrete two-way text and the present embodiment, and above-mentioned two-way text content 1 is that the direction type of a line of text is a concrete application of non-nesting in L type and content of text.
In order fully to explain the present invention, the two-way text that is non-nesting in R type and content of text below in conjunction with the direction type of a line of text describes.
Two-way text content 2:SONG NAME IS:yesterday once more.
Analyze two-way text content 2 according to step S103, this step task is to divide line of text; Owing to there not being matching symbol, so, without splitting line of text, the result after processing is still: SONG NAME IS:yesterday once more.
According to step S104, this step task is to determine the line direction type; Owing to only having a subordinate sentence, the direction of this subordinate sentence is the R type, so this line direction type is the R type.
According to step S105, this step task is to determine each subordinate sentence direction type; The strong participle of first of this subordinate sentence is SONG, and this participle direction type is the R type, therefore this subordinate sentence direction type is the R type.
According to step S106, this step task is to determine the participle direction type of each subordinate sentence, merges the continuative participle of equidirectional type; Participle SONG, NAME, the direction type of IS is the R type, weak direction participle (space and punctuate :) therebetween is the R type; Participle yesterday, once, the direction type of more is the L type, participle therebetween (space) direction type is the L type; Last participle (punctuate .) direction type is the R type; Carry out having 3 participles [SONG NAME IS :], [yesterday oncemore] and [.] after the participle merging;
According to step S107, this step task is the order of resetting each subordinate sentence; Due in row without matching symbol, only have a subordinate sentence, after resetting the subordinate sentence order be still: SONG NAME IS:yesterday once more.
According to step S108, this step task is the order of resetting each participle; Because the line direction type is the R type, therefore the order of participle will swap left and right, after rearrangement minute word order, be: [.] [yesterday once more] [SONG NAME IS :]
According to step S109, this step task is the order of resetting the character in each participle; After resetting character sequence, be: .yesterday once more:SI EMAN GNOS
In order further fully to explain the present invention, below in conjunction with the direction type of a line of text, be in L type and content of text, to have nested two-way text to describe.
", and expired.
Analyze two-way text content 3 according to step S103, this step task is to divide line of text; " },, and expired.}
According to step S104, this step task is to determine the line direction type; Because the direction of first subordinate sentence he said is the L type, so this line direction type is the L type.
According to step S105, this step task is to determine each subordinate sentence direction type; { the strong participle he of first of he said} is the L type to subordinate sentence, therefore this subordinate sentence direction is the L type; The strong participle I of first of " } is the R type, therefore this subordinate sentence direction is the R type; Subordinate sentence, the strong participle and of first of and expired.} is the R type, therefore this subordinate sentence direction is the L type.
According to step S106, this step task is to determine the participle direction type of each subordinate sentence, merges the continuative participle of equidirectional type; { the participle he of he said} and said direction type are the L type to subordinate sentence, and participle has a participle [he said] after merging, and is the L type; The participle I of " } is the R type, and need is the L type, and WATER is the R type, two spaces and exclamation mark! ]; Subordinate sentence, a participle [, and expired.] after merging, and expired.} participle is arranged, and be the L type.
According to step S107, this step task is the order of resetting each subordinate sentence; " } {, and expired.}
According to step S108, this step task is the order of resetting each participle; Because first and the 3rd subordinate sentence all only has a participle, without exchanging participle; ] [need] [I]; ] [need] [I] ["] [, and expired.]
According to step S109, this step task is the order of resetting the character in each participle; Result after rearrangement is: he said "! RETAW need I ", and expired.
In order further to explain application of the present invention, below in conjunction with the direction type of a line of text, be in R type and content of text, to have the two-way text of multinest to describe.
", and expired. '?
Analyze two-way text content 4 according to step S103, this step task is to divide line of text; Owing to there being a pair of single quotation marks in line of text, there is again a pair of double quotation marks the single quotation marks the inside, so line of text is divided into two-layer; ", and expired. ' }, {? }; " },, and expired.}.
According to step S104, this step task is to determine the line direction type; Because the direction of first subordinate sentence DID YOUSAY is the R type, therefore the direction of line of text is also the R type.
According to step S105, this step task is to determine each subordinate sentence direction type; { DID YOU SAY} is the R type; ", and expired. ' } and be the L type; ? it is the R type; Wherein the situation of the type of second each subordinate sentence of level and two-way text content 3 as mentioned above is consistent.
According to step S106, this step task is to determine the participle direction type of each subordinate sentence, merges the continuative participle of equidirectional type; ], [, and expired.], [? ]
According to step S107, this step task is the order of resetting each subordinate sentence; Because the line direction type is the R type, ground floor after resetting is:? { ' he said " I need WATER! ", and expired. ' } and { DID YOUSAY}; The second layer is reset:? { ' } { he said}{ " I need WATER! " } {, and expired.}{ ' } { DIDYOU SAY}
According to step S108, this step task is the order of resetting each participle; Result after operation is: [? ] ['] [he said] ["] [WATER! ] [need] [I] ["] [, and expired.] and ['] [DID YOU SAY]
According to step S109, this step task is the order of resetting the character in each participle; Is result after operation? ' he said "! RETAW need I ", and expired. ' YAS UOY DID
In sum, the present invention can complete the two-way text content is correctly processed, and can process the complicated two-way text information with multinest.By above embodiment, can know, the present invention is to take participle as word to the processing of two-way text, and without the direction type of each character of mark, only the type of mark participle, reduced taking of memory headroom; Owing to only participle being divided into to strong direction and weak direction, cancelled the classification of neutral direction, simplified processing procedure, improved the efficiency of method.
Fig. 2 is the detail flowchart of step S106 of the method for a kind of bidirectional text distribution of providing of the embodiment of the present invention, has shown the flow process of the judgement of participle direction type and participle merging in the subordinate sentence of the embodiment of the present invention.
Step S1601 is at first according to start address and the text size of the gain of parameter subordinate sentence character imported in the subordinate sentence memory module, so just can navigate to the first character of first participle of subordinate sentence, with for judging the direction type of character, thereby draw the direction type of participle; Text size is for judging whether the analytic process of subordinate sentence participle type completes.
After reading in a bebinning character, judgement and process steps S1602 have following three selections: if 1 character is space or punctuation mark, character forms a participle, and the participle direction is (unknown) undetermined, and adds in the participle array; If 2 characters are the L type characters such as English, read in follow-up character until run into non-L type character always, this reading in section character forms a participle and the participle type is the L type, adds in the participle array; If the R type characters such as 3 characters are Hebrew, read in follow-up character until run into non-R type character always, this reading in section character forms a participle and the participle type is the R type, adds in the participle array.
Read in one by one follow-up character, cycle criterion and process steps S1602; Whether, after all characters all run through, step S1603 calculates the length d len of participle array, for the type of participle (unknown) a little less than the subordinate sentence that judges following step, redefine and complete.
Step S1604 is by a current participle type curr_type, and first_type is as auxiliary variable for the row type, to complete redefining of weak participle.
After reading in sequentially a participle, judgement and process steps S1605 have following two selections: if 1 participle direction type is strongly-typed (not being unknown), remember that current participle type curr_type equals this participle direction type, if the type of now going is unknown, the type of going also equals this participle direction type; This operation is set to consistent with the direction type of first subordinate sentence of this row for going type; If 2 participle direction types are weak type (unknown), judge whether next participle direction type equals current participle type curr_type, if equate that the participle direction type before and after this weak participle of explanation is consistent, a little less than this, the participle type is set to current participle type curr_type; If next participle direction type is not equal to current participle type curr_type, the participle direction Type-Inconsistencies of these weak participle front and back is described, a little less than this, the participle type is set to unknown.
Repeat above-mentioned judgement and process steps S1605, until, after all participles all run through, the participle direction type that all direction types of step S1066 are unknown is set to row type first_type.Final step S1067 is merged into a new participle sequentially to the continuous participle with equidirectional type, and the direction type of new participle is constant.
In embodiments of the present invention, the continuation character of same type that can be definite by the character direction type merges a participle of formation, and the direction type of this participle of mark is the character direction type, each character direction type is not carried out again to mark and storage, processing procedure be take participle as unit, reduce taking of memory headroom, simplify processing procedure, raise the efficiency.For direction participle a little less than each, if the direction that the participle direction before and after it is same strong direction type arranges described weak direction participle be this strong direction type, if the participle direction before and after it is the type that the dissimilar direction that described weak direction participle is set is this participle place subordinate sentence; And the continuous participle that will have the equidirectional type is merged into a participle.
Fig. 3 shows the system architecture of a kind of bidirectional text distribution that the embodiment of the present invention provides.This system can be embedded in digital TV set-top box; For convenience of description, only show part related to the present invention here.
Text storage module 202, the described two-way text information received for storing described terminal receiver module 201; Described text storage unit 202 has recorded the reference position address of described two-way text information and the length of text simultaneously, with for localization of text with obtain text message;
Row splits module 203, for described two-way text information being split into to the line of text of a line a line; Row splits module 203 by obtaining the reference position address of described two-way text information, then the character that can hold according to every row, described two-way text information is split into to the line of text of a line a line.
Line of text memory module 204, split for storing described row the line of text that module splits described a line a line of 203.
Subordinate sentence splits module 205, for every a line of described line of text being split into to the subordinate sentence of different levels; Subordinate sentence splits module 205 according to whether existing the matching symbols such as quotation marks, bracket every a line of line of text to be split into to the branch of different levels in described line of text; If a pair of matching symbol is arranged by the left part of matching symbol, matching symbol inside in a line of text, the content of text of matching symbol right part splits, and forms 3 subordinate sentences; If matching symbol inside also is nested with matching symbol, continue to split the content of text of matching symbol inside.
Subordinate sentence memory module 206, split the subordinate sentence of the described different levels that module 205 splits for storing described subordinate sentence.
Participle type definition module 207, for storing countries in the world language and corresponding character calligraph direction thereof, to be used for judging the direction type of participle; In the process of judgement participle direction type, reading character, by this character direction of participle type definition module 207 definition, just can know the direction type of character one by one, the continuous strong direction type character of same type is combined, just can forms participle and obtain the type of direction.
Line direction type of process module 208, for the line direction type of every a line of determining described line of text; Each line direction type of line direction type of process module 208 described line of text is set to consistent with the type of first subordinate sentence of this row;
In the present embodiment, the line direction type is set following two effects: 1, the strong direction participle of nothing in a subordinate sentence, and in the time of can't determining the direction type of subordinate sentence, at this moment the direction type of this subordinate sentence just equals the line direction type that this subordinate sentence is expert at; 2, in the process of resetting the subordinate sentence order, order by line direction type decided subordinate sentence, if the line direction type be the L type subordinate sentence put in order constant, if the line direction type be the R type putting in order of subordinate sentence swap left and right, subordinate sentence is arranged in order according to order from right to left.
Subordinate sentence direction type of process module 209, for the direction type of the subordinate sentence of determining described different levels; The direction type of subordinate sentence direction type of process module 209 described subordinate sentences is set to consistent with the type of first strong subordinate sentence of this subordinate sentence.
In the present embodiment, subordinate sentence direction type is set following two effects is arranged: 1, when a participle be weak participle, when its direction type can't be determined by the participle before and after it, the direction type of at this moment being somebody's turn to do weak participle just equals the subordinate sentence direction type of this weak participle place subordinate sentence; 2, in the process of resetting minute word order, order by subordinate sentence direction type decided participle, if subordinate sentence direction type be the L type participle put in order constant, if subordinate sentence direction type be the R type putting in order of participle swap left and right, participle is arranged in order according to order from right to left.
Participle direction type of process module 210, for the direction type of the participle of determining described subordinate sentence; Concrete description is as described in step S1602.
The participle type merges module 211, the continuous participle that has the equidirectional type for merging.
Subordinate sentence reordering module 212, rearranged for the order of the subordinate sentence by described different levels; If the line direction type be the L type subordinate sentence put in order constant, if the line direction type be the R type putting in order of subordinate sentence swap left and right, subordinate sentence is arranged in order according to order from right to left.
Participle reordering module 213, rearranged for the order of the participle by described subordinate sentence; If subordinate sentence direction type be the L type participle put in order constant, if subordinate sentence direction type be the R type putting in order of participle swap left and right, participle is arranged in order according to order from right to left.
Character reordering module 214, rearranged for the order of the character by described participle; If the direction type of participle be the L type character put in order constant, if the direction type of participle be the R type putting in order of character swap left and right, character is arranged in order according to order from right to left.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any modifications of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.

Claims (4)

1. a method that is applicable to the bidirectional text distribution of display device, for automatically described bidirectional text distribution being become to the applicable form of display device, is characterized in that, comprises the following steps:
Step 1: the character quantity that can hold according to every row splits into line of text by described two-way text; According to the matching symbol existed in described line of text, described line of text is split into to subordinate sentence again;
Step 2: determine and the direction type of each described line of text of mark according to the direction type of first subordinate sentence of described line of text; Determine the also direction type of each described subordinate sentence of mark according to first strong direction participle of described subordinate sentence; The direction type of each participle in definite also described subordinate sentence of mark; Merge the participle with equidirectional type continuous in described subordinate sentence;
Step 3: according to the direction type, reset described line of text;
In described step 2, described direction type comprises that the character writing direction determined by languages is L type from left to right, and presentation direction is R type from right to left;
Described step 3 further comprises:
The order of each the described subordinate sentence under resetting according to the direction type of each described line of text;
The order of each the described participle under resetting according to the direction type of each described subordinate sentence;
The order of each character under resetting according to the direction type of each participle.
2. the method for bidirectional text distribution as claimed in claim 1, is characterized in that, in described step 2, the described subordinate sentence that setting can't the directions type is consistent with the direction type of the described line of text at its place; Setting can't the directions type described participle consistent with the described direction type of the described subordinate sentence at its place.
3. the method for bidirectional text distribution as claimed in claim 1, it is characterized in that, in described step 2, if the direction type of the adjacent described participle in the unascertainable described participle of some direction types both sides is identical, the direction type that this participle is set is also identical; If the direction type of the described participle that the unascertainable described participle of some direction types both sides are adjacent is not identical, the direction type that this participle is set is identical with the direction type of described participle place subordinate sentence.
4. a system that is applicable to the bidirectional text distribution of display device is characterized in that described system comprises:
Text storage module (202), for the described two-way text information before storage layout;
Row splits module (203), splits and is marked as line of text for the two-way text information before the described layout by described text storage module (202) storage, and store in line of text memory module (204);
Subordinate sentence splits module (205), for line of text described in described line of text memory module (204) is split into to the subordinate sentence of different levels, and stores in subordinate sentence memory module (206);
Participle type definition module (207), for storing the foundation of character calligraph direction corresponding to each languages as the direction type of judgement participle;
Participle direction type of process module (210), for according to described participle type definition module (207) thus determine that languages determine the direction type of described participle;
Subordinate sentence direction type of process module (209), for the direction type of the subordinate sentence of determining described different levels;
Line direction type of process module (208), for the line direction class of every a line of determining described line of text
Type;
The participle type merges module (211), the continuous participle that has the equidirectional type for merging;
Subordinate sentence reordering module (212), rearranged for the order of the subordinate sentence by described different levels;
Participle reordering module (213), rearranged for the order of the participle by described subordinate sentence;
Character reordering module (214), rearranged for the order of the character by described participle.
CN 200910190228 2009-09-17 2009-09-17 Bidirectional text distribution method and system suitable for display device Active CN102023965B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200910190228 CN102023965B (en) 2009-09-17 2009-09-17 Bidirectional text distribution method and system suitable for display device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200910190228 CN102023965B (en) 2009-09-17 2009-09-17 Bidirectional text distribution method and system suitable for display device

Publications (2)

Publication Number Publication Date
CN102023965A CN102023965A (en) 2011-04-20
CN102023965B true CN102023965B (en) 2013-12-18

Family

ID=43865276

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200910190228 Active CN102023965B (en) 2009-09-17 2009-09-17 Bidirectional text distribution method and system suitable for display device

Country Status (1)

Country Link
CN (1) CN102023965B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103186519B (en) 2011-12-31 2017-04-05 北大方正集团有限公司 Two-way composition method and equipment
CN104462034A (en) * 2013-09-17 2015-03-25 北大方正集团有限公司 Space processing method and system during bidirectional composition
CN104750671B (en) * 2013-12-25 2019-01-11 北大方正集团有限公司 A kind of two-way typesetting character insertion method and device based on full-page proof inverted sequence
CN108920433B (en) * 2018-07-17 2022-02-25 海信视像科技股份有限公司 Text display method, system and terminal
CN111178001B (en) * 2019-12-30 2023-08-29 南京汉隆科技有限公司 Bidirectional text mixed display method and device implemented on embedded network telephone

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6493735B1 (en) * 1998-12-15 2002-12-10 International Business Machines Corporation Method system and computer program product for storing bi-directional language data in a text string object for display on non-bidirectional operating systems
CN1918565A (en) * 2004-03-11 2007-02-21 国际商业机器公司 Systems and methods for identifying complex text in a presentation data stream
CN101441619A (en) * 2007-11-22 2009-05-27 国际商业机器公司 Method and device for improving user experience of reading BiDi document

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6493735B1 (en) * 1998-12-15 2002-12-10 International Business Machines Corporation Method system and computer program product for storing bi-directional language data in a text string object for display on non-bidirectional operating systems
CN1918565A (en) * 2004-03-11 2007-02-21 国际商业机器公司 Systems and methods for identifying complex text in a presentation data stream
CN101441619A (en) * 2007-11-22 2009-05-27 国际商业机器公司 Method and device for improving user experience of reading BiDi document

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
基于Java的维汉英文种办公软件的设计与实现;苏国平 等;《计算机工程与应用》;20060331(第9期);第83-85页 *
操作系统国际化基础的研究与实践;芮建武;《中国博士学位论文全文数据库》;20050708;第49-80页 *
芮建武.操作系统国际化基础的研究与实践.《中国博士学位论文全文数据库》.2005,第49-80页.
苏国平 等.基于Java的维汉英文种办公软件的设计与实现.《计算机工程与应用》.2006,(第9期),第83-85页.

Also Published As

Publication number Publication date
CN102023965A (en) 2011-04-20

Similar Documents

Publication Publication Date Title
CN102023965B (en) Bidirectional text distribution method and system suitable for display device
CN106933789B (en) Travel attack generation method and generation system
US20100131842A1 (en) Method for spell-checking location-bound words within a document
CN105808217A (en) Flow chart drawing method and system based on XML
CN110765753B (en) Document generation method, system, computer device and storage medium
JP2007010368A (en) Navigation device, navigation method, and navigation program
CN102169591A (en) Line selecting method and drawing method of text note in drawing
CN113359986B (en) Augmented reality data display method and device, electronic equipment and storage medium
Peirce et al. National capital branding: A comparative case study of Canberra, Australia and Wellington, New Zealand
CN106326233A (en) Address prompting method and device
US20040098248A1 (en) Voice generator, method for generating voice, and navigation apparatus
CN101539933A (en) Intelligent content direct technology
CN104657344A (en) Writing prompting system and method
CN115688341B (en) Distribution network thematic map layout method based on multi-tree collision detection and storage medium
CN102607585A (en) Configuration-file-based navigation voice broadcasting method and device
Raggett Getting started with HTML
JP5091549B2 (en) Document data processing device
CN110245339A (en) Article generation method, device, equipment and storage medium
CN101788303A (en) Method for displaying interest points and equipment thereof
CN102192748A (en) Map data, storage medium and navigation apparatus
JP5706634B2 (en) Route intersection extraction system and guide map generation system
CN111063003B (en) Mine distribution diagram manufacturing method and system
JP2006260076A (en) Document preparation support device
JP2005055261A (en) Navigation system, facility list display method, and program
JP5015907B2 (en) Map search server, map search system, and map search method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200628

Address after: 23 / F, Guangdong hi tech District

Patentee after: Shenzhen Konka Holding Group Co., Ltd

Address before: 518053 Konka Group Development Center, Huaqiao Town, Shenzhen, Guangdong

Patentee before: KONKA GROUP Co.,Ltd.