JP2006107155A - Device and method for document structural processing, and program for making computer execute same method - Google Patents

Device and method for document structural processing, and program for making computer execute same method Download PDF

Info

Publication number
JP2006107155A
JP2006107155A JP2004293314A JP2004293314A JP2006107155A JP 2006107155 A JP2006107155 A JP 2006107155A JP 2004293314 A JP2004293314 A JP 2004293314A JP 2004293314 A JP2004293314 A JP 2004293314A JP 2006107155 A JP2006107155 A JP 2006107155A
Authority
JP
Japan
Prior art keywords
document
character string
paragraph
document data
character
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
JP2004293314A
Other languages
Japanese (ja)
Inventor
Masaru Tanaka
大 田中
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2004293314A priority Critical patent/JP2006107155A/en
Publication of JP2006107155A publication Critical patent/JP2006107155A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a document structural processing method capable of changing a layout of document data at the side of a display device which understands structural documents of electronic papers and the like and displaying images on the surface screen of the display device at the best suitable condition. <P>SOLUTION: In structural information in which a string of characters organized by a plurality of characters disposed at one direction is set to be a minimum unit in the document data, the structure of the document data is determined, and the determined structure is showed; a document structural processor 220 producing structural documents for showing structures of the document data is arranged on a printer driver 215 which handles intermediate document data produced in the process of image processing of the document data including character codes. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、文書構造化処理装置、文書構造化処理方法及びこの方法をコンピュータに実行させるためのプログラムに関する。   The present invention relates to a document structuring processing apparatus, a document structuring processing method, and a program for causing a computer to execute the method.

現在、PCは、ワードプロセッサとして、あるいはメール等の通信手段として広く利用されている。PCは、近年ますます小型、軽量化される傾向にあるものの、日常的に携帯するには未だ電池寿命や重量の点で課題を残している。このため、PCで作成された文書等のデータは、多くの場合紙等の媒体にプリントされた状態で持ち運ばれている。このため、PCは、作成されたデータをプリンタに転送し、プリンタにおいて紙媒体にプリントさせている。   Currently, PCs are widely used as word processors or as communication means such as mail. Although PCs tend to be smaller and lighter in recent years, there are still problems in terms of battery life and weight for carrying them on a daily basis. For this reason, data such as documents created on a PC is often carried in a state of being printed on a medium such as paper. For this reason, the PC transfers the created data to the printer and causes the printer to print on a paper medium.

PCからプリンタへのデータの転送は、メモリカード等の記憶媒体やUSB等の入出力インターフェイスを利用して行われる。PC上で使用される多くのデータフォーマットとプリンタとを対応させるため、PCにおいてアプリケーションソフトを制御するOSは、アプリケーションソフトに対してプリント機能を提供している。このため、プリンタドライバをインストールすることにより、PC側では、プリンタの種別によらず一定のルールにしたがってOSにプリントすべきデータを渡すことが可能になる。   Data transfer from the PC to the printer is performed using a storage medium such as a memory card or an input / output interface such as a USB. In order to associate many data formats used on a PC with a printer, an OS that controls application software in the PC provides a print function for the application software. For this reason, by installing the printer driver, the PC side can pass data to be printed to the OS according to a certain rule regardless of the type of printer.

また、プリンタ側にあっても、PC側のアプリケーションソフトによらずデータを印刷することが可能になる。また、プリンタドライバを、ファクシミリ装置にデータを転送することによってファクシミリ通信可能に作成することも可能である。
このようなプリンタドライバは、OSからアプリケーションソフトのデータを受け取り、画像データに変換してプリンタ側に転送している。この際、文字列で構成されているデータは、文字の行ごとにプリンタドライバに渡される。このようなプリンタドライバの従来技術として、Post Script(登録商標)を非特許文献1として、また、ESC/Page(登録商標)を非特許文献2として挙げる。
インターネット<URL:http://www.adobe.co.jp/print/postscript/main.html> <URL:http://edrj.i-love-epson.co.jp/>
Even on the printer side, data can be printed regardless of the application software on the PC side. It is also possible to create a printer driver so that facsimile communication is possible by transferring data to the facsimile apparatus.
Such a printer driver receives application software data from the OS, converts it into image data, and transfers it to the printer side. At this time, data composed of character strings is transferred to the printer driver for each character line. As a conventional technology of such a printer driver, Post Script (registered trademark) is cited as Non-patent document 1, and ESC / Page (registered trademark) is named as Non-patent document 2.
Internet <URL: http://www.adobe.co.jp/print/postscript/main.html> <URL: http://edrj.i-love-epson.co.jp/>

ところで、現在、紙等に代えて使用される薄型の表示媒体がある。このような表示媒体を、本明細書では電子ペーパという。電子ペーパのうち、記憶性のものは、いったん表示されたデータを電力の供給を受けることなく保持することができる。また、繰り返しデータを書き換えることができる。このような利点により、電子ペーパを紙媒体と同様にPCで作成されたデータの表示に用い、携帯することが考えられている。   By the way, there is a thin display medium currently used instead of paper or the like. Such a display medium is referred to as electronic paper in this specification. Among electronic papers, a memory type can hold data once displayed without receiving power. Further, it is possible to rewrite data repeatedly. Due to such advantages, it is considered that electronic paper is used for displaying data created by a PC in the same manner as a paper medium and is carried.

電子ペーパは、ディスプレイ画面と、ディスプレイ画面に表示された画像を制御する制御部とを有している。制御部には、XHTML(eXtensible HyperText Markup Language)やXML(eXtensible Markup Language)等の構造化文書を理解可能なものがあり、ディスプレイ画面に表示されたデータが文字列であれば、行や段落といった文字列の構造を考慮して文字列のレイアウトを変更することが可能である。   The electronic paper has a display screen and a control unit that controls an image displayed on the display screen. Some control units can understand structured documents such as XHTML (eXtensible HyperText Markup Language) and XML (eXtensible Markup Language), and if the data displayed on the display screen is a character string, it can be a line or paragraph. The layout of the character string can be changed in consideration of the structure of the character string.

しかしながら、従来技術は、紙媒体にデータをプリントさせることを想定したものであり、前記したように、データを画像としてプリンタに転送している。このため、プリンタ側にはデータを構成する文字の大きさや形状の情報のみが転送され、文書の行や段落といった情報が失われる。
このような従来技術によれば、電子ペーパに構造化文書を理解する機能が備わっているにもかかわらず、文書データのレイアウトを変更することができない。したがって、PCから電子ペーパに文字列でなるデータを転送する構成に従来技術を適用すると、PC側で作成された画像のサイズと電子ペーパのディスプレイ画面のサイズとを一致させるには、文字列全体を画像として拡大、あるいは縮小する以外の手段がないという不具合がある。また、画像を縮小することが好ましくない場合、画像全体を見るために電子ペーパのディスプレイ画面をスクロールすることが必要になり、この操作がわずらわしいという不具合がある。
However, the prior art assumes that data is printed on a paper medium, and as described above, the data is transferred to the printer as an image. For this reason, only information on the size and shape of the characters constituting the data is transferred to the printer side, and information such as document lines and paragraphs is lost.
According to such a conventional technique, the layout of document data cannot be changed even though the electronic paper has a function of understanding a structured document. Therefore, when the conventional technique is applied to a configuration in which character string data is transferred from the PC to the electronic paper, the entire character string is used to match the size of the image created on the PC side with the size of the display screen of the electronic paper. There is a problem that there is no means other than enlarging or reducing the image as an image. Further, when it is not preferable to reduce the image, it is necessary to scroll the display screen of the electronic paper in order to view the entire image, and this operation is troublesome.

本発明は、上記した点に鑑みてなされたものであり、電子ペーパ等の構造化文書を理解できる表示装置の側で文書データをレイアウト変更し、表示装置の表示画面に最適な状態で画像を表示させることができる文書構造化処理装置、文書構造化処理方法及びこの方法をコンピュータに実行させるためのプログラムを提供することを目的とする。   The present invention has been made in view of the above points. The layout of document data is changed on the side of a display device that can understand a structured document such as electronic paper, and an image is displayed in a state optimal for the display screen of the display device. An object is to provide a document structuring processing apparatus, a document structuring processing method, and a program for causing a computer to execute the method.

以上の課題を解決するため、本発明の文書構造化処理装置は、文字コードを含む文書データを画像化する過程で生成される中間文書データを取り扱う文書構造化処理装置であって、文書データにおいて一方向に複数個配置された文字で構成される文字列を最小単位とし、前記文書データの構造を判定する構造判定手段と、前記構造判定手段によって判定された構造を示す構造化情報に基づいて、前記文書データの構造を示す構造化文書を生成する構造化文書生成手段と、を備えることを特徴とする。   In order to solve the above problems, a document structuring apparatus of the present invention is a document structuring apparatus that handles intermediate document data generated in the process of imaging document data including character codes. Based on the structure determination means for determining the structure of the document data, and the structured information indicating the structure determined by the structure determination means, with a character string composed of a plurality of characters arranged in one direction as a minimum unit And structured document generation means for generating a structured document indicating the structure of the document data.

このような発明によれば、文字コードを含む文書データを画像化する過程において、文書データの構造を判定することができる。そして、判定の結果得られる構造を示す文書を作成することができる。このような処理によれば、文書データの構造を他の機器に送出して知らせることができる。したがって、他の機器が構造化文書を理解できるものであれば、受け取った文書データをレイアウト変更し、機器側の表示画面に最適な状態で画像を表示できる文書構造化処理装置を提供することができる。   According to such an invention, the structure of the document data can be determined in the process of imaging the document data including the character code. Then, a document showing the structure obtained as a result of the determination can be created. According to such processing, the structure of the document data can be transmitted to other devices to be notified. Therefore, if another device can understand a structured document, it is possible to provide a document structuring apparatus that can change the layout of received document data and display an image in an optimal state on the display screen on the device side. it can.

また、本発明の文書構造化処理装置は、前記構造判定手段が、前記文字列に基づいて、前記文書データが示す文書を構成する段落の構造を判定する段落判定手段を備えることを特徴とする。
このような発明によれば、文字を一文字ずつ切り出して解釈するOCR等の従来技術に比べ、より簡易かつ高速に文書データを構造化することができる。
In the document structuring apparatus according to the present invention, the structure determining unit includes a paragraph determining unit that determines a structure of a paragraph constituting the document indicated by the document data based on the character string. .
According to such an invention, document data can be structured more easily and at a higher speed than conventional techniques such as OCR that extracts and interprets characters one by one.

また、本発明の文書構造化処理装置は、前記段落判定手段が、前記文書データが表す文書の1行分の文字を文字列とし、該文字列における先頭文字列の位置によって行の字下げを検出すると共に、字下げが検出された文字列から次に字下げが検出される文字列の直前の文字列までが1つの段落であると判定することを特徴とする。
このような発明によれば、段落の始まりを比較的簡易、かつ正確に検出することができる。
In the document structuring processing apparatus according to the present invention, the paragraph determination unit may use one line of characters of the document represented by the document data as a character string, and indent the line according to the position of the first character string in the character string. In addition to the detection, the character string from which the indentation is detected to the character string immediately before the next character string from which the indentation is detected is determined as one paragraph.
According to such an invention, the beginning of a paragraph can be detected relatively easily and accurately.

また、本発明の文書構造化処理装置は、前記段落判定手段が、前記文書データが表す文書の1行分の文字を文字列とし、先頭行の文字列または直前の文字列との間隔が直後の文字列との間隔よりも広い文字列から、直後の文字列との間隔が直前の文字列との間隔よりも広い文字列までを1つの段落であると判定することを特徴とする。
このような発明によれば、段落の始まりを比較的簡易、かつ正確に検出することができる。
Further, in the document structuring apparatus of the present invention, the paragraph determining means uses a character of one line of the document represented by the document data as a character string, and an interval between the character string of the first line or the immediately preceding character string is immediately after From a character string wider than the character string to a character string to a character string whose distance from the immediately following character string is wider than the distance from the immediately preceding character string is determined as one paragraph.
According to such an invention, the beginning of a paragraph can be detected relatively easily and accurately.

