JP2012243121A - Data creation device, data creation program, recording medium and data creation method - Google Patents

Data creation device, data creation program, recording medium and data creation method Download PDF

Info

Publication number
JP2012243121A
JP2012243121A JP2011113302A JP2011113302A JP2012243121A JP 2012243121 A JP2012243121 A JP 2012243121A JP 2011113302 A JP2011113302 A JP 2011113302A JP 2011113302 A JP2011113302 A JP 2011113302A JP 2012243121 A JP2012243121 A JP 2012243121A
Authority
JP
Japan
Prior art keywords
document
data
electronic book
scanning line
data creation
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.)
Withdrawn
Application number
JP2011113302A
Other languages
Japanese (ja)
Inventor
Hitoshi Shimizu
清水  仁
Toshio Akaha
俊夫 赤羽
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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP2011113302A priority Critical patent/JP2012243121A/en
Publication of JP2012243121A publication Critical patent/JP2012243121A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a data creation device, a data creation program, a recording medium and a data creation method that enable determination of order of document elements in source data with fewer calculation amount.SOLUTION: A scanning line determination part 21 determines a scanning line on the basis of a portion concerning pages having multiple document elements in source document data, and a center point determination part 22 determines a center point of each rectangular document element stored in the source document data as rectangular data. A perpendicular line determination part 23 determines a perpendicular line, which passes through the center point of each document element and intersects with the scanning line perpendicularly, and an intersection point calculation part 24 calculates a coordinate of a point at the intersection of each perpendicular line with the scanning line. An ordering part 25 orders each document element on the basis of a coordinate value of the scanning line and each intersection point, and a sorting part 26 sorts each document element on the basis of the order of each document element determined by the ordering part 25.

Description

本発明は、データ作成装置、データ作成プログラム、記録媒体およびデータ作成方法に関し、例えば、電子書籍用データを作成する際に、作成元文書データ中に座標値で表記されている段落や画像に関して、段落、画像の並び順を決定する等できるデータ作成装置、データ作成プログラム、記録媒体およびデータ作成方法に関する。   The present invention relates to a data creation device, a data creation program, a recording medium, and a data creation method.For example, when creating electronic book data, with respect to paragraphs and images represented by coordinate values in creation source document data, The present invention relates to a data creation device, a data creation program, a recording medium, and a data creation method that can determine the order of paragraphs and images.

近年、PCや専用端末上で電子書籍を読むための技術が急速に普及している。そのため、電子書籍を作成するためのオーサリングツールも開発されている。オーサリングツールでは、Word形式、InDesign形式など、既存の文書作成、編集アプリケーション形式のデータを取り込んで電子書籍を作成する。   In recent years, a technique for reading an electronic book on a PC or a dedicated terminal has been rapidly spread. Therefore, authoring tools for creating electronic books have also been developed. The authoring tool creates electronic books by importing existing document creation and editing application format data such as Word and InDesign formats.

既存の文書作成、編集アプリケーション上での段落、画像は、テキストフレームと呼ばれる形式の矩形データとして保持されており、各テキストフレームごとに、作成元データのページ内での位置情報や縦書き、横書き属性、フォントの大きさや種類の属性が決定されている。ただし、テキストフレームはページ中のレイアウトに関する位置情報は持っていても、テキストフレーム間の順序に関する情報が無いため、電子書籍化した場合に想定していた順序と異なったデータが作成されて正しく表示できなくなる場合がある。したがって、正しい電子書籍を作成するには、テキストフレーム間の順序を明確にする必要がある。   Paragraphs and images in existing document creation and editing applications are held as rectangular data in a format called text frames. For each text frame, position information, vertical writing, and horizontal writing within the page of the original data are created. Attributes, font size and type attributes are determined. However, even though the text frame has position information about the layout in the page, there is no information about the order between the text frames, so data different from the order that was assumed when converted to an e-book is created and displayed correctly. It may not be possible. Therefore, in order to create a correct electronic book, it is necessary to clarify the order between the text frames.

ここで、従来、段落や画像の順序を決定する技術として、光学文字読取技術(OCR: Optical Character Reader)でレイアウト作成時に段落、画像の並び順を設定する発明が開示されている。   Conventionally, as a technique for determining the order of paragraphs and images, an invention has been disclosed in which the arrangement order of paragraphs and images is set at the time of layout creation by an optical character reader (OCR) technique.

例えば、特開2010−176364号公報(特許文献1)には、PDFでの段落の順番付けを想定して、まず行ごとの座標を参照して、段落に相当するブロックとして行の集合体を作成し、さらに、ブロック間の順序としてブロック間の距離を考慮して、最終的に文書中の段落、画像の順序を決定する技術が開示されている。   For example, in Japanese Patent Application Laid-Open No. 2010-176364 (Patent Document 1), assuming the ordering of paragraphs in PDF, first, by referring to the coordinates for each row, a set of rows as a block corresponding to the paragraph is obtained. A technique is disclosed in which the order of paragraphs and images in a document is finally determined in consideration of the distance between blocks as the order between blocks.

また、特開2009−251872(特許文献2)には、PDFのような電子ドキュメントを想定して、OCRのように矩形抽出により文字抽出し、抽出した文字から行抽出し、さらに、抽出した行から類似した行をまとめて段落を作成して、段落を並べ変えることで、文書中の段落の順序を決定する技術が開示されている。   Further, in Japanese Patent Application Laid-Open No. 2009-251872 (Patent Document 2), assuming an electronic document such as PDF, characters are extracted by rectangular extraction like OCR, lines are extracted from the extracted characters, and the extracted lines are further extracted. A technique for determining the order of paragraphs in a document by creating a paragraph by grouping similar lines and rearranging the paragraphs is disclosed.

また、特開平11−2500411号公報(特許文献3)では、特許文献2に記載の発明と同様に文字抽出、行抽出、段落抽出を行い、段落間の順序付けにおいては、段落内の文の間の意味的、文書構造との関連性を見ることで段落、画像の順序を決める技術が開示されている。   In Japanese Patent Application Laid-Open No. 11-2500411 (Patent Document 3), character extraction, line extraction, and paragraph extraction are performed in the same manner as the invention described in Patent Document 2. A technique for determining the order of paragraphs and images by looking at the relationship between the meaning and the document structure is disclosed.

従来の技術では、文字コードが取得できないPDFや紙に印刷された文書を対象としており、矩形抽出による文字抽出、抽出した文字をつなげ合わせての行抽出など、光学文字読取技術(OCR: Optical Character Reader)で行われている手法を主に用いて、文字、行、段落を識別し、段落レベルでの順序付けを行っている。   Conventional technologies target PDF and paper printed documents where character codes cannot be obtained. Optical character reading technology (OCR: Optical Character) such as character extraction by rectangle extraction, line extraction by combining extracted characters, etc. Reader) is mainly used to identify characters, lines and paragraphs, and order them at the paragraph level.

また、特許文献3のように段落内の文間の意味的な関連性や段落の構造を把握して段落の順番を決めるなど、段落の順序決定においても複雑な処理を行っている。   Further, as in Patent Document 3, complicated processing is also performed in determining the order of paragraphs, such as determining the order of paragraphs by grasping the semantic relationship between the sentences in the paragraph and the structure of the paragraphs.

特開2010−176364号公報JP 2010-176364 A 特開2009−251872号公報JP 2009-251872 A 特開平11−2500411号公報Japanese Patent Laid-Open No. 11-2500411

しかしながら、上記特許文献に挙げられていた手法では、OCRの技術を用いたり、段落内部の文書の意味解析、段落間の意味的なつながりの解析、文書全体の構造解析を行って、段落、画像の順序を決定するため、動作時に時間を要するという問題がある。
電子書籍をオーサリングツールで作成する場合、レイアウト等を決定し、電子書籍を作成し、表示させて結果を確認するという動作を何度も繰り返すため、各動作に関して時間がかかる手法は、電子書籍作成時の効率低下につながる。
However, in the method cited in the above patent document, the OCR technique is used, the semantic analysis of the document inside the paragraph, the analysis of the semantic connection between the paragraphs, the structural analysis of the whole document, the paragraph, the image There is a problem that it takes time during operation to determine the order.
When creating an e-book with an authoring tool, the method of determining the layout, etc., creating the e-book, displaying it, and checking the results is repeated many times. This leads to a reduction in efficiency.

