JP4853891B2 - How to create document structure information - Google Patents
How to create document structure information Download PDFInfo
- Publication number
- JP4853891B2 JP4853891B2 JP2004375548A JP2004375548A JP4853891B2 JP 4853891 B2 JP4853891 B2 JP 4853891B2 JP 2004375548 A JP2004375548 A JP 2004375548A JP 2004375548 A JP2004375548 A JP 2004375548A JP 4853891 B2 JP4853891 B2 JP 4853891B2
- Authority
- JP
- Japan
- Prior art keywords
- box
- document
- instruction
- boxes
- grammar
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 claims description 85
- 238000004458 analytical method Methods 0.000 claims description 61
- 238000003780 insertion Methods 0.000 claims description 20
- 230000037431 insertion Effects 0.000 claims description 20
- 101710110315 Bacchus Proteins 0.000 claims description 2
- 230000002452 interceptive effect Effects 0.000 description 32
- 238000002360 preparation method Methods 0.000 description 25
- 238000011946 reduction process Methods 0.000 description 20
- 101001107782 Homo sapiens Iron-sulfur protein NUBPL Proteins 0.000 description 19
- 102100021998 Iron-sulfur protein NUBPL Human genes 0.000 description 19
- 101100072620 Streptomyces griseus ind2 gene Proteins 0.000 description 19
- 101100481702 Arabidopsis thaliana TMK1 gene Proteins 0.000 description 18
- 101100481704 Arabidopsis thaliana TMK3 gene Proteins 0.000 description 14
- 238000012916 structural analysis Methods 0.000 description 10
- 239000002131 composite material Substances 0.000 description 8
- 239000010410 layer Substances 0.000 description 7
- 239000002356 single layer Substances 0.000 description 7
- 101150089655 Ins2 gene Proteins 0.000 description 4
- 101100072652 Xenopus laevis ins-b gene Proteins 0.000 description 4
- 230000001174 ascending effect Effects 0.000 description 4
- 101150099000 EXPA1 gene Proteins 0.000 description 3
- 102100029095 Exportin-1 Human genes 0.000 description 3
- 101100119348 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) EXP1 gene Proteins 0.000 description 3
- 101100269618 Streptococcus pneumoniae serotype 4 (strain ATCC BAA-334 / TIGR4) aliA gene Proteins 0.000 description 3
- 150000001875 compounds Chemical class 0.000 description 3
- 108700002148 exportin 1 Proteins 0.000 description 3
- 238000003696 structure analysis method Methods 0.000 description 3
- 230000003252 repetitive effect Effects 0.000 description 2
- 101100481703 Arabidopsis thaliana TMK2 gene Proteins 0.000 description 1
- 230000002776 aggregation Effects 0.000 description 1
- 238000004220 aggregation Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000009795 derivation Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000002250 progressing effect Effects 0.000 description 1
- 210000000707 wrist Anatomy 0.000 description 1
Images
Landscapes
- Character Discrimination (AREA)
- Machine Translation (AREA)
- Document Processing Apparatus (AREA)
Description
本発明は、文書構造情報の作成方法に関し、特に、罫線で区切られたボックスから構成される文書を対象とした文書構造情報の作成方法に関するものである。 The present invention relates to a method for creating document structure information, and more particularly, to a method for creating document structure information for a document composed of boxes separated by ruled lines.
近年、企業や自治体では事務書類の電子化が推進され、国レベルでも電子政府の総合窓口が用意されるなど、開発が進められている。そして、事務処理の効率化のために、帳票などの処理は急速にコンピューター化されている。帳票には多数の罫線が縦横に引かれており、これらの罫線で囲まれた領域はボックスまたはセルと呼ばれている。ボックスは、例えば「氏名」のように帳票自身に予め印刷されている自己指示ボックスであったり、実際に記入者の氏名や住所等を具体的に記入する挿入ボックスであったりする。これらのボックスは所定の決まりに基づいて、帳票上にレイアウトされている。 In recent years, enterprises and local governments have promoted the digitization of office documents, and development has been progressing at the national level, including the provision of general electronic government contact points. In order to improve the efficiency of paperwork, the processing of forms and the like is rapidly computerized. A lot of ruled lines are drawn vertically and horizontally in the form, and an area surrounded by these ruled lines is called a box or a cell. The box may be a self-instruction box pre-printed on the form itself, such as “name”, or an insertion box that specifically fills in the name, address, etc. of the writer. These boxes are laid out on the form based on a predetermined rule.
一般に、帳票を処理するシステムは以下のような構成を有している。帳票処理システムが帳票から必要な情報を抽出するために、まず、読み取り装置(OCR等)によって帳票の画像イメージ(ビットマップ)を得る。この画像イメージをシステムのメモリの中に予め記憶されているフォーマットに基づいて解析することにより、帳票のレイアウトを把握する。この解析により、帳票中のどの位置にどのような情報(例えば、住所または名前等)が存在するのかを特定した上で、その位置に実際に存在するイメージとしての文字、数字、記号などを、よく知られた文字認識技術を用いることで、テキストとして認識していく。これにより、その位置に記入された情報がテキストとして認識される。ここでフォーマットとは、帳票のレイアウトを解析するためのモデルであって、帳票のレイアウトはこの雛形を比較参照することで解析される(特許文献1を参照)。
しかしながら、上記した特許文献1記載の方法では、多様な書式の罫線文書への対応を考えた場合、拡張性や柔軟性に欠けるという問題点があった。
However, the above-described method described in
更に、上記した解析方法はあらかじめ情報が記入された文書に対しては有効であるが、情報が記入されていない文書に対しては解析ができなかった。 Furthermore, although the above analysis method is effective for a document in which information has been previously entered, it has not been possible to analyze a document in which no information has been entered.
本発明は、上記問題を鑑みて成されたものである。本発明の目的の一つは、罫線によって区切られたボックスから構成され、情報が記入されていない罫線文書の構造を解析することができる文書構造情報の作成方法を提供することにある。 The present invention has been made in view of the above problems. One of the objects of the present invention is to provide a method for creating document structure information that can analyze the structure of a ruled line document that is composed of boxes separated by ruled lines and in which no information is written.
本発明の文書構造情報の作成方法は、一般構造文書と表構造文書とが混在している文書から文書構造情報を作成する方法であり、コンピュータあるいは手動で、罫線で区切られた複数のボックスを有する前記文書の前記ボックスを、前記ボックスの種別に基づいて、分類する第1のステップと、コンピュータで、前記ボックスの縦方向または/および横方向の隣接関係を示すボックスリストを作成する第2のステップと、コンピュータで、優先順位を有する複数の文法規則によって構成され、各文法規則によってボックス間の指示関係を明確にする書式構造文法を、前記ボックスリストに対して、適用する第3のステップと、を具備し、前記第3のステップでは、前記ボックスリストに対して、前記ボックス間の指示関係を縦または横の一方向のみとした前記書式構造文法である一般構造文法を適用し、矛盾が生じたボックス以降のボックス群に対して、前記ボックス間の指示関係を縦と横との両方向とした前記書式構造文法である表構造文法を適用することを特徴とする。
The document structure information creation method of the present invention is a method for creating document structure information from a document in which a general structure document and a table structure document are mixed, and a plurality of boxes delimited by ruled lines are manually created by a computer or manually. A first step of classifying the boxes of the document based on the type of the box; and a second list for creating a box list indicating a vertical or / and horizontal adjacency relationship of the boxes by the computer And a third step of applying, to the box list , a format structure grammar constituted by a plurality of grammatical rules having a priority order and clarifying an instruction relationship between boxes by each grammar rule. , comprising a, in the third step, with respect to the box list, one of the vertical or horizontal instructions relationships between the box Only to the application of the general structure grammar is the format structure grammar for box group after conflict box, is the format structure grammar both directions between the vertical and horizontal instructions relationships between the box A table structure grammar is applied.
本発明の文書構造情報の作成方法によれば、罫線で区切られた複数のボックスを有する文書に対して、縦方向および/または横方向の隣接関係を示すボックスリストに対して書式構造文法を適用している。従って、罫線文書の指示関係を解析して、記入情報の管理、記入情報の集計などをサポートすることができ、電子化された文書の処理を容易且つ汎用的に扱うことが可能となる。更に、本発明の文書構造情報の作成方法を対話型文書作成用ワープロ、対話型文書記入用ワープロ、自治体の電子申請システム、社内文書処理システムなどに適用することで、対話型文書を容易に作成することおよび完成された対話型文書を効率的に管理することが可能となる。 According to the document structure information creation method of the present invention, a format structure grammar is applied to a box list indicating a vertical and / or horizontal adjacency relationship for a document having a plurality of boxes separated by ruled lines. is doing. Therefore, it is possible to analyze the relationship between the indications of the ruled line document and support the management of entry information, the summation of entry information, and the like, and the processing of the digitized document can be easily and universally handled. In addition, by applying the document structure information creation method of the present invention to an interactive document creation word processor, an interactive document entry word processor, a local electronic application system, an in-house document processing system, etc., an interactive document can be easily created. And managing the completed interactive document efficiently.
また、本発明の文書構造情報の作成方法によれば、縦および横の指示方向が混在する罫線文書に対しても解析を行うことが可能であるため、様々な種類の罫線文書の解析を行うことが可能となる。 Also, according to the document structure information creation method of the present invention, it is possible to analyze a ruled line document in which both vertical and horizontal instruction directions are mixed, and therefore various types of ruled line documents are analyzed. It becomes possible.
更に、本発明の文書構造情報の作成方法によれば、罫線文書を構成する各ボックスを指示ボックス、空欄ボックス、説明ボックス、および挿入ボックスに分類することで、情報が記入されていない罫線文書の各ボックス間の指示関係を解析することが可能となる。 Furthermore, according to the document structure information creation method of the present invention, each box constituting a ruled line document is classified into an instruction box, a blank box, an explanation box, and an insertion box. It is possible to analyze the indication relationship between each box.
<第1の実施の形態>
先ず、本形態の文書構造情報の作成方法が適用可能な文書フォーマットについて説明する。一般的に広く用いられている文書は、完結型文書モデルと対話型文書モデルとの2種類に分類することができる。
<First embodiment>
First, a document format to which the document structure information creation method of this embodiment can be applied will be described. Documents that are generally widely used can be classified into two types: a complete document model and an interactive document model.
完結型文書モデルは、新聞、書籍または広告といった用途に用いられており、作者が文書を作成した時点で文書として完成している。そして、読み手はその完成した文書から作成者の伝達事項を読み取り、情報を獲得する。 The complete document model is used for applications such as newspapers, books, or advertisements, and is completed as a document when the author creates the document. Then, the reader reads the creator's transmission items from the completed document and acquires information.
対話型文書モデルは、申請用紙、アンケートまたは履歴書などの用途に用いられる文書モデルであり、作成者、記入者および処理者の三種類の立場の人間が存在する。作成者は、入力情報について記入内容に関する指示と入力情報を記入するための領域から構成される未完成文書を作成する。記入者は、未完成文書の指示を読み取り、適切な領域に必要な情報を記入し、文書を完成させる。処理者は、記入者の情報記入により完成された文書から、必要な情報を抽出して管理する。処理者は作成者と同一の場合がある。 The interactive document model is a document model that is used for applications such as application forms, questionnaires, and resumes, and there are three types of people: creators, writers, and processors. The creator creates an incomplete document composed of an instruction regarding the contents of input information and an area for inputting the input information. The writer reads the instruction of the unfinished document, fills in necessary information in an appropriate area, and completes the document. The processor extracts and manages necessary information from the document completed by the entry of information by the writer. The processor may be the same as the creator.
更に、図1に示すように、対話型文書モデルには複数の種類が存在する。例えば、図1(A)は、罫線により領域が区切られた対話型罫線文書1であり、図1(B)は、明確な領域に区切られていない対話型フリーフォーマット文書2である。本形態の文書構造情報の作成方法は、図1(A)に示すような対話型罫線文書1を対象とする。対話型罫線文書では全ての記入内容に関する指示および記入の為の領域は、罫線によって区切られた領域内に存在する。従って、図2に示すような文書3は対話型罫線文書には当てはまらない。ただし、図2の罫線領域には、本発明を適用して指示関係を解析することができる。
Furthermore, as shown in FIG. 1, there are a plurality of types of interactive document models. For example, FIG. 1A shows an interactive
対話型罫線文書において、罫線によって区切られた最小の矩形領域をボックスと定義する。ボックスはその配置場所と内部文字列からそれぞれ固有の意味が与えられている。また、複数のボックスが組み合わされることにより、文書全体として一つの目的を成す文書となる。そして、対話型罫線文書は3つの要素(対話要素を成す指示および被指示の関係、記入情報に関する文字列、罫線の引き方を表すレイアウト情報)から構成されている。 In an interactive ruled line document, a minimum rectangular area divided by ruled lines is defined as a box. Each box has its own meaning based on its location and internal string. Further, by combining a plurality of boxes, the document as a whole has a single purpose. The interactive ruled line document is composed of three elements (the relationship between an instruction and an instruction that form an interactive element, a character string related to entry information, and layout information indicating how to draw a ruled line).
文書構造情報の作成方法の対象となる罫線文書は、無駄なボックスが存在しない(意味を成さない無駄なボックスが文書内に存在しない)罫線文書である。 The ruled line document that is the target of the document structure information creation method is a ruled line document in which no useless box exists (no useless box that does not make sense exists in the document).
ボックスは大きく分けると非記入ボックスと記入ボックスに分類される。そして、非記入ボックスには指示ボックス(IND)と説明ボックス(EXP)とがあり、記入ボックスには、挿入ボックス(INS)と空欄ボックス(BLK)とがある。以下にそれぞれのボックスの特徴を明記する。
・指示ボックス(IND)は他のボックスに何らかの記入指示を与えるボックス
・挿入ボックス(INS)は内部に文字列があるボックス
・空欄ボックス(BLK)は内部に何も書かれていない空欄のボックス
・説明ボックス(EXP)は説明が書かれたボックス
以下、IND、INS、BLK、EXPと記載する。
Boxes are roughly classified into non-entry boxes and entry boxes. The non-entry box includes an instruction box (IND) and an explanation box (EXP), and the entry box includes an insertion box (INS) and a blank box (BLK). The characteristics of each box are specified below.
・ Instruction box (IND) gives some entry instructions to other boxes ・ Insert box (INS) has a character string inside ・ Blank box (BLK) is a blank box with nothing written inside ・The explanation box (EXP) is described as IND, INS, BLK, EXP below the box where the explanation is written.
図3(A)および図3(B)を参照して、ボックスを具体的に説明する。図3(A)に示す罫線文書4を参照して、“氏名”および“生年月日”と記入されたボックスがINDに相当する。また、“年 月 日”と記入されたボックスはINSであり、空欄のボックスはBLKであり、“※生年月日は・・・して下さい”と記入されたボックスはEXPである。この分類結果を図3(B)に示す。
With reference to FIG. 3 (A) and FIG. 3 (B), a box is demonstrated concretely. Referring to the
図3(B)を参照して、矢印が示すようにIND1は右に隣接するBLKに指示を与えており、IND2は右に隣接するINSに指示を与えている。 Referring to FIG. 3B, as indicated by an arrow, IND1 gives an instruction to the BLK adjacent to the right, and IND2 gives an instruction to the INS adjacent to the right.
次に、図4から図7を参照して、ボックスの指示関係について説明する。対話型罫線文書において、ボックスとボックスとの間には記入内容に関する指示関係が働いている。この指示関係には縦方向、横方向という2つの方向性が存在する。また、指示関係自体にも様々な種類が存在する。本形態では、対話型罫線文書中の指示関係として、図4に示すような隣接するボックス間に働く4種類の指示関係を想定した。 Next, the box indication relationship will be described with reference to FIGS. In an interactive ruled line document, there is an instruction relationship regarding the contents to be entered between boxes. This indication relationship has two directions, the vertical direction and the horizontal direction. There are various types of instruction relationships themselves. In this embodiment, four kinds of instruction relations acting between adjacent boxes as shown in FIG. 4 are assumed as instruction relations in the interactive ruled line document.
図4(A)は、単一指示ボックス群5であり、一つの指示ボックスが一つの記入ボックスに働く1対1の指示関係を示している。ボックス間の隣接方向としては上下方向と左右方向の二種類がある。具体的には、図中の矢印は指示関係を表しており、INDが隣接するBLKに指示を与えている。このような指示形態を単一指示と呼ぶ。また、ここでは被指示ボックスとして、BLK(空欄ボックス)を採用しているが、INS(挿入ボックス)も被指示ボックスに成りうる。これは後述する指示関係においても同様である。
FIG. 4A shows a single
図4(B)は、自己指示ボックスであり、指示ボックスから指示を受けない記入ボックスを表している。この記入ボックスは内部の文字列によって記入内容を十分想定できる。このようなボックスはボックス自身を指示しているとみなす。つまり、自己指示の指示関係が生じるのは挿入ボックスにおいてのみである。 FIG. 4B shows a self-instruction box and an entry box that does not receive an instruction from the instruction box. The entry contents of this entry box can be fully assumed by the internal character string. Such a box is considered to point to the box itself. In other words, the self-instruction indication relationship occurs only in the insertion box.
図5および図6では、一つの指示ボックスの指示が複数のボックスに働く1対nの指示関係を説明する。指示方向は縦または横であり、どちらか一方方向へ直線的に指示を出す。 5 and 6, a one-to-n instruction relationship in which an instruction in one instruction box works on a plurality of boxes will be described. The indication direction is vertical or horizontal, and the indication is given linearly in either direction.
図5に示すボックス群は、単層繰り返し指示ボックス群6であり、ボックス間の指示関係は単層繰り返し指示である。単層繰り返し指示とは、BLKのみが連続する構造や、内部文字列が同じ挿入ボックスのみが連続する構造に対し、指示ボックスが繰り返し指示を行う形式である。
The box group shown in FIG. 5 is a single layer repetition
具体的には、図5(A)および図5(B)を参照して、INDは隣接するBLK1に指示を与えており、更にBLK1と隣接するBLK2に指示を与えている。 Specifically, referring to FIGS. 5A and 5B, IND gives an instruction to adjacent BLK1, and further gives an instruction to BLK2 adjacent to BLK1.
また、図5(C)および図5(D)を参照して、INDはBLK1およびBLK2と隣接しており、BLK1およびBLK2にそれぞれ同じ指示を与えている。 Referring to FIGS. 5C and 5D, IND is adjacent to BLK1 and BLK2, and gives the same instruction to BLK1 and BLK2, respectively.
図6に示すボックス群は多層繰り返し指示ボックス群7であり、ボックス間の指示関係は多層繰り返し指示を示している。多層繰り返し指示とは、指示ボックスを含む複数のボックス群を一つの指示ボックスでまとめる形式である。つまり、重複する情報を束ねるために用いられる。多層繰り返し指示では、指示ボックスに親子関係が発生するため、記入ボックスには階層的な指示関係が得られる。階層的に上位の指示を親指示とよぶ。
The box group shown in FIG. 6 is a multilayer repeat
図6(A)および図6(B)を参照して、IND1はIND2およびIND3に対して同一の指示を与えている。そして、IND2は隣接するBLK1に対して指示を与えており、IND3は隣接するBLK2に対して指示を与えている。そして、これらの指示方向は同一方向であり、IND1とIND2とは隣接しているが、IND1とIND3とは隣接していない。このような指示関係は上述した親子関係にあり、IND1は親指示であり、IND2およびIND3は子指示である。 Referring to FIGS. 6A and 6B, IND1 gives the same instruction to IND2 and IND3. IND2 gives an instruction to the adjacent BLK1, and IND3 gives an instruction to the adjacent BLK2. These pointing directions are the same direction, and IND1 and IND2 are adjacent to each other, but IND1 and IND3 are not adjacent to each other. Such an instruction relationship is the parent-child relationship described above, IND1 is a parent instruction, and IND2 and IND3 are child instructions.
また、図6(C)を参照して、IND1はIND2と隣接しており、更にIND2はIND3と隣接している。この隣接方向は共に縦方向である。ここで、IND1はIND2およびIND3に対して指示を与えている。そして、IND2は横方向に隣接するBLK1に指示を与えており、同様にIND3は横方向に隣接するBLK2に指示を与えている。つまり、BLK1にとってIND1は親指示であり、IND2は子指示である。 Referring to FIG. 6C, IND1 is adjacent to IND2, and IND2 is adjacent to IND3. Both adjacent directions are longitudinal directions. Here, IND1 gives instructions to IND2 and IND3. Then, IND2 gives an instruction to BLK1 adjacent in the horizontal direction, and similarly IND3 gives an instruction to BLK2 adjacent in the horizontal direction. That is, for BLK1, IND1 is a parent instruction, and IND2 is a child instruction.
図6(D)および図6(E)を参照して、多層繰り返し指示ボックス群7Dおよび7Eにおいても、このような指示関係が発生する。 With reference to FIG. 6D and FIG. 6E, such an instruction relationship also occurs in the multilayer repeat instruction box groups 7D and 7E.
本形態の文書構造情報の作成方法が適用される罫線文書は、上述したような指示関係によって構成されており、ページを跨ぐような指示関係、矢印による指示関係および離れた場所に働く指示関係は扱わない。 The ruled line document to which the document structure information creation method of the present embodiment is applied is configured by the above-described instruction relationship, and the instruction relationship across the pages, the instruction relationship by the arrow, and the instruction relationship working at a remote place are Do not handle.
そして、上述したような指示関係は拡張バッカス記法を用いた文脈自由文法で表現することができる。本形態では文法表現方法を書式構造文法と定義し、以下の記号を用いて表現する。
“・”は、ボックス間の隣接関係を表す。
“::=”は、右辺から左辺への導出(還元)を表す。
“+”は、直前要素の一回以上の繰り返しを表す。
“|”は、要素の選択を表す。
The indication relationship as described above can be expressed by a context-free grammar using the extended Bacchus notation. In this embodiment, the grammar expression method is defined as a format structure grammar and expressed using the following symbols.
“·” Represents an adjacent relationship between boxes.
“:: =” represents derivation (reduction) from the right side to the left side.
“+” Represents one or more repetitions of the immediately preceding element.
“|” Represents selection of an element.
ここで、隣接とは二つのボックスが同じ高さもしくは同じ幅の辺を共有していることである。 Here, “adjacent” means that two boxes share sides of the same height or width.
書式構造文法は優先順位を有する文法規則から構成されており、ボックス種別に対応するIND、EXP、BLK、INSの4種類の終端記号に加えて、非終端記号である<gcb>および<icb>が用いられる。 The format structure grammar is composed of grammatical rules having priorities. In addition to the four types of terminal symbols IND, EXP, BLK, and INS corresponding to the box type, <gcb> and <icb> which are non-terminal symbols are included. Used.
<gcb>(general compound box)とは、他のボックスを指示しない複合ボックスを表す。ここで複合ボックスとは、指示・被指示の関係を持つボックス群を表現するものである。 <Gcb> (general compound box) represents a compound box that does not designate another box. Here, the composite box represents a group of boxes having an instruction / instructed relationship.
<icb>(indication compound box)とは、他の複合ボックスを指示する可能性のある複合ボックスを表現するものである。 <Icb> (indication compound box) represents a composite box that may indicate another composite box.
図7を参照して、具体的な書式構造文法の文法規則とその優先順位を説明する。書式構造文法50は、8種類の文法規則から成り、各文法規則には優先順位と同じ番号を付与している。つまり、文法規則1と文法規則2とでは規則1の方が優先順位は高いとみなされる。そして、この優先順位は経験的に与えられたものであり以下に説明する。
With reference to FIG. 7, specific grammar rules of format structure grammar and their priorities will be described. The format structure grammar 50 is composed of eight types of grammar rules, and each grammar rule is assigned the same number as the priority order. That is,
各文法規則は指示関係を表しており、規則1は多層繰り返し指示を表現し、規則2は単層繰り返し指示を表現している。また、規則3は自己指示挿入ボックスを、規則4は説明ボックスを表現している。更に、規則5は、図5(C)、図5(D)に示すような単層繰り返し指示および、図6(D)、図6(E)に示すような多層繰り返し指示を受けるための前処理として行う規則1の適用方向と直交する方向への還元を意味している。規則6は複合ボックス同士を還元する規則である。
Each grammar rule represents an instruction relationship,
これらの各指示関係に加えて、規則7は他の<gcb>を指示する可能性を考慮し、<icb>に還元していたが最終的に指示する<gcb>が存在しない場合は、解析成功による終了を意味する<gcb>の集合の要素とするための規則である。
In addition to each of these indication relationships,
規則8は、表形式指示を横方向および縦方向の各方向の構造解析の組み合わせであるとみなして求めるために、表形式指示の特徴である指示連結部を還元するために存在する。
具体的には、挿入ボックスに対する指示ボックスが存在しないときのみ自己指示とするため、規則3より規則2の方が優先される。
Specifically,
また、規則5および規則6は上位の規則で還元されないときに、図5(C)、図5(D)、図6(D)、図6(E)に示すような繰り返し指示を検出するための前処理として利用されるため多層、単層(単一指示を含む)および自己指示の方が優先される。
Further, when
更に、規則7は最終的に<icb>と隣接する<gcb>がなかったときに用いるものであり、規則8は形式的に表構造を扱うためのものなので、指示関係の抽出規則より上位にあってはならない。
Furthermore,
以上のような書式構造文法を用いて、文書の構造解析を行う。文書の構造解析は、構造解析木を作成する構文解析段階と得られた構造解析木からボックス間に働く指示関係を解析する指示関係解析段階の二段から成る。ここで、構造解析木は、1つの構成要素を示すノードからスタートして、枝分かれを繰り返すことで、樹木が枝を伸ばすように広がっていくようなデータ構造を有している。この構造解析木は、文法から直接生成される。つまり、構造解析木は、ボックス種別の分類結果を葉ノードとした状態から文法規則に基づく還元を開始し、還元前の記号組の親ノードとして還元後の記号を配置することを還元が可能な限り繰り返し適用することで生成できる。 The document structure is analyzed using the format structure grammar as described above. The structure analysis of a document is composed of two stages: a syntax analysis stage for creating a structure analysis tree and an instruction relation analysis stage for analyzing an instruction relation working between boxes from the obtained structure analysis tree. Here, the structural analysis tree has a data structure that starts from a node indicating one component and repeats branching so that the tree expands to extend the branch. This structural analysis tree is generated directly from the grammar. In other words, the structural analysis tree can start reduction based on the grammatical rule from the state in which the classification result of the box type is a leaf node, and can place the symbol after reduction as the parent node of the symbol set before reduction. It can be generated by applying as many times as possible.
指示関係解析は、構文解析の結果から得ることができる。すなわち、左のノードが指示ボックスとなるノードに着目したとき、その左のノードの指示が右のノード全体にかかる指示関係が成立する。 The instruction relation analysis can be obtained from the result of the syntax analysis. That is, when attention is paid to a node in which the left node is an instruction box, an instruction relationship is established in which the instruction of the left node is directed to the entire right node.
図8に、単一指示、自己指示、繰り返し指示の三種類の指示関係が構成する固有の木構造を示す。図8(A)に示す単一指示は、指示ボックスが記入ボックスに対してのみ指示を与えている。また、記入ボックスはこの指示ボックス以外からの指示を受けていない。図8(B)に示す自己指示は、指示ボックスは自らのボックスに対して指示を与えており、他のボックスに対して指示を与えていない。図8(C)に示す単層繰り返し指示は、指示を受け入れる記入ボックス群(a)〜(c)に対する指示は(1)から与えられている。また、図8(D)に示す多層繰り返し指示は、指示を受け入れるボックス(d)に対する指示は(2)〜(4)である。 FIG. 8 shows a unique tree structure formed by three types of instruction relationships: single instruction, self instruction, and repetitive instruction. In the single instruction shown in FIG. 8A, the instruction box gives an instruction only to the entry box. Also, the entry box has not received instructions from other than this instruction box. In the self-instruction shown in FIG. 8B, the instruction box gives instructions to its own box and does not give instructions to other boxes. In the single-layer repetition instruction shown in FIG. 8C, the instructions for the entry box groups (a) to (c) for receiving the instructions are given from (1). In the multi-layer repetition instruction shown in FIG. 8D, the instructions for the box (d) for receiving the instructions are (2) to (4).
以上のように、対話型罫線文書の各ボックスの指示関係を書式構造文法によって明確にすることで文書構造情報を得ることができる。 As described above, the document structure information can be obtained by clarifying the indication relation of each box of the interactive ruled line document by the format structure grammar.
図9を参照して、フローチャート28は対話型罫線文書を解析するための方法を示しており、以下に各ステップを説明する。 Referring to FIG. 9, a flowchart 28 shows a method for analyzing an interactive ruled line document, and each step will be described below.
ステップS1では、対象となる対話型罫線文書から縦方向または横方向のボックスリストを作成する。ボックスリストとはボックス間の隣接関係を示すリストである。 In step S1, a vertical or horizontal box list is created from the target interactive ruled line document. The box list is a list indicating the adjacent relationship between boxes.
本形態で対象となる対話型罫線文書は、指示方向が横方向のみの文書または縦方向のみの文書に限定される。つまり、指示方向が縦方向および横方向の双方に存在するような文書は対象とされない。従って、指示方向が横方向の文書に対しては左右の接続を示すH_listが作成され、指示方向が上下方向の文書に対してはV_listが作成される。ボックスリストの作成方法は後述する。 The interactive ruled line document that is a target in this embodiment is limited to a document in which the pointing direction is only in the horizontal direction or a document in which only the vertical direction is set. That is, a document in which the pointing direction exists in both the vertical direction and the horizontal direction is not a target. Therefore, an H_list indicating the left and right connection is created for a document whose pointing direction is horizontal, and a V_list is created for a document whose pointing direction is vertical. A method for creating the box list will be described later.
ステップS2では、書式構造文法の最も優先順位の高い文法規則を現在の文法規則に設定する。 In step S2, the grammar rule having the highest priority in the format structure grammar is set as the current grammar rule.
ステップS3では、ボックスリスト中に現在の規則が適用可能な箇所があるか否かを判断する。適用可能箇所があればステップS4へ、なければステップS6へ移動する。 In step S3, it is determined whether or not there is a place where the current rule is applicable in the box list. If there is an applicable part, the process proceeds to step S4, and if not, the process proceeds to step S6.
ステップS4では、適用箇所に対して文法規則に基づく還元処理を行う。しかし、適用可能箇所が複数箇所ある場合は、最初に現れる箇所のみに還元処理を行う。 In step S4, a reduction process based on the grammatical rule is performed on the application location. However, when there are a plurality of applicable places, the reduction process is performed only on the first appearing place.
ステップS5では、ボックスリスト内の全てボックスが、<gcb>(他のボックスを指示しない複合ボックス)によって記述されているか否かを判断する。もし、全てのボックスが<gcb>によって記述されていれば、ボックスリストの解析成功となり、文書構造情報を得ることができる。一部のボックスが<gcb>によって記述されていなければ、ステップS2へ移動する。 In step S5, it is determined whether or not all boxes in the box list are described by <gcb> (a composite box that does not designate another box). If all the boxes are described by <gcb>, the box list is successfully analyzed, and the document structure information can be obtained. If some boxes are not described by <gcb>, the process moves to step S2.
ステップS6では、現在の規則よりも一つ優先順位の低い文法規則を現在の規則に設定し、再びステップS3へ移動する。 In step S6, a grammar rule having a lower priority than the current rule is set as the current rule, and the process moves to step S3 again.
以上のステップを縦方向または横方向のボックスリストに対して行うことで、対話型罫線文書の構造解析が行われる。 The structural analysis of the interactive ruled line document is performed by performing the above steps on the box list in the vertical direction or the horizontal direction.
図10から図18を参照して、本形態の対話型罫線文書の構造解析方法を具体的に説明する。 With reference to FIGS. 10 to 18, the structure analysis method of the interactive ruled line document according to the present embodiment will be specifically described.
先ず、図10および図11を参照して、ステップS1について詳述する。ここでは、図10(A)に示すような指示方向が横方向にだけ存在する対話型罫線文書30Aを例にとって説明する。 First, step S1 will be described in detail with reference to FIG. 10 and FIG. Here, an interactive ruled line document 30A having an instruction direction only in the horizontal direction as shown in FIG. 10A will be described as an example.
図10(B)を参照して、対話型罫線文書30Bは、対話型罫線文書30Aの各ボックスをIND、INS、EXP、BLKの4種類に分類した文書を示している。そして、分類された各ボックスを識別できるように、ボックス種別毎に固有の番号を付与している。 Referring to FIG. 10B, an interactive ruled line document 30B shows a document in which each box of the interactive ruled line document 30A is classified into four types of IND, INS, EXP, and BLK. A unique number is assigned to each box type so that each classified box can be identified.
ボックスの分類方法としては、OCRなどの画像読み取り手段を利用することで、内部に文字列が存在しないボックスをBLKに自動判定することも可能であるが、基本的にボックスは手動で分類される。そして、横方向の隣接関係を示すボックスリスト(H_list)を作成する。 As a method for classifying boxes, it is possible to automatically determine a box without a character string as BLK by using an image reading means such as OCR, but basically the boxes are classified manually. . Then, a box list (H_list) indicating the adjacent relationship in the horizontal direction is created.
図11を参照して、横方向ボックスリスト(H_list)31の作成方法を説明する。 A method of creating the horizontal box list (H_list) 31 will be described with reference to FIG.
横方向ボックスリスト31を作成するには、まず、ボックスの左上座標を基準として、紙面の右向きをx軸の正方向、下向きをy軸の正方向とする座標系を想定する。そして、y座標で昇順ソートした後に、y座標が等しいボックスをx座標で昇順にソートする。ソートした後、連続する2つのボックスが同じ高さを持ち、互いの一辺を完全に共有している場合は、2つのボックスは左右方向に隣接していると判断して、隣接記号“・”をボックス間に挿入する。その結果得られるリストが横方向ボックスリスト31である。ここでは、図11(A)を参照して、矢印A1から矢印A4の順番でソートされる。矢印Aはソートされるボックス上を通過し、ソートの始点ボックスと終点ボックスを結んでいる。このようにして形成された横方向ボックスリスト31を図11(B)に示す。ここでは、各矢印Aに応じてソートされたボックスを同一行に記述している。 In order to create the horizontal box list 31, first, a coordinate system is assumed in which the right direction of the page is the positive direction of the x axis and the downward direction is the positive direction of the y axis with reference to the upper left coordinates of the box. Then, after sorting in ascending order by y coordinate, boxes having the same y coordinate are sorted in ascending order by x coordinate. After sorting, if two consecutive boxes have the same height and completely share one side of each other, it is determined that the two boxes are adjacent in the left-right direction, and the adjacent symbol “·” Is inserted between the boxes. The resulting list is the horizontal box list 31. Here, with reference to FIG. 11 (A), it sorts in the order of arrow A1 to arrow A4. The arrow A passes over the box to be sorted and connects the sorting start point box and the end point box. The horizontal box list 31 formed in this way is shown in FIG. Here, the boxes sorted according to each arrow A are described on the same line.
以上の処理がステップS1にて行われ、ステップS2へ移行する。 The above processing is performed in step S1, and the process proceeds to step S2.
本形態では必要としないが、ここで縦方向ボックスリスト(V_list)の作成方法についても説明する。縦方向ボックスリストを作成するには、前述した座標系を想定して、x座標で昇順ソートした後に、x座標が等しいボックスをy座標で昇順にソートする。ソートした後、連続する2つのボックスが同じ幅を持ち、互いの一辺を完全の共有している場合は、2つのボックスは上下方向に隣接していると判断して、隣接記号“・”をボックス間に挿入する。その結果得られるリストが縦方向ボックスリストである。 Although not required in this embodiment, a method of creating a vertical box list (V_list) will also be described here. In order to create a vertical box list, assuming the coordinate system described above, after sorting in ascending order by x coordinate, boxes having the same x coordinate are sorted in ascending order by y coordinate. After sorting, if two consecutive boxes have the same width and completely share one side of each other, it is determined that the two boxes are adjacent vertically, and the adjacent symbol “ Insert between boxes. The resulting list is a vertical box list.
次に、図12から図16を参照して、ステップS2からステップS6の処理を詳述する。 Next, the processing from step S2 to step S6 will be described in detail with reference to FIGS.
ステップS2において、図7に示す書式構造文法50における最も優先順位が高い文法規則が現在の規則に設定される。従って文法規則1が現在の規則に設定される。
In step S2, the grammar rule having the highest priority in the format structure grammar 50 shown in FIG. 7 is set as the current rule. Therefore,
そして、ステップS3では、横方向ボックスリスト31に対して文法規則1が適用できる箇所を調べる。しかし、適用可能箇所は存在しないため、ステップS6に移行して現在の規則に文法規則2が設定された後、ステップS3へ移行する。ステップS3では、文法規則2がボックスリスト31に適用可能か判断する。ここで、図12を参照して、破線で囲まれたボックス群S1に対して、文法規則2を適用することが可能であるため、ステップS4に移行して還元処理が行われる。還元処理が行われた後のボックスリスト31はボックス群S1が<gcb1>に還元されている。この還元処理によって、IND1がBLK1に対して指示を与えている、単一指示関係が解析される。
In
還元処理後、ステップS5において、ボックスリスト31が<gcb>だけで記述されているかどうか判断されるが、現段階では未還元箇所が存在するのでステップS2へ移動する。そして、ステップS2において、再度、現在の規則に文法規則1が設定される。
After the reduction process, it is determined in step S5 whether or not the box list 31 is described only by <gcb>. However, since there is an unreduced part at this stage, the process moves to step S2. In step S2,
以上のように、ボックスリストに対して書式構造文法50の優先順位の高い文法規則から順番に適用可能か判断し、適用可能箇所に対して還元処理を行い、また文法規則1から判断するという作業を繰り返す。これは、ボックスリストがすべて<gcb>だけで記述されるまで繰り返し行われる。
As described above, it is determined whether or not the box structure can be applied to the box list in order from the grammar rule having the highest priority of the format structure grammar 50, the reduction process is performed on the applicable part, and the determination is made from the
ここからは、現在の規則に文法規則1に設定されてから、始めて還元処理されるまでの一連の処理を一回の処理とみなしてカウントし、その際に適用された文法規則を中心に記述していく。従って、図12に示すように、処理回数1において文法規則2が適用され、IND1およびBLK1とから成るボックス群S1が<gcb1>に還元処理される。
From here, the series of processes from the setting of
図13を参照して、処理回数2から処理回数7の処理について説明する。処理回数に対応したボックス群の番号がその処理回数時において処理される。つまり、処理回数2ではボックス群2の還元処理が行われる。ここで、処理回数2から処理回数7においては、すべて文法規則2に基づいた還元処理が行われている。従って、処理回数2においてIND2とBLK2から成るボックス群S2は<gcb2>に還元される処理が行われている。同様に、ボックス群3からボックス群7についてもこのような還元処理が施されており、処理回数3においてはIND3とBLK3から成るボックス群S3は<gcb3>に還元される。そして、他のボックス群S4からS7も<gcb4>から<gcb7>に還元されており、ボックス群の番号と還元後の非終端記号<gcb>の番号とは対応している。
With reference to FIG. 13, the processing from the
図14を参照して、処理回数8から処理回数10における処理について説明する。ここでは文法規則3に基づいた還元処理が行われている。つまり、ボックス群8からボックス群10は挿入ボックスであり、横方向に隣接する他の指示ボックスとの指示関係はないと解析される。従って、処理回数8において、INS1であるボックス群S8は<gcb8>に還元される。同様に、処理回数9および処理回数10では、ボックス群S9が<gcb9>に、ボックス群S10が<gcb10>にそれぞれ還元されている。
With reference to FIG. 14, the process in the
図15を参照して、処理回数11の処理について説明する。ここでは文法規則4に基づいた還元処理が行われており、説明ボックスであるEXP1を示すボックス群S11が<gcb11>に還元されている。
With reference to FIG. 15, processing of the processing count 11 will be described. Here, a reduction process based on the
図16を参照して、処理回数12から処理回数15の処理について説明する。ここでは文法規則6に基づいた還元処理が行われている。つまり、隣接する他のボックスを指示することがないボックス群同士を一つのボックス群に還元する処理が行われている。従って、処理回数12ではボックス群S12が<gcb12>に還元処理される。同様に、処理回数13ではボックス群S13が<gcb13>に、処理回数14ではボックス群S14が<gcb14>に、処理回数15ではボックス群S15は<gcb15>にそれぞれ還元処理される。処理回数15が終了すれば、ステップS5を経て横方向のボックスリスト31の解析が成功したと判断される。
With reference to FIG. 16, processing from the processing count 12 to the processing count 15 will be described. Here, reduction processing based on the
図17を参照して、解析されたボックス間の横方向の指示関係を説明する。図17(A)に、解析結果に基づいて作成され横隣接構造解析木35を示し、図17(B)に、解析結果を示す。 With reference to FIG. 17, the horizontal indicating relationship between the analyzed boxes will be described. FIG. 17A shows the laterally adjacent structure analysis tree 35 created based on the analysis result, and FIG. 17B shows the analysis result.
図17(A)を参照して、文書全体<document>はボックス群<gcb8>、<gcb11>、<gcb12>、<gcb13>、<gcb14>および<gcb15>から構成されていることがわかる。そして、これらのボックス群同士は指示関係にない。しかし、各ボックス群の下位に相当するボックス群には指示関係が成り立っている。例えば、<gcb12>の下位に位置する<gcb1>と<gcb2>とは指示関係にある。また、実線で記された矢印は指示方向を表している。例えば、<gcb1>はIND1およびBLK1とから成り、IND1がBLK1に対して指示を与える単一指示の関係が成り立っている。同様に、<gcb2>はIND2とBLK2とから成り、これらも単一指示の関係になる。 Referring to FIG. 17A, it can be seen that the entire document <document> is composed of box groups <gcb8>, <gcb11>, <gcb12>, <gcb13>, <gcb14>, and <gcb15>. These box groups are not in an instruction relationship. However, an instruction relation is established in the box group corresponding to the lower order of each box group. For example, <gcb1> and <gcb2>, which are positioned below <gcb12>, are in a pointing relationship. An arrow indicated by a solid line indicates the indicated direction. For example, <gcb1> is composed of IND1 and BLK1, and a single-instruction relationship is established in which IND1 gives an instruction to BLK1. Similarly, <gcb2> is composed of IND2 and BLK2, which are also in a single indication relationship.
図17(B)を参照して、対話型罫線文書30Bには、横隣接構造解析木35から得られた解析結果が矢印38にて記されており、各ボックスの指示関係が明確にされている。このようにして、文書構造情報を作成することが可能となる。ここでは、単一指示の関係にあるボックス群のみが存在する文書を取り扱っているが、他の指示関係にあるボックス群を有する文書についても上述した方法を用いて解析することが可能である。 Referring to FIG. 17B, in the interactive ruled line document 30B, the analysis result obtained from the horizontal adjacent structure analysis tree 35 is indicated by an arrow 38, and the indication relation of each box is clarified. Yes. In this way, document structure information can be created. Here, a document in which only a box group having a single instruction relationship exists is handled, but a document having a box group having another instruction relationship can also be analyzed using the above-described method.
また、縦方向にだけ指示関係が存在する文書では、V_listに対して同様にして、縦構造解析木から文書構造情報を作成することができる。 Further, in the case of a document having a pointing relationship only in the vertical direction, document structure information can be created from the vertical structure analysis tree in the same manner as for V_list.
罫線文書の指示関係を解析して、対話型文書のレイアウト情報、記入情報および指示情報を分割して管理することで、記入情報の管理、記入情報の集計などをサポートすることができ、電子化された文書の処理を容易且つ汎用的に扱うことが可能となる。また、必要な情報だけを抽出することが可能となり、文書情報の管理をより効率化させることが可能となる。更に、文書構造情報と罫線のレイアウト情報を分離して管理することにより、事務処理を効率化させることが可能となる。更に、罫線文書に指示関係を示す矢印などを表示することで、記入者の誤記や記入漏れを防止することが可能となる。 By analyzing the instruction relations of ruled line documents and dividing and managing layout information, entry information and instruction information of interactive documents, it is possible to support entry information management, entry information aggregation, etc. It is possible to handle the processed document easily and universally. Further, only necessary information can be extracted, and management of document information can be made more efficient. Further, by separately managing document structure information and ruled line layout information, it is possible to improve the efficiency of office processing. Furthermore, by displaying an arrow or the like indicating the instruction relationship on the ruled line document, it becomes possible to prevent the writer from writing errors or omissions.
また、本形態の文書構造情報の作成方法を対話型文書作成用ワープロ、対話型文書記入用ワープロ、自治体の電子申請システム、社内文書処理システムなどに適用することで、対話型文書を容易に作成することおよび完成された対話型文書を効率的に管理することが可能となる。更に、書式構造文法に基づく構造化記述を半自動的に生成することも可能である。 In addition, by applying the document structure information creation method of this form to an interactive document creation word processor, an interactive document entry word processor, a local electronic application system, an in-house document processing system, etc., an interactive document can be created easily. And managing the completed interactive document efficiently. Furthermore, a structured description based on the format structure grammar can be generated semi-automatically.
<第2の実施の形態>
本形態は、第1の実施の形態と基本的な部分は同一であるので、相違点を中心に説明する。
<Second Embodiment>
Since this embodiment is basically the same as the first embodiment, the differences will be mainly described.
まず、本形態において解析の対象とする文書は、縦方向の指示と横方向の指示とが混在する罫線文書である。このような罫線文書の構造を解析するためには、一度の構造解析では不十分である。そこで、罫線文書の指示関係を解析するために横優先構造解析と縦優先構造解析とを行う。 First, the document to be analyzed in the present embodiment is a ruled line document in which vertical direction instructions and horizontal direction instructions are mixed. In order to analyze the structure of such a ruled line document, a single structural analysis is not sufficient. Therefore, horizontal priority structure analysis and vertical priority structure analysis are performed in order to analyze the indication relationship of the ruled line document.
横優先構造の解析方法は、構造解析木を作成する際の文法規則の適用箇所検索をH_list、V_listの順で行う解析方法である。構造解析木の作成手順を以下に示す処理番号1から処理番号6にそって説明する。
The horizontal priority structure analysis method is an analysis method in which grammatical rule application location search when creating a structural analysis tree is performed in the order of H_list and V_list. The procedure for creating the structural analysis tree will be described in the order of
1.対象文書である文書のボックス種別を分類し、H_listとV_listを作成する。 1. Classify the box type of the target document, and create H_list and V_list.
2.文法規則の最も優先順位の高い規則を現在の規則とする。 2. The rule with the highest priority in the grammar rule is the current rule.
3.H_listの中に現在の規則が適用できる箇所があるか否かを走査する。適用できる箇所がある場合は還元処理を行い、処理番号6へ移行する。また、適用可能箇所が複数ある場合は、最初に現れる箇所のみに還元処理を行う。
3. Scans H_list for places where the current rule can be applied. If there is an applicable part, a reduction process is performed, and the process proceeds to process
4.V_listの中に現在の規則が適用できる箇所があるか否かを走査する。適用できる箇所がある場合は還元処理を行い、処理番号6へ移行する。また、適用可能箇所が複数ある場合は、最初に現れる箇所のみに還元処理を行う。
4). Scans V_list for places where the current rule can be applied. If there is an applicable part, a reduction process is performed, and the process proceeds to process
5.一つ優先順位の低い文法規則を新たに現在の規則とし、再び処理番号3へ移行する。また、この時点で全ての文法規則が適用できなくなった場合は解析を終了する。
5. The grammar rule having one lower priority is newly set as the current rule, and the process proceeds to process
6.還元処理により、ボックスの並びや接続関係が変化している可能性があるため、再びH_listとV_listとを作成する。リスト作成後、処理番号2へ移行する。ただしH_listまたはV_listが<gcb>だけに還元されている場合は解析が成功したので終了する。
6). Since there is a possibility that the arrangement of boxes and the connection relationship have changed due to the reduction process, H_list and V_list are created again. After creating the list, the process proceeds to process
以上のようにして、横優先構造の解析が行われる。また、縦優先構造解析方法は、処理番号3と処理番号4とが入れ替わった解析方法である。
As described above, the horizontal priority structure is analyzed. The vertical priority structure analysis method is an analysis method in which
このように、文法規則の適用箇所検索を一定方向で行うことにより、横優先構造解析では横方向に働く指示関係を優先的に解析することができ、縦優先構造解析では縦方向に働く指示関係を優先的に解析することができる。これにより、指示方向が混在する罫線文書の文書構造情報を作成することが可能となる。 In this way, by searching in a certain direction for grammatical rule application locations, it is possible to preferentially analyze the instruction relation that works in the horizontal direction in the horizontal priority structure analysis, and the instruction relation that works in the vertical direction in the vertical priority structure analysis. Can be preferentially analyzed. As a result, it is possible to create document structure information of a ruled line document in which instruction directions are mixed.
図18(A)を参照して、罫線文書70Aを例にとって、縦の指示方向と横の指示方向が混在する罫線文書の解析方法を説明する。 With reference to FIG. 18A, a ruled line document analyzing method in which a vertical instruction direction and a horizontal instruction direction are mixed will be described by taking a ruled line document 70A as an example.
まず、図18(B)を参照して、罫線文書70Aのボックス種別が分類された罫線文書70Bの説明をする。ここでは、IND1がBLK1に指示を与えており、IND2がBLK2に指示を与えている。そして、これらの指示方向は横方向である。また、IND3がINS2に指示を与えており、この指示方向は縦である。このような罫線文書70に対して、図7に示した書式構造文法50を適用する。 First, the ruled line document 70B in which the box type of the ruled line document 70A is classified will be described with reference to FIG. Here, IND1 gives instructions to BLK1, and IND2 gives instructions to BLK2. These indication directions are horizontal directions. Further, IND3 gives an instruction to INS2, and this instruction direction is vertical. The format structure grammar 50 shown in FIG. 7 is applied to such a ruled line document 70.
図18(C)に、罫線文書70に関するボックスリストを示す。ここでは、横優先構造解析を説明するため、横方向ボックスリスト71に対して先ず、書式構造文法を適用する。そして、横方向ボックスリスト71に、現在の文法規則の適用可能箇所がなければ、縦方向ボックスリスト72に対して現在の文法規則が適用される。 FIG. 18C shows a box list related to the ruled line document 70. Here, in order to explain horizontal priority structure analysis, a format structure grammar is first applied to the horizontal box list 71. If there is no applicable location of the current grammar rule in the horizontal box list 71, the current grammar rule is applied to the vertical box list 72.
図19(A)を参照して、横方向ボックスリスト71のIND1とBLK1とから成るボックス群S30に対して、文法規則2が適用されて<gcb1>に還元される。この還元処理後の罫線文書70Cを図19(B)に示す。そして、図19(C)を参照して、還元処理が行われた罫線文書70Cに関するボックスリストを新たに作成する。
Referring to FIG. 19A,
図20(A)を参照して、横方向ボックスリスト71のIND2とBLK2とから成るボックス群S31に対して、文法規則2が適用されて<gcb2>に還元される。そして、図20(B)を参照して、還元処理が行われた罫線文書70に関するボックスリストを新たに作成する。
Referring to FIG. 20A,
図21(A)を参照して、縦方向ボックスリスト72のIND3とINS2とから成るボックス群S32に対して、文法規則2が適用されて<gcb3>に還元される。そして、図21(B)を参照して、還元処理が行われた罫線文書に関するボックスリストが新たに作成す。
Referring to FIG. 21A,
図22(A)を参照して、横方向ボックスリスト71のEXP1であるボックス群S33に対して、文法規則4が適用されて<gcb4>に還元される。そして、図22(B)参照して、新たにボックスリストを作成した結果、横方向ボックスリスト71および縦方向ボックスリスト72が<gcb>だけで表現されていることから、解析が終了したこととなる。
Referring to FIG. 22A,
図23(A)を参照して、解析結果から横優先構造解析木73を作成する。この結果、横方向の指示関係が明らかになり、矢印で示す方向にボックスが指示を与えている。従って、IND1はBLK1に。IND2はBLK2に対してそれぞれ指示を与えていることがわかる。 Referring to FIG. 23A, a horizontal priority structure analysis tree 73 is created from the analysis result. As a result, the horizontal instruction relationship is clarified, and the box gives an instruction in the direction indicated by the arrow. Therefore, IND1 becomes BLK1. It can be seen that IND2 gives instructions to BLK2.
ここでは縦優先構造解析については省略したが、上述した方法によって解析した結果を図23(B)に示す。図23(B)を参照して、縦優先構造解析木74について説明する。縦方向に指示関係にあるのは、IND3とINS2とであり、IND3がINS2に対して指示を与えている。 Here, the vertical priority structure analysis is omitted, but the result of analysis by the above-described method is shown in FIG. The vertical priority structure analysis tree 74 will be described with reference to FIG. IND3 and INS2 are in an instruction relationship in the vertical direction, and IND3 gives an instruction to INS2.
図23(C)を参照して、横優先構造解析木73および縦優先構造解析木74から得られた指示関係は、罫線文書70内の矢印にて示す。このようにして、縦と横とに指示方向が混在する罫線文書の文書構造情報を作成することができる。 With reference to FIG. 23C, the indication relationship obtained from the horizontal priority structure analysis tree 73 and the vertical priority structure analysis tree 74 is indicated by an arrow in the ruled line document 70. In this way, it is possible to create document structure information of a ruled line document in which designated directions are mixed vertically and horizontally.
<第3の実施の形態>
本形態は、第1の実施の形態および第2の実施の形態と基本的な部分は同一であるので、相違点を中心に説明する。
<Third Embodiment>
Since the basic part of this embodiment is the same as that of the first embodiment and the second embodiment, the description will focus on the differences.
図24を参照して、本形態の文書構造情報の作成方法が適用可能な罫線文書を説明する。本形態で扱う文書は表構造によって形成されている。具体的に表構造とは、ボックス群全体の形状が長方形であり、指示ボックスを除いた他のボックスは全て空欄ボックスまたは挿入ボックスなどの記入ボックスである構造の文書である。しかし、表構造の左上のボックスは説明ボックスとみなされている。 With reference to FIG. 24, a ruled line document to which the document structure information creation method of the present embodiment is applicable will be described. Documents handled in this form are formed in a table structure. Specifically, the table structure is a document having a structure in which the shape of the entire box group is a rectangle, and all other boxes except the instruction box are entry boxes such as a blank box or an insertion box. However, the box at the top left of the table structure is considered an explanation box.
表構造の特徴は、記入ボックスがマトリックス状に配置されることから記入ボックス群は長方形と成ることと、このボックス群の上辺と左辺の横方向および縦方向に指示ボックス連続部41が存在することである。 The table structure is characterized by the fact that the entry boxes are arranged in a matrix, so that the entry box group is rectangular, and the instruction box continuous portion 41 exists in the horizontal and vertical directions of the upper and left sides of the box group. It is.
表構造を用いて表現される文書構造は、多層繰り返し指示を効果的にレイアウトするために用いられる構造である。つまり、多層繰り返し指示において、親指示を束ねる属性情報が複数存在する層が二つ存在するときに、それぞれの層の属性情報を横あるいは縦方向にレイアウトしたものである。 The document structure expressed using the table structure is a structure used for effectively laying out the multilayer repeat instruction. That is, when there are two layers having a plurality of attribute information bundled with the parent instruction in the multilayer repeat instruction, the attribute information of each layer is laid out in the horizontal or vertical direction.
以下に、本形態において対象とする表構造の具体的な例を説明する。 Hereinafter, a specific example of the table structure targeted in this embodiment will be described.
図24(A)を参照して、表構造40Aは最も単純な表構造である。ここでは指示ボックスが縦方向および横方向に3つずつ連続して設けられているが、双方の指示ボックスの数に限定はない。図24(B)から図24(E)を参照して、これらの表構造40Bから40Eは、親子関係の指示ボックス群を有する表構造である。具体的には、表構造40Bおよび表構造40Cは、横方向に指示を与える指示ボックスの一部に親子関係が存在する。ここでは図示していないが、縦方向に指示を与える指示ボックスが部分的に親子関係にあるような表構造も本形態の対象となる。また、表構造40Dは横方向に指示を与える指示ボックス全てに親子関係が成立しており、表構造40Eは縦方向に指示を与える指示ボックス全てに親子関係が成立している。 Referring to FIG. 24A, the table structure 40A is the simplest table structure. Here, three instruction boxes are provided continuously in the vertical direction and the horizontal direction, but the number of both instruction boxes is not limited. Referring to FIGS. 24B to 24E, these table structures 40B to 40E are table structures having an instruction box group of a parent-child relationship. Specifically, the table structure 40B and the table structure 40C have a parent-child relationship in a part of an instruction box that gives instructions in the horizontal direction. Although not shown here, a table structure in which an instruction box for giving an instruction in the vertical direction partially has a parent-child relationship is also an object of this embodiment. In the table structure 40D, a parent-child relationship is established in all instruction boxes that give instructions in the horizontal direction, and in the table structure 40E, a parent-child relationship is established in all instruction boxes that give instructions in the vertical direction.
本形態では、上記したような表構造によって形成された文書に対して、表構造に対応した書式構造文法である表構造文法を適用することで文書構造情報を作成する。 In this embodiment, document structure information is created by applying a table structure grammar, which is a format structure grammar corresponding to the table structure, to a document formed with the table structure as described above.
表構造文法とは、空欄ボックスと挿入ボックスを区別することなく一度に結合することを特徴とする文法である。これにより、表内にあらかじめ単位等が埋め込まれた挿入ボックスと単位が不必要または省略された空欄ボックスとが混在している場合を解決することができる。また、表には指示ボックスが一列に連続する部分が存在することから、それらを意味ある形で還元する文法規則が含まれている。 The table structure grammar is a grammar characterized by combining a blank box and an insertion box at a time without distinction. As a result, it is possible to solve the case where an insertion box in which a unit or the like is embedded in the table and a blank box in which the unit is unnecessary or omitted are mixed. In addition, since there are portions where instruction boxes are continuous in a line in the table, grammar rules for reducing them in a meaningful manner are included.
表の内部の記入ボックスは左側と上側の2方向から指示を受けるため、連続する記入ボックスが指示ボックスと結合して、複合ボックスに還元すると、その複合ボックスは最初の還元方向とは別の方向に結合する必要がある。従って、これらの表の特徴を表す部分について新たな非終端記号igt(indication group in table)および、tbl(table)を追加した。 Since the entry boxes inside the table receive instructions from the left and upper two directions, if the consecutive entry boxes are combined with the instruction boxes and returned to a composite box, the composite box will have a different direction from the original reduction direction. Need to be combined. Therefore, new non-terminal symbols igt (indication group in table) and tbl (table) have been added to the portions representing the characteristics of these tables.
<igt>(indication group in table)とは、表中の指示ボックス連結部を表すが、指示は出さないボックス群である。 <Igt> (indication group in table) is a group of boxes that indicate an instruction box concatenation unit in the table but do not give an instruction.
<tbl>(table)とは、表形式指示を持つボックス群である。 <Tbl> (table) is a group of boxes having a table format instruction.
表形式指示とは、一つの記入ボックスが縦と横との二方向の異なる指示ボックスから独立して指示を受けており、一つの指示ボックスが一方方向に繰り返し指示を出す指示関係である。また、記入ボックスの縦および横はそれぞれ同じ幅(高さ)のボックスと隣接している。そして、表形式指示では、二方向の指示ボックス間に親子関係や意味的つながりはない。 The tabular instruction is an instruction relationship in which one entry box receives instructions independently from two different directions boxes in the vertical and horizontal directions, and one instruction box repeatedly issues instructions in one direction. The vertical and horizontal sides of the entry box are adjacent to the same width (height) box. In the tabular instructions, there is no parent-child relationship or semantic connection between the instruction boxes in two directions.
図25を参照して、表構造文法60の文法規則とその優先順位を説明する。表構造文法60は、9種類の文法規則から成り、各文法規則には優先順位と同じ番号を付与している。そして、表規則の優先順位は表構造を解析する際にもこれまでと同様にもっとも信頼できる解析結果が最初に現れるようにつけられている。 With reference to FIG. 25, the grammar rules of the table structure grammar 60 and their priorities will be described. The table structure grammar 60 is composed of nine kinds of grammar rules, and each grammar rule is assigned the same number as the priority order. The priority of the table rules is set so that the most reliable analysis results appear first when analyzing the table structure.
以下に各文法規則の性質について説明する。以後、書式構造文法の文法規則1と区別するために、表規則1、表規則2・・・、と記載する。
The nature of each grammar rule is explained below. Hereinafter, in order to distinguish from the
表規則1では、表構造の特徴である記入ボックス連続部を還元する。
In the
表規則2では、多層繰り返し指示を還元する。
In
表規則3では、表規則2の多層繰り返し指示を受けるための前処理として、表規則2の適用方向と直交する方向への還元を行う。
In the
表規則4、5、6では、表構造の特徴である指示連結部を還元する。 In the table rules 4, 5, and 6, the instruction connecting part, which is a feature of the table structure, is reduced.
表規則4では、表の左上をigtに還元する。
In
表規則5では、INDの並びである指示ボックス連側部分を逐次的にigtに還元する。
According to
表規則6では、親指示を持つ指示ボックス連続部分、もしくはこの表規則で還元された複数のigtを逐次的にigtに還元する。
In the
表規則7、8、9では表構造への還元を行う。
表規則7では、親指示を持つ指示ボックス連側部分、もしくはこの表規則で還元された複数のigtを逐次的にigtに還元する。
In the
表規則8では、表全体に親指示が係ることを許すため、表全体に係る親指示とtblの繰り返しをtblに還元する。
In
表規則9では、最終的に、表構造文書は複合ボックス(gcb)に還元されて、文書の構成要素となる。
According to the
表構造を解析するためには、一度の構造解析では不十分である。なぜなら表内部の記入ボックスが縦と横から同時に指示を受けているからである。そこで、表構造の指示関係を解析するために横優先構造解析と縦優先構造解析とを行う。横優先構造解析および縦優先構造解析の具体的な方法は、第2の実施の形態において説明したのでここでは省略する。 In order to analyze the table structure, a single structural analysis is not sufficient. This is because the entry box in the table receives instructions from both the vertical and horizontal directions. Therefore, horizontal priority structure analysis and vertical priority structure analysis are performed in order to analyze the table structure indication relationship. Since the specific methods of the horizontal priority structure analysis and the vertical priority structure analysis have been described in the second embodiment, they are omitted here.
図26から図32を参照して、表構造文書61の文書構造情報の作成方法を具体的に説明する。 A method for creating the document structure information of the table structure document 61 will be specifically described with reference to FIGS.
図26(A)を参照して、表構造文書61は縦方向と横方向の双方から指示を受けるボックスが存在する。ボックス種類を分類した結果を図26(B)に示す。BLK1はIND1およびIND3から指示を受けており、BLK2がIND2およびIND3から指示を受けている。また、IND3の指示方向は横方向であるが、IND1およびIND2の指示方向は縦方向である。 Referring to FIG. 26A, the table structure document 61 has boxes for receiving instructions from both the vertical direction and the horizontal direction. FIG. 26B shows the result of classifying the box types. BLK1 receives instructions from IND1 and IND3, and BLK2 receives instructions from IND2 and IND3. The indication direction of IND3 is the horizontal direction, but the indication directions of IND1 and IND2 are the vertical direction.
図27(A)を参照して、ボックス種別の分類後にボックスリストを作成する。横方向ボックスリスト62はH_listを示しており、縦方向ボックスリストはV_listを示している。ここでは、横優先構造解析を行うため、横方向ボックスリスト62に対して最初に表構造文法規則を適用する。ボックス群S20に対して表規則1を適用する。表規則1を適用した結果、IND3、BLK1およびBLK2は<gcb1>に還元される。還元後、新たにボックスリストを作成した結果を図27(B)示す。このとき、縦方向ボックスリスト63も同様にボックスリストが再度、作成される。
Referring to FIG. 27A, a box list is created after classification of box types. The horizontal box list 62 indicates H_list, and the vertical box list indicates V_list. Here, in order to perform the horizontal priority structure analysis, the table structure grammar rule is first applied to the horizontal box list 62.
図28(A)を参照して、EXP1とIND1とから成るボックス群S21に対して表規則4が適用される。その結果、ボックス群S21は<igt1>に還元される。そして、図28(B)に示すように、再度、ボックスリストが作成される。
Referring to FIG. 28A,
図29(A)を参照して、<igt1>とIND2とから成るボックス群S22に対して表規則4が適用される。その結果、ボックス群S22は<igt2>に還元される。そして、図29(B)に示すように、再度、ボックスリストが作成される。
Referring to FIG. 29A,
図30(A)を参照して、<igt1>と<gcb1>とから成るボックス群S23に対して表規則7が適用される。その結果、ボックス群S23は<tbl1>に還元される。ここでは、横方向ボックスリスト62に対して、適用可能な表規則が存在しないため、縦方向ボックスリスト63に対して適用可能な表規則が適用されている。そして、図30(B)に示すように、再度、ボックスリストが作成される。
Referring to FIG. 30A,
図31(A)を参照して、<tbl1>であるボックス群25に対して表規則9が適用される。この結果、<tbl1>は<gcb2>に変換されて、すべてのボックスが<gcb>に変換されたので解析が終了する。以上のようにして、横優先構造の解析が行われる。
Referring to FIG. 31A,
図32を参照して、解析されたボックス間の指示関係を説明する。 With reference to FIG. 32, the indication relationship between the analyzed boxes will be described.
先ず、図32(A)を参照して、解析結果に基づいて作成され横優先構造解析木64について説明する。太線で示された矢印が指示関係を表しており、IND1がBLK1に対して指示を与えており、IND2がBLK2に対して指示を与えていることがわかる。 First, the horizontal priority structure analysis tree 64 created based on the analysis result will be described with reference to FIG. An arrow indicated by a bold line represents an instruction relationship, and it can be seen that IND1 gives an instruction to BLK1, and IND2 gives an instruction to BLK2.
次に、図32(B)を参照して、縦優先構造解析木65について説明する。縦優先構造の解析方法は、上述したように表規則を適用させるボックスリストの順番を入れ替えるだけであるので、省略した。ここでは、解析結果のみを示す。太線の矢印は指示関係を示しており、IND3はBLK1およびBLK2に対して指示を与えていることがわかる。 Next, the vertical priority structure analysis tree 65 will be described with reference to FIG. The analysis method of the vertical priority structure is omitted because it only changes the order of the box list to which the table rule is applied as described above. Here, only the analysis result is shown. Thick line arrows indicate an instruction relationship, and it is understood that IND3 gives instructions to BLK1 and BLK2.
図32(C)を参照して、表構造文書61内の矢印は、これらの解析木から得られた指示関係を示している。このようにして、表構造文書の構造情報を作成することができる。 Referring to FIG. 32C, the arrows in the table structure document 61 indicate the indication relationship obtained from these parse trees. In this way, the structure information of the table structure document can be created.
<第4の実施の形態>
本形態は、第1の実施の形態から第3の実施の形態と基本的な箇所は同一であるので、相違点を中心に説明する。ここで、第1の実施の形態および第2の実施の形態で対象とされた文書を一般構造文書と記載し、使用された書式構造文法を一般構造文法と記載する。また、第3の実施の形態で対象とされた文書を表構造文書と記載し、使用された書式構造文法を表構造文法と記載する。
<Fourth embodiment>
Since this embodiment is the same as the first embodiment to the third embodiment in the same basic points, differences will be mainly described. Here, the document targeted in the first embodiment and the second embodiment is described as a general structure document, and the used format structure grammar is described as a general structure grammar. Also, the document targeted in the third embodiment is described as a table structure document, and the used format structure grammar is described as a table structure grammar.
本形態では、対象とする文書は、一般構造文書と表構造文書の両方であり、それらが組み合わされた文書をも対象とする。更に、挿入ボックスのみを指定することでボックス種別の分類を可能にする。 In this embodiment, the target document is both a general structure document and a table structure document, and the combined document is also a target. Furthermore, by specifying only the insertion box, it is possible to classify the box type.
また、一般構造文書に対する解析方法は、第2の実施の形態で述べた、横優先構造解析と縦優先構造解析とを行う方法を採用する。 The analysis method for the general structure document employs the method of performing the horizontal priority structure analysis and the vertical priority structure analysis described in the second embodiment.
具体的には、ボックスの種類を分別する際に、先ず、空欄ボックスは画像読みとり手段を用いることにより内部に文字列のないボックスとして自動判定して、自動的にBLKに設定する。次に、空欄ボックスを除く、内部に文字列のあるボックスをすべて指示ボックスに設定する。その後、挿入ボックスを手動で設定する。この時点では、説明ボックスと指示ボックスとが指示ボックスに振り分けられている。しかし、書式構造文法を適用した際に、指示ボックスでありながら、どのボックスにも指示を与えていないボックスを説明ボックスとすることで、指示ボックスと説明ボックスとを分類している。 Specifically, when classifying the types of boxes, first, the blank box is automatically determined as a box having no character string by using an image reading means, and is automatically set to BLK. Next, all boxes with character strings inside are set as instruction boxes except blank boxes. Then set the insertion box manually. At this point, the explanation box and the instruction box are allocated to the instruction box. However, when the format structure grammar is applied, an instruction box and an explanation box are classified by setting an explanation box as an instruction box that does not give an instruction to any box.
ここで、図7で示した書式構造文法50の文法規則8は形式的に表構造を扱うために含まれていた規則であるため、不要となる。また、第2の実施例では表構造の左上のボックスは説明ボックスと仮定している。しかし、記入者が挿入ボックスのみを指定することから、表構造の左上の説明ボックスと他の罫線文書中の説明ボックスとはともに指示ボックスに分類されることになる。本来、説明ボックスは他のボックスを指示しなく、かつ他のボックスから指示されないボックスである。従って、指示ボックスに分類されることにより、一般構造文法を用いた場合、横優先、縦優先構造解析の両方の解析において、指示ボックスであるにも関わらず他のボックスを指示しないという矛盾を生じることとなる。この時点では、矛盾が発生した指示ボックスが、表構造の左上の説明ボックスか、一般構造中の説明ボックスのどちらであるかは判断できないが、どちらかであることは判断できる。
Here, the
そこで、矛盾の生じたボックス以降のボックス群を対象に表構造文法を用いた解析を行う。その結果、矛盾を生じたボックスが表構造の左上のボックスであれば<tbl>に還元されるので、その矛盾が生じたボックスを説明ボックスとする。逆に、<tbl>に還元されなかった場合は、一般構造中の説明ボックスであると判断できるので、その矛盾が生じたボックスを説明ボックスに置き換えて、再度一般構造文法の適用を行う。 Therefore, the analysis using the table structure grammar is performed for the boxes after the box in which the contradiction occurs. As a result, if the contradicted box is the upper left box of the table structure, it is reduced to <tbl>. Therefore, the box in which the contradiction has occurred is used as an explanation box. On the other hand, if it is not reduced to <tbl>, it can be determined that it is an explanation box in the general structure, so the box in which the contradiction occurs is replaced with the explanation box, and the general structure grammar is applied again.
図33を参照して、本形態の具体的な文書構造情報の作成方法を説明する。 With reference to FIG. 33, a specific method for creating document structure information according to this embodiment will be described.
フローチャート70に示すステップS10において、上述したようにボックス種別が分類された文書に対応したボックスリストを作成する。 In step S10 shown in the flowchart 70, as described above, a box list corresponding to the document in which the box type is classified is created.
次に、ステップS11において、ボックスリストに対して書式構造を適用する。ここで、図7で示した書式構造文法50の文法規則8を除く文法が適用される。
Next, in step S11, the format structure is applied to the box list. Here, the grammar excluding the
ステップS12において、文法適用後、未指示関係エラーの発生有無を判断する。未指示関係エラーが発生しなければ、解析成功となる。未指示関係エラーを起こすボックスはボックス種別が誤っているボックスまたは表構造の先頭ボックスである。従って、この未指示関係エラーが発生すれば、エラーの発生原因が、表構造の先頭ボックスであるのかボックス種別が誤っているかを判断するためにステップS13へ移行する。 In step S12, after applying the grammar, it is determined whether or not an undirected relation error has occurred. If no unindicated error occurs, the analysis is successful. A box that causes an unindicated relation error is a box with an incorrect box type or a top box of a table structure. Therefore, if this unindicated error occurs, the process proceeds to step S13 in order to determine whether the cause of the error is the top box of the table structure or the box type is incorrect.
ステップS13において、未指示関係エラーの発生原因を判定するために表構造文法による構造解析木の指示関係解析を行う。このとき、未指示関係エラー発生ボックス以降の全てのボックスに対し、表構造文法が適用される。 In step S13, in order to determine the cause of the occurrence of an unindicated relation error, an instruction relation analysis of a structural analysis tree using table structure grammar is performed. At this time, the table structure grammar is applied to all boxes after the undirected relation error occurrence box.
ステップS14において、表構造文法を適用した後、未指示関係エラーが発生したボックスをスタートとする表構造が発見されない場合は、ボックス種別が誤っているボックスであると判断される。そして、このボックスは説明ボックスに変換される。 In step S14, after applying the table structure grammar, if a table structure starting from a box in which an unindicated relation error has occurred is not found, it is determined that the box type is the wrong box. This box is converted into an explanation box.
エラーが発生したボックスを説明ボックスに変換した後、再度、ステップS11において書式構造文法を適用する。その結果、エラーが発生しなければ、解析成功となる。つまり、エラーが発生したボックスは、挿入ボックスではなく、説明ボックスであることが判明したことになる。 After the box in which the error has occurred is converted into an explanation box, the format structure grammar is applied again in step S11. As a result, if no error occurs, the analysis is successful. That is, it is found that the box in which the error occurred is not an insertion box but an explanation box.
表形式指示が検出された場合は、表構造が存在していることになる。従って、表構造の範囲を特定し、ステップS11に戻り、表構造以降のボックスに対して再び書式構造文法を適用する。表構造の範囲は、指示を受ける記入ボックスの最大番号までである。 If a tabular indication is detected, a table structure exists. Therefore, the range of the table structure is specified, the process returns to step S11, and the format structure grammar is again applied to the boxes after the table structure. The range of the table structure is up to the maximum number of entry boxes that receive instructions.
以上の手法にて、一般構造文書と表構造文書が混在した文書に対しても解析を行うことができ、文書構造情報を作成することが可能となる。また、この手法を用いれば、一般構造文書と表構造文書が交互に存在するような文書に対しても、文書構造情報を作成することも可能である。 With the above method, it is possible to analyze a document in which a general structure document and a table structure document are mixed, and document structure information can be created. Also, using this technique, it is possible to create document structure information for a document in which general structure documents and table structure documents exist alternately.
一般構造文書と表構造文書が混在した文書として、図34に示すような文書80を例にとって説明する。文書80のボックス種別を分類した結果を図35に示す。ここでは、上述したように、説明ボックスは全て指示ボックスとして分類されている。まず、この文書に対して一般構造文法を適用すると、斜線で示されたボックス85が未指示関係エラーを起こす。従って、ボックス85以降の全ボックスに対して表構造文法が適用される。表構造文法適用後に指示関係解析を行うと、ボックス86Aおよびボックス87Aから隣接するボックスから、ボックス86Bおよびボックス87Bから繰り返し指示を受けるボックスまで表形式指示がみられ、未指示関係エラーは発生しなかった。よって、この範囲を表と確定し、ボックス85までを一般構造文法で再解析する。ボックス90以降に再び一般構造文法を適用すると、構造解析木が作成され、指示関係解析を行っても未指示関係エラーは発生しなかった。このようにして、指示関係が解析された結果を図36に示す。図36では、矢印の始点が指示を与えるボックスであり、矢印の終点に位置するボックスに対して指示を与えている。そして、文書80は、一般構造文書88Aと一般構造文書88Bとの間に、表構造文書89が存在する文書であることがわかる。
A document 80 as shown in FIG. 34 will be described as an example of a document in which a general structure document and a table structure document are mixed. The result of classifying the box type of the document 80 is shown in FIG. Here, as described above, all the explanation boxes are classified as instruction boxes. First, when the general structure grammar is applied to this document, the box 85 indicated by diagonal lines causes an unindicated relation error. Therefore, the table structure grammar is applied to all the boxes after the box 85. When the instruction relation analysis is performed after the table structure grammar is applied, the table format instruction is seen from the
以上のようにして、一般構造文書と表構造文書が混在した文書の文書構造情報が作成される。
As described above, document structure information of a document in which a general structure document and a table structure document are mixed is created.
Claims (8)
コンピュータあるいは手動で、罫線で区切られた複数のボックスを有する前記文書の前記ボックスを、前記ボックスの種別に基づいて、分類する第1のステップと、
コンピュータで、前記ボックスの縦方向または/および横方向の隣接関係を示すボックスリストを作成する第2のステップと、
コンピュータで、優先順位を有する複数の文法規則によって構成され、各文法規則によってボックス間の指示関係を明確にする書式構造文法を、前記ボックスリストに対して、適用する第3のステップと、を具備し、
前記第3のステップでは、
前記ボックスリストに対して、前記ボックス間の指示関係を縦または横の一方向のみとした前記書式構造文法である一般構造文法を適用し、
矛盾が生じたボックス以降のボックス群に対して、前記ボックス間の指示関係を縦と横との両方向とした前記書式構造文法である表構造文法を適用することを特徴とする文書構造情報の作成方法。 A method for creating document structure information from a document in which general structure documents and table structure documents are mixed.
A first step of classifying the box of the document having a plurality of boxes separated by ruled lines based on a type of the box, manually or manually;
A second step of creating a box list indicating a vertical or / and horizontal adjacency relationship of the box in a computer;
And a third step of applying to the box list a format structure grammar constituted by a plurality of grammatical rules having a priority order and clarifying the instruction relationship between boxes by each grammar rule. And
In the third step,
Applying a general structure grammar, which is the format structure grammar , in which the instruction relation between the boxes is only in one direction vertically or horizontally, to the box list,
Respect box group after conflict box, creating the document structure information, which comprises applying a table structure grammar is the format structure grammar both directions between the vertical and horizontal instructions relationships between the box Method.
他のボックスに対して指示を与える指示ボックスと、
他のボックスから指示を受けず且つ指示を与えない説明ボックスと、
ボックス内に何も記載されておらず情報を記入する空欄ボックスと、
ボックス内に文字が記載されており且つ情報を記入する挿入ボックスの何れかであることを特徴とする請求項1に記載の文書構造情報の作成方法。 The box is
An instruction box that gives instructions to other boxes;
An explanation box that does not receive instructions from other boxes and does not give instructions.
A blank box where nothing is written in the box and information is entered,
2. The method for creating document structure information according to claim 1, wherein the box is one of insertion boxes in which characters are written and information is entered.
前記空欄ボックスは画像読み取り手段を用いて自働的に分類され、
指示ボックス、説明ボックスおよび挿入ボックスは手動で分類されることを特徴とする請求項2に記載の文書構造情報の作成方法。 In the first step,
The blank boxes are automatically classified using image reading means,
3. The method for creating document structure information according to claim 2, wherein the instruction box, the explanation box, and the insertion box are manually classified.
前記ボックス間の縦方向または横方向の指示関係を示す構造解析木をそれぞれ形成することを特徴とする請求項1に記載の文書構造情報の作成方法。 In the third step,
2. The document structure information creation method according to claim 1, wherein a structure analysis tree indicating a vertical or horizontal pointing relationship between the boxes is formed.
前記横方向の隣接関係を示すボックスリストに対して前記書式構造文法を適用した後、前記縦方向の隣接関係を示すボックスリストに対して前記書式構造文法を適用することで、横優先構造解析木を作成し、
縦方向の隣接関係を示すボックスリストに対して前記書式構造文法を適用した後、前記横方向の隣接関係を示すボックスリストに対して前記書式構造文法を適用することで、縦優先構造解析木を作成し、
前記横優先構造解析木と前記縦優先構造解析木から文書構造を解析することを特徴とする請求項1に記載の文書構造情報の作成方法。 In the third step,
After applying the format structure grammar to the box list indicating the horizontal adjacency relationship, the format structure grammar is applied to the box list indicating the vertical adjacency relationship. Create
After applying the format structure grammar to the box list indicating vertical adjacency, the vertical structure analysis tree is obtained by applying the format structure grammar to the box list indicating horizontal adjacency. make,
2. The document structure information creation method according to claim 1, wherein a document structure is analyzed from the horizontal priority structure analysis tree and the vertical priority structure analysis tree.
前記空欄ボックスは画像読み取り手段を用いて分類され、
前記挿入ボックスは手動で分類され、前記空欄ボックスおよび前記挿入ボックス以外のボックスは前記指示ボックスに分類され、
前記第3のステップにおいて、隣接するボックス間の指示関係を解析し、他のボックスと指示関係を有さない指示ボックスを説明ボックスに分類することを特徴とする請求項2に記載の文書構造情報の作成方法。 In the first step,
The blank boxes are classified using image reading means,
The insertion box is manually classified, and the boxes other than the blank box and the insertion box are classified as the instruction box,
3. The document structure information according to claim 2, wherein in the third step, the instruction relationship between adjacent boxes is analyzed, and the instruction boxes having no instruction relationship with other boxes are classified into explanation boxes. How to create
前記ボックスリストに対して前記優先順位の高い文法規則から順次適用可能箇所を走査し、
適用可能箇所に対して前記文法規則を適用後、再度優先順位の高い文法規則から順次適用可能箇所を走査することを特徴とする請求項1に記載の文書構造情報の作成方法。
In the third step,
Scan sequentially applicable places from the grammar rules with high priority to the box list,
2. The method for creating document structure information according to claim 1, wherein after applying the grammar rule to the applicable part, the applicable part is sequentially scanned again from a grammatical rule having a higher priority.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004375548A JP4853891B2 (en) | 2004-12-27 | 2004-12-27 | How to create document structure information |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004375548A JP4853891B2 (en) | 2004-12-27 | 2004-12-27 | How to create document structure information |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2006185008A JP2006185008A (en) | 2006-07-13 |
| JP4853891B2 true JP4853891B2 (en) | 2012-01-11 |
Family
ID=36738097
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2004375548A Expired - Fee Related JP4853891B2 (en) | 2004-12-27 | 2004-12-27 | How to create document structure information |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4853891B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6325472B2 (en) * | 2015-03-03 | 2018-05-16 | 日本電信電話株式会社 | Data structure extraction device, data structure extraction method, and data structure extraction program |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2567001B2 (en) * | 1987-12-04 | 1996-12-25 | 富士電機株式会社 | Document reader including table |
-
2004
- 2004-12-27 JP JP2004375548A patent/JP4853891B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2006185008A (en) | 2006-07-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10360294B2 (en) | Methods and systems for efficient and accurate text extraction from unstructured documents | |
| CN101375278B (en) | Strategies for processing annotations | |
| Bansal et al. | Segmentation of touching and fused Devanagari characters | |
| CN105930159B (en) | A kind of method and system that the GUI code based on image generates | |
| EP0434930B1 (en) | Editing text in an image | |
| US7149967B2 (en) | Method and system for creating a table version of a document | |
| US6336124B1 (en) | Conversion data representing a document to other formats for manipulation and display | |
| US6721451B1 (en) | Apparatus and method for reading a document image | |
| US7350142B2 (en) | Method and system for creating a table version of a document | |
| JP4343213B2 (en) | Document processing apparatus and document processing method | |
| Meunier | Optimized XY-cut for determining a page reading order | |
| CN101523413A (en) | Automatically generate form definitions from hardcopy forms | |
| JPH09198456A (en) | Method for recognizing table based on graph | |
| JP2003288334A (en) | Document processing apparatus and document processing method | |
| CN106599001A (en) | Webpage content acquisition method and system | |
| CN118799908B (en) | Automatic identification method and device for literature catalogue | |
| JP5380040B2 (en) | Document processing device | |
| CN118799867A (en) | Image automatic annotation method, system, electronic device and storage medium | |
| EP2884425A1 (en) | Method and system of extracting structured data from a document | |
| CN113343658B (en) | PDF file information extraction method and device and computer equipment | |
| JP2004178010A (en) | Document processing apparatus, method and program | |
| JPH08320914A (en) | Table recognition method and device | |
| JP4853891B2 (en) | How to create document structure information | |
| CN120257974A (en) | Document content extraction method, device and related equipment | |
| KR102542174B1 (en) | Digital reference book provision system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060608 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20071203 |
|
| A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A711 Effective date: 20071203 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20071203 |
|
| A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20101027 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20101209 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110112 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110308 |
|
| RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20110322 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110421 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110810 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110908 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20111017 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20111019 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20141104 Year of fee payment: 3 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| LAPS | Cancellation because of no payment of annual fees |