また、本発明の文書構造化処理装置は、前記構造判定手段が、互いに異なる方向から前記段落と接する複数の余白領域を検出し、検出された複数の余白領域同士の位置関係及び相対的な大きさの違いに基づいて、前記文書データのレイアウトに関する構造を判定することを特徴とする。
このような発明によれば、文書データが左右及び中央、あるいは上下のいずれにシフトされているかを簡易かつ、正確に判定することができる。このため、文書データのシフトに係る構造を構造化文書に含めることができる。
In the document structuring apparatus of the present invention, the structure determination unit detects a plurality of blank areas in contact with the paragraph from different directions, and a positional relationship and a relative size between the detected blank areas. The structure relating to the layout of the document data is determined on the basis of the difference.
According to such an invention, it is possible to easily and accurately determine whether the document data is shifted to the left, right, center, or up and down. For this reason, the structure concerning the shift of the document data can be included in the structured document.

また、本発明の文書構造化処理装置は、前記構造判定手段が、前記文書データに図画が含まれる場合、前記図画の表示領域に対し、互いに異なる方向から前記表示領域と接する複数の余白領域を検出し、検出された複数の余白領域同士の位置関係及び相対的な大きさの違いに基づいて、前記図画のレイアウトに関する構造を判定することを特徴とする。
このような発明によれば、文書データに含まれる図画の表示領域が左右及び中央、あるいは上下のいずれにシフトされているかを簡易かつ、正確に判定することができる。このため、図画の表示領域のシフトに係る構造を構造化文書に含めることができる。
In the document structuring apparatus according to the present invention, when the structure determination unit includes a drawing in the document data, a plurality of blank areas that are in contact with the display area from different directions are displayed with respect to the display area of the drawing. The structure relating to the layout of the drawing is determined based on the detected positional relationship and the relative size difference between the plurality of blank areas.
According to such an invention, it is possible to easily and accurately determine whether the display area of the drawing included in the document data is shifted to the left, right, center, or up and down. For this reason, the structure related to the shift of the graphic display area can be included in the structured document.

また、本発明の文書構造化処理装置は、前記構造判定手段が、前記文字列に含まれる文字のサイズに基づいて前記段落の属性を判定することを特徴とする。
このような発明によれば、段落が見出しやルビ等、本文を構成する以外の段落であるか否かを比較的簡易、かつ正確に判定することができる。このため、段落のより詳細な属性を構造化文書に含めることができる。
In the document structuring apparatus according to the present invention, the structure determination unit determines the attribute of the paragraph based on a size of a character included in the character string.
According to such an invention, whether or not a paragraph is a paragraph other than that constituting the text, such as a headline or ruby, can be determined relatively easily and accurately. Thus, more detailed attributes of the paragraph can be included in the structured document.

また、本発明の文書構造化処理装置は、前記構造判定手段が、前記文字列に含まれるキーワードを検出し、該キーワードの意味に基づいて前記文書データのレイアウトに関する構造を判定することを特徴とする。
このような発明によれば、文字列の属性をより詳細に判定し、特殊な文字列を適正に構造化することができる。
In the document structuring apparatus of the present invention, the structure determination unit detects a keyword included in the character string, and determines a structure related to the layout of the document data based on the meaning of the keyword. To do.
According to such an invention, the attribute of the character string can be determined in more detail, and the special character string can be appropriately structured.

また、本発明の文書構造化処理装置は、文字コードを含む文書データを受け取って画像化するプリンタドライバに備えられることを特徴とする。
このような発明によれば、文書データが画像化される過程で得られる中間文書を適正な工程で処理し、構造化文書作成の処理を円滑に行うことができる。
また、本発明の文書構造化処理方法は、文字コードを含む文書データを画像化する過程で生成される中間文書データを取り扱う文書構造化処理方法であって、文書データにおいて一方向に複数個配置された文字で構成される文字列を最小単位とし、前記文書データの構造を判定する構造判定工程と、前記構造判定手段工程において判定された構造を示す構造化情報に基づいて、前記文書データの構造を示す構造化文書を生成する構造化文書生成工程と、を含むことを特徴とする。
The document structuring apparatus of the present invention is provided in a printer driver that receives document data including a character code and converts it into an image.
According to such an invention, the intermediate document obtained in the process of converting the document data into an image can be processed in an appropriate process, and the structured document creation process can be performed smoothly.
The document structuring method of the present invention is a document structuring method for handling intermediate document data generated in the process of imaging document data including character codes, and a plurality of document structuring methods are arranged in one direction in the document data. A structure determination step for determining a structure of the document data, and a structured information indicating the structure determined in the structure determination means step. And a structured document generation step of generating a structured document indicating the structure.

このような発明によれば、文字コードを含む文書データを画像化する過程において、文書データの構造を判定することができる。そして、判定の結果得られる構造を示す文書を作成することができる。このような処理によれば、文書データの構造を他の機器に送出して知らせることができる。したがって、他の機器が構造化文書を理解できるものであれば、受け取った文書データをレイアウト変更し、機器側の表示画面に最適な状態で画像を表示できる文書構造化処理方法を提供することができる。   According to such an invention, the structure of the document data can be determined in the process of imaging the document data including the character code. Then, a document indicating the structure obtained as a result of the determination can be created. According to such processing, the structure of the document data can be transmitted to other devices to be notified. Therefore, if another device can understand the structured document, it is possible to provide a document structuring processing method that can change the layout of received document data and display an image in an optimal state on the display screen on the device side. it can.

また、本発明の文書構造化処理方法をコンピュータに実行させるためのプログラムは、文字コードを含む文書データを画像化する過程で生成される中間文書データを取り扱う文書構造化処理方法をコンピュータに実行させるためのプログラムであって、文書データにおいて一方向に複数個配置された文字で構成される文字列を最小単位とし、前記文書データの構造を判定する構造判定ステップと、前記構造判定手段ステップにおいて判定された構造を示す構造化情報に基づいて、前記文書データの構造を示す構造化文書を生成する構造化文書生成ステップと、を含むことを特徴とする。   A program for causing a computer to execute the document structuring processing method of the present invention causes the computer to execute a document structuring processing method that handles intermediate document data generated in the process of imaging document data including character codes. A structure determination step for determining the structure of the document data using a character string composed of a plurality of characters arranged in one direction in the document data as a minimum unit, and the structure determination step And a structured document generation step of generating a structured document indicating the structure of the document data based on the structured information indicating the structured.

このような発明によれば、文字コードを含む文書データを画像化する過程において、文書データの構造を判定することができる。そして、判定の結果得られる構造を示す文書を作成することができる。このような処理によれば、文書データの構造を他の機器に送出して知らせることができる。したがって、他の機器が構造化文書を理解できるものであれば、受け取った文書データをレイアウト変更し、機器側の表示画面に最適な状態で画像を表示できる文書構造化処理方法をコンピュータに実行させるためのプログラム提供することができる。   According to such an invention, the structure of the document data can be determined in the process of imaging the document data including the character code. Then, a document indicating the structure obtained as a result of the determination can be created. According to such processing, the structure of the document data can be transmitted to other devices to be notified. Therefore, if the other device can understand the structured document, the layout of the received document data is changed, and the computer executes a document structuring method that can display an image in an optimal state on the display screen on the device side. A program can be provided.

以下、図を参照して本発明に係る文書構造化処理装置、文書構造化処理方法及びこの方法をコンピュータに実行させるためのプログラムの実施の形態を説明する。なお、本明細書でいう文書の構造化とは、複数の文字で構成される文書に対し、文字種(文字コードやフォント、サイズ)、改行位置や見出し、段落、図の位置といったレイアウトまで機械が認識できる記述形式に変換することをいう。また、このような形式で記述された文書を、構造化文書という。   Hereinafter, embodiments of a document structuring apparatus, a document structuring method, and a program for causing a computer to execute the method will be described with reference to the drawings. The document structuring referred to in this specification means that a machine including a character type (character code, font, size), a line feed position, a headline, a paragraph, and a figure position for a document composed of a plurality of characters. To convert to a recognizable description format. A document described in such a format is called a structured document.

一般的な構造化文書の記述方式には、HTML(HyperText Markup Language),XML(eXtensible Mark-up Language),SGML(Standard Generalized Markup Language),TeX,PoD(Plain Old Documentation),reStructuredText等がある。
図1は、本発明の一実施形態の文書構造化処理装置のハードウェア構成のブロック図である。図1に示した文書構造化処理装置は、PC(Personal Computer)1と、PC1に接続されたプリンタ103と、電子ペーパ101とを備えている。本実施形態でいう電子ペーパ101は、薄型のディスプレイと、このディスプレイの制御部とを一体的に構成した携帯型の情報表示機器である。プリンタ103と電子ペーパ101とは、PC1の外部入出力I/O115に接続されている。なお、電子ペーパのディスプレイとしては、例えば液晶の特性を利用した液晶ディスプレイを用いることができる。
Common structured document description methods include HTML (HyperText Markup Language), XML (eXtensible Markup Language), SGML (Standard Generalized Markup Language), TeX, PoD (Plain Old Documentation), reStructured Text, and the like.
FIG. 1 is a block diagram of a hardware configuration of a document structuring apparatus according to an embodiment of the present invention. The document structuring apparatus shown in FIG. 1 includes a PC (Personal Computer) 1, a printer 103 connected to the PC 1, and an electronic paper 101. The electronic paper 101 referred to in the present embodiment is a portable information display device in which a thin display and a control unit of the display are integrally configured. The printer 103 and the electronic paper 101 are connected to the external input / output I / O 115 of the PC 1. As an electronic paper display, for example, a liquid crystal display using the characteristics of liquid crystal can be used.

PC1は、全体を統括的に制御するCPU109、CPU109による制御に使用されるRAM(Random Access Memory)105、CPU109の制御によって駆動するHDD(Hard Disk Drive)107、ディスプレイ画面等の表示装置111、表示装置111に表示される画像を制御する表示コントローラ113を備えている。さらに、PC1は、オペレータの指示を入力するための入力装置121を有し、入力装置121にマウス117及びキーボード119を接続している。オペレータは、マウス117やキーボード119を操作し、PC1に処理の内容を指示する。   The PC 1 includes a CPU 109 that performs overall control, a RAM (Random Access Memory) 105 that is used for control by the CPU 109, a HDD (Hard Disk Drive) 107 that is driven by the control of the CPU 109, a display device 111 such as a display screen, a display A display controller 113 that controls an image displayed on the device 111 is provided. Further, the PC 1 has an input device 121 for inputting an operator's instruction, and a mouse 117 and a keyboard 119 are connected to the input device 121. The operator operates the mouse 117 and the keyboard 119 to instruct the PC 1 of processing contents.

図2は、図1に示した文書構造化処理装置の機能ブロック図である。また、図3は、図2に示したソフトウェアの階層構造を示す図である。図2、図3に示した構成のうち、先に図示した構成と同様のものについては同様の符号を付し、説明を一部略すものとする。
本実施形態の文書構造化処理装置は、ソフトウェア2によって動作する。ソフトウェア2は、OS(Operating System)200と、その他のアプリケーションソフト群201と、を含んでいる。OS200は、プリントサービス211を提供すると共に、インストールされたプリンタドライバ215を動作させている。
FIG. 2 is a functional block diagram of the document structuring apparatus shown in FIG. FIG. 3 is a diagram showing a hierarchical structure of the software shown in FIG. Of the configurations shown in FIGS. 2 and 3, components similar to those illustrated above are denoted by the same reference numerals, and description thereof is partially omitted.
The document structuring apparatus according to the present embodiment is operated by software 2. The software 2 includes an OS (Operating System) 200 and other application software group 201. The OS 200 provides the print service 211 and operates the installed printer driver 215.