ここで、電子書籍の元となる作成元データでは、画像、段落などはXML等のタグを用いてテキストフレームとして区別されていることが多く、実際に電子書籍端末上で表示する文字はすでに文字コード化されているため、OCRで用いられている手法での文字認識、行抽出は不要である。   Here, in the creation source data that is the source of an electronic book, images, paragraphs, and the like are often distinguished as text frames using tags such as XML, and the characters that are actually displayed on the electronic book terminal are already characters. Since it is coded, character recognition and line extraction by the method used in OCR are unnecessary.

ただし、前述のように電子書籍用のデータでは、レイアウトとしてテキストフレームの位置情報や縦書き、横書きや閉じ方向の情報はあるものの、段落、画像を表すテキストフレーム同士の表示順序に関する情報はないため、テキストフレーム間の順序付けは必要である。単純にテキストフレームの座標値の順にしていては、段落、画像の表記順が不適当になり、段落内容が逆になって表示される可能性があるためである。   However, as described above, in the data for electronic books, although there is text frame position information and vertical writing, horizontal writing, and closing direction information, there is no information about the display order of text frames representing paragraphs and images. Ordering between text frames is necessary. This is because if the text frame coordinate values are simply arranged in order, the paragraph and image notation order may be inappropriate, and the paragraph contents may be displayed in reverse.

そこで、本発明の課題は、より少ない計算量で作成元データ中の書類要素の順序を決定することが可能なデータ作成装置、データ作成プログラム、記録媒体およびデータ作成方法を提供することにある。   SUMMARY OF THE INVENTION An object of the present invention is to provide a data creation apparatus, a data creation program, a recording medium, and a data creation method that can determine the order of document elements in creation source data with a smaller amount of calculation.

また、本発明の課題は、例えば、電子書籍作成時の効率を落とすことなく、書類要素の配置の誤りをなくすことが可能なデータ作成装置、データ作成プログラム、記録媒体およびデータ作成方法を提供することにある。   Another object of the present invention is to provide a data creation device, a data creation program, a recording medium, and a data creation method capable of eliminating an error in the arrangement of document elements without reducing the efficiency at the time of creating an electronic book, for example. There is.

上記課題を解決するため、この発明の電子書籍のデータ作成装置は、
複数の文書要素を有するページを含む電子書籍の作成元文書データの上記各文書要素が持つ属性情報と、上記作成元文書データの上記ページの書式を表す情報とに基づいて、上記ページ上の上記各文書要素を順序付けする順序付手段と、
上記順序付手段が順序付けした上記各文書要素の順序に基づいて、上記各文書要素を並び替える並替手段と
を備えることを特徴としている。
In order to solve the above-described problems, an electronic book data creation device of the present invention includes:
Based on the attribute information held by each document element of the creation source document data of the electronic book including the page having a plurality of document elements and the information indicating the format of the page of the creation source document data, the above on the page An ordering means for ordering each document element;
The reordering means reorders the document elements based on the order of the document elements ordered by the ordering means.

上記文書要素の例としては、例えば、段落と、画像とがある。   Examples of the document element include a paragraph and an image.

本発明によれば、順序付手段が、各文書要素が持つ属性情報と、作成元文書データのページの書式を表す情報とに基づいて、ページに対して各文書要素を順序付けするようになっているから、文書要素の表記順が不適当になり、段落内容が逆になる等、文書要素の表示順序が逆になることを抑制できる。   According to the present invention, the ordering unit orders each document element with respect to the page based on the attribute information of each document element and the information representing the page format of the original document data. Therefore, it is possible to prevent the display order of the document elements from being reversed, for example, the display order of the document elements is inappropriate and the paragraph contents are reversed.

例えば、電子書籍用のデータにおいても、一般的に左閉じ横書きの文書の場合は、左上から右下に、右閉じ縦書きの文書の場合は、右上から左下の方へ読み進めることになる。これは普通の読書と同様である。したがって、例えば、テキストフレームに含まれる文書の閉じ方向、縦書き横書きの情報に応じて順序付けする方向を決め、テキストフレームの配置を参照すれば、段落、画像の順序を決定することができる。また、特に、単純にテキストフレームの座標値だけを見て並べるだけではなく、テキストフレームが示す矩形の大きさ、テキストフレームの配置、ページ内のレイアウト、テキストフレーム間の属性の比較を含めてテキストフレームの順序を決定すると、間違いがない順序付けを行うことができる。   For example, in the case of electronic book data, generally, a left-closed horizontal writing document is read from the upper left to the lower right, and a right-closed vertical writing document is read from the upper right to the lower left. This is similar to ordinary reading. Therefore, for example, the order of paragraphs and images can be determined by determining the closing direction of documents included in a text frame, the direction of ordering according to vertical writing and horizontal writing information, and referring to the layout of the text frame. In particular, text is not only arranged by simply looking at the coordinate values of the text frame, but also includes the size of the rectangle indicated by the text frame, the layout of the text frame, the layout within the page, and the attribute comparison between the text frames. Once the frame order is determined, ordering can be performed without error.

また、一実施形態では、
上記順序付手段は、上記作成元文書データに基づいて、上記ページの書式を表すデータが左閉じかつ横書きの書式であることを認識すると、上記作成元文書データの上記ページ上の左上の文書要素の順序を、その左上の文書要素よりも右下に位置する文書要素よりも上位に順序付けする。
In one embodiment,
When the ordering unit recognizes that the data representing the format of the page is a left-closed and horizontal format based on the creation source document data, the document element at the upper left on the page of the creation source document data Are ordered higher than the document element located at the lower right of the upper left document element.

また、一実施形態では、
上記順序付手段は、上記作成元文書データに基づいて、上記ページの書式を表すデータが右閉じかつ縦書きの書式であることを認識すると、上記作成元文書データの上記ページ上の右上の文書要素の順序を、その右上の文書要素よりも左下に位置する文書要素よりも上位に順序付けする。
In one embodiment,
When the ordering unit recognizes that the data representing the format of the page is a right-closed and vertical format based on the creation source document data, the top right document on the page of the creation source document data The order of the elements is higher than the document element located at the lower left of the upper right document element.

また、一実施形態では、
上記順序付手段は、上記複数の文書要素の順序付けを行うとき、上記作成元文書データの各文書要素の配置情報および分布情報のうちの少なくとも一方に基づいて、複数の順序付けを行うことができる算出法のうちから一の上記算出法を選択して、その選択した上記一の算出法に基づいて処理を行う。
In one embodiment,
The ordering means, when ordering the plurality of document elements, is capable of performing a plurality of orderings based on at least one of arrangement information and distribution information of each document element of the creation source document data One calculation method is selected from the methods, and processing is performed based on the selected one calculation method.

また、一実施形態では、
上記順序付手段は、上記属性情報が同一または予め定められた関係にある二以上の上記文書要素を、連続して順序付けする。
In one embodiment,
The ordering unit sequentially orders two or more document elements having the same or predetermined relationship with the attribute information.

また、一実施形態では、
上記電子書籍は、2ページに跨る上記文書要素を有し、
上記順序付手段は、2ページに跨る上記文書要素を認識すると、上記2ページ内に存在する上記文書要素の順序付けを、上記2ページの見開きの単位で行う。
In one embodiment,
The electronic book has the document element extending over two pages,
When the ordering unit recognizes the document elements extending over two pages, the ordering unit performs ordering of the document elements existing in the two pages in units of spread of the two pages.

また、一実施形態では、
上記作成元文書データ中の上記ページに関する部分に基づいて、走査線を決定する走査線決定手段と、
上記作成元文書データにおいて矩形データとして保存されている矩形状の各文書要素の中心点を決定する中心点決定手段と、
上記各文書要素の上記中心点を通過すると共に、上記走査線に垂直に交わる垂線を決定する垂線決定手段と、
上記各垂線と、上記走査線との交点の座標を算出する交点算出手段と
を備え、
上記順序付手段は、上記各交点の座標値に基づいて、上記各文書要素を順序付けする。
In one embodiment,
A scanning line determining means for determining a scanning line based on a portion related to the page in the original document data;
Center point determination means for determining a center point of each rectangular document element stored as rectangular data in the creation source document data;
Perpendicular determination means for determining a perpendicular that passes through the center point of each document element and intersects the scanning line perpendicularly;
Intersection calculation means for calculating the coordinates of the intersection of each perpendicular and the scanning line,
The ordering means orders the document elements based on the coordinate values of the intersections.

また、一実施形態では、
上記走査線決定手段は、上記作成元文書データに基づいて、上記ページが、左閉じかつ横書きであることを認識すると、上記ページの左上側から右下側に延在する走査線を決定する。
In one embodiment,
The scanning line determining means, when recognizing that the page is closed to the left and horizontal writing based on the creation source document data, determines the scanning line extending from the upper left side to the lower right side of the page.