アプリケーションソフト群201は、PC1において動作するOS200以外の複数のアプリケーションソフトを含んでいる。
プリントサービス211は、アプリケーションソフト群201からプリント要求を受け付け、プリンタドライバ215にプリントすべき文書データ(プリントデータと記す。)を渡す。プリントデータは、文字コードを含む文書データであって、また、文字の書体、サイズといったフォント属性や文字の描画位置を示す座標等のデータ(属性情報と記す。)を含む。なお、プリントデータの記述には、例えば、Post Script(登録商標)やESC/Page(登録商標)が用いられる。
The application software group 201 includes a plurality of application software other than the OS 200 operating on the PC 1.
The print service 211 receives a print request from the application software group 201 and passes document data to be printed (referred to as print data) to the printer driver 215. The print data is document data including a character code, and also includes data (referred to as attribute information) such as font attributes such as the font and size of characters and coordinates indicating the drawing position of the characters. For example, Post Script (registered trademark) or ESC / Page (registered trademark) is used for the description of the print data.

また、プリントサービス211は、文字列出力機能213を有している。文字列出力機能213によれば、プリントデータを一列に配置された文字でなる文字列の単位でプリンタドライバ215に渡すことができる。本実施形態では、プリンタドライバ215が、渡されたプリントデータを文字列の単位で処理し、電子ペーパ101に出力するものとする。   The print service 211 has a character string output function 213. According to the character string output function 213, print data can be transferred to the printer driver 215 in units of character strings made up of characters arranged in a line. In the present embodiment, it is assumed that the printer driver 215 processes the received print data in units of character strings and outputs the processed data to the electronic paper 101.

また、本実施形態のプリンタドライバ215は、文書構造化処理部220を備えている。プリンタドライバ215は、本来、プリントデータを渡され、このプリントデータを画像化するデータ(例えばビットマップデータ。)を生成するものである。文書構造化処理部220は、プリンタドライバ215において、画像化の過程で生成される中間文書データを取り扱う文書構造化処理装置として機能する。   The printer driver 215 according to the present embodiment includes a document structuring unit 220. The printer driver 215 originally receives print data, and generates data (for example, bitmap data) for converting the print data into an image. The document structuring processing unit 220 functions as a document structuring processing apparatus that handles intermediate document data generated during the imaging process in the printer driver 215.

このような文書構造化処理部220は、文字列を最小とする単位でプリントデータを処理し、プリントデータの構造を判定する。プリントデータの構造の判定は、文書構造化処理部220に備えられる段落判定部219、レイアウト構造判定部221、キーワード監視部223によって行われる。以上の各構成によってなされる処理については、後に詳述する。   Such a document structuring processing unit 220 processes print data in a unit that minimizes a character string, and determines the structure of the print data. The print data structure is determined by the paragraph determining unit 219, the layout structure determining unit 221, and the keyword monitoring unit 223 provided in the document structuring unit 220. The processing performed by each of the above configurations will be described in detail later.

また、文書構造化処理部220は、判定によって得られた構造化情報に基づいて、プリントデータの構造を示す構造化文書を生成する。本実施形態において、構造化文書の生成は、レイアウト構造判定部221が備えるタグ付け処理部217によって行われる。タグ付け処理部217は、構造化情報を示すタグをプリントデータに付加することによって構造化文書を生成するものである。   In addition, the document structuring processing unit 220 generates a structured document indicating the structure of print data based on the structured information obtained by the determination. In the present embodiment, the structured document is generated by the tagging processing unit 217 included in the layout structure determination unit 221. The tagging processing unit 217 generates a structured document by adding a tag indicating structured information to print data.

本実施形態でいう構造化情報とは、文書データの段落や、段落を基準にした文書のレイアウト構造を示す情報である。なお、本実施形態の構造化情報は、一般的な記述形式であるXHTML(eXtensible HTML)形式等で記述されるものとする。
図4は、文字列を単位とするプリントデータを例示した図である。図4に示した例では、プリントデータによってプリントされる文書の1行分の文字を1つの文字列とする。図示したプリントデータは、文書の1行目、2行目、3行目がプリントされる矩形領域401、402、403の各々の点p1、点p2、点p3の座標(図中に文字列の座標と表記。)と、矩形領域401、402、403の各々の点p’1、点p’2、点p’3の座標(図中に文字列のサイズと表記。)とを示している。
The structured information referred to in the present embodiment is information indicating a paragraph of document data and a document layout structure based on the paragraph. Note that the structured information of the present embodiment is described in a general description format such as XHTML (eXtensible HTML) format.
FIG. 4 is a diagram illustrating print data in units of character strings. In the example shown in FIG. 4, the characters for one line of the document printed by the print data are set as one character string. The illustrated print data includes the coordinates of the points p1, p2, and p3 of the rectangular areas 401, 402, and 403 on which the first, second, and third lines of the document are printed (character strings in the figure). And coordinates of the points p′1, p′2, and p′3 of the rectangular regions 401, 402, and 403 (the size and description of the character string in the figure). .

なお、プリントサービス211とプリンタドライバ215とのインターフェイス(図示せず)は、一般的に文字や画像を全てラスタライズした上でビットマップ化した状態でプリントデータをプリンタドライバ215に送る。あるいは、画像とは別に文字のデータをプリンタドライバ215に送ってもよい。
また、OS200は、表示装置111を制御する表示制御部203、キーボード119やマウス117といった入力装置を制御する入力装置制御部205、電子ペーパ101やプリンタ103といった出力装置を制御する外部入出力制御部207、PC1で作成、あるいはPC1に外部から入力されたデータのファイルを管理するファイル管理機能209を備えている。プリンタドライバ215で構造化された文書は、ファイル管理機能209によって管理される。
Note that an interface (not shown) between the print service 211 and the printer driver 215 generally sends print data to the printer driver 215 in a state where all characters and images are rasterized and converted into a bitmap. Alternatively, character data may be sent to the printer driver 215 separately from the image.
The OS 200 also includes a display control unit 203 that controls the display device 111, an input device control unit 205 that controls input devices such as a keyboard 119 and a mouse 117, and an external input / output control unit that controls output devices such as the electronic paper 101 and the printer 103. 207, a file management function 209 for managing data files created on the PC 1 or input to the PC 1 from the outside. The document structured by the printer driver 215 is managed by the file management function 209.

図3に示したように、OS200は、表示制御部203、外部入出力制御部207、ファイル管理機能209、プリンタドライバ215を提供している。さらに、OS200は、図3中では図示を略すが、図2に示した入力装置制御部205、プリントサービス211を提供している。OS200によって提供される各機能は、アプリケーションソフト群201に含まれる複数のアプリケーションソフトで共通して利用される。   As illustrated in FIG. 3, the OS 200 provides a display control unit 203, an external input / output control unit 207, a file management function 209, and a printer driver 215. Further, although not shown in FIG. 3, the OS 200 provides the input device control unit 205 and the print service 211 shown in FIG. Each function provided by the OS 200 is commonly used by a plurality of application software included in the application software group 201.

複数のアプリケーションソフトには、表示装置111や電子ペーパ101のディスプレイ画面に画像を描画する画面描画用ルーチンと、紙媒体に画像を印刷する印刷出力ルーチンとがあって、両者は一致することもある。多くの場合、OS200の呼び出しに応じて画面描画用のルーチンが先に読み出され、文字コード、文字サイズ、書体等の情報に応じて文字列を表すビットマップを生成する。生成されたビットマップは表示装置111のディスプレイ画面に表示され、オペレータは、アプリケーションソフトで生成されたデータを確認することができる。   The plurality of application software includes a screen drawing routine for drawing an image on the display screen of the display device 111 or the electronic paper 101, and a print output routine for printing an image on a paper medium. . In many cases, a screen drawing routine is read first in response to a call to the OS 200, and a bitmap representing a character string is generated in accordance with information such as a character code, a character size, and a typeface. The generated bitmap is displayed on the display screen of the display device 111, and the operator can check the data generated by the application software.

また、表示されたデータをオペレータが確認した後、印刷要求をした場合、印刷出力用ルーチンが読み出される。印刷出力用ルーチンは、プリンタ103の解像度や用紙のサイズに合わせて印刷を実行する。
また、表示されたデータをオペレータが確認した後、電子ペーパ101への出力要求をした場合、プリントデータとなる文字列は、プリンタドライバ215で構造化されて外部入出力制御部207を介して電子ペーパ101に出力される。
Further, when a print request is made after the operator confirms the displayed data, a print output routine is read out. The print output routine executes printing in accordance with the resolution of the printer 103 and the paper size.
In addition, when the operator confirms the displayed data and makes an output request to the electronic paper 101, the character string that becomes the print data is structured by the printer driver 215 and electronically via the external input / output control unit 207. It is output to the paper 101.

図5は、以上述べた文書構造化処理装置でなされる文書構造化処理の概略を説明するためのフローチャートである。なお、図5に示したフローチャートは、図1に示したプリンタドライバ215においてなされる処理である。本実施形態の文書構造化処理部220は、先ず、プリントサービス211から受け取ったプリントデータの文字列(文字コードで表される。)、文字列に関する図4に例示した座標やサイズ、属性を取得する。なお、属性とは、文字のサイズや書体の他、文書の左端揃えや図形の配置等のレイアウト、ルビや見出し等の情報を含む(S501)。   FIG. 5 is a flowchart for explaining the outline of the document structuring process performed by the document structuring apparatus described above. Note that the flowchart shown in FIG. 5 is processing performed in the printer driver 215 shown in FIG. The document structuring processing unit 220 according to the present embodiment first acquires a character string (represented by a character code) of print data received from the print service 211, and coordinates, size, and attributes illustrated in FIG. To do. The attribute includes information such as a character size and a typeface, a layout such as alignment of the left edge of the document and an arrangement of graphics, ruby, a headline, and the like (S501).

次に、文書構造化処理部220では、段落判定部219が、ステップS501において得た情報に基づき、文字列で構成される文書の段落を判定する(S502)。続いて、文書構造化処理部220では、レイアウト構造判定部221が、ステップS502で段落が判定された文書について段落ごとにレイアウト構造を判定する(S503)。さらに、文書構造化処理部220のキーワード監視部223は、段落に含まれる文字列に含まれるキーワードを検出し、文字列の内容を判定する(S504)。   Next, in the document structuring unit 220, the paragraph determining unit 219 determines a paragraph of a document composed of character strings based on the information obtained in step S501 (S502). Subsequently, in the document structuring unit 220, the layout structure determination unit 221 determines the layout structure for each paragraph for the document whose paragraph is determined in step S502 (S503). Further, the keyword monitoring unit 223 of the document structuring processing unit 220 detects a keyword included in the character string included in the paragraph, and determines the content of the character string (S504).

次に、文書構造化処理部220では、以上の処理によって段落やレイアウト構造等が判定された文書に対し、判定結果を示す情報(タグ)を付して文書を構造化する(S505)。なお、タグは、図2に示したタグ付け処理部217において行われる。
以上の処理の後、文書構造化処理部220は、構造化された文書を、外部入出力制御部207を介して電子ペーパ101に出力する(S506)。電子ペーパ101では、構造化された文書をタグに基づいて解釈し、文書を図示しないディスプレイに表示する。電子ペーパ101の側で表示された文書には、文書の段落やレイアウトに関する情報が付されている。
Next, the document structuring processing unit 220 structures the document by attaching information (tag) indicating the determination result to the document whose paragraph or layout structure is determined by the above processing (S505). Tagging is performed in the tagging processing unit 217 shown in FIG.
After the above processing, the document structuring processing unit 220 outputs the structured document to the electronic paper 101 via the external input / output control unit 207 (S506). The electronic paper 101 interprets the structured document based on the tag and displays the document on a display (not shown). The document displayed on the electronic paper 101 side is attached with information on the paragraph and layout of the document.