また、一実施形態では、
上記走査線決定手段は、上記作成元文書データに基づいて、上記ページが、右閉じかつ縦書きであることを認識すると、上記ページの右上側から左下側に延在する走査線を決定する。
In one embodiment,
When the scanning line determining unit recognizes that the page is right-closed and vertically written based on the creation source document data, the scanning line determining unit determines a scanning line extending from the upper right side to the lower left side of the page.

また、一実施形態では、
上記走査線決定手段は、上記作成元文書データの上記各文書要素の配置に関するデータに基づいて、上記走査線が通過する座標の一点を決定する。
In one embodiment,
The scanning line determining means determines one point of coordinates through which the scanning line passes based on data relating to the arrangement of the document elements of the creation source document data.

また、一実施形態では、
上記走査線決定手段は、上記作成元文書データの上記各文書要素の配置に関するデータに基づいて、上記走査線の傾きを決定する。
In one embodiment,
The scanning line determination means determines the inclination of the scanning line based on data relating to the arrangement of the document elements of the creation source document data.

また、一実施形態では、
上記順序付手段は、上記交点間の距離が、予め定められた距離以下である場合に、その各交点を通っている上記垂線が中心点を通っている上記文書要素の角の座標の情報に基づいて、上記各交点を通っている上記垂線が中心点を通っている上記文書要素間の順序付けを行う。
In one embodiment,
When the distance between the intersections is equal to or less than a predetermined distance, the ordering unit uses the information on the coordinates of the corners of the document element through which the perpendicular passing through each intersection passes through the center point. Based on the ordering, the document elements in which the perpendicular passing through the intersections pass through the center point are arranged.

また、一実施形態では、
上記走査線決定手段は、複数の走査線を決定し、
上記垂線決定部は、上記走査線毎に、上記垂線を決定すると共に、上記交点算出手段は、上記走査線毎に、上記各垂線と上記走査線との交点の座標を算出し、
上記順序付手段は、上記走査線毎に求められた交点に基づいて、一の走査線を決定し、その一の走査線に基づいて、上記各文書要素を順序付けする。
In one embodiment,
The scanning line determining means determines a plurality of scanning lines,
The perpendicular determining unit determines the perpendicular for each of the scanning lines, and the intersection calculation means calculates the coordinates of the intersection of each perpendicular and the scanning line for each of the scanning lines,
The ordering means determines one scanning line based on the intersection obtained for each scanning line, and orders the document elements based on the one scanning line.

また、本発明のデータ作成プログラムは、
複数の文書要素を有するページを含む電子書籍の作成元文書データの上記各文書要素の位置情報と、上記作成元文書データの書式情報とに基づいて上記複数の文書要素を順序付けする順序付けステップと、
上記順序付けステップで順序付けされた上記各文書要素の順序に基づいて、上記各文書要素を並び替える文書要素並替ステップと
をコンピュータに実行させることを特徴としている。
Further, the data creation program of the present invention includes:
An ordering step for ordering the plurality of document elements based on position information of each document element of the creation source document data of the electronic book including a page having a plurality of document elements and format information of the creation source document data;
A document element rearranging step for rearranging the document elements based on the order of the document elements ordered in the ordering step is executed by a computer.

また、本発明のコンピュータ読取可能な記録媒体は、
本発明のデータ作成プログラムが記録されていることを特徴としている。
The computer-readable recording medium of the present invention is
The data creation program of the present invention is recorded.

また、本発明のデータ作成方法は、
複数の文書要素を有するページを含む電子書籍の作成元文書データの上記各文書要素の位置情報と、上記作成元文書データの書式とに基づいて上記複数の文書要素を順序付けし、
順序付けされた上記各文書要素の順序に基づいて、上記各文書要素を並び替えて、電子書籍を作成することを特徴としている。
Further, the data creation method of the present invention includes:
Ordering the plurality of document elements based on position information of each document element of the creation source document data of an electronic book including a page having a plurality of document elements and a format of the creation source document data;
The electronic book is created by rearranging the document elements based on the ordered order of the document elements.

本発明によれば、電子書籍を作成する際に段落、画像の並び順を修正することで、段落、画像が間違った順番で電子書籍を作成されることを防げるため、電子データ作成の効率化が見込める。   According to the present invention, when creating an electronic book, by correcting the order of paragraphs and images, it is possible to prevent electronic books from being created in the wrong order of paragraphs and images. Can be expected.

また、最終的に人間が確認し、手で修正する場合でも、段落、画像の順序間違いを一部訂正できていれば、修正する箇所を減らすことができるため、電子書籍作成時の効率化が可能になる。   In addition, even when humans finally check and correct manually, if the partial order of paragraphs and images can be corrected partially, the number of corrections can be reduced, so the efficiency at the time of e-book creation can be improved. It becomes possible.

本発明の一実施形態のデータ作成装置におけるデータ作成の基本的な考えを説明するための図である。It is a figure for demonstrating the basic idea of the data preparation in the data preparation apparatus of one Embodiment of this invention. テキストフレームのレイアウトを示すXML表記の例を示す図である。It is a figure which shows the example of the XML description which shows the layout of a text frame. テキストフレームのレイアウトを示すXML表記の例を示す図である。It is a figure which shows the example of the XML description which shows the layout of a text frame. テキストフレーム中のテキストの縦書き、横書きを示すXML表記の例を示す図である。It is a figure which shows the example of the XML description which shows the vertical writing and horizontal writing of the text in a text frame. 本発明の一実施形態のデータ作成装置のCPUに形成される演算を行う各部を示すブロック図である。It is a block diagram which shows each part which performs the calculation formed in CPU of the data preparation apparatus of one Embodiment of this invention. データ作成装置の動作手順を示すフローチャートを示す図である。It is a figure which shows the flowchart which shows the operation | movement procedure of a data preparation apparatus. 本発明の他の実施形態のデータ作成装置におけるデータ処理のフローチャートを示す図であり、複数の走査線を用いてデータ処理を行う場合のフローチャートを示す図である。It is a figure which shows the flowchart of the data process in the data preparation apparatus of other embodiment of this invention, and is a figure which shows the flowchart in the case of performing a data process using a some scanning line. 本発明の一実施形態のデータ作成装置の走査線の設定のしかたを説明する図であり、テキストフレームのレイアウトが右閉じ縦書きのものになっている場合に好適に採用できる走査線の設定のしかたを説明する図である。It is a figure explaining how to set the scanning line of the data creation apparatus of an embodiment of the present invention, the setting of the scanning line that can be suitably adopted when the layout of the text frame is a right-closed vertical writing It is a figure explaining how. 本発明の一実施形態のデータ作成装置の走査線の設定のしかたを説明する図であり、対角線以外の走査線の設定のしかたを説明する図である。It is a figure explaining the setting method of the scanning line of the data preparation apparatus of one Embodiment of this invention, and is a figure explaining the setting method of scanning lines other than a diagonal line. 本発明の一実施形態のデータ作成装置の走査線の設定のしかたを説明する図である。It is a figure explaining the setting method of the scanning line of the data preparation apparatus of one Embodiment of this invention. 段落がページ境界を跨いでいる場合の処理の一例を説明するための図である。It is a figure for demonstrating an example of a process when a paragraph straddles a page boundary.

以下、本発明を図示の形態により詳細に説明する。   Hereinafter, the present invention will be described in detail with reference to the drawings.

図1は、本発明の一実施形態のデータ作成装置におけるデータ作成の基本的な考えを説明するための図であり、書籍1ページのレイアウトを示す図である。   FIG. 1 is a diagram for explaining the basic idea of data creation in the data creation device of one embodiment of the present invention, and is a diagram showing the layout of one page of a book.

ここで、説明は、1ページ分の作成元データに関して行い、図1においては、文書要素の一例としての段落や画像を示すテキストフレームを矩形の領域で表現している。尚、ページ上のレイアウトは横書きで三段組みの表記を想定している。   Here, the description will be made with respect to the creation source data for one page. In FIG. 1, a text frame indicating a paragraph or an image as an example of a document element is represented by a rectangular area. Note that the layout on the page assumes horizontal writing and a three-column notation.

データ作成に関し、このデータ作成装置は、先ず、作成元データ1ページ分のレイアウトデータに対して、走査線および中心点を設定した上で、各レイアウトデータの中心点から走査線への垂線を求めるようになっている。   Regarding data creation, this data creation device first sets a scan line and a center point for layout data for one page of creation source data, and then obtains a perpendicular line from the center point of each layout data to the scan line. It is like that.

そして、走査線と、各垂線との交点に基づいて、読み進める方向を決定して、左上から右下へと探索して、段落の順番を決めるようになっている。ここで、図1の例では段落2と段落3の順番が正解とする順序と入れ替わるため、補正を行う必要がある。この補正については、後に説明する。   Then, based on the intersection of the scanning line and each perpendicular line, the reading direction is determined, the search is performed from the upper left to the lower right, and the order of the paragraphs is determined. Here, in the example of FIG. 1, the order of paragraphs 2 and 3 is switched to the order of correct answers, and thus correction is necessary. This correction will be described later.

図2A,2Bは、作成元データの一例を示す図であり、XMLの形式で書かれているファイルから一部を抜き出したものである。   2A and 2B are diagrams illustrating an example of the creation source data, which are extracted from a file written in the XML format.

図2A,2BのXMLの形式のデータは、テキストフレームと呼ばれる、図1におけるテキストがある一の段落の矩形の大きさ、位置等を指定している。図1のようなテキストフレームのレイアウトは、図2A,2Bのテキストフレームに関する情報を参照することで作成できるようになっている。   The data in the XML format of FIGS. 2A and 2B designates the size, position, etc., of a rectangle of a paragraph where the text in FIG. 1 is called a text frame. The text frame layout as shown in FIG. 1 can be created by referring to the information on the text frames shown in FIGS. 2A and 2B.

図3は、図2A,2Bのテキストフレーム内部で表示されるテキストの実体を定義している部分を、別のXMLファイルから抜き出したものである。図3を参照して、<Content>タグで囲まれたテキストが、実際に電子書籍として表示されるテキストの部分である。また、StoryOrientation="Horizontal"の部分で、テキストフレーム内のテキストを横書きにすることを示している。尚、縦書きの場合は、この部分が、StoryOrientation="Vertical"となっている。   FIG. 3 is a diagram in which a part defining a text entity displayed in the text frame of FIGS. 2A and 2B is extracted from another XML file. With reference to FIG. 3, the text enclosed by the <Content> tag is the part of the text actually displayed as an electronic book. In the section of StoryOrientation = "Horizontal", the text in the text frame is written horizontally. In the case of vertical writing, this portion has StoryOrientation = "Vertical".

図2A,2Bや、図3のXMLの情報から、図1の概略図のように、テキストフレームがページ内のどの部分にあって、フォントの種類・大きさ、テキストフレーム内のテキストの縦書き、横書きを知ることができる。作成元データは、段落の分だけ図2A,2Bや図3で示されたタグ表記を持っている。   2A and 2B and the XML information in FIG. 3, as shown in the schematic diagram in FIG. 1, the text frame is located in any part of the page, the font type and size, and the vertical writing of the text in the text frame. , You can know horizontal writing. The creation source data has the tag notation shown in FIGS. 2A and 2B and FIG. 3 for the paragraph.

図4は、本発明の一実施形態のデータ作成装置のCPU10に形成される演算を行う各部を示すブロック図である。   FIG. 4 is a block diagram illustrating each unit that performs a calculation formed in the CPU 10 of the data creation device according to the embodiment of the present invention.

このデータ作成装置は、CPU(Central Processing Unit)10と、プログラムおよびデータを格納するメモリ11と、外部機器とデータを入出力するためのI/F(Interface)(図示せず)とを備える。図4に示すように、CPU10には、走査線決定部21と、中心点決定部22と、垂線決定部23と、交点算出部24と、順序付部25と、並替部26とが形成されるようになっている。上記各部21〜26は、適宜メモリ11にアクセスでき、メモリ11に収納されている計算プログラムを用いることができるようになっている。図4に示すように、作成元文書データが入力データとして、CPU10に入力されると、CPU10上に形成される各部21〜26で、演算が行われて、CPU10から電子書籍データが出力されるようになっている。   This data creation device includes a CPU (Central Processing Unit) 10, a memory 11 for storing programs and data, and an I / F (Interface) (not shown) for inputting / outputting data to / from an external device. As shown in FIG. 4, the CPU 10 includes a scanning line determination unit 21, a center point determination unit 22, a perpendicular line determination unit 23, an intersection calculation unit 24, an ordering unit 25, and a rearrangement unit 26. It has come to be. Each of the units 21 to 26 can access the memory 11 as appropriate, and can use a calculation program stored in the memory 11. As shown in FIG. 4, when the creation source document data is input as input data to the CPU 10, calculations are performed by the units 21 to 26 formed on the CPU 10, and electronic book data is output from the CPU 10. It is like that.

図5は、このデータ作成装置の動作手順を示すフローチャートを示す図である。このデータ作成装置は、作成元データ内の各ページごとに、次に説明するステップS1からステップS6の処理を行うようになっている。   FIG. 5 is a flowchart showing the operation procedure of the data creation apparatus. This data creation apparatus performs the processing from step S1 to step S6 described below for each page in the creation source data.

このデータ作成装置は、ステップS1では、図2に例示したタグを参照して、ページ内の全てのテキストフレームの位置、大きさを取得するようになっている。上述のように、図2の例は、テキストフレームを示すタグの一つを抜き出したものであるが、実際には、ページごとに1以上のテキストフレームのタグが存在する。   In step S1, the data creation device refers to the tags illustrated in FIG. 2 and acquires the positions and sizes of all text frames in the page. As described above, the example of FIG. 2 is obtained by extracting one of the tags indicating a text frame, but actually, there are one or more text frame tags for each page.

ステップS2では、図3で一例を開示したような、テキストフレーム内部で表示されるテキストの実体を定義している部分を参照して、各テキストフレームに対応する、表示されるテキストの内容、縦書き、横書きの情報を取得するようになっている。また、続いて、ステップS3では、対象ページに走査線を設定するになっている。ステップS3において、図1に示す例では、走査線を、対象ページの対角線として設定する。尚、図1に示す左閉じ横書きの想定の例では、読み進める順番が左上から右下方向になるため、走査線を左上から右下に延在する対角線としたが、走査線が対角線である必要はない。詳しくは、ステップS3では、テキストフレームの属性、ページ上での分布に応じて、走査線を引く位置、角度を変えることができる。この実施形態では、ステップS1〜S3は、走査線決定部21が行うようになっている。   In step S2, referring to the part defining the substance of the text displayed inside the text frame as disclosed in the example in FIG. 3, the contents of the displayed text corresponding to each text frame, the vertical The information of writing and horizontal writing is acquired. In step S3, a scanning line is set for the target page. In step S3, in the example shown in FIG. 1, the scanning line is set as a diagonal line of the target page. In the example of assumed left-closed horizontal writing shown in FIG. 1, since the reading order is from the upper left to the lower right, the scanning line is a diagonal line extending from the upper left to the lower right, but the scanning line is a diagonal line. There is no need. Specifically, in step S3, the position and angle at which the scanning line is drawn can be changed according to the attribute of the text frame and the distribution on the page. In this embodiment, steps S1 to S3 are performed by the scanning line determination unit 21.

次に、ステップS4では、中心線決定部22が、対象ページ中の各テキストフレームの中心点の座標を求める。また、ステップS5では、垂線決定部23が、中心線決定部22がステップS4で求めたページ中の各テキストフレームの中心点から、ステップS3で走査線決定部21が設定した走査線への、垂線を設定するようになっており、その後、交点算出部24が、各垂線と走査線との交点を求めるようになっている。   Next, in step S4, the center line determination unit 22 obtains the coordinates of the center point of each text frame in the target page. In step S5, the perpendicular line determination unit 23 converts the center point of each text frame in the page obtained by the center line determination unit 22 in step S4 to the scanning line set by the scanning line determination unit 21 in step S3. A perpendicular line is set, and then the intersection calculation unit 24 obtains an intersection point between each perpendicular line and the scanning line.

ステップS6では、順序付部25が、ステップS5で交点算出部24が算出した各交点の、走査線上での並びにより、対象ページ内でのテキストフレームの対象ページでの順序を決定するようになっている。尚、順序は、この実施形態のように、交点の並びから機械的に決定することもできるが、対象ページの状況、交点間の位置関係等も考慮してテキストフレームの順序を決めることもできる。   In step S6, the ordering unit 25 determines the order of the text frames in the target page in the target page based on the arrangement of the intersections calculated by the intersection calculation unit 24 in step S5 on the scanning line. ing. Note that the order can be determined mechanically from the arrangement of intersections as in this embodiment, but the order of the text frames can also be determined in consideration of the status of the target page, the positional relationship between the intersections, and the like. .