このため、オペレータは、表示された文書の1行の文字数、1ページに含まれる行数や列数等を変更することができる。また、このように文書の形式を変更した場合にも、本実施形態によれば、文書の段落やレイアウトが崩れることを防ぐことができる。以下、図5に示した文書構造化の複数の処理を、各々より詳細に説明する。
(1)段落の判定
以下、本実施形態の文書構造化処理装置でなされる段落の判定の方法について説明する。図6は、本実施形態の段落判定の処理を示したフローチャートである。また、図7及び図8は、段落の判定方法を示す模式図であって、図7は行の字下げに基づいて段落を判定する方法を、図8は行と行との間の長さ(行間隔)に基づいて段落を判定する方法を示す。
For this reason, the operator can change the number of characters in one line of the displayed document, the number of lines and the number of columns included in one page, and the like. Even when the document format is changed as described above, according to the present embodiment, it is possible to prevent the paragraphs and layout of the document from being corrupted. Hereinafter, each of the plurality of document structuring processes shown in FIG. 5 will be described in more detail.
(1) Paragraph Determination A paragraph determination method performed by the document structuring apparatus according to this embodiment will be described below. FIG. 6 is a flowchart showing the paragraph determination processing of the present embodiment. 7 and 8 are schematic diagrams showing a method for determining a paragraph. FIG. 7 shows a method for determining a paragraph based on indentation of a line, and FIG. 8 shows a length between lines. A method for determining a paragraph based on (line spacing) will be described.

図2に示した段落判定部219は、図6のフローチャートに示すように、プリントサービス211からプリントデータからプリントすべき文字のフォントサイズを取得する(S601)。そして、文字列で構成される各行の先頭に字下げが存在するか否か判断する(S602)。判断の結果、字下げが検出された場合(S602:Yes)、字下げが検出された文字列が段落の開始行であると判断する(S605)。   The paragraph determination unit 219 shown in FIG. 2 acquires the font size of the character to be printed from the print data 211 from the print service 211 as shown in the flowchart of FIG. 6 (S601). Then, it is determined whether or not there is an indentation at the head of each line composed of character strings (S602). If indentation is detected as a result of the determination (S602: Yes), it is determined that the character string in which indentation is detected is the start line of the paragraph (S605).

図7は、複数の文字列6によって構成された文書を示している。図示を略すが、各文字列6は、各々複数の文字を一列に配置されて構成されている。本実施形態では、文書の1行分を1つの文字列6とする。段落判定部219は、図示した文字列6のうち、行頭部分に1以上の文字幅分の空白があるか否かを調べることによって字下げを検出する。なお、文字幅は、ステップS601の処理で取得したフォントサイズから検出される。   FIG. 7 shows a document composed of a plurality of character strings 6. Although not shown, each character string 6 is configured by arranging a plurality of characters in a line. In the present embodiment, one line of the document is defined as one character string 6. The paragraph determination unit 219 detects the indentation by checking whether or not there is a space of one or more character widths at the beginning of the line in the illustrated character string 6. Note that the character width is detected from the font size acquired in the process of step S601.

ステップS602において行の先頭の字下げが検出されなかった場合(S602:No)、段落判定部219は、文字列の間隔を行間隔として取得する。行間隔は、例えば、プリントデータのうちの図4に示した各文字列6の座標から得ることができる。そして、取得した行間隔が、以前に取得された行間隔より広いか否か判断する(S603)。ステップS603の判断の結果、取得された行間隔が以前に取得されたもの(通常の行間隔と記す。)より広い場合(S603:Yes)、直前の行にあたる文字列と通常の行間隔よりも広い間隔を持って位置する文字列が次の段落の開始行であると判断する(S605)。   If the indentation at the beginning of the line is not detected in step S602 (S602: No), the paragraph determination unit 219 acquires the character string interval as the line interval. The line spacing can be obtained, for example, from the coordinates of each character string 6 shown in FIG. 4 in the print data. Then, it is determined whether or not the acquired line interval is wider than the previously acquired line interval (S603). As a result of the determination in step S603, when the acquired line interval is wider than the previously acquired line (denoted as a normal line interval) (S603: Yes), the character string corresponding to the immediately preceding line and the normal line interval It is determined that the character string positioned with a wide interval is the start line of the next paragraph (S605).

図8は、図7と同様に、複数の文字列6によって構成された文書を示している。段落判定部219は、直前の文字列の座標と今回処理すべき文字列との座標とから文字間隔を検出する。図示した例では、1行目から3行目までにある文字列6の行間隔は一定の値aであるが、3行目にあたる文字列6と4行目にあたる文字列6との間の行間隔が値aより長い値bである。このような場合、段落判定部219は、3行目にあたる文字列6と4行目にあたる文字列6との行間隔が通常より長いと判断する。   FIG. 8 shows a document composed of a plurality of character strings 6 as in FIG. The paragraph determination unit 219 detects the character spacing from the coordinates of the immediately preceding character string and the coordinates of the character string to be processed this time. In the illustrated example, the line spacing of the character string 6 from the first line to the third line is a constant value a, but the line between the character string 6 corresponding to the third line and the character string 6 corresponding to the fourth line. The interval is a value b longer than the value a. In such a case, the paragraph determination unit 219 determines that the line interval between the character string 6 corresponding to the third line and the character string 6 corresponding to the fourth line is longer than usual.

プリンタドライバ215は、プリントサービス211からプリントデータを行ごとに順次受け取って以上の処理を実行する。そして、文書にある末尾の行にあたる文字列について字下げの検出、あるいは行間隔の取得の処理が終了したか否か判断する(S604)。判断の結果、処理が末尾の行に達していれば(S604:Yes)、段落判定部219は、段落判定の処理を終了する。   The printer driver 215 sequentially receives print data for each row from the print service 211 and executes the above processing. Then, it is determined whether or not the process of detecting indentation or obtaining the line interval is completed for the character string corresponding to the last line in the document (S604). As a result of the determination, if the process has reached the last line (S604: Yes), the paragraph determination unit 219 ends the paragraph determination process.

また、処理が末尾の行に達していない場合(S604:No)、次の行のフォントサイズを取得し、次の行にあたる文字列について処理を続行する。
以上の処理により、図7に示した例では、文字列6のうちの1行目にあたる文字列6の先頭に字下げ601aが検出される。また、文字列6のうちの4行目にあたる文字列6の先頭に字下げ602aが検出される。段落判定部219は、1行目にあたる文字列6が段落の開始行であると判断し、4行目にあたる文字列6aが次の段落の開始行であると判断する。したがって、段落判定部219は、文書の1行目から4行目の直前の行(3行目)が1つの段落601であると判定する。
If the process has not reached the last line (S604: No), the font size of the next line is acquired, and the process is continued for the character string corresponding to the next line.
Through the above processing, in the example shown in FIG. 7, the indent 601 a is detected at the head of the character string 6 corresponding to the first line of the character string 6. Further, an indent 602a is detected at the head of the character string 6 corresponding to the fourth line of the character string 6. The paragraph determination unit 219 determines that the character string 6 corresponding to the first line is the start line of the paragraph, and determines that the character string 6a corresponding to the fourth line is the start line of the next paragraph. Therefore, the paragraph determination unit 219 determines that the line immediately before the first to fourth lines (third line) of the document is one paragraph 601.

また、図7に示した例によれば、文字列6のうちの7行目にあたる文字列6の先頭に字下げ603aが検出される。したがって、段落判定部219は、7行目にあたる文字列6が段落の開始行であると判断し、文書の4行目から7行目の直前の行(6行目)が1つの段落602であると判定する。
また、以上の処理により、図8に示した例では、文字列6のうち、直前の行にあたる文字列6と通常よりも広い行間隔を持って位置する文字列が段落の開始行であると判断する。このため、段落判定部219は、文書の1行目から4行目の直前の行(3行目)が1つの段落701であると判定する。さらに、文書の6行目にあたる文字列6と直後の行にあたる文字列(図示せず)との行間隔が通常の値aよりも長い場合、段落判定部219は、7行目にあたる文字列6が段落の開始行であると判断し、文書の4行目から7行目の直前の行(6行目)が1つの段落702であると判定する。
Further, according to the example shown in FIG. 7, an indent 603 a is detected at the head of the character string 6 corresponding to the seventh line of the character string 6. Therefore, the paragraph determining unit 219 determines that the character string 6 corresponding to the seventh line is the start line of the paragraph, and the line immediately preceding the fourth to seventh lines (the sixth line) of the document is one paragraph 602. Judge that there is.
Further, with the above processing, in the example shown in FIG. 8, in the character string 6, a character string positioned with a line spacing wider than the character string 6 corresponding to the immediately preceding line is the start line of the paragraph. to decide. For this reason, the paragraph determination unit 219 determines that the line immediately before the first line to the fourth line (third line) of the document is one paragraph 701. Furthermore, when the line interval between the character string 6 corresponding to the sixth line of the document and the character string corresponding to the immediately following line (not shown) is longer than the normal value a, the paragraph determining unit 219 causes the character string 6 corresponding to the seventh line. Is the start line of the paragraph, and the line immediately before the fourth to seventh lines (the sixth line) of the document is determined to be one paragraph 702.

以上の処理の後、段落判定の結果は、構造化情報として段落判定部219からタグ付け処理部217に渡される。プリントデータには、この構造化情報に基づいて、後に段落を示すタグ付けが行われる。
(2)レイアウト構造の判定
・余白に基づくレイアウト構造の判定
次に、余白に基づく文書のレイアウト構造を判定する処理について説明する。
After the above processing, the result of the paragraph determination is passed from the paragraph determination unit 219 to the tagging processing unit 217 as structured information. The print data is later tagged with a paragraph based on the structured information.
(2) Determination of layout structure Determination of layout structure based on margins Next, processing for determining a layout structure of a document based on margins will be described.

図9は、余白に基づく文書のレイアウト構造を判定する方法を説明するためのフローチャートである。また、図10ないし図12は、図9のフローチャートに示した文書のレイアウト構造を判定する方法を説明するための図である。
図9に示したように、レイアウト構造判定部221は、段落判定部219から送られてきた文書を受け取り、文字列の両端にある空白の領域(余白)を検出する。余白の検出は、段落判定部219によって判定された段落ごとに行われる(S901)。以下、本実施形態では、先ず、1段落に含まれる文字列の左側にある余白(左余白)と、右側にある余白(右余白)との大きさを比較する(S902)。
FIG. 9 is a flowchart for explaining a method for determining the layout structure of a document based on margins. 10 to 12 are diagrams for explaining a method for determining the layout structure of the document shown in the flowchart of FIG.
As shown in FIG. 9, the layout structure determination unit 221 receives the document sent from the paragraph determination unit 219 and detects blank areas (margins) at both ends of the character string. The margin is detected for each paragraph determined by the paragraph determination unit 219 (S901). Hereinafter, in the present embodiment, first, the size of the margin on the left side (left margin) of the character string included in one paragraph is compared with the size of the margin on the right side (right margin) (S902).