図6は、本発明の他の実施形態のデータ作成装置におけるデータ処理のフローチャートを示す図である。このデータ作成装置は、図5にデータ処理のフローチャートを示す上記実施形態のデータ処理装置との比較において、一つの対象ページに複数の走査線を設定する点が異なり、走査結果の良し悪しを走査線ごとに評価して、最適な走査結果を得た走査線を用いるという点が異なる。   FIG. 6 is a diagram showing a flowchart of data processing in the data creation device of another embodiment of the present invention. This data creation device differs from the data processing device of the above-described embodiment shown in the flowchart of data processing in FIG. 5 in that a plurality of scanning lines are set for one target page, and the scanning result is scanned for good or bad. The difference is that a scanning line obtained by evaluating each line and obtaining an optimum scanning result is used.

ここで、走査線の走査結果を得るための評価基準としては、各中心点から走査線に引いた垂線の長さの合計が最も短い走査線を選択するという評価基準がある。また、他の評価基準としては、各垂線と走査線の各交点が均等に分布している走査線(垂線間の長さのばらつきが最も少ない場合)を選択するという評価基準がある。また、更なる評価基準としては、各交点の順に沿ってテキストフレームの順序を仮決定し、その順序に沿って各テキストフレームの中心線間を結び、線の長さの合計が最も短くなる走査線を選択するという評価基準がある。図1の例では、テキストフレーム内部のテキストが横書きの場合で、走査線を、左上から右下に引いている。尚、この実施形態では、走査線決定部が、複数の走査線のうちから一の走査線を決定するようになっている。   Here, as an evaluation criterion for obtaining the scanning result of the scanning line, there is an evaluation criterion for selecting the scanning line having the shortest sum of the lengths of the perpendicular lines drawn from the respective center points to the scanning line. In addition, as another evaluation criterion, there is an evaluation criterion of selecting a scanning line in which each intersection of each perpendicular line and each scanning line is evenly distributed (when the variation in length between perpendicular lines is the smallest). Further, as a further evaluation standard, the order of the text frames is tentatively determined along the order of the intersections, the center lines of the text frames are connected along the order, and the total of the lengths of the lines is the shortest. There is an evaluation criterion of selecting a line. In the example of FIG. 1, when the text inside the text frame is horizontal writing, the scanning line is drawn from the upper left to the lower right. In this embodiment, the scanning line determination unit determines one scanning line from among a plurality of scanning lines.

図7は、本発明の一実施形態のデータ作成装置の走査線の設定のしかたを説明する図であり、テキストフレームのレイアウトが右閉じ縦書きのものになっている場合に好適に採用できる走査線の設定のしかたを説明する図である。尚、図7は、書籍1ページのレイアウトを示している。   FIG. 7 is a diagram for explaining how to set the scanning line of the data creation apparatus according to the embodiment of the present invention. Scanning that can be suitably used when the text frame layout is right-closed and vertical writing. It is a figure explaining how to set a line. FIG. 7 shows a layout of one page of a book.

図7に示すように、この例では、縦書きの見出しおよび縦書き三段組みのレイアウトが採用されている。この実施形態では、走査線決定部が、対象ページのテキストフレーム中のテキストに関するタグを参照して、縦書きのページと判断した場合に、走査線が、右上から左下に引かれるようになっている。   As shown in FIG. 7, in this example, a vertical writing heading and a vertical writing three-column layout are employed. In this embodiment, when the scanning line determination unit refers to the tag related to the text in the text frame of the target page and determines that the page is vertically written, the scanning line is drawn from the upper right to the lower left. Yes.

図8は、本発明の他の実施形態のデータ作成装置の走査線の設定のしかたを説明する図である。尚、図8は、書籍1ページのレイアウトを示している。   FIG. 8 is a diagram for explaining how scanning lines are set in a data creation apparatus according to another embodiment of the present invention. FIG. 8 shows the layout of one page of a book.

図1に示す例では、走査線をページの対角線として設定していたが、図8に示すように、走査線が通る点は、角の点でなくても良く、また、走査線の傾きは、対角線における傾きと異なっていても良い。   In the example shown in FIG. 1, the scanning line is set as a diagonal line of the page. However, as shown in FIG. 8, the point through which the scanning line passes may not be a corner point, and the inclination of the scanning line is The slope may be different from the diagonal line.

例えば、図8に示す例では、図1に示す例と比較して、走査線の傾きの絶対値が、小さくなっており、かつ、走査線が、ページ内の上部側に移動している。ここで、図8に示す例では、左閉じ横書き三段組みを想定しているが、傾きを小さくすると、交点の順番が中心点の横方向の配置に影響されやすくなる(極端な場合、走査線が水平の場合は中心点の横方向の配置だけで決まる)。   For example, in the example shown in FIG. 8, the absolute value of the inclination of the scanning line is smaller than in the example shown in FIG. 1, and the scanning line has moved to the upper side in the page. Here, in the example shown in FIG. 8, a left-closed horizontal triplet is assumed. However, if the inclination is reduced, the order of intersections is likely to be affected by the horizontal arrangement of the center points (in extreme cases, scanning is performed). If the line is horizontal, it is determined only by the horizontal placement of the center point).

一方、逆に傾きを大きくすると、交点の順番は、中心点の縦方向の配置の影響を受けやすくなる(極端な場合、走査線が垂直の場合は中心点の縦方向の配置だけで決まる)。つまり、中心点の縦方向、横方向の配置を重視する度合いによって走査線の傾きを変えることで、より適切なテキストフレーム間の順序付けができるようになるのである。   On the other hand, when the inclination is increased, the order of the intersections is easily affected by the vertical arrangement of the center points (in the extreme case, when the scanning line is vertical, it is determined only by the vertical arrangement of the center points). . In other words, by changing the inclination of the scanning line depending on the degree of emphasis on the vertical and horizontal arrangement of the center points, more appropriate ordering between the text frames can be performed.

また、ページ内を走査線が通る位置については、例えば、テキストフレームの中心点がページの上部に集まっている場合、中心点が集まっている中に走査線を通す方が、交点の順番が正しくなる可能性が高い。   As for the position where the scanning line passes through the page, for example, if the center point of the text frame is gathered at the top of the page, the order of the intersections is correct if the scanning line is passed while the center point is gathered. Is likely to be.

図9は、本発明の一実施形態のデータ作成装置の走査線の設定のしかたを説明する図である。尚、図9は、書籍1ページのレイアウトを示している。   FIG. 9 is a diagram for explaining how to set the scanning line of the data creation apparatus according to the embodiment of the present invention. FIG. 9 shows the layout of one page of a book.

図9に示す例では、段落1と段落2とをグループ化し、段落3と段落4とをグループ化している。グループ化する段落は、属性情報が同一または予め定められた関係にある二以上の段落であって、連続するものとみなせる複数の段落である。この例では、段落1の次に段落2が来て、段落3の後に段落4が来るとみなせる場合での、段落のグループ化を示している。   In the example shown in FIG. 9, paragraph 1 and paragraph 2 are grouped, and paragraph 3 and paragraph 4 are grouped. The paragraphs to be grouped are two or more paragraphs having the same attribute information or a predetermined relationship, and are a plurality of paragraphs that can be regarded as continuous. This example shows the grouping of paragraphs in the case where paragraph 2 comes after paragraph 1 and paragraph 4 comes after paragraph 3.

ここで、属性情報が同一または予め定められた関係を満たす複数の段落としては、各段落を表すテキストフレームの縦幅又は横幅が同じであるか極めて近い(その違いが所定の長さ以下である)複数の段落がある。また、他の例としては、グループ化は、各段落を表すテキストフレーム同士が、長さが同じか極めて近い辺を介して並んでいる(段落1,2は横方向の辺、段落3,4は縦方向の辺を介して並んでいる)複数の段落で行うことができる。また、他の例としては、グループ化は、並んでいるテキストフレーム同士の距離が一定値以内の段落間で行うことができる。また、他の例としては、グループ化は、段落を表すテキストフレーム同士の文字設定(例えば、縦・横書き、文字の大きさ、フォントの種類等)が同じである段落間で行うことができる。   Here, as the plurality of paragraphs having the same attribute information or satisfying a predetermined relationship, the vertical width or horizontal width of the text frame representing each paragraph is the same or very close (the difference is not more than a predetermined length). ) There are multiple paragraphs. As another example, in the grouping, text frames representing respective paragraphs are arranged with sides having the same or very close length (paragraphs 1 and 2 are horizontal sides, paragraphs 3 and 4). Can be done in multiple paragraphs (lined up vertically). As another example, grouping can be performed between paragraphs in which the distance between adjacent text frames is within a certain value. As another example, grouping can be performed between paragraphs having the same character settings (for example, vertical / horizontal writing, character size, font type, etc.) between text frames representing paragraphs.

尚、作成元文書データにおいて、テキストの流し込みやアンカー付きオブジェクトの設定により、段落、画像のテキストフレーム間のつながりが明示的に設定されているものは上記条件に関係なくグループ化の対象とするようにしても良い。   In the original document data, if the connection between text frames of paragraphs and images is explicitly set by text flow or anchored object setting, it will be grouped regardless of the above conditions. Anyway.

図9に示す例では、2つの段落のグループ化の例を示したが、上述の条件を満たせば、3つ以上の段落をグループ化することも可能である。ここで、グループ化された段落で、先頭の段落でない段落は、中心点の設定、走査線に対する垂線の設定を行わないようにすることもできる。例えば、図9に示す例では、グループ化された段落で、先頭の段落でない段落2と段落4は中心点の設定、走査線に対する垂線の設定を行わないようにすることができる。   In the example shown in FIG. 9, an example of grouping two paragraphs is shown, but it is possible to group three or more paragraphs if the above-described conditions are satisfied. Here, in a grouped paragraph, a paragraph that is not the first paragraph can be set such that the center point is not set and the perpendicular to the scanning line is not set. For example, in the example shown in FIG. 9, in the grouped paragraphs, the paragraphs 2 and 4 which are not the first paragraph can be set so as not to set the center point and the perpendicular to the scanning line.

このようにすると、先頭の段落1と、段落3との順序を決定しさえすれば良く、段落2は、段落1の直後に、段落4は、段落3の直後にあると決定できる。このように、グループ化を行えば、順序の評価対象となる段落を減らすことができて、順序付けがより正しく行えるようになる。3つ以上の段落をグループ化した場合でも、評価の対象となる段落はグループ内の先頭とされている段落のみとすることができる。   In this way, it is only necessary to determine the order of the first paragraph 1 and paragraph 3, and it can be determined that paragraph 2 is immediately after paragraph 1 and paragraph 4 is immediately after paragraph 3. If grouping is performed in this way, the number of paragraphs to be evaluated in the order can be reduced, and the ordering can be performed more correctly. Even when three or more paragraphs are grouped, the paragraph to be evaluated can be only the first paragraph in the group.

次に、間違った順序を正す補正について説明する。具体的には、図1で示す例において、段落2と段落3との順序が逆になったり、または、図8で示す例において、段落1と段落6との順序が逆になった場合に、順序を正しい順序に入れ替えるための補正について説明する。   Next, correction for correcting the wrong order will be described. Specifically, in the example shown in FIG. 1, when the order of paragraphs 2 and 3 is reversed, or in the example shown in FIG. 8, the order of paragraphs 1 and 6 is reversed. The correction for changing the order to the correct order will be described.

本発明では、簡単で計算量の少ない方式とするため、かなり簡単化した方法を使っている。そのため、機械的に走査線との交点の順序を段落の順序とすると、段落の順序に間違いが起こる場合がある。特に、走査線上の交点が近接している場合は、その結果をそのまま使用すると、順序間違いが起こる可能性が高い。そこで、交点が近接している場合は、走査線上の交点座標以外の要素を参照して、別の観点からも交点の順序が正しいかどうかを判定するようにしても良い。   In the present invention, a considerably simplified method is used in order to achieve a simple method with a small amount of calculation. Therefore, if the order of the intersections with the scanning lines is mechanically set as the order of the paragraphs, an error may occur in the order of the paragraphs. In particular, when the intersections on the scanning line are close to each other, if the result is used as it is, there is a high possibility that an order error will occur. Therefore, when the intersections are close to each other, it is possible to determine whether the order of the intersections is correct from another viewpoint by referring to elements other than the intersection coordinates on the scanning line.

例えば、図8に示す例では、段落6がタイトルで、段落1から本文が始まると想定できるが、段落6のテキストフレームの横幅によっては、中心点が右に寄って、走査線に垂線を下ろした際に段落1の交点より後ろになってしまう場合がある。   For example, in the example shown in FIG. 8, it can be assumed that paragraph 6 is the title and the text starts from paragraph 1. However, depending on the width of the text frame of paragraph 6, the center point is shifted to the right and a vertical line is dropped on the scanning line. May be behind the intersection of paragraph 1.

この好ましくない順序を補正する処理としては、次のものを採用できる。具体的には、交点が一定距離以内にある二つの段落に関して、左閉じ横書きの場合、段落を表すテキストフレームの左上の座標値を調べ、座標がより左又はより上であった場合や、交点の順序で後になっているテキストフレームの方の全ての文字の大きさがより大きい設定である場合などに、段落の順序を入れ替える処理を採用することができる。   As a process for correcting this undesirable order, the following can be adopted. Specifically, for two paragraphs whose intersection is within a certain distance, in the case of left-closed horizontal writing, the coordinate value at the upper left of the text frame representing the paragraph is examined, and if the coordinate is more to the left or above, For example, when the size of all the characters in the text frame that follows in this order is set to be larger, a process of changing the order of the paragraphs can be employed.

また、右閉じ縦書きの場合は、比較対象とするテキストフレームの座標値を右上の座標値とし、座標値が上又は右の場合に段落の順序を入れ替える補正を採用できる。また、テキストフレーム内の文字の大きさの比較については、上述の左閉じ横書きの場合と同様の処理を採用できる。   Further, in the case of right-closed vertical writing, the coordinate value of the text frame to be compared is the upper-right coordinate value, and correction can be adopted in which the order of paragraphs is changed when the coordinate value is up or right. Further, for the comparison of the size of the characters in the text frame, the same processing as in the case of the above-mentioned left closed horizontal writing can be adopted.

図10は、段落がページ境界を跨いでいる場合の処理の一例を説明するための図である。尚、この例では、左閉じ横書きの書籍を想定している。   FIG. 10 is a diagram for explaining an example of processing when a paragraph straddles a page boundary. In this example, a left-closed horizontal book is assumed.

書籍やページによっては、見開きの2ページを一つの単位として扱い、段落がページ境界を跨いでいる場合がある。図10に示す例では、段落13と、段落14とが、ページ境界を跨いで存在している。この場合には、例えば、順序付手段が、2ページに跨る上記文書要素を認識すると、上記2ページ内に存在する文書要素の順序付けを、2ページの見開きの単位で行うようにすることができる。このような場合でも、1ページ分だけの評価では正確な評価はできないので、2ページを一まとめとして扱い、従来と同様に、傾きを持った走査線を引き、各段落の中心点を求め、垂線を引き、走査線と垂線との交点を求め、段落の順序を決定するようにすることにより、適切な処理を行うことができるのである。   Some books and pages handle two spread pages as a unit, and a paragraph may straddle a page boundary. In the example shown in FIG. 10, paragraph 13 and paragraph 14 exist across the page boundary. In this case, for example, when the ordering unit recognizes the document element extending over two pages, the ordering of the document elements existing in the two pages can be performed in units of two-page spread. . Even in such a case, since an accurate evaluation cannot be performed by evaluating only one page, the two pages are treated as a group, and a scanning line having an inclination is drawn to obtain the center point of each paragraph, as in the past. Appropriate processing can be performed by drawing a perpendicular line, obtaining the intersection of the scanning line and the perpendicular line, and determining the order of the paragraphs.

尚、この発明では、順序付手段は、複数の文書要素の順序付けを行うとき、作成元文書データの各文書要素の配置情報および分布情報のうちの少なくとも一方に基づいて、複数の順序付けの算出法のうちから一の算出法を選択して、その選択した一の算出法に基づいて処理を行うこともできる。作成元文書データのページ中の段落、画像の配置、分布によって順序の決定基準を変更すると、より正確な順序付けができるからである。   In the present invention, the ordering means, when ordering a plurality of document elements, calculates a plurality of orderings based on at least one of the arrangement information and the distribution information of each document element of the original document data. It is also possible to select one calculation method from the above and perform processing based on the selected one calculation method. This is because more accurate ordering can be achieved by changing the order determination criteria depending on the paragraphs, image arrangement, and distribution in the page of the original document data.

ここで、この例を具体的に示すと、予め互いに平行な複数の走査線が決定されている場合に、各文書要素のよりページの上方に配置されている場合に、よりページの上方の走査線を選択して、その走査線に基づいて、上述の方法で、順序付けを行う手法が考えられる。   Here, when this example is shown concretely, when a plurality of scanning lines parallel to each other are determined in advance, the scanning above the page when the document elements are arranged above the page. A method is conceivable in which lines are selected and ordered by the above-described method based on the scanning lines.