図10は、ステップS902においてなされる比較の方法を説明するための図である。なお、本実施形態では、余白の大きさを、段落1000の左から用紙P左端までの長さa、b、c、dと、段落1000の右から用紙P右端までの長さa’、b’、c’、d’とを、各々対応する長さ同士で比較する。対応する長さ同士とは、例えば、段落に含まれる文字列のうち、特定の文字列(例えば文字列60)の左端から用紙P左端までの長さdと、同じ文字列60の右端から用紙P右端までの長さd’とを比較することを指す。   FIG. 10 is a diagram for explaining the comparison method performed in step S902. In the present embodiment, the size of the margin is set to the lengths a, b, c, d from the left of the paragraph 1000 to the left end of the paper P, and the lengths a ′, b from the right of the paragraph 1000 to the right end of the paper P. ', C', and d 'are compared with the corresponding lengths. The corresponding lengths are, for example, the length d from the left end of a specific character string (for example, the character string 60) to the left end of the paper P among the character strings included in the paragraph, and the paper from the right end of the same character string 60 to the paper. It means comparing with the length d ′ up to the right end of P.

すなわち、レイアウト構造判定部221は、段落1000に含まれる各文字列6の左端から用紙Pの左端までの長さa、b、c、dが0に略等しく、かつ各文字列6の右端から用紙Pの右端までの長さa’、b’、c’、d’が0より大であるか否か判断する。この判断の結果、長さa、b、c、dの値が0に略等しく、かつ長さa’、b’、c’、d’が0より大であれば(S902:Yes)、段落1000が左揃えのレイアウト構造であると判断する(S908)。   That is, the layout structure determination unit 221 has lengths a, b, c, d from the left end of each character string 6 included in the paragraph 1000 to the left end of the paper P substantially equal to 0, and from the right end of each character string 6. It is determined whether or not the lengths a ′, b ′, c ′, d ′ to the right end of the paper P are greater than zero. As a result of this determination, if the values of the lengths a, b, c, d are substantially equal to 0 and the lengths a ′, b ′, c ′, d ′ are greater than 0 (S902: Yes), the paragraph 1000 is determined to be a left-aligned layout structure (S908).

一方、ステップS902において「ノー」と判断された場合(S902:No)、長さa、b、c、dが0より大であって、かつ長さa’、b’、c’、d’が0に略等しいか否か判断する(S903)。この結果、長さa、b、c、dが0より大であって、かつ長さa’〜d’が0に略等しい場合(S903:Yes)、段落1000が右揃えのレイアウト構造であると判断する(S909)。   On the other hand, if “NO” is determined in step S902 (S902: NO), the lengths a, b, c, d are greater than 0, and the lengths a ′, b ′, c ′, d ′. Is determined to be substantially equal to 0 (S903). As a result, when the lengths a, b, c, and d are greater than 0 and the lengths a ′ to d ′ are substantially equal to 0 (S903: Yes), the paragraph 1000 has a right-aligned layout structure. (S909).

また、ステップS903において「ノー」と判断された場合(S903:No)、レイアウト構造判定部221は、長さa、b、c、dと長さa’、b’、c’、d’とが、いずれも0に略等しいか否か判断する(S904)。この判断の結果、長さa、b、c、dと長さa’、b’、c’、d’とが、いずれも0に略等しい場合(S904:Yes)、レイアウト構造判定部221は、段落1000が通常レイアウト(左端にも右端にも余白を設けていない)構造を有するものと判断する(S907)。   If it is determined “No” in step S903 (S903: No), the layout structure determination unit 221 determines the lengths a, b, c, and d and the lengths a ′, b ′, c ′, and d ′. Are all substantially equal to 0 (S904). If the lengths a, b, c, d and the lengths a ′, b ′, c ′, d ′ are all substantially equal to 0 as a result of this determination (S904: Yes), the layout structure determination unit 221 , It is determined that the paragraph 1000 has a normal layout (no margins are provided at either the left end or the right end) (S907).

さらに、レイアウト構造判定部221は、ステップS904において、「ノー」と判断された場合(S904:No)、長さaと長さa’、長さbと長さb’、長さcと長さc’長さdと長さd’がそれぞれ略等しいか否か判断する(S905)。この判断の結果、長さaと長さa’、長さbと長さb’、長さcと長さc’ 長さdと長さd’がそれぞれ略等しい場合(S905:Yes)、段落1000が中央揃え(センタリング)のレイアウト構造を有しているものと判断する(S906)。文字列6がセンタリングされた状態の長さa、b、c、dと長さa’、b’、c’、d’との関係を、図11に示す。   Furthermore, when the layout structure determination unit 221 determines “No” in step S904 (S904: No), the length a and the length a ′, the length b and the length b ′, and the length c and the length It is determined whether or not the length c ′ and the length d ′ are substantially equal (S905). As a result of this determination, when the length a and the length a ′, the length b and the length b ′, the length c and the length c ′, the length d and the length d ′ are approximately equal (S905: Yes), It is determined that the paragraph 1000 has a centered layout structure (S906). FIG. 11 shows the relationship between the lengths a, b, c, d and the lengths a ′, b ′, c ′, d ′ when the character string 6 is centered.

また、レイアウト構造判定部221は、ステップS905において「ノー」と判断された場合(S905:No)、段落1000が、通常レイアウト構造を有するものと判断する(S907)。
また、本実施形態のレイアウト構造の判定は、以上述べた構成に限定されるものではない。すなわち、先に述べたレイアウト構造の判定では、段落の左余白と右余白とを比較してレイアウト構造を判定している。しかし、段落の上方の余白(上余白)と段落の下方の余白(下方余白)とを比較することによって段落の上下方向のレイアウトを判定することができる。
If the layout structure determination unit 221 determines “No” in step S905 (S905: No), the layout structure determination unit 221 determines that the paragraph 1000 has a normal layout structure (S907).
Further, the determination of the layout structure of the present embodiment is not limited to the configuration described above. That is, in the determination of the layout structure described above, the layout structure is determined by comparing the left margin and the right margin of the paragraph. However, the vertical layout of a paragraph can be determined by comparing the upper margin of the paragraph (upper margin) with the lower margin of the paragraph (lower margin).

図12は、段落1000の上下方向のレイアウトを判定する方法を説明するための図である。図12に示した例では、段落1000の上余白と下余白の大きさを、段落1000の上端から用紙P上端までの長さa、b、c、dと、段落1000の下端から用紙P下端までの長さa’、b’、c’、d’とを、対応する長さ同士で比較する。比較の結果、例えば、長さa、b、c、dがいずれも略同じであって、長さa’、b’、c’、d’のうちの対応するもの(例えば長さaには長さa’が対応する)よりも短い場合、レイアウト構造判定部221は、段落1000が上端揃えであると判断する。   FIG. 12 is a diagram for explaining a method for determining the vertical layout of the paragraph 1000. In the example shown in FIG. 12, the size of the upper and lower margins of the paragraph 1000 is set to the lengths a, b, c, d from the upper end of the paragraph 1000 to the upper end of the paper P, and from the lower end of the paragraph 1000 to the lower end of the paper P. The lengths a ′, b ′, c ′, and d ′ up to are compared with corresponding lengths. As a result of the comparison, for example, the lengths a, b, c, and d are substantially the same, and the corresponding ones of the lengths a ′, b ′, c ′, and d ′ (for example, the length a is If the length a ′ is shorter than the corresponding length), the layout structure determination unit 221 determines that the paragraph 1000 is aligned at the upper end.

なお、本実施形態では、このような処理を図9のフローチャート中の括弧内に示す。すなわち、図9のフローチャートは、図中の左の文字を括弧内の上、右の文字を括弧内の下に読み替えることよって段落の上下方向のレイアウトを判定するフローチャートとなる。
また、以上述べた段落の左側、右側の余白を比較するレイアウト構造の判定方法によれば、文書を段落等の単位ごとに字下げする、いわゆるインデントの設定がなされていることを判定することができる。図13は、文書が段落1301、段落1302、段落1303ごとにインデントされた状態を示している。
In the present embodiment, such processing is shown in parentheses in the flowchart of FIG. That is, the flowchart of FIG. 9 is a flowchart for determining the vertical layout of a paragraph by replacing the left character in the figure above the parentheses and the right character below the parentheses.
Further, according to the layout structure determination method for comparing the left and right margins of the paragraph described above, it is determined that a so-called indent is set to indent the document for each unit such as a paragraph. it can. FIG. 13 shows a state where the document is indented for each of the paragraphs 1301, 1302, and 1303.

また、本実施形態のレイアウト構造判定部221は、以上述べた方法を応用し、文書中の図形の位置をも判定し、文書を構造化することができる。このような処理を、図14、図15に例示する。
すなわち、図14、図15に示した文書中の図形141、図形151は、いずれも他の文字とサイズが異なる文字と同様に取り扱われる。したがって、レイアウト構造判定部221は、図14に示した処理では、図形をも含めた段落140の左余白を示す長さa、b、c、d、e、fと、右余白を示す長さa’、b’、c’、d’、e’、f’とを対応する長さ同士比較する。
In addition, the layout structure determination unit 221 according to the present embodiment can apply the above-described method to determine the position of a graphic in the document and to structure the document. Such processing is illustrated in FIGS. 14 and 15.
That is, the graphic 141 and the graphic 151 in the document shown in FIG. 14 and FIG. 15 are all handled in the same manner as other characters having different sizes. Therefore, in the process shown in FIG. 14, the layout structure determining unit 221 includes lengths a, b, c, d, e, and f indicating the left margin of the paragraph 140 including the graphic, and a length indicating the right margin. The lengths a ′, b ′, c ′, d ′, e ′, and f ′ are compared with each other.

この結果、図14に示した例では、長さa、b、c、d、eと、長さa’、b’、c’、d’、e’とが各々略等しいものの、長さfと長さf’において、f<f’が成立する。このような場合、レイアウト構造判定部221は、図形141を含む段落140が、左端揃いのレイアウト構造を持つものと判定する。なお、図14に示したレイアウト構造の場合、段落140における図形141の周辺にも文字列6がある。このような状態を、本実施形態では、テキストの回りこみがあるとも記す。   As a result, in the example shown in FIG. 14, the lengths a, b, c, d, and e are substantially equal to the lengths a ′, b ′, c ′, d ′, and e ′. And f <f ′ holds for the length f ′. In such a case, the layout structure determination unit 221 determines that the paragraph 140 including the graphic 141 has a left-aligned layout structure. In the case of the layout structure shown in FIG. 14, there is also a character string 6 around the figure 141 in the paragraph 140. Such a state is also described as text wraparound in this embodiment.

また、図15に示した処理では、図形をも含めた段落150の左余白を示す長さaと、右余白を示すa’とが略等しい。このような場合、レイアウト構造判定部221は、図形151を含む段落150が、両端揃いのレイアウト構造を持つものと判定する。なお、図15に示したレイアウト構造の場合、段落150における図形151の周辺に文字列6は存在しない。このような状態を、本実施形態では、テキストの回りこみがないとも記す。   Further, in the process shown in FIG. 15, the length a indicating the left margin of the paragraph 150 including the figure is substantially equal to a ′ indicating the right margin. In such a case, the layout structure determination unit 221 determines that the paragraph 150 including the graphic 151 has a layout structure with both ends aligned. In the case of the layout structure shown in FIG. 15, the character string 6 does not exist around the graphic 151 in the paragraph 150. In this embodiment, such a state is also described as having no text wraparound.

・文字サイズに基づくレイアウト構造の判定
次に、文字サイズに基づく文書のレイアウト構造を判定する処理について説明する。
図16は、文字サイズに基づく文書のレイアウト構造を判定する方法を説明するためのフローチャートである。また、図17は、図16のフローチャートに示した文書のレイアウト構造を判定する方法を説明するための図である。
Determination of layout structure based on character size Next, processing for determining the layout structure of a document based on character size will be described.
FIG. 16 is a flowchart for explaining a method of determining the layout structure of a document based on the character size. FIG. 17 is a diagram for explaining a method of determining the layout structure of the document shown in the flowchart of FIG.

図16のフローチャートに示したように、レイアウト構造判定部221は、判定された段落に含まれる文字列の文字サイズを取得する(S161)。なお、文字サイズは、文書構造化処理部220に渡されたプリントデータに含まれていて、容易に取得することができる。
次に、レイアウト構造判定部221は、プリントデータに基づいて、段落に含まれる文字列の文字のサイズを抽出する。そして、この結果から、段落において、一般的に文書内で出現頻度が高いとされている9〜12ポイントの文字が所定の値より高い頻度で出現しているか否か判断する(S162)。この判断の結果、段落内において9〜12ポイントの文字の出現頻度が所定の値より低い場合(S162:No)、9ポイント以下のポイントの文字が文字列間(行間)に存在するか否か判断する(S163)。
As shown in the flowchart of FIG. 16, the layout structure determination unit 221 acquires the character size of the character string included in the determined paragraph (S161). Note that the character size is included in the print data passed to the document structuring processing unit 220 and can be easily obtained.
Next, the layout structure determination unit 221 extracts the character size of the character string included in the paragraph based on the print data. From this result, it is determined whether or not 9 to 12 point characters, which are generally regarded as having a high appearance frequency in the document, appear at a frequency higher than a predetermined value in the paragraph (S162). As a result of the determination, if the appearance frequency of characters of 9 to 12 points in the paragraph is lower than a predetermined value (S162: No), whether or not characters of points of 9 points or less exist between character strings (line intervals). Judgment is made (S163).

ステップS163の判断の結果、行間に9ポイント以下の文字が存在する場合(S163:Yes)、レイアウト構造判定部221は、この文字をルビであると判定する(S166)。また、ステップS163の判断の結果、行間に9ポイント以下の文字が存在しない場合(S163:No)、10ポイント以上のポイントの文字が太字、あるいは下線付き、中央揃えの文字(強調文字)として存在しているか否か判断する(S164)。この判断の結果、10ポイント以上のポイントの強調文字が存在していれば(S164:Yes)、この段落を見出しと判定する(S167)。   As a result of the determination in step S163, if there is a character of 9 points or less between the lines (S163: Yes), the layout structure determination unit 221 determines that this character is ruby (S166). If the result of determination in step S163 is that there are no characters of 9 points or less between lines (S163: No), characters of 10 points or more exist as bold or underlined, center-aligned characters (emphasized characters) It is determined whether or not (S164). As a result of this determination, if there is an emphasized character of 10 points or more (S164: Yes), this paragraph is determined as a headline (S167).

また、ステップS164において、10ポイント以上の強調文字がない場合(S164:No)、この文字列に含まれる文字を文書の本体を構成する文字と判定する(S165)。なお、ステップS162において、この段落の文字サイズが9〜12ポイントであると判定された場合(S162:Yes)にも、この段落を文書本体であると判断する(S165)。   If there is no emphasized character of 10 points or more in step S164 (S164: No), it is determined that the character included in the character string is a character constituting the main body of the document (S165). If it is determined in step S162 that the character size of this paragraph is 9 to 12 points (S162: Yes), it is determined that this paragraph is a document body (S165).

図17は、このような処理を説明するための図であって、ルビや強調文字を含む文書を示している。図17に示した文書は、レイアウト構造判定部221によって段落174a、段落174b、段落174cの3つの段落を含んでいると判定されている。段落174aは、1行分の文字列を含み、文字列がすべて強調文字172で構成されている。したがって、この段落は、見出しであると判定される。   FIG. 17 is a diagram for explaining such processing, and shows a document including ruby and emphasized characters. The document shown in FIG. 17 is determined by the layout structure determination unit 221 to include the three paragraphs of the paragraph 174a, the paragraph 174b, and the paragraph 174c. The paragraph 174a includes a character string for one line, and the character string is entirely composed of emphasized characters 172. Therefore, this paragraph is determined to be a heading.

また、段落174bは、9〜12ポイントの文字173と、9ポイント以下の文字171とによって構成されている。このような段落では、文字173の出現頻度が、すべて文字173によって構成される段落よりも低い。したがって、レイアウト構造判定部221は、段落174bは文字173の出現頻度が所定の値よりも低いことを検出できる。
また、段落174bでは、文字173で構成された文字列間に9ポイントより小さいポイントの文字で171が存在する。レイアウト構造判定部221は、文字171で構成される文字列をルビであると判定する。同様に、後の段落174cにおいても、文字173で構成される文字列間に文字171で構成される文字列が存在する。この文字列についても、レイアウト構造判定部221は、ルビであると判定する。
The paragraph 174b includes characters 173 having 9 to 12 points and characters 171 having 9 points or less. In such a paragraph, the appearance frequency of the character 173 is lower than that of a paragraph composed of all the characters 173. Therefore, the layout structure determination unit 221 can detect that the appearance frequency of the character 173 in the paragraph 174b is lower than a predetermined value.
Also, in the paragraph 174b, there are 171 characters with a point smaller than 9 points between character strings composed of the characters 173. The layout structure determination unit 221 determines that the character string composed of the characters 171 is ruby. Similarly, in the later paragraph 174c, a character string composed of characters 171 exists between character strings composed of characters 173. Also for this character string, the layout structure determination unit 221 determines that it is ruby.

以上の処理の後、レイアウト構造判定部221による判定結果は、構造化情報としてタグ付け処理部217に渡される。この判定結果により、プリントデータは、後にルビや見出し、文書本体といった情報を示すタグが付されて構造化される。
(3)キーワードに基づくレイアウト構造の判定
次に、本実施形態のキーワードに基づくレイアウト構造の判定について説明する。キーワードに基づくレイアウト構造の判定は、文書構造化処理部220のキーワード監視部223によってなされる。キーワード監視部223は、文字列に含まれるキーワードを検出し、このキーワードの意味に基づいてプリントデータのレイアウトに関する構造を判定する。
After the above processing, the determination result by the layout structure determination unit 221 is passed to the tagging processing unit 217 as structured information. Based on the determination result, the print data is structured with tags indicating information such as ruby, headline, and document body later.
(3) Determination of layout structure based on keyword Next, the determination of the layout structure based on the keyword of the present embodiment will be described. The determination of the layout structure based on the keyword is performed by the keyword monitoring unit 223 of the document structuring processing unit 220. The keyword monitoring unit 223 detects a keyword included in the character string, and determines the structure related to the layout of the print data based on the meaning of the keyword.

本実施形態では、文字列先頭の「・」、「http://」、「mailto:」、「@」、連続する数字「1、2、3…」をキーワードとして扱う。キーワード監視部223は、このようなキーワードを記憶した記憶部(図示せず)を備えていて、文字列をこの記憶部に記憶されたキーワードと文字列ごとに対照する。そして、文字列にキーワードのいずれかが含まれている場合、このキーワードに応じて文字列、あるいは文字列でなる段落のレイアウト構造を判定する。   In the present embodiment, “·”, “http: //”, “mailto:”, “@”, and consecutive numbers “1, 2, 3,. The keyword monitoring unit 223 includes a storage unit (not shown) that stores such a keyword, and compares the character string with the keyword stored in the storage unit for each character string. If any of the keywords is included in the character string, the layout structure of the character string or the paragraph composed of the character string is determined according to the keyword.

図18は、キーワードに基づくレイアウト構造の判定の処理を示したフローチャートである。キーワード監視部223は、プリンタデータを段落ごとに取り込み、この段落が見出しの段落であるか否か判断する(S181)。この判断は、前述したレイアウト構造判定部221による判定結果に基づいて行われる。この判断によって、段落が見出しを示すものでないと判断された場合(S181:No)、この段落の各行にあたる複数の文字列の先頭が揃っているか否か判断する(S182)。   FIG. 18 is a flowchart showing a layout structure determination process based on keywords. The keyword monitoring unit 223 takes in the printer data for each paragraph, and determines whether this paragraph is a headline paragraph (S181). This determination is made based on the determination result by the layout structure determination unit 221 described above. If it is determined by this determination that the paragraph does not indicate a headline (S181: No), it is determined whether or not the heads of a plurality of character strings corresponding to the respective lines of this paragraph are aligned (S182).

ステップS182において、複数の文字列の先頭が揃っている場合(S182:Yes)、文字列の先頭が「・」で始まるか否か判断する(S186)。先頭が「・」で始まる場合(S186:Yes)、この複数行分に相当する文字列でなる段落をリスト段落とする(S189)。
図19は、以上の処理を説明するための図であって、プリントデータによって表示される文書を示している。この文書には、段落191、段落192、段落193、段落194の4つの段落がある。キーワード監視部223は、段落191、段落192、段落193、段落194の順にレイアウト構造を判定する。
In step S182, when the heads of a plurality of character strings are aligned (S182: Yes), it is determined whether or not the heads of the character strings start with “·” (S186). When the head starts with “·” (S186: Yes), a paragraph composed of character strings corresponding to the plurality of lines is set as a list paragraph (S189).
FIG. 19 is a diagram for explaining the above processing, and shows a document displayed by print data. This document has four paragraphs: paragraph 191, paragraph 192, paragraph 193, and paragraph 194. The keyword monitoring unit 223 determines the layout structure in the order of paragraph 191, paragraph 192, paragraph 193, and paragraph 194.

段落191は、9〜12ポイントより大きなポイントの文字で構成された文字列でなり、先にレイアウト構造判定部221によって見出しの段落であると判定されている。また、段落193は、文字列の先頭が揃っていて、先頭が「・」で始まっている。このような段落は、リストの項目を示す段落であると判定される。
また、キーワード監視部223は、ステップS186において、段落を構成する文字列の先頭に「・」の文字が含まれるかいないと判断した場合(S186:No)、文字列の先頭に連続する数字が含まれているか否か判断する(S187)。この結果、文字列の先頭に連続して増加する数字が含まれている場合(S187:Yes)、この段落を番号付きリストの項目段落と判定する(S190)。図20は、番号付きリストの項目段落2001を示す図である。
The paragraph 191 is a character string composed of characters with points greater than 9 to 12 points, and is determined by the layout structure determination unit 221 to be a headline paragraph. In the paragraph 193, the beginnings of the character strings are aligned, and the beginnings begin with “·”. Such a paragraph is determined to be a paragraph indicating an item in the list.
If the keyword monitoring unit 223 determines in step S186 that a character “·” is not included at the beginning of the character string constituting the paragraph (S186: No), a number that continues at the beginning of the character string is displayed. It is determined whether it is included (S187). As a result, when a continuously increasing number is included at the beginning of the character string (S187: Yes), this paragraph is determined as an item paragraph of the numbered list (S190). FIG. 20 is a diagram showing an item paragraph 2001 of the numbered list.

また、キーワード監視部223は、ステップS181において、段落が見出しを示す段落であると判定された場合(S181:Yes)、さらに、この段落の先頭に連続して増加する数字が含まれているか否か判断する(S191)。この結果、連続して増加する数字が含まれている場合(S191:Yes)、この段落に章あるいは節を示す番号が付されていると判断する(S192)。図21は、章や節を示す番号が付された段落2101、段落2102を示す図である。   If it is determined in step S181 that the paragraph is a paragraph indicating a headline (S181: Yes), the keyword monitoring unit 223 further determines whether or not a continuously increasing number is included at the beginning of the paragraph. Is determined (S191). As a result, when continuously increasing numbers are included (S191: Yes), it is determined that a number indicating a chapter or a section is attached to this paragraph (S192). FIG. 21 is a diagram showing paragraphs 2101 and 2102 with numbers indicating chapters and sections.