尚、この電子書籍データのデータ作成装置の技術的思想および作用効果は、以下の方法の発明、プログラムの発明およびそのプログラムが記録された記録媒体によっても実現できる。   The technical idea and operation effect of the electronic book data creation apparatus can also be realized by the following method invention, program invention, and recording medium on which the program is recorded.

すなわち、複数の文書要素を有するページを含む電子書籍の作成元文書データの上記各文書要素の位置情報と、上記作成元文書データの書式とに基づいて上記複数の文書要素を順序付けし、
順序付けされた上記各文書要素の順序に基づいて、上記各文書要素を並び替えて、電子書籍を作成するデータ作成方法によっても実現できる。
That is, ordering the plurality of document elements based on the position information of each document element of the creation source document data of the electronic book including pages having a plurality of document elements, and the format of the creation source document data,
This can also be realized by a data creation method for creating an electronic book by rearranging the document elements based on the ordered order of the document elements.

また、それらの発明特定事項に加えて、上述のデータ作成装置の実施形態および変形例で説明した一以上の計算に対応する発明特定事項を追加したデータ作成方法の発明によっても実現できる。   Further, in addition to those invention-specific matters, the invention can also be realized by an invention of a data creation method in which invention-specific matters corresponding to one or more calculations described in the above-described embodiment and modification of the data creation device are added.

また、複数の文書要素を有するページを含む電子書籍の作成元文書データの上記各文書要素の位置情報と、上記作成元文書データの書式情報とに基づいて上記複数の文書要素を順序付けする順序付けステップと、
上記順序付けステップで順序付けされた上記各文書要素の順序に基づいて、上記各文書要素を並び替える文書要素並替ステップと
をコンピュータに実行させることを特徴とするデータ作成プログラムによっても実現できる。
An ordering step of ordering the plurality of document elements based on position information of each document element of creation source document data of an electronic book including pages having a plurality of document elements and format information of the creation source document data When,
It can also be realized by a data creation program that causes a computer to execute a document element rearranging step for rearranging the document elements based on the order of the document elements ordered in the ordering step.

また、これらのステップをコンピュータに実行させることに加えて、更に、上述のデータ作成装置の実施形態および変形例で説明した一以上の計算に対応するステップを、コンピュータに実行させるデータ処理プログラムによっても実現できる。   Further, in addition to causing the computer to execute these steps, the data processing program further causes the computer to execute steps corresponding to one or more calculations described in the embodiments and modifications of the above-described data creation device. realizable.

また、本発明のデータ作成プログラムが記録されているコンピュータ読取可能な記録媒体によっても実現できる。   The present invention can also be realized by a computer-readable recording medium on which the data creation program of the present invention is recorded.

というのは、それらの、方法、プログラム、記録媒体に係る発明は、本発明のデータ作成装置と、単なるカテゴリー上の差異に相当する発明にすぎないからである。   This is because the inventions related to the method, the program, and the recording medium are only inventions corresponding to the categorical differences from the data creation device of the present invention.

21 走査線決定部
22 中心点決定部
23 垂線決定部
24 交点算出部
25 順序付部
26 並替部
DESCRIPTION OF SYMBOLS 21 Scan line determination part 22 Center point determination part 23 Perpendicular line determination part 24 Intersection point calculation part 25 Ordering part 26 Rearrangement part

Claims (16)