以上の処理の後、この段落が、リストの項目を示す段落、番号付きリストの項目段落、章あるいは節を示す番号付の段落のいずれでもないと判断された場合、キーワード監視部223は、この段落にキーワード「http://」で始まるASCII文字を含む文字列があるか否か判断する(S183)。そして、このような文字列が段落に含まれている場合(S183:Yes)、この文字列がURLであると判定する(S184)。   After the above processing, if it is determined that this paragraph is neither a paragraph indicating a list item, an item paragraph of a numbered list, a numbered paragraph indicating a chapter or a section, the keyword monitoring unit 223 It is determined whether or not there is a character string including ASCII characters beginning with the keyword “http: //” in the paragraph (S183). If such a character string is included in the paragraph (S183: Yes), it is determined that the character string is a URL (S184).

さらに、ステップS183において、「http://」で始まるASCII文字を含む文字列がないと判定された場合(S183:No)、「mailto:」で始まるASCII文字、あるいは「@」を挟むASCII文字列を含む文字列が段落中にあるか否か判断する(S185)。このような文字列を含むと判定された場合(S185:Yes)、この文字列がメールアドレスであると判定する(S188)。   Furthermore, when it is determined in step S183 that there is no character string including an ASCII character starting with “http: //” (S183: No), an ASCII character starting with “mailto:” or an ASCII character sandwiching “@” is inserted. It is determined whether or not the character string including the column is in the paragraph (S185). If it is determined that such a character string is included (S185: Yes), it is determined that this character string is a mail address (S188).

図22は、URLを含む文字列でなる段落2201を示す図である。URLやメールアドレスを含む文字列は、構造化されることによって出力先である電子ペーパ101側ではURLや電子メールのアドレスへのリンク機能を実現する。すなわち、URLは、電子ペーパ101の側でURLを示す文字列上でクリックが行われた場合にURLが示すページを表示する、あるいはURLによって指定されたアドレス宛の電子メールを作成するものと認識される。   FIG. 22 is a diagram showing a paragraph 2201 formed of a character string including a URL. The character string including the URL and the mail address is structured to realize a link function to the URL or the email address on the electronic paper 101 side as the output destination. That is, the URL is recognized to display the page indicated by the URL when the electronic paper 101 is clicked on the character string indicating the URL, or to create an e-mail addressed to the address specified by the URL. Is done.

以上の処理の後、キーワード監視部223は、判定の結果を構造化情報としてタグ付け処理部217に渡す。プリントデータは、キーワードの判定結果に応じて文字列が持つリスト項目や章番号といった意味が失われないように構造化される。この構造化により、例えば、項目や章番号等を含む文字列の改行を禁止することができる。
(4)構造化(タグ付け)処理
タグ付け処理部217は、段落判定部219、レイアウト構造判定部221、キーワード監視部223によってなされた判定結果に基づいて、プリントデータを構造化する。以下に、本実施形態によって構造化されたプリントデータ(構造化文書)を例示する。以下の例では、構造化文書が、XHTML(eXtensible HTML)形式で記述されている。ただし、本実施形態は、XHTML形式で構造化文書を記述するものに限定されるものでなく、どのようなフォーマットを使って記述するものであってもよい。

<?xml version="1.0" encoding="Shift_JIS"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<body>
<h2>構造化文書について</h2>
<p>構造化文書のフォーマットとしては以下が有名である。</p>
<ul>
<li>SGML</li>
<li>HTML</li>
<li>XML</li>
<li>XHTML</li>
</ul>
<p>SGMLとはStandard Generalized Markup Languageの略であり、
システムに依存しない情報の記述方法として定められた。
After the above processing, the keyword monitoring unit 223 passes the determination result to the tagging processing unit 217 as structured information. The print data is structured so that meanings such as list items and chapter numbers of character strings are not lost in accordance with keyword determination results. With this structuring, for example, line breaks in character strings including items and chapter numbers can be prohibited.
(4) Structuring (Tagging) Processing The tagging processing unit 217 structures print data based on the determination results made by the paragraph determination unit 219, the layout structure determination unit 221, and the keyword monitoring unit 223. Hereinafter, print data (structured document) structured according to the present embodiment will be exemplified. In the following example, the structured document is described in the XHTML (eXtensible HTML) format. However, the present embodiment is not limited to describing structured documents in the XHTML format, and may be described using any format.

<? xml version = "1.0" encoding = "Shift_JIS"?>
<! DOCTYPE html PUBLIC "-// W3C // DTD XHTML 1.0 Strict // EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml" xml: lang = "en" lang = "en">
<body>
<h2> About structured documents </ h2>
<p> The following are well-known formats for structured documents. </ p>
<ul>
<li> SGML </ li>
<li> HTML </ li>
<li> XML </ li>
<li> XHTML </ li>
</ ul>
<p> SGML stands for Standard Generalized Markup Language,
Defined as a system-independent information description method.

厳密な記述が可能な反面、言語仕様が難解である。
DTDなどXMLに多くの影響を与えている。</p>
<p>HTMLとはHyper Text Markup Languageの略であり、
いわゆるホームページの記述に用いられる。
WWW(World Wide Web)の爆発的普及の立役者である。
While strict description is possible, the language specification is difficult.
It has many influences on XML such as DTD. </ p>
<p> HTML stands for Hyper Text Markup Language,
Used to describe so-called homepages.
He is a driving force in the explosive spread of the World Wide Web.

テキストと画像、ハイパーリンクを実現する。
W3Cにおいて仕様の策定が行われる。W3CのURLは
<a href="http://www.w3.org/">http://www.w3.org/</a>
である。</p>
<p>XMLはExtensible Markup Languageの略である。
Realize text, images and hyperlinks.
Specification is developed at W3C. W3C URL is
<a href="http://www.w3.org/"> http://www.w3.org/ </a>
It is. </ p>
<p> XML stands for Extensible Markup Language.

HTMLは決められたタグしか利用できなかったが、
XMLでは自らタグの定義付けを行うことができる。
電子商取引からデータ転送のヘッダまであらゆる分野で
活用がおこなわれている。</p>
<p>XHTMLはExtensible Hyper Text Markup Language略であり、
HTMLをXML形式に対応させたものと言える。XMLではタグを自由に
定義できる反面、タグと表示方法は独立している。このため
印刷分野ではXSL-FOなどが用いられるが、より簡便なものとして
XHTMLが提案された。</p>
</body>
</html>
上記した構造化文書は、電子ペーパ101に送信される。図23は、上記した構造化文書によって電子ペーパ101の側で表示される文書である。
HTML was only available for certain tags,
In XML, you can define tags yourself.
It is used in all fields from electronic commerce to data transfer headers. </ p>
<p> XHTML stands for Extensible Hyper Text Markup Language,
It can be said that HTML corresponds to the XML format. While tags can be freely defined in XML, tags and display methods are independent. For this reason, XSL-FO is used in the printing field.
XHTML was proposed. </ p>
</ body>
</ html>
The structured document described above is transmitted to the electronic paper 101. FIG. 23 is a document displayed on the electronic paper 101 side by the above-described structured document.

以上述べた本実施形態の構造化処理装置及び構造化処理方法は、プリントデータから構造化文書を作成することができる。そして、構造化文書を電子ペーパ等の構造化文書を理解できる機器に送出することにより、機器側がプリントデータの構造を理解させることができる。このため、この機器において、機器のディスプレイ画面やオペレータのニーズに応じてプリントデータを再レイアウトすることができる。   The structured processing apparatus and structured processing method of the present embodiment described above can create a structured document from print data. Then, by sending the structured document to a device that can understand the structured document such as electronic paper, the device side can make the structure of the print data understood. Therefore, in this device, print data can be re-laid out according to the display screen of the device and the needs of the operator.

このような本実施形態は、プリントデータを他の機器に出力し、出力された機器側の表示画面に最適な状態で画像を表示させることができるものといえる。
なお、以上述べた本実施形態のフローチャートで示した文書構造化処理方法をコンピュータに実行させるプログラム は、インストール可能な形式又は実行可能な形式のファイルでCD−ROM、フロッピー(登録商標)ディスク(FD)、DVD等のコンピュータで読み取り可能な記録媒体に記録されて提供される。また、本実施形態の文書構造化処理方法をコンピュータに実行させるプログラム を、インターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成しても良い。
In this embodiment, it can be said that print data can be output to another device and an image can be displayed in an optimal state on the output display screen of the device.
Note that a program for causing a computer to execute the document structuring method shown in the flowchart of the present embodiment described above is an installable format or executable format file that is a CD-ROM, floppy (registered trademark) disk (FD). ) And recorded on a computer-readable recording medium such as a DVD. In addition, a program that causes a computer to execute the document structuring method according to the present embodiment may be provided by being stored on a computer connected to a network such as the Internet and downloaded via the network.

本発明の一実施形態の文書構造化処理装置のハードウェア構成のブロック図である。It is a block diagram of the hardware constitutions of the document structure processing apparatus of one Embodiment of this invention. 図1に示した文書構造化処理装置の機能ブロック図である。It is a functional block diagram of the document structuring apparatus shown in FIG. 図2に示したソフトウェアの階層構造を示す図である。It is a figure which shows the hierarchical structure of the software shown in FIG. 本発明の一実施形態の文字列を単位とするプリントデータを例示した図である。It is the figure which illustrated print data per character string of one embodiment of the present invention. 本発明の一実施形態の文書構造化処理装置でなされる文書構造化処理の概略を説明するためのフローチャートである。It is a flowchart for demonstrating the outline of the document structuring process performed with the document structuring processing apparatus of one Embodiment of this invention. 本発明の一実施形態の段落判定の処理を示したフローチャートである。It is the flowchart which showed the process of the paragraph determination of one Embodiment of this invention. 本発明の一実施形態の段落判定の処理のうち、行の字下げに基づいて段落を判定する方法を説明するための図である。It is a figure for demonstrating the method to determine a paragraph based on the indentation of a line among the processes of the paragraph determination of one Embodiment of this invention. 本発明の一実施形態の段落判定の処理のうち、行間隔に基づいて段落を判定する方法を説明するための図である。It is a figure for demonstrating the method to determine a paragraph based on a line space | interval among the processes of the paragraph determination of one Embodiment of this invention. 本発明の一実施形態の余白に基づく文書のレイアウト構造を判定する方法を説明するためのフローチャートである。6 is a flowchart illustrating a method for determining a layout structure of a document based on margins according to an embodiment of the present invention. 図9に示したフローチャートのうち、余白の比較の方法を説明するための図である。It is a figure for demonstrating the method of a margin comparison among the flowcharts shown in FIG. 図9に示したフローチャートのうち、中央揃え時の余白の状態を説明するための図である。FIG. 10 is a diagram for explaining a margin state during center alignment in the flowchart illustrated in FIG. 9. 図9に示したフローチャートのうち、上下方向のレイアウトを判定する方法を説明するための図である。It is a figure for demonstrating the method to determine the layout of an up-down direction among the flowcharts shown in FIG. 本発明の一実施形態の文書のインデントを説明するための図である。It is a figure for demonstrating the indentation of the document of one Embodiment of this invention. 本発明の一実施形態の文書中の図形の位置を判定するための図である。It is a figure for determining the position of the figure in the document of one Embodiment of this invention. 本発明の一実施形態の文書中の図形の位置を判定するための他の図である。It is another figure for determining the position of the figure in the document of one Embodiment of this invention. 本発明の一実施形態の文字サイズに基づく文書のレイアウト構造を判定する方法を説明するためのフローチャートである。6 is a flowchart for explaining a method of determining a layout structure of a document based on a character size according to an embodiment of the present invention. 図16のフローチャートに示した文書のレイアウト構造を判定する方法を説明するための図である。FIG. 17 is a diagram for explaining a method of determining the layout structure of a document shown in the flowchart of FIG. 16. 本発明の一実施形態のキーワードに基づくレイアウト構造の判定の処理を示したフローチャートである。It is the flowchart which showed the process of the layout structure determination based on the keyword of one Embodiment of this invention. 図18のフローチャートに示した処理のうち、リスト段落の判定方法を説明するための図である。It is a figure for demonstrating the determination method of a list paragraph among the processes shown to the flowchart of FIG. 本発明の一実施形態の番号付きリストの項目段落を示すための図である。It is a figure for showing the item paragraph of the numbered list of one embodiment of the present invention. 本発明の一実施形態の章や節を示す番号が付された段落を示すための図である。It is a figure for showing the paragraph to which the number which shows the chapter and section of one Embodiment of this invention was attached | subjected. 本発明の一実施形態のURLを含む文字列でなる段落を示すための図である。It is a figure for showing the paragraph which consists of a character string containing URL of one embodiment of the present invention. 本発明の一実施形態で得られる構造化文書によって表示される文書である。It is a document displayed by the structured document obtained by one Embodiment of this invention.