複数の文書要素を有するページを含む電子書籍の作成元文書データの上記各文書要素が持つ属性情報と、上記作成元文書データの上記ページの書式を表す情報とに基づいて、上記ページ上の上記各文書要素を順序付けする順序付手段と、
上記順序付手段が順序付けした上記各文書要素の順序に基づいて、上記各文書要素を並び替える並替手段と
を備えることを特徴とする電子書籍のデータ作成装置。
Based on the attribute information held by each document element of the creation source document data of the electronic book including the page having a plurality of document elements and the information indicating the format of the page of the creation source document data, the above on the page An ordering means for ordering each document element;
An electronic book data creation device comprising: a reordering unit that reorders the document elements based on the order of the document elements ordered by the ordering unit.
請求項1に記載の電子書籍のデータ作成装置において、
上記順序付手段は、上記作成元文書データに基づいて、上記ページの書式を表すデータが左閉じかつ横書きの書式であることを認識すると、上記作成元文書データの上記ページ上の左上の文書要素の順序を、その左上の文書要素よりも右下に位置する文書要素よりも上位に順序付けすることを特徴とする電子書籍のデータ作成装置。
The electronic book data creation device according to claim 1,
When the ordering unit recognizes that the data representing the format of the page is a left-closed and horizontal format based on the creation source document data, the document element at the upper left on the page of the creation source document data An electronic book data creation device characterized in that the order is ordered higher than the document element located at the lower right of the upper left document element.
請求項1または2に記載の電子書籍のデータ作成装置において、
上記順序付手段は、上記作成元文書データに基づいて、上記ページの書式を表すデータが右閉じかつ縦書きの書式であることを認識すると、上記作成元文書データの上記ページ上の右上の文書要素の順序を、その右上の文書要素よりも左下に位置する文書要素よりも上位に順序付けすることを特徴とする電子書籍のデータ作成装置。
In the electronic book data creation device according to claim 1 or 2,
When the ordering unit recognizes that the data representing the format of the page is a right-closed and vertical format based on the creation source document data, the top right document on the page of the creation source document data An electronic book data creation device that orders elements in a higher order than document elements located in the lower left of the upper right document element.
請求項1から3までのいずれか一項に記載の電子書籍のデータ作成装置において、
上記順序付手段は、上記複数の文書要素の順序付けを行うとき、上記作成元文書データの各文書要素の配置情報および分布情報のうちの少なくとも一方に基づいて、複数の順序付けを行うことができる算出法のうちから一の上記算出法を選択して、その選択した上記一の算出法に基づいて処理を行うことを特徴とする電子書籍のデータ作成装置。
In the electronic book data creation device according to any one of claims 1 to 3,
The ordering means, when ordering the plurality of document elements, is capable of performing a plurality of orderings based on at least one of arrangement information and distribution information of each document element of the creation source document data An electronic book data creation device, wherein one calculation method is selected from among the methods, and processing is performed based on the selected one calculation method.
請求項1から4までのいずれか一項に記載の電子書籍のデータ作成装置において、
上記順序付手段は、上記属性情報が同一または予め定められた関係にある二以上の上記文書要素を、連続して順序付けすることを特徴とする電子書籍のデータ作成装置。
In the electronic book data creation device according to any one of claims 1 to 4,
2. The electronic book data creation device according to claim 1, wherein the ordering unit sequentially orders two or more document elements having the same or predetermined relationship between the attribute information.
請求項1から5までのいずれか一項に記載の電子書籍のデータ作成装置において、
上記電子書籍は、2ページに跨る上記文書要素を有し、
上記順序付手段は、2ページに跨る上記文書要素を認識すると、上記2ページ内に存在する上記文書要素の順序付けを、上記2ページの見開きの単位で行うことを特徴とする電子書籍のデータ作成装置。
In the electronic book data creation device according to any one of claims 1 to 5,
The electronic book has the document element extending over two pages,
When the ordering unit recognizes the document elements extending over two pages, the ordering of the document elements existing in the two pages is performed in units of two-page spreads. apparatus.
請求項1から6までのいずれか一項に記載の電子書籍のデータ作成装置において、
上記作成元文書データ中の上記ページに関する部分に基づいて、走査線を決定する走査線決定手段と、
上記作成元文書データにおいて矩形データとして保存されている矩形状の各文書要素の中心点を決定する中心点決定手段と、
上記各文書要素の上記中心点を通過すると共に、上記走査線に垂直に交わる垂線を決定する垂線決定手段と、
上記各垂線と、上記走査線との交点の座標を算出する交点算出手段と
を備え、
上記順序付手段は、上記各交点の座標値に基づいて、上記各文書要素を順序付けすることを特徴とする電子書籍のデータ作成装置。
In the electronic book data creation device according to any one of claims 1 to 6,
A scanning line determining means for determining a scanning line based on a portion related to the page in the original document data;
Center point determination means for determining a center point of each rectangular document element stored as rectangular data in the creation source document data;
Perpendicular determination means for determining a perpendicular that passes through the center point of each document element and intersects the scanning line perpendicularly;
Intersection calculation means for calculating the coordinates of the intersection of each perpendicular and the scanning line,
The electronic book data creation apparatus characterized in that the ordering means orders the document elements based on the coordinate values of the intersections.
請求項7に記載の電子書籍のデータ作成装置において、
上記走査線決定手段は、上記作成元文書データに基づいて、上記ページが、左閉じかつ横書きであることを認識すると、上記ページの左上側から右下側に延在する走査線を決定することを特徴とする電子書籍のデータ作成装置。
In the electronic book data creation device according to claim 7,
The scanning line determining means determines a scanning line extending from the upper left side of the page to the lower right side when recognizing that the page is left-closed and horizontally written based on the original document data. An electronic book data creation device characterized by the above.
請求項7または8に記載の電子書籍のデータ作成装置において、
上記走査線決定手段は、上記作成元文書データに基づいて、上記ページが、右閉じかつ縦書きであることを認識すると、上記ページの右上側から左下側に延在する走査線を決定することを特徴とする電子書籍のデータ作成装置。
In the electronic book data creation device according to claim 7 or 8,
The scanning line determining means determines a scanning line extending from the upper right side to the lower left side of the page when recognizing that the page is right-closed and vertically written based on the original document data. An electronic book data creation device characterized by the above.
請求項7から9までのいずれか一項に記載の電子書籍のデータ作成装置において、
上記走査線決定手段は、上記作成元文書データの上記各文書要素の配置に関するデータに基づいて、上記走査線が通過する座標の一点を決定することを特徴とする電子書籍のデータ作成装置。
In the electronic book data creation device according to any one of claims 7 to 9,
The electronic book data creation device, wherein the scanning line determination means determines one point of coordinates through which the scanning line passes based on data relating to the arrangement of each document element of the creation source document data.
請求項7から10までのいずれか一項に記載の電子書籍のデータ作成装置において、
上記走査線決定手段は、上記作成元文書データの上記各文書要素の配置に関するデータに基づいて、上記走査線の傾きを決定することを特徴とする電子書籍のデータ作成装置。
In the electronic book data creation device according to any one of claims 7 to 10,
The electronic book data creation device, wherein the scanning line determination means determines the inclination of the scanning line based on data relating to the arrangement of the document elements of the creation source document data.
請求項7から11までのいずれか一項に記載の電子書籍のデータ作成装置において、
上記順序付手段は、上記交点間の距離が、予め定められた距離以下である場合に、その各交点を通っている上記垂線が中心点を通っている上記文書要素の角の座標の情報に基づいて、上記各交点を通っている上記垂線が中心点を通っている上記文書要素間の順序付けを行うことを特徴とする電子書籍のデータ作成装置。
In the electronic book data creation device according to any one of claims 7 to 11,
When the distance between the intersections is equal to or less than a predetermined distance, the ordering unit uses the information on the coordinates of the corners of the document element through which the perpendicular passing through each intersection passes through the center point. An electronic book data creation device that performs ordering between the document elements in which the perpendicular passing through the intersections passes through a center point.
請求項7から12までのいずれか一項に記載の電子書籍のデータ作成装置において、
上記走査線決定手段は、複数の走査線を決定し、
上記垂線決定部は、上記走査線毎に、上記垂線を決定すると共に、上記交点算出手段は、上記走査線毎に、上記各垂線と上記走査線との交点の座標を算出し、
上記順序付手段は、上記走査線毎に求められた交点に基づいて、一の走査線を決定し、その一の走査線に基づいて、上記各文書要素を順序付けすることを特徴とする電子書籍のデータ作成装置。
In the electronic book data creation device according to any one of claims 7 to 12,
The scanning line determining means determines a plurality of scanning lines,
The perpendicular determining unit determines the perpendicular for each of the scanning lines, and the intersection calculation means calculates the coordinates of the intersection of each perpendicular and the scanning line for each of the scanning lines,
The ordering means determines one scanning line based on the intersection obtained for each scanning line, and orders the document elements based on the one scanning line. Data creation device.
複数の文書要素を有するページを含む電子書籍の作成元文書データの上記各文書要素の位置情報と、上記作成元文書データの書式情報とに基づいて上記複数の文書要素を順序付けする順序付けステップと、
上記順序付けステップで順序付けされた上記各文書要素の順序に基づいて、上記各文書要素を並び替える文書要素並替ステップと
をコンピュータに実行させることを特徴とするデータ作成プログラム。
An ordering step for ordering the plurality of document elements based on position information of each document element of the creation source document data of the electronic book including a page having a plurality of document elements and format information of the creation source document data;
A data creation program that causes a computer to execute a document element rearrangement step for rearranging the document elements based on the order of the document elements ordered in the ordering step.
請求項14に記載のデータ作成プログラムが記録されていることを特徴とするコンピュータ読取可能な記録媒体。   15. A computer-readable recording medium on which the data creation program according to claim 14 is recorded. 複数の文書要素を有するページを含む電子書籍の作成元文書データの上記各文書要素の位置情報と、上記作成元文書データの書式とに基づいて上記複数の文書要素を順序付けし、
順序付けされた上記各文書要素の順序に基づいて、上記各文書要素を並び替えて、電子書籍を作成することを特徴とするデータ作成方法。
Ordering the plurality of document elements based on position information of each document element of the creation source document data of an electronic book including a page having a plurality of document elements and a format of the creation source document data;
A data creation method, wherein an electronic book is created by rearranging the document elements based on the ordered order of the document elements.
JP2011113302A 2011-05-20 2011-05-20 Data creation device, data creation program, recording medium and data creation method Withdrawn JP2012243121A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011113302A JP2012243121A (en) 2011-05-20 2011-05-20 Data creation device, data creation program, recording medium and data creation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011113302A JP2012243121A (en) 2011-05-20 2011-05-20 Data creation device, data creation program, recording medium and data creation method

Publications (1)

Publication Number Publication Date
JP2012243121A true JP2012243121A (en) 2012-12-10

Family

ID=47464757

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011113302A Withdrawn JP2012243121A (en) 2011-05-20 2011-05-20 Data creation device, data creation program, recording medium and data creation method

Country Status (1)

Country Link
JP (1) JP2012243121A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018067892A (en) * 2016-10-21 2018-04-26 シャープ株式会社 Image cutout device, multi-functional device, image cutout method, and image cutout program
CN110377885A (en) * 2019-06-14 2019-10-25 北京百度网讯科技有限公司 Convert method, apparatus, equipment and the computer storage medium of pdf document

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018067892A (en) * 2016-10-21 2018-04-26 シャープ株式会社 Image cutout device, multi-functional device, image cutout method, and image cutout program
CN110377885A (en) * 2019-06-14 2019-10-25 北京百度网讯科技有限公司 Convert method, apparatus, equipment and the computer storage medium of pdf document
CN110377885B (en) * 2019-06-14 2023-09-26 北京百度网讯科技有限公司 Method, device, equipment and computer storage medium for converting PDF file

Similar Documents

Publication Publication Date Title
WO2020192391A1 (en) Ocr-based image conversion method and apparatus, device and readable storage medium
CN110069767B (en) Typesetting method based on electronic book, electronic equipment and computer storage medium
US9007405B1 (en) Column zoom
US5784487A (en) System for document layout analysis
US7853869B2 (en) Creation of semantic objects for providing logical structure to markup language representations of documents
US8515176B1 (en) Identification of text-block frames
US20120128249A1 (en) Script-agnostic text reflow for document images
WO2000020985A1 (en) Conversion of data representing a document to other formats for manipulation and display
US8522138B2 (en) Content analysis apparatus and method
EP2544099A1 (en) Method for creating an enrichment file associated with a page of an electronic document
JP2004139484A (en) Form processing device, program for implementing it, and program for creating form format
US9460089B1 (en) Flow rendering of annotation characters
NL9301004A (en) Apparatus for processing and reproducing digital image information.
Meunier Optimized XY-cut for determining a page reading order
JP2002056398A (en) Document image processing device, document image processing method, and storage medium
US9734132B1 (en) Alignment and reflow of displayed character images
CN112100979A (en) Typesetting processing method based on electronic book, electronic equipment and storage medium
US20080131000A1 (en) Method for generating typographical line
US8068261B2 (en) Image reading apparatus, image reading method, and image reading program
JP5950700B2 (en) Image processing apparatus, image processing method, and program
US7627815B2 (en) Object editing system
JP2008108114A (en) Document processor and document processing method
JP2012243121A (en) Data creation device, data creation program, recording medium and data creation method
JP2009031937A (en) Form image processing apparatus and form image processing program
JP6322086B2 (en) Display control device, display device, program, recording medium

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140805