符号の説明Explanation of symbols

2 ソフトウェア、6 文字列、101 電子ペーパ、103 プリンタ、
111 表示装置、113 表示コントローラ、117 マウス、119 キーボード
121 入力装置、200 ソフトウェア、201 アプリケーションソフト群
203 表示制御部、205 入力装置制御部、207 外部入出力制御部
209 ファイル管理機能、211 プリントサービス、213 文字列出力機能
215 プリンタドライバ、217 タグ付け処理部、219 段落判定部
220 文書構造化処理部、221 レイアウト構造判定部、223 キーワード監視部
2 software, 6 character string, 101 electronic paper, 103 printer,
111 display device, 113 display controller, 117 mouse, 119 keyboard 121 input device, 200 software, 201 application software group 203 display control unit, 205 input device control unit, 207 external input / output control unit 209 file management function, 211 print service, 213 Character string output function 215 Printer driver, 217 Tagging processing unit, 219 Paragraph determination unit 220 Document structure processing unit, 221 Layout structure determination unit, 223 Keyword monitoring unit

Claims (11)

文字コードを含む文書データを画像化する過程で生成される中間文書データを取り扱う文書構造化処理装置であって、
文書データにおいて一方向に複数個配置された文字で構成される文字列を最小単位とし、前記文書データの構造を判定する構造判定手段と、
前記構造判定手段によって判定された構造を示す構造化情報に基づいて、前記文書データの構造を示す構造化文書を生成する構造化文書生成手段と、
を備えることを特徴とする文書構造化処理装置。
A document structuring apparatus that handles intermediate document data generated in the process of imaging document data including character codes,
A structure determination means for determining a structure of the document data using a character string composed of a plurality of characters arranged in one direction in the document data as a minimum unit;
Structured document generating means for generating a structured document indicating the structure of the document data based on the structured information indicating the structure determined by the structure determining means;
A document structuring apparatus comprising:
前記構造判定手段は、前記文字列に基づいて、前記文書データが示す文書を構成する段落の構造を判定する段落判定手段を備えることを特徴とする請求項1に記載の文書構造化処理装置。   2. The document structuring apparatus according to claim 1, wherein the structure determining unit includes a paragraph determining unit that determines a structure of a paragraph constituting the document indicated by the document data based on the character string. 前記段落判定手段は、前記文書データが表す文書の1行分の文字を文字列とし、該文字列における先頭文字列の位置によって行の字下げを検出すると共に、字下げが検出された文字列から次に字下げが検出される文字列の直前の文字列までが1つの段落であると判定することを特徴とする請求項1または2に記載の文書構造化処理装置。   The paragraph determination means uses one line of characters of the document represented by the document data as a character string, detects indentation of a line according to the position of the first character string in the character string, and character string in which indentation is detected 3. The document structuring apparatus according to claim 1, wherein the first character string to the character string immediately before the character string in which indentation is detected is determined to be one paragraph. 前記段落判定手段は、前記文書データが表す文書の1行分の文字を文字列とし、先頭行の文字列または直前の文字列との間隔が直後の文字列との間隔よりも広い文字列から、直後の文字列との間隔が直前の文字列との間隔よりも広い文字列までを1つの段落であると判定することを特徴とする請求項1または2に記載の文書構造化処理装置。   The paragraph determination means uses one line of characters of the document represented by the document data as a character string, and a character string whose interval from the character string of the first line or the immediately preceding character string is wider than the interval from the immediately following character string. 3. The document structuring apparatus according to claim 1, wherein a character string whose interval between the immediately following character string and the character string wider than the immediately preceding character string is determined as one paragraph. 前記構造判定手段は、互いに異なる方向から前記段落と接する複数の余白領域を検出し、検出された複数の余白領域同士の位置関係及び相対的な大きさの違いに基づいて、前記文書データのレイアウトに関する構造を判定することを特徴とする請求項2から4のいずれか1項に記載の文書構造化処理装置。   The structure determination unit detects a plurality of blank areas in contact with the paragraph from different directions, and determines the layout of the document data based on a positional relationship and a relative size difference between the detected blank areas. 5. The document structuring apparatus according to claim 2, wherein the structure is determined. 前記構造判定手段は、前記文書データに図画が含まれる場合、前記図画の表示領域に対し、互いに異なる方向から前記表示領域と接する複数の余白領域を検出し、検出された複数の余白領域同士の位置関係及び相対的な大きさの違いに基づいて、前記図画のレイアウトに関する構造を判定することを特徴とする請求項2から4のいずれか1項に記載の文書構造化処理装置。   When the document data includes a drawing, the structure determination unit detects a plurality of blank areas in contact with the display area from different directions with respect to the display area of the drawing, and detects a plurality of detected blank areas. 5. The document structuring apparatus according to claim 2, wherein a structure related to the drawing layout is determined based on a positional relationship and a relative size difference. 前記構造判定手段は、前記文字列に含まれる文字のサイズに基づいて前記段落の属性を判定することを特徴とする請求項2から6のいずれか1項に記載の文書構造化処理装置。   The document structuring apparatus according to claim 2, wherein the structure determination unit determines the attribute of the paragraph based on a size of a character included in the character string. 前記構造判定手段は、前記文字列に含まれるキーワードを検出し、該キーワードの意味に基づいて前記文書データのレイアウトに関する構造を判定することを特徴とする請求項1から7のいずれか1項に記載の文書構造化処理装置。   8. The structure determination unit according to claim 1, wherein the structure determination unit detects a keyword included in the character string and determines a structure related to a layout of the document data based on a meaning of the keyword. The document structuring apparatus described. 文字コードを含む文書データを受け取って画像化するプリンタドライバに備えられることを特徴とする請求項1から8のいずれか1項に記載の文書構造化処理装置。   9. The document structuring apparatus according to claim 1, wherein the document structuring apparatus is provided in a printer driver that receives and converts document data including a character code into an image. 文字コードを含む文書データを画像化する過程で生成される中間文書データを取り扱う文書構造化処理方法であって、
文書データにおいて一方向に複数個配置された文字で構成される文字列を最小単位とし、前記文書データの構造を判定する構造判定工程と、
前記構造判定手段工程において判定された構造を示す構造化情報に基づいて、前記文書データの構造を示す構造化文書を生成する構造化文書生成工程と、
を含むことを特徴とする文書構造化処理方法。
A document structuring method for handling intermediate document data generated in the process of imaging document data including character codes,
A structure determination step for determining a structure of the document data using a character string composed of a plurality of characters arranged in one direction in the document data as a minimum unit;
A structured document generating step for generating a structured document indicating the structure of the document data based on the structured information indicating the structure determined in the structure determining means step;
A document structuring method comprising:
文字コードを含む文書データを画像化する過程で生成される中間文書データを取り扱う文書構造化処理方法をコンピュータに実行させるためのプログラムであって、
文書データにおいて一方向に複数個配置された文字で構成される文字列を最小単位とし、前記文書データの構造を判定する構造判定ステップと、
前記構造判定手段ステップにおいて判定された構造を示す構造化情報に基づいて、前記文書データの構造を示す構造化文書を生成する構造化文書生成ステップと、
を含むことを特徴とする文書構造化処理方法をコンピュータに実行させるためのプログラム。
A program for causing a computer to execute a document structuring method that handles intermediate document data generated in the process of imaging document data including character codes.
A structure determination step for determining a structure of the document data using a character string composed of a plurality of characters arranged in one direction in the document data as a minimum unit;
A structured document generating step for generating a structured document indicating the structure of the document data based on the structured information indicating the structure determined in the structure determining means step;
A program for causing a computer to execute a document structuring method comprising:
JP2004293314A 2004-10-06 2004-10-06 Device and method for document structural processing, and program for making computer execute same method Withdrawn JP2006107155A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004293314A JP2006107155A (en) 2004-10-06 2004-10-06 Device and method for document structural processing, and program for making computer execute same method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004293314A JP2006107155A (en) 2004-10-06 2004-10-06 Device and method for document structural processing, and program for making computer execute same method

Publications (1)

Publication Number Publication Date
JP2006107155A true JP2006107155A (en) 2006-04-20

Family

ID=36376816

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004293314A Withdrawn JP2006107155A (en) 2004-10-06 2004-10-06 Device and method for document structural processing, and program for making computer execute same method

Country Status (1)

Country Link
JP (1) JP2006107155A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005208303A (en) * 2004-01-22 2005-08-04 Seiko Epson Corp Information display device
JP2005215333A (en) * 2004-01-29 2005-08-11 Seiko Epson Corp Device and program for information display
JP2008197466A (en) * 2007-02-14 2008-08-28 Fujitsu Ltd Electronic paper apparatus and data generating apparatus for electronic paper
JP2009003397A (en) * 2007-06-21 2009-01-08 Masazumi Fukuda Electronic paper type computer

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005208303A (en) * 2004-01-22 2005-08-04 Seiko Epson Corp Information display device
JP2005215333A (en) * 2004-01-29 2005-08-11 Seiko Epson Corp Device and program for information display
JP4686979B2 (en) * 2004-01-29 2011-05-25 セイコーエプソン株式会社 Information display device and information display program
JP2008197466A (en) * 2007-02-14 2008-08-28 Fujitsu Ltd Electronic paper apparatus and data generating apparatus for electronic paper
JP2009003397A (en) * 2007-06-21 2009-01-08 Masazumi Fukuda Electronic paper type computer

Similar Documents

Publication Publication Date Title
US10067931B2 (en) Analysis of documents using rules
KR100576030B1 (en) A printing system
JP4290011B2 (en) Viewer device, control method therefor, and program
US7139975B2 (en) Method and system for converting structured documents
US7434160B2 (en) PDF document to PPML template translation
US7640494B1 (en) Document generation from web pages
US20100281351A1 (en) Web print content control using html
US20110264705A1 (en) Method and system for interactive generation of presentations
US20050232484A1 (en) Image processing device, image processing method, and storage medium storing program therefor
JP2006350867A (en) Document processing device, method, program, and information storage medium
CN101361059A (en) System and method supporting displaying content on portable apparatus
KR20080100179A (en) Detection of lists in vector graphics documents
JP2010129057A (en) Information processor, display data translation method, and program
US8582164B2 (en) Generating merged documents
JP2006107155A (en) Device and method for document structural processing, and program for making computer execute same method
US20060242571A1 (en) Systems and methods for processing derivative featurees in input files
Ockerbloom Archiving and preserving PDF files
JP2013033432A (en) Electronic book format conversion method, conversion system
JP2006227773A (en) Data processor and printer
JP2004110131A (en) Information processor, information processing method and information processing system
JPH10124494A (en) Information processor and comment addition method
JP2004145736A (en) Character recognition device, character recognition data output method, program and recording medium
KR101174802B1 (en) Printer driver for converting printing data into common file and printer controlling apparatus using the same
JP4508264B2 (en) Database construction apparatus, database construction method, database construction program, recording medium
JP2007265429A (en) Document conversion system, document conversion method, and computer readable storage medium storing document conversion program

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: 20080108