JP6568021B2 - Logical relationship recognition apparatus, logical relationship recognition method, and logical relationship recognition program - Google Patents

Logical relationship recognition apparatus, logical relationship recognition method, and logical relationship recognition program Download PDF

Info

Publication number
JP6568021B2
JP6568021B2 JP2016138932A JP2016138932A JP6568021B2 JP 6568021 B2 JP6568021 B2 JP 6568021B2 JP 2016138932 A JP2016138932 A JP 2016138932A JP 2016138932 A JP2016138932 A JP 2016138932A JP 6568021 B2 JP6568021 B2 JP 6568021B2
Authority
JP
Japan
Prior art keywords
node
item name
logical relationship
item
nodes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2016138932A
Other languages
Japanese (ja)
Other versions
JP2018010489A (en
Inventor
郁子 高木
郁子 高木
山田 光一
光一 山田
勉 丸山
勉 丸山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2016138932A priority Critical patent/JP6568021B2/en
Publication of JP2018010489A publication Critical patent/JP2018010489A/en
Application granted granted Critical
Publication of JP6568021B2 publication Critical patent/JP6568021B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Character Input (AREA)
  • Document Processing Apparatus (AREA)

Description

本発明は、論理関係認識装置、論理関係認識方法および論理関係認識プログラムに関する。   The present invention relates to a logical relationship recognition apparatus, a logical relationship recognition method, and a logical relationship recognition program.

様々な企業における業務の処理に、OpS(業務支援システム:Operation Support System)が導入されている。一方で、OpSが支援できない業務については、各組織独自の運用がなされており、その中で帳票は情報流通に利用されている。帳票は半構造データのため、それぞれの値の意味(論理関係)は、人にとっては理解できても機械にとっては理解困難なものであり、帳票上のデータを活用する際に多大な人手の作業負担が発生している。これに対し、罫線枠の並びを基に、帳票の項目名間の論理関係、および項目名と項目値との間の論理関係を自動的に認識する技術が知られている(例えば、特許文献1および非特許文献1〜3を参照)。   OpS (Operation Support System: Operation Support System) has been introduced for business processing in various companies. On the other hand, for operations that cannot be supported by OpS, each organization has its own operations, and forms are used for information distribution. Since the form is semi-structured data, the meaning (logical relationship) of each value can be understood by a person but difficult for a machine, and a large amount of manual work is required when utilizing the data on the form. There is a burden. On the other hand, a technique for automatically recognizing a logical relationship between item names of a form and a logical relationship between item names and item values based on the arrangement of ruled line frames is known (for example, Patent Documents). 1 and non-patent documents 1 to 3).

特開2016−004417号公報JP, 2006-004417, A

高木ほか、“電子帳票群に対する横断的データ操作技術のための抽出手法の検討”、信学技報、vol.114、No.150 pp.1-6(2014)Takagi et al., “Examination of Extraction Techniques for Cross-sectional Data Manipulation Techniques for Electronic Forms”, IEICE Technical Report, vol.114, No.150 pp.1-6 (2014) 高木ほか、“電子帳票データ連携のための帳票視覚表現の調査”、電子情報通信学会通信ソサイエティ大会講演論文集(2015)Takagi et al., “Investigation of visual representation of forms for linking electronic form data”, IEICE Communication Society Conference Proceedings (2015) 高木ほか、“視覚表現を利用した電子帳票のデータ構造変換手法の検討”、信学技法、vol.115、No.409、pp25-30(2016)Takagi et al., "Examination of data structure conversion method of electronic forms using visual expression", Shingaku Techniques, vol.115, No.409, pp25-30 (2016)

しかしながら、従来の技術は、入れ子構造型に縦列挙、横列挙、縦列挙と横列挙の複合型、縦表、横表、直交表、入れ子構造型列挙、入れ子構造縦表、入れ子構造横表または入れ子構造直交表が含まれる、または混在する場合に、帳票の項目名間の論理関係、および項目名と項目値との間の論理関係を正確に認識することができない場合があるという問題があった。   However, the conventional technique has a vertical enumeration, horizontal enumeration, vertical enumeration and horizontal enumeration combined type, vertical table, horizontal table, orthogonal table, nested structure type enumeration, nested structure vertical table, nested structure horizontal table or When nested orthogonal tables are included or mixed, there is a problem that the logical relationship between item names in the form and the logical relationship between item names and item values may not be recognized correctly. It was.

例えば、4行×3列の罫線枠からなる表について、上端の行の3つの罫線枠が項目名である縦表である場合と、左端の列の4つの罫線枠が項目名である横表である場合と、上端の行の3つの罫線枠、および左端の列の4つの罫線枠の両方が項目名である直交表である場合と、が考えられる。このような場合、従来の技術では、項目名間の論理関係、および項目名と項目値との間の論理関係を正確に認識することは困難である。   For example, with respect to a table composed of ruled line frames of 4 rows × 3 columns, a vertical table in which the three ruled line frames in the uppermost row are item names and a horizontal table in which the four ruled line frames in the leftmost column are item names And the case where both the three ruled line frames in the uppermost row and the four ruled line frames in the leftmost column are orthogonal tables that are item names. In such a case, it is difficult for the conventional technique to accurately recognize the logical relationship between the item names and the logical relationship between the item names and the item values.

例えば、縦列挙の場合、縦方向に項目名に対応した同じ幅の罫線枠が複数存在する場合がある。さらに、それぞれの項目名は項目値を持ち、項目値に対応した罫線枠の幅も、項目名に対応した罫線枠の幅と同じである。このような場合、従来の技術では、どの罫線枠が項目名であるかを特定することができないため、項目名間の論理関係、および項目名と項目値との間の論理関係を正確に認識することは困難である。   For example, in the case of vertical enumeration, there may be a plurality of ruled line frames of the same width corresponding to the item names in the vertical direction. Further, each item name has an item value, and the width of the ruled line frame corresponding to the item value is the same as the width of the ruled line frame corresponding to the item name. In such a case, the conventional technology cannot identify which ruled line frame is the item name, so it accurately recognizes the logical relationship between the item names and the logical relationship between the item names and the item values. It is difficult to do.

さらに、例えば、入れ子構造の中に列挙および入れ子構造で表現された表が含まれる場合、従来技術では項目名と項目値との間の論理関係を正確に認識することは困難である。   Further, for example, when a table represented by an enumeration and a nested structure is included in the nested structure, it is difficult for the conventional technique to accurately recognize the logical relationship between the item name and the item value.

本発明の論理関係認識装置は、帳票の項目名または項目値を表す領域に関する情報をノードとして表し、前記ノード間の隣接関係をエッジとして表したグラフを基に、前記ノードのうち、あらかじめ設定された条件を満たすノードを、項目名を表す領域のノードである項目名ノードとして抽出する抽出部と、前記エッジを基に、前記項目名ノードから表の起点となるノードである起点ノードを抽出し、前記起点ノードを起点とした表を、上端と左端の両方に項目名が存在する直交表、上端に項目名が存在する縦表、および左端に項目名が存在する横表のうちのいずれかに分類する表分類部と、前記直交表における前記項目名ノード間の縦方向の論理関係、前記直交表における前記項目名ノード間の横方向の論理関係、前記直交表における前記項目名ノードと前記項目名ノード以外のノードである項目値ノードとの間の縦方向の論理関係、および前記直交表における前記項目名ノードと前記項目値ノードとの間の横方向の論理関係を取得する直交表取得部と、前記縦表における前記項目名ノード間の縦方向の論理関係、および前記縦表における前記項目名ノードと前記項目値ノードとの間の縦方向の論理関係を取得する縦表取得部と、前記横表における前記項目名ノード間の横方向の論理関係、および前記横表における前記項目名ノードと前記項目値ノードとの間の横方向の論理関係を取得する横表取得部と、前記直交表、前記縦表および前記横表から、不整合な表であることを示す所定の条件を満たす表を除外した合成対象の表を特定する第1の特定部と、1つのノードの所定の方向に、複数のノードが隣接している場合、前記1つのノードと前記複数のノードとの隣接関係を表すエッジを削除する第1の削除部と、前記項目名ノードのうち、所定の方向に項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、前記項目値ノードとの隣接関係を表すエッジを削除する第2の削除部と、前記第1の削除部および前記第2の削除部によってエッジの削除が行われた前記グラフを基に、前記項目名ノードと前記項目値ノードとの間の論理関係を取得する第1の取得部と、前記第1の削除部によってエッジの削除が行われた前記グラフを基に、前記項目名ノード間の包含関係を取得する第2の取得部と、前記第1の取得部によって取得された論理関係のうち、前記合成対象の表に含まれるノードに関する論理関係を除外した合成対象の列挙に関する論理関係を特定する第2の特定部と、前記第2の取得部によって取得された包含関係のうち、前記合成対象の表に関する論理関係および前記合成対象の列挙に関する論理関係のいずれにも含まれない包含関係を基に第1の木構造のデータを作成する第1の合成部と、前記合成対象の表に関する論理関係を基に木構造のデータを作成し、当該木構造のデータと前記第1の木構造のデータとを合成した第2の木構造のデータを作成する第2の合成部と、前記合成対象の列挙に関する論理関係を基に木構造のデータを作成し、当該木構造のデータと前記第2の木構造のデータとを合成した第3の木構造のデータを作成する第3の合成部と、を有することを特徴とする。   The logical relationship recognition apparatus of the present invention represents information relating to an area representing an item name or item value of a form as a node, and is set in advance among the nodes based on a graph representing an adjacency relationship between the nodes as an edge. An extraction unit that extracts a node that satisfies the condition as an item name node that is a node in an area that represents an item name, and based on the edge, extracts a starting node that is a node that is a starting point of the table from the item name node The table starting from the origin node is either an orthogonal table in which item names exist at both the top and left ends, a vertical table in which item names exist at the top, and a horizontal table in which item names exist at the left end. A vertical classification logical relationship between the item name nodes in the orthogonal table, a horizontal logical relationship between the item name nodes in the orthogonal table, the table in the orthogonal table A vertical logical relationship between a name node and an item value node that is a node other than the item name node, and a horizontal logical relationship between the item name node and the item value node in the orthogonal table. An orthogonal table acquisition unit to acquire, a vertical logical relationship between the item name nodes in the vertical table, and a vertical logical relationship between the item name node and the item value node in the vertical table are acquired. A horizontal table for acquiring a horizontal logical relationship between the item name nodes in the horizontal table and a horizontal logical relationship between the item name nodes and the item value nodes in the horizontal table An acquisition unit; a first specifying unit that specifies a table to be synthesized by excluding a table that satisfies a predetermined condition indicating that the table is inconsistent from the orthogonal table, the vertical table, and the horizontal table; The given one of the two nodes When a plurality of nodes are adjacent to each other, a first deletion unit that deletes an edge representing an adjacent relationship between the one node and the plurality of nodes, and an item in a predetermined direction among the item name nodes An item name node that is adjacent to an item value node that is a node of an area that represents a value, a second deletion unit that deletes an edge that represents an adjacent relationship with the item value node, the first deletion unit, and the A first acquisition unit that acquires a logical relationship between the item name node and the item value node based on the graph in which an edge is deleted by a second deletion unit; and the first deletion unit Based on the graph in which the edge is deleted by the second acquisition unit that acquires the inclusion relationship between the item name nodes, and the combination target among the logical relationships acquired by the first acquisition unit On the nodes in the table A second specifying unit that specifies a logical relationship regarding enumeration of synthesis targets excluding a logical relationship; and an inclusion relationship acquired by the second acquisition unit, a logical relationship related to the table to be combined and the combination target Creating a first tree structure data based on an inclusive relationship not included in any of the enumerated logical relationships, and creating a tree structure data based on the logical relationship regarding the table to be synthesized A tree structure based on a logical relationship relating to the enumeration of the synthesis target and a second synthesis unit that creates a second tree structure data obtained by synthesizing the tree structure data and the first tree structure data And a third synthesis unit for creating a third tree structure data obtained by synthesizing the tree structure data and the second tree structure data.

また、本発明の論理関係認識方法は、論理関係認識装置で実行される論理関係認識方法であって、帳票の項目名または項目値を表す領域に関する情報をノードとして表し、前記ノード間の隣接関係をエッジとして表したグラフを基に、前記ノードのうち、あらかじめ設定された条件を満たすノードを、項目名を表す領域のノードである項目名ノードとして抽出する抽出工程と、前記エッジを基に、前記項目名ノードから表の起点となるノードである起点ノードを抽出し、前記起点ノードを起点とした表を、上端と左端の両方に項目名が存在する直交表、上端に項目名が存在する縦表、および左端に項目名が存在する横表のうちのいずれかに分類する表分類工程と、前記直交表における前記項目名ノード間の縦方向の論理関係、前記直交表における前記項目名ノード間の横方向の論理関係、前記直交表における前記項目名ノードと前記項目名ノード以外のノードである項目値ノードとの間の縦方向の論理関係、および前記直交表における前記項目名ノードと前記項目値ノードとの間の横方向の論理関係を取得する直交表取得工程と、前記縦表における前記項目名ノード間の縦方向の論理関係、および前記縦表における前記項目名ノードと前記項目値ノードとの間の縦方向の論理関係を取得する縦表取得工程と、前記横表における前記項目名ノード間の横方向の論理関係、および前記横表における前記項目名ノードと前記項目値ノードとの間の横方向の論理関係を取得する横表取得工程と、前記直交表、前記縦表および前記横表から、不整合な表であることを示す所定の条件を満たす表を除外した合成対象の表を特定する第1の特定工程と、1つのノードの所定の方向に、複数のノードが隣接している場合、前記1つのノードと前記複数のノードとの隣接関係を表すエッジを削除する第1の削除工程と、前記項目名ノードのうち、所定の方向に項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、前記項目値ノードとの隣接関係を表すエッジを削除する第2の削除工程と、前記第1の削除工程および前記第2の削除工程によってエッジの削除が行われた前記グラフを基に、前記項目名ノードと前記項目値ノードとの間の論理関係を取得する第1の取得工程と、前記第1の削除工程によってエッジの削除が行われた前記グラフを基に、前記項目名ノード間の包含関係を取得する第2の取得工程と、前記第1の取得工程によって取得された論理関係のうち、前記合成対象の表に含まれるノードに関する論理関係を除外した合成対象の列挙に関する論理関係を特定する第2の特定工程と、前記第2の取得工程によって取得された包含関係のうち、前記合成対象の表に関する論理関係および前記合成対象の列挙に関する論理関係のいずれにも含まれない包含関係を基に第1の木構造のデータを作成する第1の合成工程と、前記合成対象の表に関する論理関係を基に木構造のデータを作成し、当該木構造のデータと前記第1の木構造のデータとを合成した第2の木構造のデータを作成する第2の合成工程と、前記合成対象の列挙に関する論理関係を基に木構造のデータを作成し、当該木構造のデータと前記第2の木構造のデータとを合成した第3の木構造のデータを作成する第3の合成工程と、を含んだことを特徴とする。   The logical relationship recognition method of the present invention is a logical relationship recognition method executed by a logical relationship recognition device, wherein information relating to an area representing an item name or item value of a form is represented as a node, and the adjacent relationship between the nodes Based on the graph expressed as an edge, an extraction step of extracting a node that satisfies a preset condition from among the nodes as an item name node that is a node of an area representing an item name, and based on the edge, A starting node that is a node that is a starting point of the table is extracted from the item name node, and a table that has the starting node as the starting point is an orthogonal table in which item names exist at both the upper end and the left end, and an item name exists at the upper end. A table classification process for classifying the table into one of a vertical table and a horizontal table having an item name at the left end, a vertical logical relationship between the item name nodes in the orthogonal table, and the orthogonal table A horizontal logical relationship between the item name nodes, a vertical logical relationship between the item name node in the orthogonal table and an item value node that is a node other than the item name node, and the orthogonal table An orthogonal table acquisition step of acquiring a horizontal logical relationship between an item name node and the item value node, a vertical logical relationship between the item name nodes in the vertical table, and the item name in the vertical table A vertical table acquisition step of acquiring a vertical logical relationship between a node and the item value node, a horizontal logical relationship between the item name nodes in the horizontal table, and the item name node in the horizontal table; A table that satisfies a predetermined condition indicating that the table is an inconsistent table from the orthogonal table, the vertical table, and the horizontal table, and a horizontal table acquisition step of acquiring a horizontal logical relationship with the item value node. When a plurality of nodes are adjacent to each other in a predetermined direction of one node and a first specifying step of specifying the excluded synthesis target table, the adjacent relationship between the one node and the plurality of nodes is represented. An item name node adjacent to an item value node that is a node of an area representing an item value in a predetermined direction, and the item value node; The item name node and the item value based on a second deletion step of deleting an edge representing an adjacency, and the graph in which the edge is deleted by the first deletion step and the second deletion step. A first acquisition step of acquiring a logical relationship between the nodes, and a second acquisition step of acquiring an inclusion relationship between the item name nodes based on the graph in which edges are deleted by the first deletion step. And the acquisition step A second specifying step of specifying a logical relationship related to enumeration of synthesis targets, excluding a logical relationship related to a node included in the table to be combined among the logical relationships acquired in one acquisition step; and the second acquisition A first tree-structured data is generated based on an inclusion relation that is not included in any of the inclusion relation acquired by the process and included in either the logical relation relating to the table to be synthesized or the logical relation relating to the enumeration of the synthesis target. The data of the second tree structure in which the data of the tree structure is created based on the synthesis process of 1 and the logical relationship regarding the table to be synthesized, and the data of the tree structure and the data of the first tree structure are synthesized Based on the logical relationship regarding the enumeration of the synthesis target, and the third synthesis step of synthesizing the tree structure data and the second tree structure data. Wooden frame Characterized in a third synthesis step of creating the data, that it contained.

また、本発明の論理関係認識プログラムは、コンピュータに、帳票の項目名または項目値を表す領域に関する情報をノードとして表し、前記ノード間の隣接関係をエッジとして表したグラフを基に、前記ノードのうち、あらかじめ設定された条件を満たすノードを、項目名を表す領域のノードである項目名ノードとして抽出する抽出ステップと、前記エッジを基に、前記項目名ノードから表の起点となるノードである起点ノードを抽出し、前記起点ノードを起点とした表を、上端と左端の両方に項目名が存在する直交表、上端に項目名が存在する縦表、および左端に項目名が存在する横表のうちのいずれかに分類する表分類ステップと、前記直交表における前記項目名ノード間の縦方向の論理関係、前記直交表における前記項目名ノード間の横方向の論理関係、前記直交表における前記項目名ノードと前記項目名ノード以外のノードである項目値ノードとの間の縦方向の論理関係、および前記直交表における前記項目名ノードと前記項目値ノードとの間の横方向の論理関係を取得する直交表取得ステップと、前記縦表における前記項目名ノード間の縦方向の論理関係、および前記縦表における前記項目名ノードと前記項目値ノードとの間の縦方向の論理関係を取得する縦表取得ステップと、前記横表における前記項目名ノード間の横方向の論理関係、および前記横表における前記項目名ノードと前記項目値ノードとの間の横方向の論理関係を取得する横表取得ステップと、前記直交表、前記縦表および前記横表から、不整合な表であることを示す所定の条件を満たす表を除外した合成対象の表を特定する第1の特定ステップと、1つのノードの所定の方向に、複数のノードが隣接している場合、前記1つのノードと前記複数のノードとの隣接関係を表すエッジを削除する第1の削除ステップと、前記項目名ノードのうち、所定の方向に項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、前記項目値ノードとの隣接関係を表すエッジを削除する第2の削除ステップと、前記第1の削除ステップおよび前記第2の削除ステップによってエッジの削除が行われた前記グラフを基に、前記項目名ノードと前記項目値ノードとの間の論理関係を取得する第1の取得ステップと、前記第1の削除ステップによってエッジの削除が行われた前記グラフを基に、前記項目名ノード間の包含関係を取得する第2の取得ステップと、前記第1の取得ステップによって取得された論理関係のうち、前記合成対象の表に含まれるノードに関する論理関係を除外した合成対象の列挙に関する論理関係を特定する第2の特定ステップと、前記第2の取得ステップによって取得された包含関係のうち、前記合成対象の表に関する論理関係および前記合成対象の列挙に関する論理関係のいずれにも含まれない包含関係を基に第1の木構造のデータを作成する第1の合成ステップと、前記合成対象の表に関する論理関係を基に木構造のデータを作成し、当該木構造のデータと前記第1の木構造のデータとを合成した第2の木構造のデータを作成する第2の合成ステップと、前記合成対象の列挙に関する論理関係を基に木構造のデータを作成し、当該木構造のデータと前記第2の木構造のデータとを合成した第3の木構造のデータを作成する第3の合成ステップと、を実行させることを特徴とする。   Further, the logical relationship recognition program of the present invention represents, on a computer, information relating to an area representing an item name or item value of a form as a node, and a graph representing the adjacency relationship between the nodes as an edge. Among these, the extraction step of extracting a node that satisfies a preset condition as an item name node that is a node of an area representing an item name, and a node that is a starting point of the table from the item name node based on the edge Extracts the origin node, and uses the origin node as the origin table, the orthogonal table in which the item name exists at both the upper end and the left end, the vertical table in which the item name exists in the upper end, and the horizontal table in which the item name exists at the left end A table classification step for classifying into any of the above, a vertical logical relationship between the item name nodes in the orthogonal table, and between the item name nodes in the orthogonal table Logical relationship in direction, vertical logical relationship between the item name node in the orthogonal table and an item value node that is a node other than the item name node, and the item name node and the item value node in the orthogonal table An orthogonal table acquisition step for acquiring a horizontal logical relationship between the item name node and the item name node in the vertical table, and the item name node and the item value node in the vertical table A vertical table acquisition step of acquiring a vertical logical relationship between the item name nodes in the horizontal table, and between the item name node and the item value node in the horizontal table A table obtained by excluding a table satisfying a predetermined condition indicating that the table is inconsistent from the orthogonal table, the vertical table, and the horizontal table, and a horizontal table acquisition step of acquiring a logical relationship in the horizontal direction. When a plurality of nodes are adjacent to each other in a first direction for specifying a target table and a predetermined direction of one node, an edge representing an adjacent relationship between the one node and the plurality of nodes is deleted. A first deletion step, and an item name node adjacent to an item value node that is a node of an area representing an item value in a predetermined direction among the item name nodes and an adjacency relationship between the item value nodes Based on the second deletion step of deleting the edge to be represented, and the graph in which the deletion of the edge was performed by the first deletion step and the second deletion step, the item name node and the item value node A first acquisition step of acquiring a logical relationship between the item name nodes, and a second acquisition of acquiring an inclusion relationship between the item name nodes based on the graph from which edges have been deleted by the first deletion step. A second specifying step for specifying a logical relationship related to enumeration of synthesis targets, excluding a logical relationship related to nodes included in the table to be synthesized among the logical relationships obtained in the first obtaining step; The first tree structure based on the inclusion relationship that is not included in either the logical relationship related to the table to be synthesized and the logical relationship related to the enumeration of the synthesis target among the inclusion relationships acquired by the second acquisition step A first synthesizing step for creating the data of the tree, and creating a tree structure data based on the logical relationship relating to the table to be synthesized, and synthesizing the tree structure data and the first tree structure data. A second synthesizing step for creating two tree-structured data, and creating a tree-structured data on the basis of a logical relationship relating to the enumeration of the synthesis target, A third synthesis step of creating the data of the third tree structure obtained by synthesizing the data of the tree structure, characterized in that to the execution.

本発明によれば、入れ子構造型に縦列挙、横列挙、縦列挙と横列挙の複合型、縦表、横表、直交表、入れ子構造型列挙、入れ子構造縦表、入れ子構造横表または入れ子構造直交表が含まれる、または混在する場合に、帳票の項目名間の論理関係、および項目名と項目値との間の論理関係を正確に認識することができる。   According to the present invention, a vertical enumeration, horizontal enumeration, vertical enumeration and horizontal enumeration, vertical table, horizontal table, orthogonal table, nested structure type enumeration, nested structure vertical table, nested structure horizontal table or nested When the structure orthogonal table is included or mixed, it is possible to accurately recognize the logical relationship between the item names of the form and the logical relationship between the item name and the item value.

図1は、論理関係認識処理の概要について説明するための図である。FIG. 1 is a diagram for explaining the outline of the logical relationship recognition process. 図2は、横方向の並びに縦表が含まれる帳票の一例を示す図である。FIG. 2 is a diagram illustrating an example of a form including a horizontal table and a vertical table. 図3は、横方向の並びに縦表が含まれる帳票の一例を示す図である。FIG. 3 is a diagram illustrating an example of a form including a horizontal table and a vertical table. 図4は、縦方向の並びに縦表が含まれる帳票の一例を示す図である。FIG. 4 is a diagram illustrating an example of a form including a vertical table. 図5は、入れ子構造の中に直交表が含まれる帳票の一例を示す図である。FIG. 5 is a diagram illustrating an example of a form in which an orthogonal table is included in a nested structure. 図6は、第1の実施形態に係る論理関係認識装置の構成の一例を示す図である。FIG. 6 is a diagram illustrating an example of the configuration of the logical relationship recognition apparatus according to the first embodiment. 図7は、隣接ノードの取得について説明するための図である。FIG. 7 is a diagram for explaining acquisition of adjacent nodes. 図8は、横表の表リストの一例である。FIG. 8 is an example of a table list of a horizontal table. 図9は、直交表の表リストの一例である。FIG. 9 is an example of a table list of an orthogonal table. 図10は、横表の表リストの一例である。FIG. 10 is an example of a table list of a horizontal table. 図11は、列挙リストの一例である。FIG. 11 is an example of an enumeration list. 図12は、包含グラフについて説明するための図である。FIG. 12 is a diagram for explaining the inclusion graph. 図13は、包含グラフについて説明するための図である。FIG. 13 is a diagram for explaining the inclusion graph. 図14は、木構造のデータの一例である。FIG. 14 is an example of tree structure data. 図15は、帳票グラフを生成する処理の流れを示すフローチャートである。FIG. 15 is a flowchart showing a flow of processing for generating a form graph. 図16は、ノードを取得する処理の流れを示すフローチャートである。FIG. 16 is a flowchart showing a flow of processing for acquiring a node. 図17は、ノードを生成する処理の流れを示すフローチャートである。FIG. 17 is a flowchart showing a flow of processing for generating a node. 図18は、隣接関係を取得する処理の流れを示すフローチャートである。FIG. 18 is a flowchart showing a flow of processing for acquiring the adjacency relationship. 図19は、隣接するノード群を取得する処理の流れを示すフローチャートである。FIG. 19 is a flowchart showing a flow of processing for acquiring adjacent node groups. 図20は、様式グラフを生成する処理の流れを示すフローチャートである。FIG. 20 is a flowchart showing a flow of processing for generating a style graph. 図21は、抽出部の処理の流れを示すフローチャートである。FIG. 21 is a flowchart showing the flow of processing of the extraction unit. 図22は、解析部の処理の流れを示すフローチャートである。FIG. 22 is a flowchart showing the flow of processing of the analysis unit. 図23は、表分類部の処理の流れを示すフローチャートである。FIG. 23 is a flowchart showing the flow of processing of the table classification unit. 図24は、縦表取得部の処理の流れを示すフローチャートである。FIG. 24 is a flowchart showing the flow of processing of the vertical table acquisition unit. 図25は、横表取得部の処理の流れを示すフローチャートである。FIG. 25 is a flowchart showing the flow of processing of the horizontal table acquisition unit. 図26は、直交表取得部の処理の流れを示すフローチャートである。FIG. 26 is a flowchart showing the flow of processing of the orthogonal table acquisition unit. 図27は、縦方向の論理関係を取得する処理の流れを示すフローチャートである。FIG. 27 is a flowchart illustrating a flow of processing for acquiring a vertical logical relationship. 図28は、横方向の論理関係を取得する処理の流れを示すフローチャートである。FIG. 28 is a flowchart showing a flow of processing for acquiring a horizontal logical relationship. 図29は、表整合部の処理の流れを示すフローチャートである。FIG. 29 is a flowchart showing the flow of processing of the table matching unit. 図30は、第1の削除部の処理の流れを示すフローチャートである。FIG. 30 is a flowchart showing the flow of processing of the first deletion unit. 図31は、第2の削除部の処理の流れを示すフローチャートである。FIG. 31 is a flowchart showing the flow of processing of the second deletion unit. 図32は、列挙分類部の処理の流れを示すフローチャートである。FIG. 32 is a flowchart showing the flow of processing of the enumeration classification unit. 図33は、縦列挙取得部の処理の流れを示すフローチャートである。FIG. 33 is a flowchart showing the flow of processing of the vertical enumeration acquisition unit. 図34は、横列挙取得部の処理の流れを示すフローチャートである。FIG. 34 is a flowchart illustrating a process flow of the horizontal enumeration acquisition unit. 図35は、包含関係取得部の処理の流れを示すフローチャートである。FIG. 35 is a flowchart illustrating a process flow of the inclusion relationship acquisition unit. 図36は、右側の包含関係を取得する処理の流れを示すフローチャートである。FIG. 36 is a flowchart showing the flow of processing for acquiring the right inclusion relationship. 図37は、下側の包含関係を取得する処理の流れを示すフローチャートである。FIG. 37 is a flowchart showing a flow of processing for acquiring the lower inclusion relationship. 図38は、包含グラフ生成部の処理の流れを示すフローチャートである。FIG. 38 is a flowchart showing the flow of processing of the inclusion graph generation unit. 図39は、列挙整合部の処理の流れを示すフローチャートである。FIG. 39 is a flowchart showing the flow of processing of the enumeration matching unit. 図40は、項目名間合成部の処理の流れを示すフローチャートである。FIG. 40 is a flowchart showing the flow of processing of the item name synthesizing unit. 図41は、表合成部の処理の流れを示すフローチャートである。FIG. 41 is a flowchart showing a process flow of the table synthesis unit. 図42は、列挙合成部の処理の流れを示すフローチャートである。FIG. 42 is a flowchart showing the flow of processing of the enumeration synthesis unit. 図43は、追加部の処理の流れを示すフローチャートである。FIG. 43 is a flowchart showing the flow of processing of the adding unit. 図44は、その他の実施形態について説明するための図である。FIG. 44 is a diagram for explaining another embodiment. 図45は、プログラムが実行されることにより論理関係認識装置が実現されるコンピュータの一例を示す図である。FIG. 45 is a diagram illustrating an example of a computer in which the logical relationship recognition apparatus is realized by executing a program.

以下に、本願に係る論理関係認識装置、論理関係認識方法および論理関係認識プログラムの実施形態を図面に基づいて詳細に説明する。なお、この実施形態により本発明が限定されるものではない。   Hereinafter, embodiments of a logical relationship recognition device, a logical relationship recognition method, and a logical relationship recognition program according to the present application will be described in detail with reference to the drawings. In addition, this invention is not limited by this embodiment.

まず、図1を用いて、論理関係認識装置を有する論理関係認識システムによる論理関係認識処理の概要について説明する。図1は、論理関係認識処理の概要について説明するための図である。図1に示すように、まず、論理関係認識システムは、PC等から表形式の帳票を読み込む(ステップS1)。このとき、論理関係認識システムが読み込むデータは、帳票に限られず、WebGUI、システムGUI、および画像上の表構造等の、半構造のデータであればよい。次に、論理関係認識システムは、読み込んだ帳票から罫線枠に関する情報を取得する(ステップS2)。また、論理関係認識システムは、スキャナ等で読み込まれた紙の帳票の画像から記載内容をOCR(光学文字認識:Optical Character Recognition)によって取得してもよい(ステップS3)。   First, the outline of the logical relationship recognition process by the logical relationship recognition system having the logical relationship recognition device will be described with reference to FIG. FIG. 1 is a diagram for explaining the outline of the logical relationship recognition process. As shown in FIG. 1, first, the logical relationship recognition system reads a tabular form from a PC or the like (step S1). At this time, the data read by the logical relationship recognition system is not limited to a form, and may be semi-structured data such as a Web GUI, a system GUI, and a table structure on an image. Next, the logical relationship recognition system acquires information on the ruled line frame from the read form (step S2). Further, the logical relationship recognition system may acquire the description content from an image of a paper form read by a scanner or the like by OCR (Optical Character Recognition) (step S3).

そして、論理関係認識システムは、罫線枠情報および項目名定義情報を基に、様式グラフを生成する(ステップS4)。罫線枠情報には、例えば罫線枠の座標、罫線枠内の文字列、罫線枠の塗りつぶし色、罫線の種類や太さ、色等の視覚的な情報が含まれる。また、項目名定義情報には、罫線枠を項目名として判断する際の条件が含まれる。   Then, the logical relationship recognition system generates a style graph based on the ruled line frame information and the item name definition information (step S4). The ruled line frame information includes visual information such as the coordinates of the ruled line frame, the character string in the ruled line frame, the fill color of the ruled line frame, the type, thickness, and color of the ruled line. Further, the item name definition information includes a condition for determining a ruled line frame as an item name.

例えば、色が黄色の罫線枠を項目名とする項目名定義情報は、「if {node:{color:#FFFF00}} then item」と記述される。また、例えば、文字列の空でない罫線枠を項目名とする罫線枠定義情報は、「if {node:{!string:null}} then item」と記述される。また、例えば、色が白でなく、かつ文字列が空でない罫線枠を項目名とする罫線枠定義情報は、「if {node:{!color:white},{!string:null} then item」と記述される。また、例えば、文字列が「y1」の罫線枠を項目名とする罫線枠定義情報は、「if {node:{string:”y1”}} then item」と記述される。   For example, item name definition information whose item name is a ruled frame with a yellow color is described as “if {node: {color: # FFFF00}} then item”. Also, for example, ruled line frame definition information whose item name is a non-empty ruled line frame of a character string is described as “if {node: {! String: null}} then item”. Also, for example, ruled line frame definition information whose item name is a ruled line frame whose color is not white and whose character string is not empty is “if {node: {! Color: white}, {! String: null} then item” Is described. Further, for example, ruled line frame definition information whose item name is a ruled line frame with the character string “y1” is described as “if {node: {string:“ y1 ”}} then item”.

また、様式グラフとは、帳票に含まれる複数の様式ごとに、罫線枠等をノード、ノードの隣接関係をエッジとして表したグラフである。以降の処理において、論理関係認識システムは、帳票の様式をグラフ形式のデータとして扱う。また、様式には表が含まれる。以降の説明では、様式グラフを基に論理関係を認識する場合について説明するが、帳票全体をノードとエッジで表した帳票グラフを用いることとしてもよい。   Further, the style graph is a graph in which a ruled line frame or the like is represented as a node and an adjacent relationship between nodes is represented as an edge for each of a plurality of styles included in the form. In the subsequent processing, the logical relationship recognition system handles the form format as graph format data. The form also includes a table. In the following description, the case where the logical relationship is recognized based on the style graph will be described. However, a form graph in which the entire form is represented by nodes and edges may be used.

次に、論理関係認識システムは、表形式の構造から論理関係を認識し(ステップS5)、認識した結果を所定の形式のデータ構造(xml、yaml、json等)に変換し(ステップS6)、DBに格納する。このとき、DBへはデータ構造のリンクパスを格納してもよいし、あらかじめ定義したスキーマに合わせてデータを格納してもよい。   Next, the logical relationship recognition system recognizes the logical relationship from the tabular structure (step S5), converts the recognized result into a predetermined data structure (xml, yaml, json, etc.) (step S6), Store in DB. At this time, the link path of the data structure may be stored in the DB, or the data may be stored in accordance with a predefined schema.

次に、図2〜5を用いて、論理関係認識システムによる論理関係認識処理の対象となる帳票の構造について説明する。なお、図2〜5の各符号はノードを表しており、以降の説明では、説明のために、これらの符号が示すノードを、単にノードと呼ぶ場合と、項目名ノードまたは項目値ノードと呼ぶ場合がある。なお、図2〜5において、網掛け部分は項目名を表し、網掛けでない部分は項目値を表している。   Next, with reference to FIGS. 2 to 5, the structure of a form that is a target of logical relationship recognition processing by the logical relationship recognition system will be described. 2 to 5 represent nodes, and in the following description, for the sake of explanation, the nodes indicated by these symbols are simply referred to as “nodes” or “item name nodes” or “item value nodes”. There is a case. 2 to 5, shaded portions represent item names, and portions not shaded represent item values.

ここで、縦表は、例えば項目名同士、および項目名と項目値が縦方向に隣接した表である。また、横表は、例えば項目名同士、および項目名と項目値が横方向に隣接した表である。また、直交表は、例えば項目名同士、および項目名と項目値が縦方向および横方向に隣接した表である。また、縦列挙は、項目名同士、および項目名と項目値の関係である論理関係を、縦方向に複数有する。横列挙は、論理関係を横方向に複数有する。   Here, the vertical table is a table in which, for example, item names and item names and item values are adjacent in the vertical direction. The horizontal table is a table in which, for example, item names are adjacent to each other and item names and item values are adjacent in the horizontal direction. The orthogonal table is a table in which, for example, item names and item names and item values are adjacent in the vertical direction and the horizontal direction. The vertical enumeration has a plurality of logical relationships in the vertical direction, which are the relationship between item names and the relationship between item names and item values. The horizontal enumeration has a plurality of logical relationships in the horizontal direction.

図2は、横方向の並びに縦表が含まれる帳票の一例を示す図である。図2には、例えば、ノードa1を起点とする横方向の並びの中に、ノードa2、a3およびa4を起点とする縦表が含まれている。   FIG. 2 is a diagram illustrating an example of a form including a horizontal table and a vertical table. In FIG. 2, for example, a vertical table starting from the nodes a2, a3, and a4 is included in the horizontal arrangement starting from the node a1.

また、図3は、横方向の並びに縦表が含まれる帳票の一例を示す図である。図3には、例えば、b1を起点とする横方向の並びの中に、b8、b9およびb10を起点とする縦表が含まれている。なお、図3の構造は、横方向の論理関係が複数あるため、横列挙である。   FIG. 3 is a diagram illustrating an example of a form including a horizontal table and a vertical table. FIG. 3 includes, for example, a vertical table starting from b8, b9, and b10 in the horizontal arrangement starting from b1. Note that the structure of FIG. 3 is horizontal enumeration because there are a plurality of horizontal logical relationships.

図4は、縦方向の並びに縦表が含まれる帳票の一例を示す図である。図4には、例えば、c1を起点とする縦方向の並びの中に、c6、c7、c8およびc9を起点とする縦表が含まれている。なお、図4の構造は、縦方向の論理関係が複数あるため、縦列挙である。   FIG. 4 is a diagram illustrating an example of a form including a vertical table. In FIG. 4, for example, a vertical table starting from c6, c7, c8 and c9 is included in the vertical arrangement starting from c1. Note that the structure in FIG. 4 is listed vertically because there are a plurality of logical relationships in the vertical direction.

図5は、入れ子構造の中に直交表が含まれる帳票の一例を示す図である。図5には、例えば、d1、d6、d8、d36、d38およびd40を起点とする横方向の並びの中に、入れ子として直交表が含まれている。   FIG. 5 is a diagram illustrating an example of a form in which an orthogonal table is included in a nested structure. In FIG. 5, for example, an orthogonal table is included as a nesting in a horizontal arrangement starting from d1, d6, d8, d36, d38, and d40.

[第1の実施形態の構成]
次に、図6を用いて、第1の実施形態に係る論理関係認識装置の構成について説明する。図6は、第1の実施形態に係る論理関係認識装置の構成の一例を示す図である。図6に示すように、論理関係認識装置10は、制御部20および記憶部30を有する。
[Configuration of First Embodiment]
Next, the configuration of the logical relationship recognition apparatus according to the first embodiment will be described with reference to FIG. FIG. 6 is a diagram illustrating an example of the configuration of the logical relationship recognition apparatus according to the first embodiment. As illustrated in FIG. 6, the logical relationship recognition device 10 includes a control unit 20 and a storage unit 30.

制御部20は、論理関係認識装置10全体を制御する。制御部20は、例えば、CPU(Central Processing Unit)、MPU(Micro Processing Unit)等の電子回路や、ASIC(Application Specific Integrated Circuit)、FPGA(Field Programmable Gate Array)等の集積回路である。また、制御部20は、各種の処理手順を規定したプログラムや制御データを格納するための内部メモリを有し、内部メモリを用いて各処理を実行する。また、制御部20は、各種のプログラムが動作することにより各種の処理部として機能する。例えば、制御部20は、抽出部201、解析部202、表分類部203、縦表取得部204、横表取得部205、直交表取得部206、表整合部207、第1の削除部208、第2の削除部209、列挙分類部210、縦列挙取得部211、横列挙取得部212、列挙整合部213、包含関係取得部214、包含グラフ生成部215、項目名間合成部216、表合成部217、列挙合成部218および追加部219を有する。   The control unit 20 controls the entire logical relationship recognition apparatus 10. The control unit 20 is, for example, an electronic circuit such as a CPU (Central Processing Unit) or MPU (Micro Processing Unit), or an integrated circuit such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field Programmable Gate Array). The control unit 20 has an internal memory for storing programs and control data that define various processing procedures, and executes each process using the internal memory. The control unit 20 functions as various processing units when various programs are operated. For example, the control unit 20 includes an extraction unit 201, an analysis unit 202, a table classification unit 203, a vertical table acquisition unit 204, a horizontal table acquisition unit 205, an orthogonal table acquisition unit 206, a table matching unit 207, a first deletion unit 208, Second deletion unit 209, enumeration classification unit 210, vertical enumeration acquisition unit 211, horizontal enumeration acquisition unit 212, enumeration matching unit 213, inclusion relation acquisition unit 214, inclusion graph generation unit 215, item name composition unit 216, table composition A unit 217, an enumeration synthesis unit 218, and an addition unit 219.

記憶部30は、HDD(Hard Disk Drive)、SSD(Solid State Drive)、光ディスク等の記憶装置である。なお、記憶部30は、RAM(Random Access Memory)、フラッシュメモリ、NVSRAM(Non Volatile Static Random Access Memory)等のデータを書き換え可能な半導体メモリであってもよい。記憶部30は、論理関係認識装置10で実行されるOS(Operating System)や各種プログラムを記憶する。さらに、記憶部30は、プログラムの実行で用いられる各種情報を記憶する。また、記憶部30は、例えば表リスト301、列挙リスト302および包含グラフ303を記憶する。   The storage unit 30 is a storage device such as an HDD (Hard Disk Drive), an SSD (Solid State Drive), or an optical disk. Note that the storage unit 30 may be a semiconductor memory that can rewrite data, such as a random access memory (RAM), a flash memory, and a non-volatile static random access memory (NVSRAM). The storage unit 30 stores an OS (Operating System) executed by the logical relationship recognition apparatus 10 and various programs. Furthermore, the storage unit 30 stores various information used in executing the program. In addition, the storage unit 30 stores, for example, a table list 301, an enumeration list 302, and an inclusion graph 303.

ここで、論理関係認識装置10による論理関係認識処理について説明するとともに、論理関係認識装置10の各部の詳細について説明する。抽出部201は、帳票の項目名または項目値を表す領域に関する情報をノードとして表し、ノード間の隣接関係をエッジとして表したグラフ、すなわち様式グラフを基に、ノードのうち、あらかじめ設定された条件を満たすノードを、項目名を表す領域のノードである項目名ノードとして抽出する。   Here, the logical relationship recognition processing by the logical relationship recognition device 10 will be described, and details of each part of the logical relationship recognition device 10 will be described. The extraction unit 201 represents information related to the area representing the item name or item value of the form as a node, and a pre-set condition among the nodes based on a graph representing the adjacent relationship between nodes as an edge, that is, a style graph. Nodes satisfying the condition are extracted as item name nodes that are nodes in the area representing the item name.

図7は、隣接ノードの取得について説明するための図である。ノード1およびノード2という2つのノードがある場合について説明する。一方のノードの辺が他方のノードの辺を内包している場合、または一方のノードの辺が他方のノードの辺に外延している場合、ノードが隣接関係を有することとする。   FIG. 7 is a diagram for explaining acquisition of adjacent nodes. A case where there are two nodes, node 1 and node 2, will be described. When the side of one node includes the side of the other node, or when the side of one node extends to the side of the other node, the nodes have an adjacency relationship.

例えば、図7の(a)〜(c)の例では、ノード2はノード1の左側に隣接していると判定される。また、図7の(d)〜(f)の例では、ノード2はノード1の右側に隣接していると判定される。また、図7の(g)〜(i)の例では、ノード2はノード1の上側に隣接していると判定される。また、図7の(j)〜(l)の例では、ノード2はノード1の下側に隣接していると判定される。   For example, in the example of (a) to (c) of FIG. 7, it is determined that the node 2 is adjacent to the left side of the node 1. Further, in the examples of (d) to (f) in FIG. 7, it is determined that the node 2 is adjacent to the right side of the node 1. Further, in the examples of (g) to (i) in FIG. 7, it is determined that the node 2 is adjacent to the upper side of the node 1. In the example of (j) to (l) in FIG. 7, it is determined that the node 2 is adjacent to the lower side of the node 1.

[表の取得処理]
まず、表分類部203、縦表取得部204、横表取得部205、直交表取得部206および表整合部207の処理について説明するとともに、表の取得処理について説明する。表分類部203は、様式グラフのエッジを基に、項目名ノードから表の起点となるノードである起点ノードを抽出し、起点ノードを起点とした表を、上端と左端の両方に項目名が存在する直交表、上端に項目名が存在する縦表、および左端に項目名が存在する横表のうちのいずれかに分類する。
[Table acquisition processing]
First, the processing of the table classification unit 203, the vertical table acquisition unit 204, the horizontal table acquisition unit 205, the orthogonal table acquisition unit 206, and the table matching unit 207 will be described, and the table acquisition processing will be described. Based on the edge of the style graph, the table classification unit 203 extracts a starting node, which is a node that is the starting point of the table, from the item name node, and converts the table starting from the starting node to the item name at both the upper end and the left end. The table is classified into an orthogonal table that exists, a vertical table that has an item name at the upper end, and a horizontal table that has an item name at the left end.

例えば、表分類部203は、左上のノード、すなわち起点ノードを対象ノードとした場合に、所定の条件が満たされるか否かによって分類を行う。以後、対象ノードから右側に隣接しているノードを辿って得られるノードとの関係を「右側に接続する」、対象ノードから下側に隣接しているノードを辿って得られるノードとの関係を「下側に接続する」と呼ぶ。このとき、まず、表分類部203は、起点ノードの右側に接続するノード群をrights、起点ノードの下側に接続するノード群をbottomsと定義する。そして、rightsおよびbottomsについて、下記の条件1および条件2が満たされるか否かを判定する。
(条件1)rightsが全て項目名かつrightsの高さが起点ノードの高さと同じである。
(条件2)bottomsが全て項目名かつbottomsの幅が起点ノードの幅と同じである。
For example, the table classification unit 203 performs classification based on whether or not a predetermined condition is satisfied when the upper left node, that is, the starting node is the target node. From now on, the relationship with the node obtained by tracing the node adjacent to the right side from the target node is “connected to the right side”, and the relationship with the node obtained by tracing the node adjacent to the lower side from the target node Called “connect to the bottom”. At this time, the table classification unit 203 first defines a node group connected to the right side of the starting node as rights and a node group connected to the lower side of the starting node as bottoms. Then, it is determined whether or not the following conditions 1 and 2 are satisfied for rights and bottoms.
(Condition 1) All rights are item names and the height of rights is the same as the height of the starting node.
(Condition 2) “bottoms” is the item name and the width of “bottoms” is the same as the width of the starting node.

例えば、図5の例では、表分類部203は、ノードd1を起点ノードとした場合、ノードd2およびd4をrightsとする。また、表分類部203は、ノードd9を起点ノードとした場合、ノードd10、d11およびd12をrightsとし、ノードd13、d14、d17、d20、d21、d24、d27、d30およびd33をbottomsとする。   For example, in the example of FIG. 5, the table classification unit 203 sets the nodes d2 and d4 to rights when the node d1 is the starting node. Further, when the node d9 is the starting node, the table classification unit 203 sets the nodes d10, d11, and d12 as rights, and the nodes d13, d14, d17, d20, d21, d24, d27, d30, and d33 as bottoms.

表分類部203は、条件1、および条件2が満たされる場合、起点ノードを起点とする表を直交表に分類し、条件1が満たされ、条件2が満たされない場合、起点ノードを起点とする表を縦表に分類し、条件2が満たされ、条件1が満たされない場合、起点ノードを起点とする表を横表に分類する。   When condition 1 and condition 2 are satisfied, table classification unit 203 classifies the table starting from the starting node into an orthogonal table, and when condition 1 is satisfied and condition 2 is not satisfied, the starting node is the starting point. The table is classified into a vertical table, and when the condition 2 is satisfied and the condition 1 is not satisfied, the table starting from the starting node is classified as a horizontal table.

次に、直交表取得部206は、直交表における項目名ノード間の縦方向の論理関係、直交表における項目名ノード間の横方向の論理関係、直交表における項目名ノードと項目名ノード以外のノードである項目値ノードとの間の縦方向の論理関係、および直交表における項目名ノードと項目値ノードとの間の横方向の論理関係を取得する。また、縦表取得部204は、縦表における項目名ノード間の縦方向の論理関係、および縦表における項目名ノードと項目値ノードとの間の縦方向の論理関係を取得する。また、横表取得部205は、横表における項目名ノード間の横方向の論理関係、および横表における項目名ノードと項目値ノードとの間の横方向の論理関係を取得する。   Next, the orthogonal table acquisition unit 206 includes a vertical logical relationship between item name nodes in the orthogonal table, a horizontal logical relationship between item name nodes in the orthogonal table, and items other than item name nodes and item name nodes in the orthogonal table. A vertical logical relationship between the item value nodes, which are nodes, and a horizontal logical relationship between the item name node and the item value node in the orthogonal table are acquired. Further, the vertical table acquisition unit 204 acquires the vertical logical relationship between the item name nodes in the vertical table and the vertical logical relationship between the item name node and the item value node in the vertical table. In addition, the horizontal table acquisition unit 205 acquires a horizontal logical relationship between item name nodes in the horizontal table and a horizontal logical relationship between item name nodes and item value nodes in the horizontal table.

直交表取得部206は、項目名および当該項目名の右側にある項目名または項目値の組み合わせを横方向の論理関係として取得し、項目名および当該項目名の下側にある項目名または項目値の組み合わせを縦方向の論理関係として取得する。また、横表取得部205は、項目名および当該項目名の右側にある項目名または項目値の組み合わせを横方向の論理関係として取得する。また、縦表取得部204は、項目名および当該項目名の下側にある項目名または項目値の組み合わせを縦方向の論理関係として取得する。   The orthogonal table acquisition unit 206 acquires a combination of the item name and the item name or item value on the right side of the item name as a logical relationship in the horizontal direction, and the item name or item value below the item name and the item name. Is obtained as a vertical logical relationship. The horizontal table acquisition unit 205 acquires a combination of an item name and an item name or item value on the right side of the item name as a logical relationship in the horizontal direction. The vertical table acquisition unit 204 acquires a combination of an item name and an item name or item value below the item name as a vertical logical relationship.

縦表取得部204は、論理関係をリストとして取得し、取得したリストを表リスト301として記憶部30に格納する。なお、抽出部201および表分類部203の処理によって、表が縦表であること、およびノードa3およびノードa4が項目名であることがわかっているため、縦表取得部204は、ノードa4をノードa3の横方向の子とするような誤った論理関係の取得を行わない。   The vertical table acquisition unit 204 acquires the logical relationship as a list, and stores the acquired list in the storage unit 30 as the table list 301. Note that the processing of the extraction unit 201 and the table classification unit 203 knows that the table is a vertical table and that the node a3 and the node a4 are item names, so the vertical table acquisition unit 204 changes the node a4 to the node a4. It does not acquire an erroneous logical relationship as a child in the horizontal direction of the node a3.

また、縦表取得部204は、例えば表の左上のノードの右側に接続するノード群のうち最も上側にあるノード群をleast_topsとし、least_topsを起点として論理関係の取得を行う。また、横表取得部205は、論理関係をリストとして取得し、取得したリストを表リスト301として記憶部30に格納する。   Further, the vertical table acquisition unit 204 acquires the logical relationship from the node group connected to the right side of the upper left node of the table, for example, with the uppermost node group as last_tops and the last_tops as a starting point. Further, the horizontal table acquisition unit 205 acquires the logical relationship as a list, and stores the acquired list in the storage unit 30 as the table list 301.

また、横表取得部205は、例えば表の左上のノードの下側に接続するノード群のうち最も左側にあるノード群をleast_leftsとし、least_leftsを起点として論理関係の取得を行う。また、直交表取得部206は、論理関係をリストとして取得し、取得したリストを表リスト301として記憶部30に格納する。   In addition, the horizontal table acquisition unit 205 acquires, for example, the leftmost node group among the node groups connected to the lower side of the upper left node of the table as the last_lefts, and acquires the logical relationship using the last_lefts as a starting point. The orthogonal table acquisition unit 206 acquires the logical relationship as a list, and stores the acquired list in the storage unit 30 as the table list 301.

また、直交表取得部206は、例えば表の左上のノードの右側に接続するノード群のうち最も上側にあるノード群をleast_topsとし、表の左上のノードの下側に接続するノード群のうち最も左側にあるノード群をleast_leftsとする。そして、直交表取得部206は、least_topsおよびleast_leftsを起点として論理関係の取得を行う。   Further, the orthogonal table acquisition unit 206, for example, designates the uppermost node group among the node groups connected to the right side of the upper left node of the table as least_tops, and is the most of the node group connected to the lower side of the upper left node of the table. Let the node group on the left be the last_lefts. Then, the orthogonal table acquisition unit 206 acquires a logical relationship starting from last_tops and last_lefts.

図8は、横表の表リストの一例である。まず、図8に示すように、表リストには表の分類が「横表」であることが記載されている。また、例えば、図8のNo.1の行は、ノードd8の横方向の子がノードd9、d13、d20、d27、d30およびd33であることを示している。また、例えば、図8のNo.2の行は、ノードd9の横方向の子がノードd10およびd11であることを示している。また、例えば、図8のNo.3の行は、ノードd11の横方向の子がノードd12であることを示している。また、例えば、図8のNo.4の行は、ノードd13の横方向の子がノードd14およびd17であることを示している。   FIG. 8 is an example of a table list of a horizontal table. First, as shown in FIG. 8, the table list describes that the table classification is “horizontal table”. Further, for example, as shown in FIG. The row 1 indicates that the horizontal children of the node d8 are nodes d9, d13, d20, d27, d30, and d33. Further, for example, as shown in FIG. The row 2 indicates that the horizontal children of the node d9 are nodes d10 and d11. Further, for example, as shown in FIG. The row 3 indicates that the horizontal child of the node d11 is the node d12. Further, for example, as shown in FIG. The row 4 indicates that the horizontal children of the node d13 are nodes d14 and d17.

ここで、図5に示すように、ノードd10、d11およびd12は項目名ノードであるため、縦方向に子となる項目値ノードが存在している必要がある。しかしながら、図8の表リストのNo.3の行にはノードd11の横方向の子がノード12であることが記載されている。また、表リストにはノードd10の子は記載されていない。このため、表整合部207は、図8のような誤った表リストを除外する。   Here, as shown in FIG. 5, since the nodes d10, d11, and d12 are item name nodes, it is necessary to have item value nodes that are children in the vertical direction. However, No. in the table list of FIG. Line 3 describes that the horizontal child of node d11 is node 12. Further, the child of the node d10 is not described in the table list. For this reason, the table matching unit 207 excludes an erroneous table list as shown in FIG.

図9は、直交表の表リストの一例である。また、図10は、横表の表リストの一例である。図9および10の表リストは誤っていないため、表整合部207によって除外されない。   FIG. 9 is an example of a table list of an orthogonal table. FIG. 10 is an example of a table list of a horizontal table. Since the table lists of FIGS. 9 and 10 are not in error, they are not excluded by the table matching unit 207.

表整合部207は、直交表、縦表および横表から、不整合な表であることを示す所定の条件を満たす表を除外した表を特定する。例えば、表整合部207は、直交表、縦表および横表から、下側にも右側にも項目値ノードが存在しない項目名ノードを有する直交表と、下側に項目値ノードが存在しない項目名ノードを有する縦表と、右側に項目値ノードが存在しない項目名ノードを有する横表と、を除外した表を特定する。具体的には、表整合部207は、表リスト301から、項目値ノードを子ノードとして持たない項目名ノードが存在する表リストを削除する。または、項目名ノードを子ノードとしてもつ項目名ノードが存在する表リストを削除する。なお、表整合部207は、第1の特定部の一例である。例えば、表整合部207は、図8の表リストを削除し、図9および10の表リストを削除しない。   The table matching unit 207 identifies a table that excludes a table that satisfies a predetermined condition indicating that the table is inconsistent from the orthogonal table, the vertical table, and the horizontal table. For example, the table matching unit 207 includes an orthogonal table having an item name node having no item value node on the lower side and the right side, and an item having no item value node on the lower side from the orthogonal table, the vertical table, and the horizontal table. A table excluding a vertical table having name nodes and a horizontal table having item name nodes having no item value nodes on the right side is specified. Specifically, the table matching unit 207 deletes from the table list 301 a table list that includes item name nodes that do not have item value nodes as child nodes. Alternatively, the table list in which the item name node having the item name node as a child node exists is deleted. The table matching unit 207 is an example of a first specifying unit. For example, the table matching unit 207 deletes the table list of FIG. 8 and does not delete the table lists of FIGS.

[列挙の取得処理]
次に、第1の削除部208、第2の削除部209、列挙分類部210、縦列挙取得部211、横列挙取得部212、包含関係取得部214および包含グラフ生成部215の処理について説明するとともに、列挙の取得処理について説明する。
[Enumeration acquisition processing]
Next, processing of the first deletion unit 208, the second deletion unit 209, the enumeration classification unit 210, the vertical enumeration acquisition unit 211, the horizontal enumeration acquisition unit 212, the inclusion relationship acquisition unit 214, and the inclusion graph generation unit 215 will be described. In addition, enumeration acquisition processing will be described.

第1の削除部208は、1つのノードの所定の方向に、複数のノードが隣接している場合、1つのノードと複数のノードとの隣接関係を表すエッジを削除する。なお、第1の削除部208は、1つのノードの左側または上側に、複数のノードが隣接している場合、1つのノードと複数のノードとの隣接関係を表すエッジを削除するようにしてもよい。   When a plurality of nodes are adjacent to each other in a predetermined direction of one node, the first deletion unit 208 deletes an edge representing the adjacency relationship between the one node and the plurality of nodes. The first deletion unit 208 may delete an edge representing the adjacency relationship between one node and a plurality of nodes when a plurality of nodes are adjacent to the left or upper side of the one node. Good.

また、第2の削除部209は、項目名ノードのうち、所定の方向に項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、項目値ノードとの隣接関係を表すエッジを削除する。なお、第2の削除部209は、項目名ノードのうち、左側または上側に、項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、項目値ノードとの隣接関係を表すエッジを削除するようにしてもよい。   Also, the second deletion unit 209 determines the adjacency relationship between the item name node and the item value node adjacent to the item value node that is the node of the area representing the item value in a predetermined direction among the item name nodes. Delete the representing edge. Note that the second deletion unit 209 has an adjacency relationship between an item name node and an item value node adjacent to an item value node that is a node of an area representing an item value on the left or upper side of the item name nodes. You may make it delete the edge showing.

そして、縦列挙取得部211および横列挙取得部212は、第1の削除部208および第2の削除部209によってエッジの削除が行われたグラフを基に、項目名ノードと項目値ノードとの間の論理関係を取得する。具体的に、縦列挙取得部211および横列挙取得部212は、論理関係を、図11に示すようなリストとして取得し、取得したリストを列挙リスト302として記憶部30に格納する。図11は、列挙リストの一例である。なお、列挙分類部210は、縦列挙取得部211および横列挙取得部212による処理の前に、グラフを縦列挙と横列挙に分類する。   Then, the vertical enumeration acquisition unit 211 and the horizontal enumeration acquisition unit 212 determine whether the item name node and the item value node are based on the graph in which the edge is deleted by the first deletion unit 208 and the second deletion unit 209. Get logical relationship between. Specifically, the vertical enumeration acquisition unit 211 and the horizontal enumeration acquisition unit 212 acquire the logical relationship as a list as illustrated in FIG. 11 and store the acquired list in the storage unit 30 as the enumeration list 302. FIG. 11 is an example of an enumeration list. The enumeration classification unit 210 classifies the graph into a vertical enumeration and a horizontal enumeration before processing by the vertical enumeration acquisition unit 211 and the horizontal enumeration acquisition unit 212.

図11は、図5の列挙の論理関係を表した列挙リストである。図11のリストのNo.1の行は、項目名ノードd11の縦方向の子がノードd15、d18、d22、d25、d28、d31およびd34であることを表している。また、図11のリストのNo.3の行は、項目名ノードd2の横方向の子がノードd3であることを表している。   FIG. 11 is an enumeration list showing the logical relationship of the enumeration of FIG. In the list of FIG. The row 1 indicates that the vertical children of the item name node d11 are nodes d15, d18, d22, d25, d28, d31, and d34. In the list of FIG. Line 3 indicates that the horizontal child of the item name node d2 is the node d3.

また、例えば、図5の場合、第1の削除部208によって、ノードd1と、ノードd2およびd4との隣接関係を表すエッジが削除されているため、縦列挙取得部211および横列挙取得部212が、項目名ノードd1の横方向の子をd3およびd5とするような論理関係を取得することはない。   Further, for example, in the case of FIG. 5, since the edge indicating the adjacency relationship between the node d1 and the nodes d2 and d4 has been deleted by the first deletion unit 208, the vertical enumeration acquisition unit 211 and the horizontal enumeration acquisition unit 212. However, a logical relationship in which the horizontal children of the item name node d1 are d3 and d5 is not acquired.

また、例えば、図4の場合、第2の削除部209によって、ノードc2と、ノードc6との隣接関係を表すエッジが削除されているため、縦列挙取得部211および横列挙取得部212が、項目名ノードc2の縦方向の子をc10とするような論理関係を取得することはない。   For example, in the case of FIG. 4, since the edge indicating the adjacency relationship between the node c2 and the node c6 is deleted by the second deletion unit 209, the vertical enumeration acquisition unit 211 and the horizontal enumeration acquisition unit 212 A logical relationship in which the vertical child of the item name node c2 is c10 is not acquired.

包含関係取得部214は、第1の削除部208によってエッジの削除が行われたグラフを基に、項目名ノード間の包含関係を取得する。また、包含グラフ生成部215は、包含関係取得部214によって取得された包含関係を基に、図12に示すようなグラフを生成し、生成したグラフを包含グラフ303として記憶部30に格納する。図12は、包含グラフについて説明するための図である。図12の破線は縦方向の包含関係を表している。また、図12の実線は横方向の包含関係を表している。以後、対象ノードが縦方向(または横方向)に他のノードを1つ以上包含する場合、対象ノードを縦方向(または横方向)の包含ノードと呼ぶ。また、包含関係のあるノードのうち、他のノードに包含されないノードを主のノード、包含される他のノードを従のノードと呼ぶ。   The inclusion relationship acquisition unit 214 acquires the inclusion relationship between the item name nodes based on the graph in which the edge is deleted by the first deletion unit 208. Further, the inclusion graph generation unit 215 generates a graph as shown in FIG. 12 based on the inclusion relationship acquired by the inclusion relationship acquisition unit 214 and stores the generated graph in the storage unit 30 as the inclusion graph 303. FIG. 12 is a diagram for explaining the inclusion graph. The broken line in FIG. 12 represents the vertical inclusion relationship. Also, the solid line in FIG. 12 represents the horizontal inclusion relationship. Hereinafter, when the target node includes one or more other nodes in the vertical direction (or horizontal direction), the target node is referred to as a vertical (or horizontal) included node. Among nodes having an inclusion relationship, a node that is not included in another node is referred to as a master node, and another node that is included is referred to as a slave node.

図12の包含グラフは、図5の構造に対応したものである。図5および12に示すように、ノードd1は、ノードd2およびd4を横方向に包含している。また、ノードd8は、ノードd9およびd10を横方向に包含している。また、ノードd9は、ノードd13、d20、d27、d30およびd33を縦方向に包含している。また、ノードd13は、ノードd14およびd17を横方向に包含している。また、ノードd20は、ノードd21およびd24を横方向に包含している。また、ノードd10は、ノードd11およびd12を縦方向に包含している。また、ノードd40は、ノードd41、d42およびd47を横方向に包含している。また、ノードd47は、ノードd48およびd49を縦方向に包含している。   The inclusion graph of FIG. 12 corresponds to the structure of FIG. As shown in FIGS. 5 and 12, the node d1 includes nodes d2 and d4 in the horizontal direction. The node d8 includes nodes d9 and d10 in the horizontal direction. The node d9 includes nodes d13, d20, d27, d30, and d33 in the vertical direction. The node d13 includes nodes d14 and d17 in the horizontal direction. The node d20 includes nodes d21 and d24 in the horizontal direction. The node d10 includes nodes d11 and d12 in the vertical direction. The node d40 includes nodes d41, d42, and d47 in the horizontal direction. The node d47 includes nodes d48 and d49 in the vertical direction.

具体的に、包含関係取得部214は、第1の項目名ノードの右側に隣接する第1のノード群のうち少なくとも1つが項目名ノードであり、かつ、第1のノード群に含まれる全てのノードの高さが第1の項目名ノードの高さ以下であり、かつ、第1のノード群の左上端のノードの頂点と、第1の項目名ノードの頂点が重なっている場合、第1の項目名ノードが第1のノード群を横方向に包含していると判定する。また、包含関係取得部214は、第2の項目名ノードの下側に隣接する第2のノード群のうち少なくとも1つが項目名ノードであり、かつ、第2のノード群に含まれる全てのノードの幅が第2の項目名ノードの幅以下であり、かつ、第2のノード群の左上端のノードの頂点と、第1の項目名ノードの頂点が重なっている場合、第2の項目名ノードが第2のノード群を縦方向に包含していると判定する。   Specifically, the inclusion relationship acquisition unit 214 includes at least one of the first node groups adjacent to the right side of the first item name node as an item name node, and all of the first node groups included in the first node group. If the height of the node is less than or equal to the height of the first item name node, and the vertex of the upper left node of the first node group and the vertex of the first item name node overlap, the first Is determined to include the first node group in the horizontal direction. In addition, the inclusion relationship acquisition unit 214 has at least one of the second node groups adjacent to the lower side of the second item name node as an item name node, and all the nodes included in the second node group The width of the second item name node is less than or equal to the width of the second item name node, and the vertex of the upper left node of the second node group overlaps the vertex of the first item name node, the second item name It is determined that the node includes the second node group in the vertical direction.

例えば、図5に示すように、項目名ノードd8の右側に隣接するノード群のうち、少なくともノードd9は項目名ノードである。また、項目名ノードd8の右側に隣接するノード群に含まれる全てのノードの高さは、全て項目名ノードd8の高さ以下である。また、項目名ノードd8の右側に隣接するノード群の左上端のノード、すなわちノードd9の頂点は、項目名ノードd8の頂点と重なり、かつ項目名ノードd8の右側に隣接するノード群の左下端のノード、すなわちノードd33の頂点は項目名ノードd8の頂点と重なる。これより、包含関係取得部214は、項目名ノードd8が、項目名ノードd8の右側に隣接するノード群を包含していると判定する。   For example, as shown in FIG. 5, at least a node d9 is an item name node in a node group adjacent to the right side of the item name node d8. The heights of all nodes included in the node group adjacent to the right side of the item name node d8 are all equal to or lower than the height of the item name node d8. Also, the upper left node of the node group adjacent to the right side of the item name node d8, that is, the vertex of the node d9 overlaps with the vertex of the item name node d8, and the lower left end of the node group adjacent to the right side of the item name node d8. , That is, the vertex of the node d33 overlaps with the vertex of the item name node d8. Accordingly, the inclusion relationship acquisition unit 214 determines that the item name node d8 includes a node group adjacent to the right side of the item name node d8.

なお、包含関係取得部214の処理対象となる様式グラフは、第1の削除部208によるエッジの削除は行われているが、第2の削除部209によるエッジの削除は行われていないものである。このため、例えば、ノードd40と、ノードd47との間の隣接関係を表すエッジは削除されていない。そのため、包含関係取得部214は、項目名ノードd40が、ノードd47を横方向に包含していると判定する。   Note that the format graph to be processed by the inclusion relation acquisition unit 214 has been deleted by the first deletion unit 208 but not by the second deletion unit 209. is there. For this reason, for example, the edge representing the adjacency relationship between the node d40 and the node d47 is not deleted. Therefore, the inclusion relationship acquisition unit 214 determines that the item name node d40 includes the node d47 in the horizontal direction.

列挙整合部213は、縦列挙取得部211および横列挙取得部212によって取得された論理関係のうち、表リスト301に含まれるノードに関する論理関係を除外した合成対象の列挙に関する論理関係を特定する。具体的には、列挙整合部213は、列挙リスト302の各行の論理関係のうち、表リスト301に含まれる論理関係を削除する。なお、列挙整合部213は、第2の特定部の一例である。例えば、図11のNo.6の行の論理関係(親がノードd14、子がノードd15およびd16、方向が横)は、図9のNo.6の行の論理関係と一致するため、列挙整合部213は、図11のNo.6の行の論理関係を削除する。   The enumeration matching unit 213 specifies a logical relationship related to enumeration of synthesis targets from which logical relationships related to nodes included in the table list 301 are excluded from the logical relationships acquired by the vertical enumeration acquisition unit 211 and the horizontal enumeration acquisition unit 212. Specifically, the enumeration matching unit 213 deletes the logical relationship included in the table list 301 among the logical relationships of each row of the enumeration list 302. The enumeration matching unit 213 is an example of a second specifying unit. For example, in FIG. The logical relationship of the row 6 (the parent is the node d14, the children are the nodes d15 and d16, the direction is horizontal) is shown in No. 6 of FIG. 6 coincides with the logical relationship of the row 6, the enumeration matching unit 213 displays No. 6 in FIG. Delete the logical relationship of line 6.

[合成処理]
項目名間合成部216は、包含グラフを、図13に示すような、木構造のデータとして表す。図13は、包含グラフについて説明するための図である。なお、図13の木構造のデータは、図12の包含グラフに基づくものである。ここで、図12の包含グラフは、各ノードの包含関係を集合として表現したものであるため、包含グラフ上には表内部の項目名同士の論理関係も含まれる。このとき、入れ子構造型に直交表が含まれる場合、直交表の親ノードは起点ノードとなるため、包含グラフのみからでは構造を正しく取得することができない。
[Composition process]
The item name synthesizing unit 216 represents the inclusion graph as tree-structured data as shown in FIG. FIG. 13 is a diagram for explaining the inclusion graph. The data of the tree structure in FIG. 13 is based on the inclusion graph in FIG. Here, since the inclusion graph of FIG. 12 expresses the inclusion relationship of each node as a set, the inclusion graph also includes the logical relationship between the item names in the table. At this time, if the nested structure type includes an orthogonal table, the parent node of the orthogonal table becomes the starting node, and therefore the structure cannot be acquired correctly only from the inclusion graph.

そこで、項目名間合成部216は、包含関係取得部214によって取得された包含関係のうち、合成対象の表に関する論理関係および合成対象の列挙に関する論理関係のいずれにも含まれない包含関係を基に木構造のデータを作成する。つまり、項目名間合成部216は、主のノードから従のノードへの包含関係を木構造のデータとして形成する際に、表リストの起点ノードまで、または列挙リストの項目名ノードまでを木ノードとして木構造のデータに合成し、以降のノードは合成しない。   Therefore, the inter-item name composition unit 216 is based on the inclusion relationships acquired by the inclusion relationship acquisition unit 214 based on the inclusion relationships that are not included in either the logical relationship related to the table to be combined or the logical relationship related to the enumeration of the synthesis target. Create tree structure data. That is, the item name synthesizing unit 216, when forming the inclusion relationship from the main node to the subordinate node as tree structure data, up to the starting node of the table list or the item name node of the enumeration list is a tree node Are synthesized into tree-structured data, and the subsequent nodes are not synthesized.

例えば、項目名間合成部216は、合成対象の表および合成対象の列挙に含まれるノードのうち、直交表の起点ノードと、縦表の起点ノードおよび当該起点ノードの右側に接続するノード群のうち最も上側にあるノード群と、横表の起点ノードおよび当該起点ノードの下側に接続するノード群のうち最も左側にあるノード群と、列挙の項目名ノードと、を木構造のデータに含める。つまり、項目名間合成部216は、縦表の起点ノードおよび起点ノードの右側のノードのうち最も上側にあるノード群(least_tops)、横表の起点ノードおよび起点ノードの下側のノードのうち最も左側にあるノード群(least_lefts)、直交表の起点ノード、および列挙の項目名ノード以外のノードについては、木構造のデータに合成しない。   For example, the item name synthesizing unit 216 includes, among the nodes included in the synthesis target table and the synthesis target enumeration, a starting node of the orthogonal table, a starting node of the vertical table, and a node group connected to the right side of the starting node. The tree structure data includes the uppermost node group, the leftmost node group of the starting node of the horizontal table and the node group connected to the lower side of the starting node, and the enumerated item name node. . That is, the inter-item name composition unit 216 selects the uppermost node group (least_tops) among the starting node of the vertical table and the right node of the starting node, and the most of the starting node of the horizontal table and the lower node of the starting node. Nodes other than the node group (least_lefts) on the left side, the origin node of the orthogonal table, and the item name node of the enumeration are not synthesized with the tree structure data.

図12の例では、項目名間合成部216は、ノードd1、d9、d36、d38、d40、d41、d42、d47、d48およびd49までを木構造のデータに合成する。例えば、ノードd9を親、ノードd10を子とする論理関係は、図9の表リストに含まれている。同様に、ノードd9を起点ノードとする直交表に含まれるノードに関する論理関係は、図9の表リストに含まれているため、図9の表リストに含まれるノードのうち項目名間合成部216によって木構造のデータに合成されるのは、起点ノードであるノードd9のみである。   In the example of FIG. 12, the item name synthesizing unit 216 synthesizes nodes d1, d9, d36, d38, d40, d41, d42, d47, d48, and d49 into tree-structured data. For example, the logical relationship in which the node d9 is a parent and the node d10 is a child is included in the table list of FIG. Similarly, since the logical relationship regarding the nodes included in the orthogonal table starting from the node d9 is included in the table list of FIG. 9, among the nodes included in the table list of FIG. Only the node d9 that is the starting node is synthesized into the tree-structured data.

また、図10の例では、項目名間合成部216は、ノードd48およびノードd49までを木構造のデータに合成する。例えば、ノードd48を親、ノードd50を子とする論理関係、および、ノードd49を親、ノードd51を子とする論理関係は、図10の表リストに含まれている。このため、図10の表リストに含まれるノードのうち項目名間合成部216によって木構造のデータに合成されるのは、起点ノードであるノードd48および、ノードd48の下側のノードのうち最も左側にあるノード(群)であるノードd49のみである。   Further, in the example of FIG. 10, the item name synthesizing unit 216 synthesizes the nodes d48 and d49 up to tree structure data. For example, the logical relationship in which the node d48 is a parent and the node d50 is a child, and the logical relationship in which the node d49 is a parent and the node d51 is a child are included in the table list of FIG. For this reason, among the nodes included in the table list of FIG. 10, the item name synthesizing unit 216 synthesizes the tree-structured data with the node d48 that is the starting node and the node below the node d48 being the most. Only the node d49 which is the node (group) on the left side.

なお、ノードd8は、図8の表リストにおける起点ノードであるが、前述の通り、図8の表リストは表整合部207によって削除されている。このため、項目名間合成部216は、ノードd8を起点ノードとみなさない。   The node d8 is a starting node in the table list of FIG. 8, but the table list of FIG. 8 has been deleted by the table matching unit 207 as described above. Therefore, the item name synthesizing unit 216 does not regard the node d8 as a starting node.

また、表合成部217は、合成対象の表に関する論理関係を基に木構造のデータを作成し、当該木構造のデータと項目名間合成部216によって作成された木構造のデータとを合成した木構造のデータを作成する。具体的には、表合成部217は、縦表取得部204によって取得された論理関係、横表取得部205によって取得された論理関係、直交表取得部206によって取得された論理関係を表現した木構造のデータをそれぞれの表ごとに作成し、項目名間合成部216の木構造のデータに合成する。例えば、表合成部217は、図9に示すリストを基に、図14のノードd9以降の枝に示す木構造のデータを作成する。図14は、木構造のデータの一例である。   Further, the table synthesis unit 217 creates tree structure data based on the logical relationship regarding the synthesis target table, and synthesizes the tree structure data and the tree structure data created by the item name synthesis unit 216. Create tree structure data. Specifically, the table synthesizing unit 217 represents a logical relationship acquired by the vertical table acquisition unit 204, a logical relationship acquired by the horizontal table acquisition unit 205, and a logical relationship acquired by the orthogonal table acquisition unit 206. Structure data is created for each table and combined with the tree structure data of the item name synthesizing unit 216. For example, the table synthesizing unit 217 creates tree-structured data shown in the branches after the node d9 in FIG. 14 based on the list shown in FIG. FIG. 14 is an example of tree structure data.

また、列挙合成部218は、合成対象の列挙に関する論理関係を基に木構造のデータを作成し、当該木構造のデータと表合成部217によって作成された木構造のデータとを合成した木構造のデータを作成する。例えば、列挙合成部218は、図14のノードd2、d4、d6、d36、d38、d41、d42、d48およびd49以降の枝に示す木構造のデータを作成する。図14は、木構造のデータの一例である。   In addition, the enumeration synthesis unit 218 creates tree structure data based on the logical relationship regarding the enumeration of synthesis targets, and synthesizes the tree structure data and the tree structure data created by the table synthesis unit 217. Create data for. For example, the enumeration synthesis unit 218 creates tree structure data shown in the branches after the nodes d2, d4, d6, d36, d38, d41, d42, d48, and d49 in FIG. FIG. 14 is an example of tree structure data.

例えば、列挙合成部218は、図11の列挙リストを基に、項目名間合成部216によって作成された木構造データ、および表合成部217によって作成された木構造データを合成し、図14に示す木構造のデータを作成する。   For example, the enumeration synthesis unit 218 synthesizes the tree structure data created by the item name synthesis unit 216 and the tree structure data created by the table synthesis unit 217 based on the enumeration list of FIG. Create the tree structure data shown.

また、追加部219は、表合成部217によって作成された木構造のデータに、当該木構造を定義する根ノードを追加する。例えば、追加部219は、当該木構造のデータに根ノード「form1」を追加する。なお、根ノードは様式を構成する論理関係を示すために追加しているため、様式を構成する情報が必要なければ追加部219は必須ではない。   The adding unit 219 adds a root node that defines the tree structure to the tree structure data created by the table synthesis unit 217. For example, the adding unit 219 adds the root node “form1” to the data of the tree structure. In addition, since the root node is added to indicate the logical relationship that forms the format, the adding unit 219 is not essential if the information that configures the format is not necessary.

なお、木構造データの各ノードである木ノードは、例えば項目名または項目値の文字列等の帳票の書式情報から取得された情報の他に、子や親のノードを識別する情報、子や親のノードとの隣接方向、および当該木ノードが表に含まれるものであることを示す情報等を有する。   In addition, the tree node that is each node of the tree structure data includes, for example, information for identifying child and parent nodes in addition to information acquired from form format information such as item name or item value character strings, Information indicating that the adjacent direction to the parent node, the tree node is included in the table, and the like.

[第1の実施形態の処理]
まず、帳票グラフを生成する処理について説明する。帳票グラフを生成する処理は、論理関係認識装置10による処理の前に前提として実行される処理である。ここでは、図示しない帳票グラフ生成部によって帳票グラフを生成する処理が行われることとする。なお、帳票グラフ生成部は、論理関係認識装置10に備えられていても良いし、他の装置に備えられていてもよい。
[Process of First Embodiment]
First, processing for generating a form graph will be described. The process for generating the form graph is a process executed as a precondition before the process by the logical relationship recognition apparatus 10. Here, it is assumed that a form graph is generated by a form graph generation unit (not shown). The form graph generation unit may be provided in the logical relationship recognition device 10 or may be provided in another device.

まず、図15を用いて帳票グラフ生成部の処理の全体の流れを説明する。図15は、帳票グラフを生成する処理の流れを示すフローチャートである。図15に示すように、帳票グラフ生成部は、まず帳票を読み込む(ステップS11)。次に、帳票グラフ生成部は、読み込んだ帳票からノードを取得する(ステップS12)。そして、帳票グラフ生成部は、ノードの隣接関係を取得する(ステップS13)。最後に、帳票グラフ生成部は、生成した帳票グラフを出力する(ステップS14)。なお、帳票グラフは、帳票の項目名または項目値を表す領域に関する情報をノードとして表し、ノード間の隣接関係をエッジとして表したグラフである。   First, the overall flow of processing of the form graph generation unit will be described with reference to FIG. FIG. 15 is a flowchart showing a flow of processing for generating a form graph. As shown in FIG. 15, the form graph generation unit first reads a form (step S11). Next, the form graph generation unit acquires a node from the read form (step S12). Then, the form graph generation unit acquires the adjacent relationship between the nodes (step S13). Finally, the form graph generation unit outputs the generated form graph (step S14). Note that the form graph is a graph in which information about an area representing an item name or item value of the form is represented as a node, and the adjacent relationship between the nodes is represented as an edge.

次に、図16を用いて、ノードを取得する処理(ステップS12)について説明する。図16は、ノードを取得する処理の流れを示すフローチャートである。図16に示すように、帳票グラフ生成部は、まず、帳票を読み込む(ステップS21)。次に、帳票グラフ生成部は、各罫線枠の範囲を取得する(ステップS22)。そして、帳票グラフ生成部は、全罫線枠をノードに変換するまで以下の処理を繰り返す(ステップS23、S27)。   Next, the process for acquiring a node (step S12) will be described with reference to FIG. FIG. 16 is a flowchart showing a flow of processing for acquiring a node. As shown in FIG. 16, the form graph generation unit first reads a form (step S21). Next, the form graph generation unit acquires the range of each ruled line frame (step S22). Then, the form graph generation unit repeats the following processing until all ruled line frames are converted into nodes (steps S23 and S27).

まず、帳票グラフ生成部は、罫線枠の範囲からノードを生成する(ステップS24)。次に、帳票グラフ生成部は、生成したノードの罫線枠フラグをtrueにする(ステップS25)。そして、帳票グラフ生成部は、生成したノードをノード集合Nに追加する(ステップS26)。   First, the form graph generation unit generates a node from the range of the ruled line frame (step S24). Next, the form graph generation unit sets the ruled line frame flag of the generated node to true (step S25). Then, the form graph generation unit adds the generated node to the node set N (step S26).

そして、帳票グラフ生成部は、罫線枠外の文字列群の範囲を取得する(ステップS28)。ここで、帳票グラフ生成部は、全文字列群の範囲をノードに変換するまで以下の処理を繰り返す(ステップS29、S33)。   Then, the form graph generation unit acquires the range of the character string group outside the ruled line frame (step S28). Here, the form graph generation unit repeats the following processing until the range of all character string groups is converted into nodes (steps S29 and S33).

まず、帳票グラフ生成部は、全文字列群の範囲を罫線枠とした場合の、文字列群の範囲からノードを生成する(ステップS30)。次に、帳票グラフ生成部は、生成したノードの罫線枠フラグをfalseにする(ステップS31)。そして、帳票グラフ生成部は、生成したノードをノード集合Nに追加する(ステップS32)。最後に、帳票グラフ生成部は、ノード集合Nを出力する(ステップS34)。   First, the form graph generation unit generates a node from the range of character string groups when the range of all character string groups is a ruled line frame (step S30). Next, the form graph generation unit sets the ruled line frame flag of the generated node to false (step S31). Then, the form graph generation unit adds the generated node to the node set N (step S32). Finally, the form graph generation unit outputs the node set N (step S34).

次に、図17を用いて、罫線枠の範囲からノードを生成する処理(ステップS24、S30)について説明する。図17は、ノードを生成する処理の流れを示すフローチャートである。図17に示すように、帳票グラフ生成部は、帳票グラフおよび罫線枠の範囲を読み込み、罫線枠の範囲をareaとする(ステップS41)。次に、帳票グラフ生成部は、帳票グラフに新規ノードを生成し(ステップS42)、areaの範囲情報および保持情報を当該新規ノードに設定する(ステップS43)。そして、帳票グラフ生成部は、新規ノードにインデックスを付け(ステップS44)、当該新規ノードを出力する(ステップS45)。   Next, processing (steps S24 and S30) for generating a node from the range of the ruled line frame will be described with reference to FIG. FIG. 17 is a flowchart showing a flow of processing for generating a node. As illustrated in FIG. 17, the form graph generation unit reads the range of the form graph and the ruled line frame, and sets the range of the ruled line frame as area (step S41). Next, the form graph generation unit generates a new node in the form graph (step S42), and sets the area range information and the holding information in the new node (step S43). Then, the form graph generation unit indexes the new node (step S44) and outputs the new node (step S45).

次に、図18を用いて、隣接関係を取得する処理(ステップS13)について説明する。図18は、隣接関係を取得する処理の流れを示すフローチャートである。図18に示すように、帳票グラフ生成部は、まず、ノード集合を読み込む(ステップS51)。次に、帳票グラフ生成部は、読み込んだノード集合の各ノードであるノード1について、以下の処理を繰り返す(ステップS52、S55)。   Next, the process for acquiring the adjacency relationship (step S13) will be described with reference to FIG. FIG. 18 is a flowchart showing a flow of processing for acquiring the adjacency relationship. As shown in FIG. 18, the form graph generation unit first reads a node set (step S51). Next, the form graph generation unit repeats the following processing for node 1 which is each node of the read node set (steps S52 and S55).

まず、帳票グラフ生成部は、上下左右に隣接するノード群を取得する(ステップS53)。次に、ノードの上下左右の隣接エッジを隣接グラフに格納する(ステップS54)。最後に、帳票グラフ生成部は、隣接グラフを出力する(ステップS56)。   First, the form graph generation unit acquires a group of nodes adjacent vertically and horizontally (step S53). Next, the upper, lower, left and right adjacent edges of the node are stored in the adjacent graph (step S54). Finally, the form graph generation unit outputs an adjacent graph (step S56).

次に、図19を用いて、隣接するノード群を取得する処理(ステップS53)について説明する。図19は、隣接するノード群を取得する処理の流れを示すフローチャートである。図19に示すように、まず、帳票グラフ生成部は、ノード集合およびノード1を読み込む。帳票グラフ生成部は、ノード集合をNとする(ステップS61)。ここで、ノード集合Nの各ノードであるノード2について、以下の処理を繰り返す(ステップS62、S73)。   Next, the process (step S53) for acquiring adjacent node groups will be described with reference to FIG. FIG. 19 is a flowchart showing a flow of processing for acquiring adjacent node groups. As shown in FIG. 19, first, the form graph generation unit reads a node set and node 1. The form graph generation unit sets the node set to N (step S61). Here, the following processing is repeated for the node 2 which is each node of the node set N (steps S62 and S73).

まず、帳票グラフ生成部は、ノード1とノード2が同一である場合(ステップS63、true)、ノード2をノード1に隣接しないノードとする(ステップS72)。ノード1とノード2が同一でない場合(ステップS63、false)、帳票グラフ生成部は、左側の隣接条件が充足されている場合(ステップS64、true)はノード2がノード1の左に隣接していると判定し(ステップS65)、右側の隣接条件が充足されている場合(ステップS66、true)はノード2がノード1の右に隣接していると判定し(ステップS67)、上側の隣接条件が充足されている場合(ステップS68、true)はノード2がノード1の上に隣接していると判定し(ステップS69)、下側の隣接条件が充足されている場合(ステップS70、true)はノード2がノード1の下に隣接していると判定する(ステップS71)。最後に、帳票グラフ生成部は、ノード1の各ノードとの隣接関係を表す隣接エッジを出力する(ステップS74)。   First, when the node 1 and the node 2 are the same (step S63, true), the form graph generation unit sets the node 2 as a node not adjacent to the node 1 (step S72). When the node 1 and the node 2 are not the same (step S63, false), the form graph generation unit determines that the node 2 is adjacent to the left of the node 1 when the left adjacent condition is satisfied (step S64, true). If the right adjacent condition is satisfied (step S66, true), it is determined that the node 2 is adjacent to the right of the node 1 (step S67), and the upper adjacent condition is satisfied. Is satisfied (step S68, true), it is determined that the node 2 is adjacent to the node 1 (step S69), and the lower adjacent condition is satisfied (step S70, true). Determines that node 2 is adjacent to node 1 (step S71). Finally, the form graph generation unit outputs an adjacent edge representing the adjacent relationship between each node of node 1 (step S74).

ここで、各方向の隣接条件の一例について説明する。ノード1の左上、右上、左下、右下の頂点の座標をそれぞれノード1(x1,y1)、ノード1(x2,y1)、ノード1(x1,y2)、ノード1(x2,y2)とする。また、ノード2の左上、右上、左下、右下の頂点の座標をそれぞれノード2(x1,y1)、ノード2(x2,y1)、ノード2(x1,y2)、ノード2(x2,y2)とする。また、marginを、あらかじめ設定された罫線枠間のマージンを表す定数(例えば0)とする。   Here, an example of the adjacency condition in each direction will be described. The coordinates of the upper left, upper right, lower left, and lower right vertices of node 1 are node 1 (x1, y1), node 1 (x2, y1), node 1 (x1, y2), and node 1 (x2, y2), respectively. . In addition, the coordinates of the upper left, upper right, lower left, and lower right vertices of node 2 are respectively node 2 (x1, y1), node 2 (x2, y1), node 2 (x1, y2), and node 2 (x2, y2). And Further, margin is a constant (for example, 0) representing a margin between ruled line frames set in advance.

このとき、各隣接条件は、一例として、下記のように表される。
(左側の隣接条件)
ノード2.y1≧ノード1.y1
& ノード2.y2≧ノード1.y2
& 0≦ノード1.x1−ノード2.x2≦margin
(右側の隣接条件)
ノード2.y1≧ノード1.y1
& ノード2.y2≧ノード1.y2
& 0≦ノード2.x1−ノード1.x2≦margin
(上側の隣接条件)
ノード2.x1≧ノード1.x1
& ノード2.x2≧ノード1.x2
& 0≦ノード1.y1−ノード2.y2≦margin
(下側の隣接条件)
ノード2.x1≧ノード1.x1
& ノード2.x2≧ノード1.x2
& 0≦ノード2.y1−ノード1.y2≦margin
At this time, each adjacency condition is expressed as follows as an example.
(Adjacent condition on the left)
Node 2. y1 ≧ node 1. y1
& Node 2. y2 ≧ node 1. y2
& 0 ≦ node 1. x1-node2. x2 ≦ margin
(Adjacent condition on the right)
Node 2. y1 ≧ node 1. y1
& Node 2. y2 ≧ node 1. y2
& 0 ≦ node 2. x1-node1. x2 ≦ margin
(Upper adjacent condition)
Node 2. x1 ≧ node 1. x1
& Node 2. x2 ≧ node 1. x2
& 0 ≦ node 1. y1-node2. y2 ≦ margin
(Lower adjacent condition)
Node 2. x1 ≧ node 1. x1
& Node 2. x2 ≧ node 1. x2
& 0 ≦ node 2. y1-node1. y2 ≦ margin

また、帳票には複数の様式が含まれている場合があるため、帳票グラフを様式グラフに分割する。図20を用いて、様式グラフの生成について説明する。図20は、様式グラフを生成する処理の流れを示すフローチャートである。図20に示すように、帳票グラフ生成部は、まず、帳票グラフを読み込む(ステップS81)。次に、帳票グラフ生成部は、帳票グラフから、ノードが項目値である包含関係を全て削除する(ステップS82)。   In addition, since the form may include a plurality of forms, the form graph is divided into form graphs. Generation of the style graph will be described with reference to FIG. FIG. 20 is a flowchart showing a flow of processing for generating a style graph. As shown in FIG. 20, the form graph generation unit first reads a form graph (step S81). Next, the form graph generation unit deletes all inclusion relationships whose nodes are item values from the form graph (step S82).

そして、帳票グラフ生成部は、分類されていないノードのうち任意のノードをノードXに指定する(ステップS83)。帳票グラフ生成部は、ノードXを始点として連結グラフを求める(ステップS84)。ここで、連結グラフに分類されていないノードがある場合(ステップS85、true)、帳票グラフ生成部は、分類されていないノードをさらにノードXに指定する(ステップS83)。そして、連結グラフに分類されていないノードがなくなった場合(ステップS85、false)、帳票グラフ生成部は、求めた連結グラフを様式グラフ群として出力する(ステップS86)。   Then, the form graph generation unit designates an arbitrary node among the unclassified nodes as the node X (step S83). The form graph generation unit obtains a connected graph starting from the node X (step S84). If there is a node that is not classified in the connected graph (step S85, true), the form graph generation unit further designates a node that is not classified as the node X (step S83). When there is no node that is not classified into the connected graph (step S85, false), the form graph generation unit outputs the obtained connected graph as a style graph group (step S86).

次に、論理関係認識装置10の処理の流れについて説明する。まず、図21を用いて抽出部201の処理について説明する。図21は、抽出部の処理の流れを示すフローチャートである。図21に示すように、まず、抽出部201は、様式グラフおよび解析後視覚表現ルールを読み込む(ステップS91)。次に、抽出部201は、様式グラフから解析後視覚表現ルールの条件を満たすノード群を選択する(ステップS92)。次に、抽出部201は、選択したノード群の項目名属性を項目名に設定、すなわち項目名であることを示すフラグの値をtrueにする(ステップS93)。最後に、抽出部201は、様式グラフをGとして返す(ステップS94)。   Next, the processing flow of the logical relationship recognition apparatus 10 will be described. First, processing of the extraction unit 201 will be described with reference to FIG. FIG. 21 is a flowchart showing the flow of processing of the extraction unit. As shown in FIG. 21, first, the extraction unit 201 reads a style graph and a visual expression rule after analysis (step S91). Next, the extraction unit 201 selects a node group that satisfies the condition of the post-analysis visual expression rule from the style graph (step S92). Next, the extraction unit 201 sets the item name attribute of the selected node group to the item name, that is, sets the value of the flag indicating the item name to true (step S93). Finally, the extraction unit 201 returns the style graph as G (step S94).

次に、図22を用いて解析部202の処理について説明する。図22は、解析部の処理の流れを示すフローチャートである。解析部202は、視覚表現ルールを基に解析後視覚表現ルールを作成する。図22に示すように、まず、解析部202は、視覚表現ルール群を読み込む(ステップS101)。次に、解析部202は、ArrayまたはHash型の変数rule_listを生成する(ステップS102)。以降、解析部202は、読み込んだ視覚表現ルールを1つずつ処理する(ステップS103、S107)。   Next, processing of the analysis unit 202 will be described with reference to FIG. FIG. 22 is a flowchart showing the flow of processing of the analysis unit. The analysis unit 202 creates a post-analysis visual expression rule based on the visual expression rule. As shown in FIG. 22, first, the analysis unit 202 reads a visual expression rule group (step S101). Next, the analysis unit 202 generates an Array or Hash type variable rule_list (step S102). Thereafter, the analysis unit 202 processes the read visual expression rules one by one (steps S103 and S107).

まず、解析部202は、視覚表現ルールの条件を解析する(ステップS104)。次に、解析部202は、視覚表現ルールのアクションを解析する(ステップS105)。そして、解析部202は、解析した条件およびアクションを解析後視覚表現ルールとしてrule_listに格納する(ステップS106)。解析部202は、全ての視覚表現ルールについて処理を行った後、解析後視覚表現ルール群が格納されたrule_listを出力する(ステップS108)。   First, the analysis unit 202 analyzes the condition of the visual expression rule (step S104). Next, the analysis unit 202 analyzes the action of the visual expression rule (step S105). Then, the analysis unit 202 stores the analyzed conditions and actions in the rule_list as post-analysis visual expression rules (step S106). The analysis unit 202 processes all visual expression rules, and then outputs a rule_list in which the post-analysis visual expression rule group is stored (step S108).

次に、図23を用いて表分類部203の処理について説明する。図23は、表分類部の処理の流れを示すフローチャートである。図23に示すように、まず、表分類部203は、様式グラフおよび様式グラフの左上のノードである対象ノード、および表リスト301を読み込む(ステップS31a)。ここで、対象ノードが項目名でないか、対象ノードが既に親もしくは子として表リスト301に記載されている場合(ステップS32a、true)、表分類部203は、表フラグを「処理しない」に設定する(ステップS42a)。なお、表フラグは、表の分類を「縦表」、「横表」、「直交表」および「処理しない」のうちのいずれかで示す変数である。   Next, the process of the table classification | category part 203 is demonstrated using FIG. FIG. 23 is a flowchart showing the flow of processing of the table classification unit. As shown in FIG. 23, first, the table classification unit 203 reads the style graph, the target node that is the upper left node of the style graph, and the table list 301 (step S31a). Here, when the target node is not an item name or the target node is already described in the table list 301 as a parent or child (step S32a, true), the table classification unit 203 sets the table flag to “do not process”. (Step S42a). The table flag is a variable indicating the table classification as one of “vertical table”, “horizontal table”, “orthogonal table”, and “not processed”.

表分類部203は、対象ノードが項目名、かつ、対象ノードが親もしくは子として表リスト301に未記載の場合(ステップS32a、false)、表分類部203は、対象ノードの下側に接続するノード群をbottomsに格納し、対象ノードの右側に接続するノード群をrightsに格納する(ステップS33a)。   When the target node is an item name and the target node is not described in the table list 301 as a parent or a child (step S32a, false), the table classification unit 203 connects to the lower side of the target node. The node group is stored in bottoms, and the node group connected to the right side of the target node is stored in rights (step S33a).

図5の例で、対象ノードがノードd9である場合、rightsにはノードd10、d11およびd12が格納され、bottomsにはノードd13、d14、d17、d20、d21、d24、d27、d30およびd33が格納される。   In the example of FIG. 5, when the target node is the node d9, the nodes d10, d11, and d12 are stored in the rights, and the nodes d13, d14, d17, d20, d21, d24, d27, d30, and d33 are stored in the bottoms. Stored.

そして、表分類部203は、rightsが全て項目名である場合、flg1をtrueとし、それ以外の場合はflg1をfalseとする。また、表分類部203は、rightsの領域が対象ノードと同じ高さである場合、flg2をtrueとし、それ以外の場合はflg2をfalseとする(ステップS34a)。また、表分類部203は、flg1およびflg2の両方がtrueである場合はflg_rをtrueとし、それ以外の場合はflg_rをfalseとする。   Then, the table classification unit 203 sets flg1 to true when all the rights are item names, and sets flg1 to false otherwise. Also, the table classification unit 203 sets flg2 to true when the rights region is the same height as the target node, and sets flg2 to false otherwise (step S34a). The table classification unit 203 sets flg_r to true when both flg1 and flg2 are true, and sets flg_r to false otherwise.

また、表分類部203は、bottomsが全て項目名である場合、flg3をtrueとし、それ以外の場合はflg3をfalseとする。また、表分類部203は、bottomsの領域が対象ノードと同じ幅である場合、flg4をtrueとし、それ以外の場合はflg4をfalseとする(ステップS35a)。また、表分類部203は、flg3およびflg4の両方がtrueである場合はflg_bをtrueとし、それ以外の場合はflg_bをfalseとする。   Also, the table classification unit 203 sets flg3 to true if bottoms are all item names, and sets flg3 to false otherwise. Also, the table classification unit 203 sets flg4 to true when the bottoms region has the same width as the target node, and sets flg4 to false otherwise (step S35a). Also, the table classification unit 203 sets flg_b to true when both flg3 and flg4 are true, and sets flg_b to false otherwise.

flg_rおよびflg_bの両方がtrueである場合(ステップS36aがtrue、かつ、ステップS37aがtrue)、表分類部203は、表フラグを「直交表」に設定する(ステップS38a)。また、flg_rがtrueかつflg_bがfalseである場合(ステップS36aがtrue、かつ、ステップS37aがfalse)、表分類部203は、表フラグを「縦表」に設定する(ステップS39a)。また、flg_rがfalseかつflg_bがtrueである場合(ステップS36aがfalse、かつ、ステップS40aがtrue)、表分類部203は、表フラグを「横表」に設定する(ステップS41a)。また、flg_rおよびflg_bの両方がfalseである場合(ステップS36aがfalse、かつ、ステップS40aがfalse)、表分類部203は、表フラグを「処理しない」に設定する(ステップS42a)。最後に、表分類部203は、表フラグを出力する(ステップS43a)。   When both flg_r and flg_b are true (step S36a is true and step S37a is true), the table classification unit 203 sets the table flag to “orthogonal table” (step S38a). When flg_r is true and flg_b is false (step S36a is true and step S37a is false), the table classification unit 203 sets the table flag to “vertical table” (step S39a). When flg_r is false and flg_b is true (step S36a is false and step S40a is true), the table classification unit 203 sets the table flag to “horizontal table” (step S41a). When both flg_r and flg_b are false (step S36a is false and step S40a is false), the table classification unit 203 sets the table flag to “not process” (step S42a). Finally, the table classification unit 203 outputs a table flag (step S43a).

例えば、図5のノードd9を起点とした例では、rights(ノードd10、d11およびd12)は全て項目名、かつ、rightsの領域の高さがノードd9と同じであるため、表分類部203は、flg1およびflg2をtrueにする。また、bottoms(ノードd13、d14、d17、d20、d21、d24、d27、d30およびd33)は全て項目名、かつ、bottomsの領域の幅がノードd9と同じであるため、表分類部203は、flg3およびflg4をtrueにする。これより、flg_rおよびflg_bは両方ともtrueとなるため、表分類部203は表フラグを「直交表」とする。これにより、図5のノードd9を起点とする表は、直交表に分類される。   For example, in the example starting from the node d9 in FIG. 5, all the rights (nodes d10, d11, and d12) have the same item name and the height of the area of the rights is the same as that of the node d9. , Flg1 and flg2 are set to true. Further, since bottoms (nodes d13, d14, d17, d20, d21, d24, d27, d30, and d33) are all item names and the width of the bottoms area is the same as that of the node d9, the table classification unit 203 Set flg3 and flg4 to true. Thus, since both flg_r and flg_b are true, the table classification unit 203 sets the table flag to “orthogonal table”. As a result, the table starting from the node d9 in FIG. 5 is classified as an orthogonal table.

次に、図24を用いて、縦表取得部204の処理について説明する。図24は、縦表取得部の処理の流れを示すフローチャートである。図24に示すように、まず、縦表取得部204は、起点ノードおよび様式グラフを読み込む(ステップS51a)。次に、縦表取得部204は、新規表リストを作成する(ステップS52a)。次に、縦表取得部204は、least_topsに、起点ノードと起点ノードの右側に接続するノード群のうち最も上側にあるノード群を格納する(ステップS53a)。   Next, processing of the vertical table acquisition unit 204 will be described with reference to FIG. FIG. 24 is a flowchart showing the flow of processing of the vertical table acquisition unit. As shown in FIG. 24, first, the vertical table acquisition unit 204 reads a starting point node and a style graph (step S51a). Next, the vertical table acquisition unit 204 creates a new table list (step S52a). Next, the vertical table acquisition unit 204 stores, in last_tops, the uppermost node group among the node groups connected to the starting node and the right side of the starting node (step S53a).

ここで、縦表取得部204は、least_topsに含まれるノードのそれぞれについて、以下の処理を行う(ステップS54a、S57a)。まず、縦表取得部204は、縦表論理関係を取得する(ステップS55a)。縦表論理関係を取得する処理の詳細については後述する。次に、縦表取得部204は、表リストに論理関係を追加する(ステップS56a)。縦表取得部204は、全てのノードについて処理を行った後、表リストを出力する(ステップS58a)。   Here, the vertical table acquisition unit 204 performs the following processing for each of the nodes included in the least_tops (steps S54a and S57a). First, the vertical table acquisition unit 204 acquires a vertical table logical relationship (step S55a). Details of the process of acquiring the vertical table logical relationship will be described later. Next, the vertical table acquisition unit 204 adds a logical relationship to the table list (step S56a). The vertical table acquisition unit 204 outputs the table list after processing all the nodes (step S58a).

次に、図25を用いて、横表取得部205の処理について説明する。図25は、横表取得部の処理の流れを示すフローチャートである。図25に示すように、まず、横表取得部205は、起点ノードおよび様式グラフを読み込む(ステップS61a)。次に、横表取得部205は、新規表リストを作成する(ステップS62a)。次に、横表取得部205は、least_leftsに、起点ノードと起点ノードの下側に接続するノード群のうち最も左側にあるノード群を格納する(ステップS63a)。   Next, the process of the horizontal table acquisition unit 205 will be described with reference to FIG. FIG. 25 is a flowchart showing the flow of processing of the horizontal table acquisition unit. As shown in FIG. 25, first, the horizontal table acquisition unit 205 reads a starting point node and a style graph (step S61a). Next, the horizontal table acquisition unit 205 creates a new table list (step S62a). Next, the horizontal table acquisition unit 205 stores, in last_lefts, the leftmost node group among the node groups connected to the origin node and the origin node (step S63a).

ここで、横表取得部205は、least_leftsに含まれるノードのそれぞれについて、以下の処理を行う(ステップS64a、S67a)。まず、横表取得部205は、横表論理関係を取得する(ステップS65a)。横表論理関係を取得する処理の詳細については後述する。次に、横表取得部205は、表リストに論理関係を追加する(ステップS66a)。横表取得部205は、全てのノードについて処理を行った後、表リストを出力する(ステップS68a)。   Here, the horizontal table acquisition unit 205 performs the following processing for each of the nodes included in the last_lefts (steps S64a and S67a). First, the horizontal table acquisition unit 205 acquires a horizontal table logical relationship (step S65a). Details of the process of acquiring the horizontal and logical relation will be described later. Next, the horizontal table acquisition unit 205 adds a logical relationship to the table list (step S66a). The horizontal table acquisition unit 205 outputs the table list after processing all the nodes (step S68a).

例えば、横表取得部205は、図5のノードd48を起点とした表に対応した様式グラフを基に、図10に示すような表リストを出力する。このとき、横表取得部205は、least_leftsに、ノードd49を格納する。   For example, the horizontal table acquisition unit 205 outputs a table list as shown in FIG. 10 based on the style graph corresponding to the table starting from the node d48 in FIG. At this time, the horizontal table acquisition unit 205 stores the node d49 in the last_lefts.

次に、図26を用いて、直交表取得部206の処理について説明する。図26は、直交表取得部の処理の流れを示すフローチャートである。図26に示すように、まず、直交表取得部206は、起点ノードおよび様式グラフを読み込む(ステップS71a)。次に、直交表取得部206は、新規表リストを作成する(ステップS72a)。   Next, the processing of the orthogonal table acquisition unit 206 will be described with reference to FIG. FIG. 26 is a flowchart showing the flow of processing of the orthogonal table acquisition unit. As shown in FIG. 26, first, the orthogonal table acquisition unit 206 reads the start node and the style graph (step S71a). Next, the orthogonal table acquisition unit 206 creates a new table list (step S72a).

次に、直交表取得部206は、least_topsに、起点ノードの右側に接続するノード群のうち最も上側にあるノード群を格納する(ステップS73a)。ここで、直交表取得部206は、least_topsに含まれるノードのそれぞれについて、以下の処理を行う(ステップS74a、S77a)。まず、直交表取得部206は、縦表論理関係を取得する(ステップS75a)。次に、直交表取得部206は、表リストに論理関係を追加する(ステップS76a)。   Next, the orthogonal table acquisition unit 206 stores the uppermost node group among the node groups connected to the right side of the starting node in last_tops (step S73a). Here, the orthogonal table acquisition unit 206 performs the following process for each of the nodes included in the least_tops (steps S74a and S77a). First, the orthogonal table acquisition unit 206 acquires a vertical table logical relationship (step S75a). Next, the orthogonal table acquisition unit 206 adds a logical relationship to the table list (step S76a).

次に、直交表取得部206は、least_leftsに、起点ノードの下側に接続するノード群のうち最も左側にあるノード群を格納する(ステップS78a)。ここで、直交表取得部206は、least_leftsに含まれるノードのそれぞれについて、以下の処理を行う(ステップS79a、S82a)。まず、直交表取得部206は、横表論理関係を取得する(ステップS80a)。次に、直交表取得部206は、表リストに論理関係を追加する(ステップS81a)。直交表取得部206は、全てのノードについて処理を行った後、表リストを出力する(ステップS83a)。   Next, the orthogonal table acquisition unit 206 stores the leftmost node group among the node groups connected to the lower side of the origin node in last_lefts (step S78a). Here, the orthogonal table acquisition unit 206 performs the following processing for each of the nodes included in the least_lefts (steps S79a and S82a). First, the orthogonal table acquisition unit 206 acquires a horizontal table logical relationship (step S80a). Next, the orthogonal table acquisition unit 206 adds a logical relationship to the table list (step S81a). The orthogonal table acquisition unit 206 outputs the table list after processing all the nodes (step S83a).

例えば、直交表取得部206は、図5のノードd9を起点とした表に対応した様式グラフを基に、図9に示すような表リストを出力する。このとき、直交表取得部206は、least_topsに、ノードd10を格納する。また、直交表取得部206は、least_leftsに、ノードd13、d20、d27、d30およびd33を格納する。   For example, the orthogonal table acquisition unit 206 outputs a table list as shown in FIG. 9 based on the style graph corresponding to the table starting from the node d9 in FIG. At this time, the orthogonal table acquisition unit 206 stores the node d10 in the least_tops. Further, the orthogonal table acquisition unit 206 stores the nodes d13, d20, d27, d30, and d33 in last_lefts.

次に、図27を用いて、縦方向の論理関係を取得する処理、すなわち縦表論理関係取得処理(図24のステップS55a、および図26のステップS75a)について説明する。図27は、縦方向の論理関係を取得する処理の流れを示すフローチャートである。縦表論理関係取得処理は、縦表取得部204または直交表取得部206によって行われる。ここでは、直交表取得部206が縦表論理関係取得処理を行う場合の例について説明する。なお、縦表取得部204が縦表論理関係取得処理を行う場合も、直交表取得部206が縦表論理関係取得処理を行う場合と処理内容は同様である。   Next, processing for acquiring a vertical logical relationship, that is, vertical table logical relationship acquisition processing (step S55a in FIG. 24 and step S75a in FIG. 26) will be described with reference to FIG. FIG. 27 is a flowchart illustrating a flow of processing for acquiring a vertical logical relationship. The vertical table logical relationship acquisition processing is performed by the vertical table acquisition unit 204 or the orthogonal table acquisition unit 206. Here, an example in which the orthogonal table acquisition unit 206 performs vertical table logical relationship acquisition processing will be described. In addition, when the vertical table acquisition unit 204 performs the vertical table logical relationship acquisition processing, the processing content is the same as when the orthogonal table acquisition unit 206 performs the vertical table logical relationship acquisition processing.

図27に示すように、まず、直交表取得部206は、対象ノードおよび様式グラフを読み込む(ステップS101a)。そして、直交表取得部206は、新規論理関係を表す変数pairを生成する(ステップS102a)。次に、直交表取得部206は、対象ノードの下隣にあるノード集合をnext_bに格納する(ステップS103a)。   As shown in FIG. 27, first, the orthogonal table acquisition unit 206 reads the target node and the style graph (step S101a). And the orthogonal table acquisition part 206 produces | generates the variable pair showing a new logical relationship (step S102a). Next, the orthogonal table acquisition unit 206 stores the node set next to the target node in next_b (step S103a).

ここで、next_bのノード数が2つ以上であるか、next_bが全て項目名である場合(ステップS104a、true)、直交表取得部206は、pairに、親を対象ノード、子をnext_b、方向を縦とする論理関係を追加する(ステップS105a)。   Here, when the number of nodes of next_b is two or more or next_b is an item name (step S104a, true), the orthogonal table acquisition unit 206 sets a parent as a target node, a child as a next_b, and a direction. Is added to the vertical (step S105a).

そして、直交表取得部206は、next_bに含まれるノードのそれぞれ(crt)について、縦表論理関係取得処理を再帰的に行う(ステップS106a、S108a)。直交表取得部206は、pairに項目名および項目値の論理関係群を格納し、Gに様式グラフを格納し、対象ノードをcrtに置き換える(ステップS107a)。そして、直交表取得部206は、ステップS103aに戻り、next_bに対象ノードの下隣にあるノード集合を格納する。   Then, the orthogonal table acquisition unit 206 recursively performs vertical table logical relationship acquisition processing for each node (crt) included in next_b (steps S106a and S108a). The orthogonal table acquisition unit 206 stores the logical relationship group of the item name and the item value in the pair, stores the style graph in G, and replaces the target node with crt (step S107a). Then, the orthogonal table acquisition unit 206 returns to step S103a, and stores the node set adjacent to the target node in next_b.

また、next_bのノード数が2つ以上でなく、かつ、next_bのいずれかが項目名でない場合(ステップS104a、false)、直交表取得部206は、対象ノードの下側のノード集合をbottomsに格納する(ステップS109a)。そして、直交表取得部206は、pairに、親を対象ノード、子をbottoms、方向を縦とする論理関係を追加する(ステップS110a)。直交表取得部206は、全ての対象ノードについて処理を行った後、論理関係集合(pair)を出力する(ステップS111a)。   Further, when the number of nodes of next_b is not two or more and any of the next_b is not an item name (step S104a, false), the orthogonal table acquisition unit 206 stores the lower node set of the target node in bottoms. (Step S109a). Then, the orthogonal table acquisition unit 206 adds a logical relationship in which the parent is the target node, the child is bottoms, and the direction is vertical (step S110a). The orthogonal table acquisition unit 206 outputs the logical relation set (pair) after performing processing for all target nodes (step S111a).

次に、図28を用いて、横方向の論理関係を取得する処理、すなわち横表論理関係取得処理(図25のステップS65a、および図26のステップS80a)について説明する。図28は、横方向の論理関係を取得する処理の流れを示すフローチャートである。横表論理関係取得処理は、横表取得部205または直交表取得部206によって行われる。ここでは、直交表取得部206が横表論理関係取得処理を行う場合の例について説明する。なお、横表取得部205が横表論理関係取得処理を行う場合も、直交表取得部206が横表論理関係取得処理を行う場合と処理内容は同様である。   Next, processing for acquiring a horizontal logical relationship, that is, horizontal table logical relationship acquisition processing (step S65a in FIG. 25 and step S80a in FIG. 26) will be described with reference to FIG. FIG. 28 is a flowchart showing a flow of processing for acquiring a horizontal logical relationship. The horizontal table logical relationship acquisition processing is performed by the horizontal table acquisition unit 205 or the orthogonal table acquisition unit 206. Here, an example in which the orthogonal table acquisition unit 206 performs a horizontal table logical relationship acquisition process will be described. Note that the processing contents are the same when the horizontal table acquisition unit 205 performs the horizontal table logical relationship acquisition processing as when the orthogonal table acquisition unit 206 performs the horizontal table logical relationship acquisition processing.

図28に示すように、まず、直交表取得部206は、対象ノードおよび様式グラフを読み込む(ステップS201a)。そして、直交表取得部206は、新規論理関係を表す変数pairを生成する(ステップS202a)。次に、直交表取得部206は、対象ノードの右隣にあるノード集合をnext_rに格納する(ステップS203a)。   As shown in FIG. 28, first, the orthogonal table acquisition unit 206 reads the target node and the style graph (step S201a). And the orthogonal table acquisition part 206 produces | generates the variable pair showing a new logical relationship (step S202a). Next, the orthogonal table acquisition unit 206 stores the node set on the right side of the target node in next_r (step S203a).

ここで、next_rのノード数が2つ以上であるか、next_rが全て項目名である場合(ステップS204a、true)、直交表取得部206は、pairに、親を対象ノード、子をnext_r、方向を横とする論理関係を追加する(ステップS205a)。   Here, when the number of nodes of next_r is two or more, or when next_r is all item names (step S204a, true), the orthogonal table acquisition unit 206 sets the parent as the target node, the child as the next_r, and the direction. Is added to the side (step S205a).

そして、直交表取得部206は、next_rに含まれるノードのそれぞれ(crt)について、横表論理関係取得処理を再帰的に行う(ステップS206a、S208a)。直交表取得部206は、pairに項目名および項目値の論理関係群を格納し、Gに様式グラフを格納し、対象ノードをcrtに置き換える(ステップS207a)。そして、直交表取得部206は、ステップS203aに戻り、next_rに対象ノードの右隣にあるノード集合を格納する。   Then, the orthogonal table acquisition unit 206 recursively performs a horizontal table logical relationship acquisition process for each node (crt) included in next_r (steps S206a and S208a). The orthogonal table acquisition unit 206 stores the logical relationship group of the item name and item value in the pair, stores the style graph in G, and replaces the target node with crt (step S207a). Then, the orthogonal table acquisition unit 206 returns to step S203a, and stores the node set on the right side of the target node in next_r.

また、next_rのノード数が2つ以上でなく、かつ、next_rのいずれかが項目名でない場合(ステップS204a、false)、直交表取得部206は、対象ノードの右側のノード集合をrightsに格納する(ステップS209a)。そして、直交表取得部206は、pairに、親を対象ノード、子をrights、方向を横とする論理関係を追加する(ステップS210a)。直交表取得部206は、全ての対象ノードについて処理を行った後、論理関係集合(pair)を出力する(ステップS211a)。   If the number of nodes in next_r is not two or more and any of the next_r is not an item name (step S204a, false), the orthogonal table acquisition unit 206 stores the right node set of the target node in rights. (Step S209a). Then, the orthogonal table acquisition unit 206 adds a logical relationship in which the parent is the target node, the child is rights, and the direction is horizontal (step S210a). The orthogonal table acquisition unit 206 outputs the logical relation set (pair) after performing processing for all target nodes (step S211a).

ここで、図29を用いて、表整合部207の処理について説明する。図29は、表整合部の処理の流れを示すフローチャートである。表整合部207は、まず、様式グラフおよび表リストを読み込む(ステップS111)。次に、表整合部207は、表リストから、子のないノード群childrenを取得する(ステップS112)。そして、childrenに項目名が含まれている場合(ステップS113、true)、表整合部207は、当該表を表リストから削除する(ステップS114)。また、childrenに項目名が含まれていない場合(ステップS113、false)、表整合部207は、当該表を表リストに残す。   Here, the processing of the table matching unit 207 will be described with reference to FIG. FIG. 29 is a flowchart showing the flow of processing of the table matching unit. The table matching unit 207 first reads a style graph and a table list (step S111). Next, the table matching unit 207 acquires a node group children having no children from the table list (step S112). When the item name is included in the children (step S113, true), the table matching unit 207 deletes the table from the table list (step S114). If the item name is not included in the children (step S113, false), the table matching unit 207 leaves the table in the table list.

次に、図30を用いて、第1の削除部208の処理について説明する。図30は、第1の削除部の処理の流れを示すフローチャートである。まず、第1の削除部208は、様式グラフを読み込む(ステップS31b)。   Next, the processing of the first deletion unit 208 will be described with reference to FIG. FIG. 30 is a flowchart showing the flow of processing of the first deletion unit. First, the first deletion unit 208 reads a style graph (step S31b).

次に、第1の削除部208は、様式グラフの各ノードについて、以下の処理を行う(ステップS32b、S37b)。まず、左方向に隣接するノードの本数が2本以上である場合(ステップS33b、true)、第1の削除部208は、左方向に隣接するノードと対象ノードの隣接関係を削除する(ステップS34b)。また、左方向に隣接するノードの本数が2本以上でない場合(ステップS33b、false)、第1の削除部208は、隣接関係を削除しない。   Next, the first deletion unit 208 performs the following process for each node of the style graph (steps S32b and S37b). First, when the number of nodes adjacent in the left direction is two or more (step S33b, true), the first deletion unit 208 deletes the adjacent relationship between the node adjacent in the left direction and the target node (step S34b). ). If the number of nodes adjacent in the left direction is not two or more (step S33b, false), the first deletion unit 208 does not delete the adjacent relationship.

次に、上方向に隣接するノードの本数が2本以上である場合(ステップS35b、true)、第1の削除部208は、上方向に隣接するノードと対象ノードの隣接関係を削除する(ステップS36b)。また、上方向に隣接するノードの本数が2本以上でない場合(ステップS35b、false)、第1の削除部208は、隣接関係を削除しない。第1の削除部208は、全ての対象ノードについて処理を行った後、様式グラフを出力する(ステップS38b)。   Next, when the number of nodes adjacent in the upward direction is two or more (step S35b, true), the first deletion unit 208 deletes the adjacent relationship between the node adjacent in the upward direction and the target node (step S35b). S36b). If the number of nodes adjacent in the upward direction is not two or more (step S35b, false), the first deletion unit 208 does not delete the adjacent relationship. The 1st deletion part 208 outputs a style graph, after processing about all object nodes (Step S38b).

次に、図31を用いて、第2の削除部209の処理について説明する。図31は、第2の削除部の処理の流れを示すフローチャートである。まず、第2の削除部209は、様式グラフおよび項目名ノードリストを読み込む(ステップS41b)。なお、項目名ノードリストは、抽出部201によって抽出された項目名ノードのリストである。   Next, the process of the second deletion unit 209 will be described with reference to FIG. FIG. 31 is a flowchart showing the flow of processing of the second deletion unit. First, the second deletion unit 209 reads the style graph and the item name node list (step S41b). The item name node list is a list of item name nodes extracted by the extraction unit 201.

次に、第2の削除部209は、項目名ノードのリストの各項目名ノードについて、以下の処理を行う(ステップS42b、S47b)。まず、左方向に項目値ノードが隣接する場合(ステップS43b、true)、第2の削除部209は、左方向に隣接するノードと対象ノードの隣接関係を削除する(ステップS44b)。また、左方向に項目値ノードが隣接しない場合(ステップS43b、false)、第2の削除部209は、隣接関係を削除しない。   Next, the second deletion unit 209 performs the following processing for each item name node in the list of item name nodes (steps S42b and S47b). First, when the item value node is adjacent in the left direction (step S43b, true), the second deletion unit 209 deletes the adjacent relationship between the node adjacent in the left direction and the target node (step S44b). When the item value node is not adjacent in the left direction (step S43b, false), the second deletion unit 209 does not delete the adjacent relationship.

次に、上方向に項目値ノードが隣接する場合(ステップS45b、true)、第2の削除部209は、上方向に隣接するノードと対象ノードの隣接関係を削除する(ステップS46b)。また、上方向に項目値ノードが隣接しない場合(ステップS45b、false)、第2の削除部209は、隣接関係を削除しない。第2の削除部209は、全ての対象ノードについて処理を行った後、様式グラフを出力する(ステップS48b)。   Next, when the item value node is adjacent in the upward direction (step S45b, true), the second deletion unit 209 deletes the adjacent relationship between the node adjacent in the upward direction and the target node (step S46b). If the item value node is not adjacent in the upward direction (step S45b, false), the second deletion unit 209 does not delete the adjacent relationship. The 2nd deletion part 209 outputs a style graph, after processing about all object nodes (Step S48b).

次に、図32を用いて、列挙分類部210の処理について説明する。図32は、列挙分類部の処理の流れを示すフローチャートである。以後、対象ノードから右側に隣接しているノードを辿って得られるノードとの関係を「右側に接続する」、対象ノードから下側に隣接しているノードを辿って得られるノードとの関係を「下側に接続する」と呼ぶ。図32に示すように、まず、列挙分類部210は、様式グラフおよび対象ノードを読み込む(ステップS51b)。ここで、対象ノードが項目名でない場合(ステップS52b、true)、列挙分類部210は、列挙フラグを「列挙なし」に設定する(ステップS58b)。なお、列挙フラグは、各対象ノードの分類を「縦列挙」、「横列挙」および「列挙なし」のうちのいずれかで示す変数である。また、列挙には、縦列挙と横列挙の複合型や、列挙入れ子構造も存在するが、これらの列挙は、縦列挙および横列挙の組み合わせで表現することができる。   Next, processing of the enumeration classification unit 210 will be described with reference to FIG. FIG. 32 is a flowchart showing the flow of processing of the enumeration classification unit. From now on, the relationship with the node obtained by tracing the node adjacent to the right side from the target node is “connected to the right side”, and the relationship with the node obtained by tracing the node adjacent to the lower side from the target node Called “connect to the bottom”. As shown in FIG. 32, first, the enumeration classification unit 210 reads a style graph and a target node (step S51b). If the target node is not an item name (step S52b, true), the enumeration classification unit 210 sets the enumeration flag to “no enumeration” (step S58b). The enumeration flag is a variable indicating the classification of each target node as one of “vertical enumeration”, “horizontal enumeration”, and “no enumeration”. In addition, the enumeration includes a composite type of vertical enumeration and horizontal enumeration, and an enumeration nested structure. These enumerations can be expressed by a combination of vertical enumeration and horizontal enumeration.

また、対象ノードが項目名である場合(ステップS51b、false)、列挙分類部210は、対象ノードの下側に接続するノード群をbottomsに格納し、対象ノードの右側に接続するノード群をrightsに格納する(ステップS53b)。   When the target node is an item name (step S51b, false), the enumeration classification unit 210 stores a node group connected to the lower side of the target node in bottoms, and sets the node group connected to the right side of the target node to the rights. (Step S53b).

ここで、rightsに項目名が含まれず、rightsの個数が1である場合(ステップS54b、true)、列挙分類部210は、列挙フラグを「横列挙」に設定する(ステップS55b)。また、rightsに項目名が含まれる場合、またはrightsの個数が1でない場合(ステップS54b、false)、列挙分類部210は、以下の処理を行う。   Here, when the item name is not included in rights and the number of rights is 1 (step S54b, true), the enumeration classification unit 210 sets the enumeration flag to “horizontal enumeration” (step S55b). When the item name is included in rights, or when the number of rights is not 1 (step S54b, false), the enumeration classification unit 210 performs the following processing.

bottomsに項目名が含まれず、bottomsの個数が1である場合(ステップS56b、true)、列挙分類部210は、列挙フラグを「縦列挙」に設定する(ステップS57b)。bottomsに項目名が含まれる場合、または、bottomsの個数が1でない場合(ステップS56b、false)、列挙分類部210は、列挙フラグを「列挙なし」に設定する(ステップS58b)。最後に、列挙分類部210は、列挙フラグを出力する(ステップS59b)。   When the item name is not included in bottoms and the number of bottoms is 1 (step S56b, true), the enumeration classification unit 210 sets the enumeration flag to “vertical enumeration” (step S57b). When the item name is included in bottoms, or when the number of bottoms is not 1 (step S56b, false), the enumeration classification unit 210 sets the enumeration flag to “no enumeration” (step S58b). Finally, the enumeration classification unit 210 outputs an enumeration flag (step S59b).

次に、図33を用いて、縦列挙取得部211の処理について説明する。図33は、縦列挙取得部の処理の流れを示すフローチャートである。図33に示すように、まず、縦列挙取得部211は、様式グラフおよび対象ノードを読み込む(ステップS61b)。次に、縦列挙取得部211は、bottomsに対象ノードの下側に接続するノード群を格納する(ステップS62b)。ここで、bottomsに項目名が含まれている場合(ステップS63b、true)、縦列挙取得部211は、処理を終了する。また、bottomsに項目名が含まれていない場合(ステップS63b、false)、縦列挙取得部211は、親を対象ノード、子をbottoms、方向を縦とする論理関係を取得する(ステップS64b)。そして、縦列挙取得部211は、取得した論理関係を列挙リスト302に追加する(ステップS65b)。   Next, the processing of the vertical enumeration acquisition unit 211 will be described with reference to FIG. FIG. 33 is a flowchart showing the flow of processing of the vertical enumeration acquisition unit. As shown in FIG. 33, first, the vertical enumeration acquiring unit 211 reads a style graph and a target node (step S61b). Next, the vertical enumeration acquiring unit 211 stores a node group connected to the lower side of the target node in bottoms (step S62b). Here, when the item name is included in bottoms (step S63b, true), the vertical enumeration acquiring unit 211 ends the process. If the item name is not included in bottoms (step S63b, false), the vertical enumeration acquiring unit 211 acquires a logical relationship in which the parent is the target node, the child is bottoms, and the direction is vertical (step S64b). Then, the vertical enumeration acquisition unit 211 adds the acquired logical relationship to the enumeration list 302 (step S65b).

次に、図34を用いて、横列挙取得部212の処理について説明する。図34は、横列挙取得部の処理の流れを示すフローチャートである。図34に示すように、まず、横列挙取得部212は、様式グラフおよび対象ノードを読み込む(ステップS71b)。次に、横列挙取得部212は、rightsに対象ノードの右側に接続するノード群を格納する(ステップS72b)。ここで、rightsに項目名が含まれている場合(ステップS73、true)、横列挙取得部212は、処理を終了する。また、rightsに項目名が含まれていない場合(ステップS73b、false)、横列挙取得部212bは、親を対象ノード、子をrights、方向を横とする論理関係を取得する(ステップS74b)。そして、横列挙取得部212は、取得した論理関係を列挙リスト302に追加する(ステップS75b)。   Next, the process of the horizontal enumeration acquisition unit 212 will be described with reference to FIG. FIG. 34 is a flowchart illustrating a process flow of the horizontal enumeration acquisition unit. As shown in FIG. 34, the horizontal enumeration obtaining unit 212 first reads the style graph and the target node (step S71b). Next, the horizontal enumeration acquisition unit 212 stores a node group connected to the right side of the target node in rights (step S72b). If the item name is included in rights (step S73, true), the horizontal enumeration acquisition unit 212 ends the process. If the item name is not included in rights (step S73b, false), the horizontal enumeration acquisition unit 212b acquires a logical relationship in which the parent is the target node, the child is rights, and the direction is horizontal (step S74b). Then, the horizontal enumeration acquisition unit 212 adds the acquired logical relationship to the enumeration list 302 (step S75b).

次に、図35を用いて、包含関係取得部214の処理について説明する。図35は、包含関係取得部の処理の流れを示すフローチャートである。包含関係取得部214は、まず、様式グラフを読み込む(ステップS81b)。   Next, processing of the inclusion relationship acquisition unit 214 will be described using FIG. FIG. 35 is a flowchart illustrating a process flow of the inclusion relationship acquisition unit. The inclusion relationship acquisition unit 214 first reads a style graph (step S81b).

ここで、包含関係取得部214は、様式グラフに含まれる各ノードについて、以下の処理を行う(ステップS82b、S87b)。まず、ノード自身が項目名、かつ右方向に隣接するノードに項目名のノードを含む場合(ステップS83b、true)、包含関係取得部214は、右側の包含関係を取得する(ステップS84b)。右側の包含関係を取得する処理の詳細については後述する。また、ノード自身が項目名でない場合、または右方向に隣接するノードに項目名のノードを含まない場合(ステップS83b、false)、包含関係取得部214は、右側の包含関係を取得しない。   Here, the inclusion relationship acquisition unit 214 performs the following processing for each node included in the style graph (steps S82b and S87b). First, when the node itself includes the item name and the node of the item name in the node adjacent to the right (step S83b, true), the inclusion relationship acquisition unit 214 acquires the right inclusion relationship (step S84b). Details of the process of acquiring the right inclusion relationship will be described later. Also, if the node itself is not an item name, or if the node adjacent to the right direction does not include the item name node (step S83b, false), the inclusion relationship acquisition unit 214 does not acquire the right inclusion relationship.

次に、ノード自身が項目名、かつ下方向に隣接するノードに項目名のノードを含む場合(ステップS85b、true)、包含関係取得部214は、下側の包含関係を取得する(ステップS86b)。下側の包含関係を取得する処理の詳細については後述する。また、ノード自身が項目名でない場合、または下方向に隣接するノードに項目名のノードを含まない場合(ステップS85b、false)、包含関係取得部214は、下側の包含関係を取得しない。包含関係取得部214は、全てのノードについて処理を行った後、取得した包含関係を包含関係リストとして出力する(ステップS88b)。   Next, when the node itself includes the item name and the node of the item name in the node adjacent in the downward direction (step S85b, true), the inclusion relationship acquisition unit 214 acquires the lower inclusion relationship (step S86b). . Details of the process of acquiring the lower inclusion relationship will be described later. If the node itself is not an item name, or if the node adjacent to the downward direction does not include the item name node (step S85b, false), the inclusion relationship acquisition unit 214 does not acquire the lower inclusion relationship. The inclusion relationship acquisition unit 214 processes all the nodes, and then outputs the acquired inclusion relationship as an inclusion relationship list (step S88b).

次に、図36を用いて、右側の包含関係を取得する処理について説明する。図36は、右側の包含関係を取得する処理の流れを示すフローチャートである。図36に示すように、まず、包含関係取得部214は、対象ノードおよび様式グラフを読み込む(ステップS101b)。次に、包含関係取得部214は、min_yに、対象ノードの右側にあるノード群のy座標の最小値を格納し、max_yに、対象ノードの右側にあるノード群のy座標の最大値を格納する(ステップS102b)。   Next, processing for acquiring the right inclusion relationship will be described with reference to FIG. FIG. 36 is a flowchart showing the flow of processing for acquiring the right inclusion relationship. As shown in FIG. 36, first, the inclusion relationship acquisition unit 214 reads the target node and the style graph (step S101b). Next, the inclusion relationship acquisition unit 214 stores the minimum value of the y coordinate of the node group on the right side of the target node in min_y, and stores the maximum value of the y coordinate of the node group on the right side of the target node in min_y. (Step S102b).

ここで、対象ノードのy座標の範囲が対象ノードの右側のノード群のy座標の範囲と一致する場合(ステップS103b、true)、包含関係取得部214は、listに、対象ノードの右側のノード群を格納する(ステップS107b)。なお、包含関係取得部214は、対象ノードの右側のノード群のy座標の範囲を、min_yおよびmax_yを用いて計算する。そして、包含関係取得部214は、listに含まれるノードそれぞれについて以下の処理を行う(ステップS108b、S110b)。包含関係取得部214は、それぞれのノードrを対象ノードとするたびに、ステップS102bに戻り再帰処理を実行する(ステップS109b)。   If the y-coordinate range of the target node matches the y-coordinate range of the right node group of the target node (step S103b, true), the inclusion relationship acquisition unit 214 sets the list to the right node of the target node. The group is stored (step S107b). The inclusion relationship acquisition unit 214 calculates the y-coordinate range of the node group on the right side of the target node using min_y and max_y. Then, the inclusion relationship acquisition unit 214 performs the following processing for each node included in the list (steps S108b and S110b). The inclusion relationship acquisition unit 214 returns to step S102b and executes recursion processing every time each node r is set as a target node (step S109b).

また、対象ノードのy座標の範囲が対象ノードの右側のノード群のy座標の範囲と一致しない場合(ステップS103b、false)であって、包含するノードの中に項目値が含まれない場合(ステップS104b、false)、包含関係取得部214は、右側に包含する従のノード集合(list)を初期化する(ステップS105b)。また、包含するノードの中に項目値が含まれる場合(ステップS104b、true)、包含関係取得部214は、初期化を行わない。最後に、包含関係取得部214は、listを出力する(ステップS106b)。   Further, when the y-coordinate range of the target node does not match the y-coordinate range of the right node group of the target node (step S103b, false), and the item value is not included in the included node ( In step S104b, false), the inclusion relationship acquisition unit 214 initializes the slave node set (list) included on the right side (step S105b). In addition, when the item value is included in the included node (step S104b, true), the inclusion relationship acquisition unit 214 does not perform initialization. Finally, the inclusion relationship acquisition unit 214 outputs list (step S106b).

次に、図37を用いて、下側の包含関係を取得する処理について説明する。図37は、下側の包含関係を取得する処理の流れを示すフローチャートである。図37に示すように、まず、包含関係取得部214は、対象ノードおよび様式グラフを読み込む(ステップS151b)。次に、包含関係取得部214は、min_xに、対象ノードの下側にあるノード群のx座標の最小値を格納し、max_xに、対象ノードの下側にあるノード群のx座標の最大値を格納する(ステップS152b)。   Next, processing for obtaining the lower inclusion relationship will be described with reference to FIG. FIG. 37 is a flowchart showing a flow of processing for acquiring the lower inclusion relationship. As shown in FIG. 37, first, the inclusion relationship acquisition unit 214 reads the target node and the style graph (step S151b). Next, the inclusion relationship acquisition unit 214 stores the minimum value of the x coordinate of the node group below the target node in min_x, and the maximum value of the x coordinate of the node group below the target node in max_x. Is stored (step S152b).

ここで、対象ノードのx座標の範囲が対象ノードの下側のノード群のx座標の範囲と一致する場合(ステップS153b、true)、包含関係取得部214は、listに、対象ノードの下側のノード群を格納する(ステップS157b)。なお、包含関係取得部214は、対象ノードの下側のノード群のx座標の範囲を、min_xおよびmax_xを用いて計算する。そして、包含関係取得部214は、listに含まれるノードそれぞれについて以下の処理を行う(ステップS158b、S160b)。包含関係取得部214は、それぞれのノードbを対象ノードとするたびに、ステップS152bに戻り再帰処理を実行する(ステップS159b)。   Here, when the x-coordinate range of the target node matches the x-coordinate range of the lower node group of the target node (step S153b, true), the inclusion relationship acquisition unit 214 sets the lower side of the target node to the list. Are stored (step S157b). The inclusion relationship acquisition unit 214 calculates the x-coordinate range of the lower node group of the target node using min_x and max_x. Then, the inclusion relationship acquisition unit 214 performs the following processing for each node included in the list (steps S158b and S160b). The inclusion relationship acquisition unit 214 returns to step S152b and executes recursion processing every time each node b is set as a target node (step S159b).

また、対象ノードのx座標の範囲が対象ノードの下側のノード群のx座標の範囲と一致しない場合(ステップS153b、false)であって、包含するノードの中に項目値が含まれない場合(ステップS154b、false)、包含関係取得部214は、下側に包含する従のノード集合(list)を初期化する(ステップS155b)。また、包含するノードの中に項目値が含まれる場合(ステップS154b、true)、包含関係取得部214は、初期化を行わない。最後に、包含関係取得部214は、listを出力する(ステップS156b)。   Also, when the x-coordinate range of the target node does not match the x-coordinate range of the lower node group of the target node (step S153b, false), and the item value is not included in the included node (Step S154b, false), the inclusion relationship acquisition unit 214 initializes a slave node set (list) included in the lower side (Step S155b). In addition, when the item value is included in the included node (step S154b, true), the inclusion relationship acquisition unit 214 does not perform initialization. Finally, the inclusion relationship acquisition unit 214 outputs list (step S156b).

次に、図38を用いて、包含グラフ生成部215の処理について説明する。図38は、包含グラフ生成部の処理の流れを示すフローチャートである。図38に示すように、まず、包含グラフ生成部215は、様式グラフおよび包含関係リストを読み込む(ステップS201b)。次に、包含グラフ生成部215は、Nvに、包含関係リストから取得した縦方向の包含ノードを格納し、Nhに、包含関係リストから取得した横方向の包含ノードを格納し、IGに、新規包含グラフ集合を格納する(ステップS202b)。   Next, processing of the inclusion graph generation unit 215 will be described with reference to FIG. FIG. 38 is a flowchart showing the flow of processing of the inclusion graph generation unit. As shown in FIG. 38, first, the inclusion graph generation unit 215 reads the style graph and the inclusion relation list (step S201b). Next, the inclusion graph generation unit 215 stores the vertical inclusion node acquired from the inclusion relation list in Nv, stores the horizontal inclusion node acquired from the inclusion relation list in Nh, and stores the new inclusion in IG. The inclusion graph set is stored (step S202b).

ここで、包含グラフ生成部215は、NvおよびNhに含まれる各包含ノードiについて、以下の処理を行う(ステップS203b、S213b)。以後、他のノードの包含関係から、包含グラフに対象ノードが既に割り当てられている場合、対象ノードを「分割済みのノード」と呼ぶ。まず、包含ノードiが分割済みである場合(ステップS204b、true)、包含グラフ生成部215は、次の包含ノードの処理に進む。また、包含ノードiが分割済みでない場合(ステップS204b、false)、包含グラフ生成部215は、incに包含ノードiおよび従の項目名ノード集合を格納する(ステップS205b)。   Here, the inclusion graph generation unit 215 performs the following processing for each inclusion node i included in Nv and Nh (steps S203b and S213b). Hereinafter, when the target node is already assigned to the inclusion graph due to the inclusion relationship of other nodes, the target node is referred to as a “divided node”. First, when the inclusion node i has been divided (step S204b, true), the inclusion graph generation unit 215 proceeds to processing of the next inclusion node. If the inclusion node i has not been divided (step S204b, false), the inclusion graph generation unit 215 stores the inclusion node i and the subordinate item name node set in inc (step S205b).

ここで、incの中で分割済みのノードがある場合(ステップS206b、true)、包含グラフ生成部215は、生成済包含グラフから従のノードが重なっているグラフを探し、当該包含ノードをnに格納する(ステップS207b)。次に、包含グラフ生成部215は、包含ノードnを起点とする包含グラフ内にあるノードに追加されていないノード群を追加する(ステップS208b)。そして、包含グラフ生成部215は、包含ノードの包含する方向、または項目名の並びから包含方向を設定する(ステップS209b)。   Here, when there is a divided node in inc (step S206b, true), the inclusion graph generation unit 215 searches the generated inclusion graph for a graph in which a slave node overlaps, and sets the inclusion node to n. Store (step S207b). Next, the inclusion graph generation unit 215 adds a node group that has not been added to the nodes in the inclusion graph starting from the inclusion node n (step S208b). Then, the inclusion graph generation unit 215 sets the inclusion direction from the inclusion node's inclusion direction or the list of item names (step S209b).

一方、incの中で分割済みのノードがない場合(ステップS206b、false)、包含グラフ生成部215は、新規包含グラフを生成する(ステップS210b)。そして、包含グラフ生成部215は、主のノードが包含する方向、または項目名の並びから包含方向を設定し(ステップS211b)、新規包含グラフを包含グラフ集合IGに追加する(ステップS212b)。包含グラフ生成部215は、全てのiについて処理を行った後、包含グラフ集合IGを出力する(ステップS214b)。   On the other hand, when there is no divided node in inc (step S206b, false), the inclusion graph generation unit 215 generates a new inclusion graph (step S210b). Then, the inclusion graph generation unit 215 sets the inclusion direction from the direction included in the main node or the list of item names (step S211b), and adds a new inclusion graph to the inclusion graph set IG (step S212b). The inclusion graph generation unit 215 outputs the inclusion graph set IG after processing all i (Step S214b).

このように、包含グラフ生成部215は、包含関係のあるノードのうち、包含するノードの数が多いものを優先して処理していく。包含グラフ生成部215は、まず、様式グラフ内の全ての包含関係を取得し、包含方向にノードを探索していく。   As described above, the inclusion graph generation unit 215 preferentially processes a node having a large number of included nodes among nodes having an inclusion relationship. The inclusion graph generation unit 215 first acquires all inclusion relations in the style graph and searches for nodes in the inclusion direction.

ここで、図39を用いて、列挙整合部213の処理について説明する。図39は、列挙整合部の処理の流れを示すフローチャートである。図39に示すように、列挙整合部213は、まず、様式グラフおよび列挙リストを読み込む(ステップS121)。次に、表リスト内に列挙リストの論理関係が含まれる場合(ステップS122、true)、当該列挙リストを削除する(ステップS123)。   Here, the processing of the enumeration matching unit 213 will be described with reference to FIG. FIG. 39 is a flowchart showing the flow of processing of the enumeration matching unit. As shown in FIG. 39, the enumeration matching unit 213 first reads a style graph and an enumeration list (step S121). Next, when the logical relationship of the enumeration list is included in the table list (step S122, true), the enumeration list is deleted (step S123).

次に、図40を用いて、項目名間合成部216の処理について説明する。図40は、項目名間合成部の処理の流れを示すフローチャートである。図40に示すように、まず、項目名間合成部216は、様式グラフ、包含グラフ303、表リスト301、列挙リスト302および始点ノード群を読み込む(ステップS301b)。次に、項目名間合成部216は、新規木構造Tを生成する(ステップS302b)。なお、始点ノード群は、包含グラフの起点となるノードの集合である。   Next, processing of the item name synthesizing unit 216 will be described with reference to FIG. FIG. 40 is a flowchart showing the flow of processing of the item name synthesizing unit. As shown in FIG. 40, first, the item name synthesizing unit 216 reads the style graph, the inclusion graph 303, the table list 301, the enumeration list 302, and the start point node group (step S301b). Next, the item name synthesizing unit 216 generates a new tree structure T (step S302b). The starting point node group is a set of nodes that are the starting points of the inclusion graph.

ここで、項目名間合成部216は、始点ノード群に含まれる各始点ノードについて、以下の処理を行う(ステップS303b、S319b)。まず、項目名間合成部216は、包含グラフからノードが項目名のノード群を求め、childrenに格納する(ステップS304b)。次に、項目名間合成部216は、子をchildren、親をなしとする始点ノード用の新規木ノードtを生成する(ステップS305b)。そして、項目名間合成部216は、対象木ノードをtとする(ステップS306b)。そして、項目名間合成部216は、対象木ノードの種類を設定せずに木構造に追加する(ステップS307b)。   Here, the item name synthesizing unit 216 performs the following processing for each start point node included in the start point node group (steps S303b and S319b). First, the item name synthesizing unit 216 obtains a node group whose node is the item name from the inclusion graph, and stores it in the children (step S304b). Next, the item name synthesizing unit 216 generates a new tree node t for the start point node whose child is child and whose parent is none (step S305b). The item name synthesizing unit 216 sets the target tree node to t (step S306b). Then, the item name synthesizing unit 216 adds to the tree structure without setting the type of the target tree node (step S307b).

ここで、対象木ノードが表リスト、または列挙リストにある場合(ステップS308b、false)、項目名間合成部216は、次の始点ノードの処理に移行する。対象木ノードが列挙リストにない場合(ステップS308b、true)であって、さらに、対象木ノードが横方向に包含するノード集合が存在する場合(ステップS309b、true)、項目名間合成部216は、対象木ノードの種類を包含に設定する(ステップS310b)。そして、項目名間合成部216は、横に包含するノード集合の次のノードを対象木ノードとし、ステップS307bへ戻り、再帰処理を行う(ステップS311b、S312b、S313b)。   Here, when the target tree node is in the table list or the enumeration list (step S308b, false), the item name synthesizing unit 216 proceeds to the processing of the next start point node. When the target tree node is not in the enumeration list (step S308b, true) and there is a node set that the target tree node includes in the horizontal direction (step S309b, true), the inter-item name composition unit 216 The type of the target tree node is set to inclusion (step S310b). Then, the item name synthesizing unit 216 sets the next node in the horizontally included node set as the target tree node, returns to step S307b, and performs recursive processing (steps S311b, S312b, and S313b).

対象木ノードが表リスト、または列挙リストにない場合(ステップS308b、true)であって、さらに、対象木ノードが横方向に包含するノード集合が存在せず(ステップS309b、false)、対象木ノードが縦方向に包含するノード集合が存在する場合(ステップS314b、true)、項目名間合成部216は、対象木ノードの種類を包含に設定する(ステップS315b)。そして、項目名間合成部216は、縦に包含するノード集合の次のノードを対象木ノードとし、ステップS307bへ戻り、再帰処理を行う(ステップS316b、S317b、S318b)。項目名間合成部216は、全ての始点ノードについて処理を行った後、木構造データを出力する(ステップS320b)。   If the target tree node is not in the table list or the enumeration list (step S308b, true), and there is no node set that the target tree node includes in the horizontal direction (step S309b, false), the target tree node If there is a node set included in the vertical direction (step S314b, true), the item name name synthesizing unit 216 sets the type of the target tree node to include (step S315b). Then, the item name synthesizing unit 216 sets the next node of the vertically included node set as the target tree node, returns to step S307b, and performs recursive processing (steps S316b, S317b, and S318b). The item name synthesizing unit 216 performs processing on all the start point nodes, and then outputs tree structure data (step S320b).

なお、対象木ノードが列挙リストにない場合(ステップS308b、true)であって、さらに、対象木ノードが横方向に包含するノード集合が存在せず(ステップS309b、false)、対象木ノードが縦方向に包含するノード集合が存在しない場合(ステップS314b、false)、項目名間合成部216は、次の始点ノードの処理に移行する。   When the target tree node is not in the enumeration list (step S308b, true), there is no node set that the target tree node includes in the horizontal direction (step S309b, false), and the target tree node is vertical. If there is no node set included in the direction (step S314b, false), the inter-name-name composition unit 216 proceeds to processing of the next start point node.

次に、図41を用いて、表合成部217の処理について説明する。図41は、表合成部の処理の流れを示すフローチャートである。まず、表合成部217は、様式グラフおよび表リスト301を読み込む(ステップS301a)。次に、表合成部217は、新規木構造を生成する(ステップS302a)。そして、表合成部217は、表リストから先祖(親なしのノード)を取得する(ステップS303a)。   Next, processing of the table synthesis unit 217 will be described with reference to FIG. FIG. 41 is a flowchart showing a process flow of the table synthesis unit. First, the table synthesis unit 217 reads the style graph and the table list 301 (step S301a). Next, the table composition unit 217 generates a new tree structure (step S302a). Then, the table synthesizing unit 217 acquires an ancestor (parentless node) from the table list (step S303a).

ここで、表合成部217は、表リストに含まれる各ノードについて、以下の処理を行う(ステップS304a、S310a)。まず、表合成部217は、新規木ノードを生成する(ステップS305a)。次に、表合成部217は、表リストからノードの親を探索し木ノードの親に設定し、親がなければ木ノードを空とする(ステップS306a)。そして、表合成部217は、木ノードの子を、表リストの子に設定する(ステップS307a)。そして、表合成部217は、木ノードの種類を表に設定する(ステップS308a)。そして、表合成部217は、木ノードを木構造に合成する(ステップS309a)。最後に、表リストの各ノードについて処理が終わると、表合成部217は、木構造データを出力する(ステップS311a)。   Here, the table synthesizing unit 217 performs the following processing for each node included in the table list (steps S304a and S310a). First, the table synthesis unit 217 generates a new tree node (step S305a). Next, the table synthesizing unit 217 searches for the parent of the node from the table list and sets it as the parent of the tree node. If there is no parent, the table node is emptied (step S306a). Then, the table composition unit 217 sets the child of the tree node as the child of the table list (step S307a). Then, the table composition unit 217 sets the tree node type in the table (step S308a). The table synthesis unit 217 then synthesizes the tree node into a tree structure (step S309a). Finally, when processing is completed for each node in the table list, the table synthesis unit 217 outputs tree structure data (step S311a).

次に、図42を用いて、列挙合成部218の処理について説明する。図42は、列挙合成部の処理の流れを示すフローチャートである。図42に示すように、列挙合成部218は、まず、様式グラフ、列挙リスト302および木構造データを読み込む(ステップS341b)。   Next, processing of the enumeration synthesis unit 218 will be described with reference to FIG. FIG. 42 is a flowchart showing the flow of processing of the enumeration synthesis unit. As shown in FIG. 42, the enumeration synthesis unit 218 first reads the style graph, the enumeration list 302, and the tree structure data (step S341b).

そして、列挙合成部218は、列挙リスト302の各ノードごとに以下の処理を行う(ステップS342b、S347b)。まず、列挙合成部218は、新規木ノードを生成する(ステップS343b)。次に、列挙合成部218は、木ノードの子を列挙リストの子に設定する(ステップS344b)。そして、列挙合成部218は、木ノードの種類を列挙に設定し(ステップS345b)、木構造データに合成する(ステップS346b)。列挙合成部218は、以上の処理を全てのノードについて行った後、木構造データを出力する(ステップS348b)。   Then, the enumeration synthesis unit 218 performs the following processing for each node of the enumeration list 302 (steps S342b and S347b). First, the enumeration synthesis unit 218 generates a new tree node (step S343b). Next, the enumeration composition unit 218 sets the children of the tree node as children of the enumeration list (step S344b). Then, the enumeration synthesis unit 218 sets the tree node type to enumeration (step S345b), and synthesizes the tree node data with the tree structure data (step S346b). The enumeration synthesis unit 218 outputs the tree structure data after performing the above processing for all the nodes (step S348b).

次に、図43を用いて、追加部219の処理について説明する。図43は、追加部の処理の流れを示すフローチャートである。図43に示すように、まず、追加部219は、様式グラフおよび木構造データを読み込み、Sに木構造データを格納し、Gに様式グラフを格納する(ステップS131)。次に、追加部219は、ndsに親なしのノード集合を格納し、strに任意の文字列を格納する(ステップS132)。ここで、追加部219は、ndsの左または上方向にある罫線枠外の文字列が取得できれば、取得した文字列をstrに格納する(ステップS133)。   Next, processing of the adding unit 219 will be described with reference to FIG. FIG. 43 is a flowchart showing the flow of processing of the adding unit. As shown in FIG. 43, the adding unit 219 first reads the style graph and tree structure data, stores the tree structure data in S, and stores the style graph in G (step S131). Next, the adding unit 219 stores a parentless node set in nds and an arbitrary character string in str (step S132). Here, if the character string outside the ruled line frame in the left or upward direction of nds can be acquired, the adding unit 219 stores the acquired character string in str (step S133).

罫線枠外の文字列が発見されなかった場合(ステップS134、false)、追加部219は、strに格納した任意の文字列を有し、種類を様式とする木ノードをndsの親として木構造データに追加する(ステップS135)。また、罫線枠外の文字列が発見された場合(ステップS134、true)、追加部219は、strに格納した任意の文字列を有し、種類を様式とする木ノードをndsの親として木構造データに追加する(ステップS136)。最後に、追加部219は、木構造データを出力する(ステップS137)。   When a character string outside the ruled line frame is not found (step S134, false), the adding unit 219 uses the tree node having an arbitrary character string stored in str and having a type as a style as a parent of nds. (Step S135). When a character string outside the ruled line frame is found (step S134, true), the adding unit 219 has an arbitrary character string stored in str and uses a tree node whose type is a style as a parent of nds. It adds to data (step S136). Finally, the adding unit 219 outputs tree structure data (step S137).

なお、任意の文字列としては、form#(i)のように、カウントに合わせて文字列が変わるようにしてもよい。この場合、(i)の部分がカウントに合わせて変化するため、根ノードの文字列は「form1」、「form2」のようになる。また、表の左または上方向の罫線枠外に、「○○直交表」のような記載があれば、根ノードの文字列を「○○直交表」のようにしてもよい。   In addition, as an arbitrary character string, the character string may be changed in accordance with the count as in form # (i). In this case, since the part (i) changes in accordance with the count, the character string of the root node becomes “form1”, “form2”. Further, if there is a description such as “XX orthogonal table” outside the left or upper ruled line frame of the table, the character string of the root node may be set as “XX orthogonal table”.

[第1の実施形態の効果]
抽出部201は、帳票の項目名または項目値を表す領域に関する情報をノードとして表し、ノード間の隣接関係をエッジとして表したグラフを基に、ノードのうち、あらかじめ設定された条件を満たすノードを、項目名を表す領域のノードである項目名ノードとして抽出する。表分類部203は、エッジを基に、項目名ノードから表の起点となるノードである起点ノードを抽出し、起点ノードを起点とした表を、上端と左端の両方に項目名が存在する直交表、上端に項目名が存在する縦表、および左端に項目名が存在する横表のうちのいずれかに分類する。
[Effect of the first embodiment]
The extraction unit 201 represents information related to the area representing the item name or item value of the form as a node, and based on the graph representing the adjacency relationship between the nodes as an edge, the node satisfying a preset condition is selected. , It is extracted as an item name node which is a node of the area representing the item name. Based on the edge, the table classification unit 203 extracts a starting node, which is a node that is a starting point of the table, from the item name node, and the table having the starting node as the starting point is orthogonal with the item names existing at both the upper end and the left end. The table is classified into one of a table, a vertical table in which the item name exists at the upper end, and a horizontal table in which the item name exists at the left end.

直交表取得部206は、直交表における項目名ノード間の縦方向の論理関係、直交表における項目名ノード間の横方向の論理関係、直交表における項目名ノードと項目名ノード以外のノードである項目値ノードとの間の縦方向の論理関係、および直交表における項目名ノードと項目値ノードとの間の横方向の論理関係を取得する。縦表取得部204は、縦表における項目名ノード間の縦方向の論理関係、および縦表における項目名ノードと項目値ノードとの間の縦方向の論理関係を取得する。横表取得部205は、横表における項目名ノード間の横方向の論理関係、および横表における項目名ノードと項目値ノードとの間の横方向の論理関係を取得する。また、表整合部207は、直交表、縦表および横表から、不整合な表であることを示す所定の条件を満たす表を除外した表を特定する。   The orthogonal table acquisition unit 206 is a vertical logical relationship between item name nodes in the orthogonal table, a horizontal logical relationship between item name nodes in the orthogonal table, and a node other than the item name node and the item name node in the orthogonal table. The vertical logical relationship between the item value nodes and the horizontal logical relationship between the item name node and the item value node in the orthogonal table are acquired. The vertical table acquisition unit 204 acquires a vertical logical relationship between item name nodes in the vertical table and a vertical logical relationship between item name nodes and item value nodes in the vertical table. The horizontal table acquisition unit 205 acquires a horizontal logical relationship between item name nodes in the horizontal table and a horizontal logical relationship between item name nodes and item value nodes in the horizontal table. In addition, the table matching unit 207 specifies a table that excludes a table that satisfies a predetermined condition indicating that it is an inconsistent table from the orthogonal table, the vertical table, and the horizontal table.

また、第1の削除部208は、1つのノードの所定の方向に、複数のノードが隣接している場合、1つのノードと複数のノードとの隣接関係を表すエッジを削除する。また、第2の削除部209は、項目名ノードのうち、所定の方向に項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、項目値ノードとの隣接関係を表すエッジを削除する。   In addition, when a plurality of nodes are adjacent to each other in a predetermined direction of one node, the first deletion unit 208 deletes an edge representing the adjacency relationship between the one node and the plurality of nodes. Also, the second deletion unit 209 determines the adjacency relationship between the item name node and the item value node adjacent to the item value node that is the node of the area representing the item value in a predetermined direction among the item name nodes. Delete the representing edge.

また、縦列挙取得部211および横列挙取得部212は、第1の削除部208および第2の削除部209によってエッジの削除が行われたグラフを基に、項目名ノードと項目値ノードとの間の論理関係を取得する。また、包含関係取得部214は、第1の削除部208によってエッジの削除が行われたグラフを基に、項目名ノード間の包含関係を取得する。   In addition, the vertical enumeration acquisition unit 211 and the horizontal enumeration acquisition unit 212, based on the graph in which the edge deletion is performed by the first deletion unit 208 and the second deletion unit 209, is performed between the item name node and the item value node. Get logical relationship between. The inclusion relationship acquisition unit 214 acquires the inclusion relationship between the item name nodes based on the graph in which the edge is deleted by the first deletion unit 208.

また、列挙整合部213は、縦列挙取得部211および横列挙取得部212によって取得された論理関係のうち、表リスト301に含まれるノードに関する論理関係を除外した合成対象の列挙に関する論理関係を特定する。   In addition, the enumeration matching unit 213 identifies the logical relationship related to the enumeration of the synthesis targets excluding the logical relationship related to the nodes included in the table list 301 among the logical relationships acquired by the vertical enumeration acquiring unit 211 and the horizontal enumeration acquiring unit 212. To do.

また、項目名間合成部216は、包含関係取得部214によって取得された包含関係のうち、合成対象の表に関する論理関係および合成対象の列挙に関する論理関係のいずれにも含まれない包含関係を基に木構造のデータを作成する。また、表合成部217は、合成対象の表に関する論理関係を基に木構造のデータを作成し、当該木構造のデータと項目名間合成部216によって作成された木構造のデータとを合成した木構造のデータを作成する。また、列挙合成部218は、合成対象の列挙に関する論理関係を基に木構造のデータを作成し、当該木構造のデータと表合成部217によって作成された木構造のデータとを合成した木構造のデータを作成する。   Further, the inter-item name composition unit 216 is based on the inclusion relationships that are not included in either the logical relationship related to the synthesis target table or the logical relationship related to the synthesis target enumeration among the inclusion relationships acquired by the inclusion relationship acquisition unit 214. Create tree structure data. Further, the table synthesis unit 217 creates tree structure data based on the logical relationship regarding the synthesis target table, and synthesizes the tree structure data and the tree structure data created by the item name synthesis unit 216. Create tree structure data. In addition, the enumeration synthesis unit 218 creates tree structure data based on the logical relationship regarding the enumeration of synthesis targets, and synthesizes the tree structure data and the tree structure data created by the table synthesis unit 217. Create data for.

このため、本実施形態によれば、帳票に縦表、横表、直交表または入れ子構造の直交表が含まれる場合であっても、帳票の項目名間の論理関係、および項目名と項目値との間の論理関係を正確に認識することができるようになる。さらに、本実施形態では、論理関係を半自動的に取得することができるため、帳票の半構造データの取得および活用を効率的に行うことができるようになる。   For this reason, according to this embodiment, even if the form includes a vertical table, a horizontal table, an orthogonal table, or a nested orthogonal table, the logical relationship between the item names of the form, and the item names and item values It becomes possible to accurately recognize the logical relationship between the two. Further, in the present embodiment, since the logical relationship can be acquired semi-automatically, it is possible to efficiently acquire and utilize the semi-structured data of the form.

また、本実施形態によれば、帳票に縦列挙、横列挙、縦列挙と横列挙の複合型、または列挙型入れ子構造が含まれる場合であっても、帳票の項目名間の論理関係、および項目名と項目値との間の論理関係を正確に認識することができるようになる。さらに、本実施形態では、論理関係を半自動的に取得することができるため、帳票の半構造データの取得および活用を効率的に行うことができるようになる。   Further, according to the present embodiment, even if the form includes a vertical enumeration, a horizontal enumeration, a combined type of vertical enumeration and horizontal enumeration, or an enumerated type nested structure, the logical relationship between the item names of the forms, and The logical relationship between the item name and the item value can be accurately recognized. Further, in the present embodiment, since the logical relationship can be acquired semi-automatically, it is possible to efficiently acquire and utilize the semi-structured data of the form.

さらに、本実施形態によれば、表整合部207および列挙整合部213による木構造データに含める論理関係の特定が行われるため、帳票の縦列挙、横列挙、縦列挙と横列挙の複合型、または入れ子構造型に縦列挙、横列挙、縦列挙と横列挙の複合型、縦表、横表、直交表、入れ子構造の縦表、入れ子構造の横表、入れ子構造の直交表が含まれる場合であっても、帳票の項目名間の論理関係、および項目名と項目値との間の論理関係を正確に認識することができる。   Further, according to the present embodiment, the logical relationship included in the tree structure data is specified by the table matching unit 207 and the enumeration matching unit 213, so that the vertical enumeration, horizontal enumeration, combined vertical enumeration and horizontal enumeration, Or when the nested structure type includes vertical enumeration, horizontal enumeration, vertical enumeration and horizontal enumeration, vertical table, horizontal table, orthogonal table, nested vertical table, nested horizontal table, nested orthogonal table Even so, it is possible to accurately recognize the logical relationship between the item names of the form and the logical relationship between the item name and the item value.

表分類部203は、起点ノードの右側に接続する第1のノード群が全て項目名かつ第1ノード群の高さが起点ノードの高さと同じであることである第1の条件、および、起点ノードの下側に接続する第2のノード群が全て項目名かつ第2ノード群の幅が起点ノードの幅と同じであることである第2の条件が満たされる場合、起点ノードを起点とする表を直交表に分類し、第1の条件が満たされ、第2の条件が満たされない場合、起点ノードを起点とする表を横表に分類し、第2の条件が満たされ、第1の条件が満たされない場合、起点ノードを起点とする表を縦表に分類する。   The table classification unit 203 includes a first condition that all the first node groups connected to the right side of the starting node are item names, and the height of the first node group is the same as the height of the starting node, and the starting point When the second condition that all the second node groups connected to the lower side of the node are item names and the width of the second node group is the same as the width of the starting node is satisfied, the starting node is set as the starting point If the table is classified as an orthogonal table and the first condition is satisfied and the second condition is not satisfied, the table starting from the starting node is classified into a horizontal table, the second condition is satisfied, and the first condition is satisfied. If the condition is not satisfied, the table starting from the starting node is classified into a vertical table.

さらに、表整合部207は、直交表、縦表および横表から、下側にも右側にも項目値ノードが存在しない項目名ノードを有する直交表と、下側に項目値ノードが存在しない項目名ノードを有する縦表と、右側に項目値ノードが存在しない項目名ノードを有する横表と、を除外した表を特定する。   Further, the table matching unit 207 includes an orthogonal table having an item name node having no item value node on the lower side and the right side, and an item having no item value node on the lower side from the orthogonal table, the vertical table, and the horizontal table. A table excluding a vertical table having name nodes and a horizontal table having item name nodes having no item value nodes on the right side is specified.

このように、ノードの隣接関係、高さおよび幅を利用することによって、縦表、横表、および直交表を正確に分類することができるだけでなく、項目名ノードが誤って項目値ノードとして扱われているような不整合な表を除外することができる。   Thus, by using the adjacency, height and width of nodes, not only can the vertical table, horizontal table, and orthogonal table be classified correctly, but the item name node is erroneously treated as an item value node. Inconsistent tables such as those listed can be excluded.

項目名間合成部216は、合成対象の表および合成対象の列挙に含まれるノードのうち、直交表の起点ノードと、縦表の起点ノードおよび当該起点ノードの右側に接続するノード群のうち最も上側にあるノード群と、横表の起点ノードおよび当該起点ノードの下側に接続するノード群のうち最も左側にあるノード群と、列挙の項目名ノードと、を第1の木構造のデータに含める。これにより、最終的に出力される木構造のデータに、論理関係が重複して含まれないようにすることができる。   Among the nodes included in the synthesis target table and the synthesis target enumeration, the item name synthesizing unit 216 is the first of the orthogonal table starting node, the vertical table starting node, and the node group connected to the right side of the starting node. The node group on the upper side, the leftmost node group of the starting node in the horizontal table and the node group connected to the lower side of the starting node, and the item name node of the enumeration as the data of the first tree structure include. Thereby, it is possible to prevent the logical relationship from being redundantly included in the finally output tree-structured data.

直交表取得部206は、項目名および当該項目名の右側にある項目名または項目値の組み合わせを横方向の論理関係として取得し、項目名および当該項目名の下側にある項目名または項目値の組み合わせを縦方向の論理関係として取得する。また、横表取得部205は、項目名および当該項目名の右側にある項目名または項目値の組み合わせを横方向の論理関係として取得する。また、縦表取得部204は、項目名および当該項目名の下側にある項目名または項目値の組み合わせを縦方向の論理関係として取得する。このように、縦方向の場合は下側、および横方向の場合は右側のノードを参照することで、論理関係を正確に取得することができる。   The orthogonal table acquisition unit 206 acquires a combination of the item name and the item name or item value on the right side of the item name as a logical relationship in the horizontal direction, and the item name or item value below the item name and the item name. Is obtained as a vertical logical relationship. The horizontal table acquisition unit 205 acquires a combination of an item name and an item name or item value on the right side of the item name as a logical relationship in the horizontal direction. The vertical table acquisition unit 204 acquires a combination of an item name and an item name or item value below the item name as a vertical logical relationship. Thus, the logical relationship can be accurately acquired by referring to the lower node in the vertical direction and the right node in the horizontal direction.

また、第1の削除部208は、1つのノードの左側または上側に、複数のノードが隣接している場合、1つのノードと複数のノードとの隣接関係を表すエッジを削除してもよい。また、第2の削除部209は、項目名ノードのうち、左側または上側に、項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、項目値ノードとの隣接関係を表すエッジを削除してもよい。一般的に帳票の項目名間や項目名と項目値との位置関係は、左から右、または上から下である場合が多い。このため、削除する隣接関係の方向を左側と上側に設定しておくことで、多くの帳票に対応することが可能になる。   In addition, when a plurality of nodes are adjacent to the left side or the upper side of one node, the first deletion unit 208 may delete an edge representing the adjacent relationship between the one node and the plurality of nodes. In addition, the second deletion unit 209 has an adjacency relationship between the item name node and the item value node adjacent to the item value node that is the node of the area representing the item value on the left or upper side of the item name nodes. You may delete the edge showing. In general, the positional relationship between item names in a form and between item names and item values is often left to right or top to bottom. For this reason, by setting the direction of the adjacent relationship to be deleted on the left side and the upper side, it is possible to deal with many forms.

包含関係取得部214は、第1の項目名ノードの右側に隣接する第1のノード群のうち少なくとも1つが項目名ノードであり、かつ、第1のノード群に含まれる全てのノードの高さが第1の項目名ノードの高さ以下であり、かつ、第1のノード群の左上端のノードの頂点と、第1の項目名ノードの頂点が重なっている場合、第1の項目名ノードが第1のノード群を包含していると判定する。また、包含関係取得部214は、第2の項目名ノードの下側に隣接する第2のノード群のうち少なくとも1つが項目名ノードであり、かつ、第2のノード群に含まれる全てのノードの幅が第2の項目名ノードの幅以下であり、かつ、第2のノード群の左上端のノードの頂点と、第1の項目名ノードの頂点が重なっている場合、第2の項目名ノードが第2のノード群を包含していると判定する。このように、ノードの隣接関係、高さおよび幅を利用することによって、包含関係を正確に認識することができる。   The inclusion relationship acquisition unit 214 has at least one of the first node groups adjacent to the right side of the first item name node as the item name node, and the heights of all the nodes included in the first node group. Is less than or equal to the height of the first item name node, and the vertex of the upper left node of the first node group and the vertex of the first item name node overlap, the first item name node Are included in the first node group. In addition, the inclusion relationship acquisition unit 214 has at least one of the second node groups adjacent to the lower side of the second item name node as an item name node, and all the nodes included in the second node group The width of the second item name node is less than or equal to the width of the second item name node, and the vertex of the upper left node of the second node group overlaps the vertex of the first item name node, the second item name It is determined that the node includes the second node group. Thus, the inclusion relation can be accurately recognized by utilizing the adjacent relation, height, and width of the nodes.

[その他の実施形態]
論理関係認識の対象は、帳票形式に整形可能であれば、Web画面やシステムGUIであってもよい。例えば、図44に示すようなWeb上で航空券の予約を行うようなWeb画面から、項目名および項目値を取得し、帳票形式に整形することで、当該Web画面を論理関係認識処理の対象とすることができる。図44は、その他の実施形態について説明するための図である。
[Other Embodiments]
The target of the logical relationship recognition may be a Web screen or a system GUI as long as it can be formed into a form format. For example, an item name and an item value are acquired from a Web screen that makes a reservation for an air ticket on the Web as shown in FIG. 44, and the Web screen is subjected to logical relationship recognition processing by formatting it into a form format. It can be. FIG. 44 is a diagram for explaining another embodiment.

[システム構成等]
また、図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部または一部を、各種の負荷や使用状況等に応じて、任意の単位で機能的または物理的に分散・統合して構成することができる。さらに、各装置にて行われる各処理機能は、その全部または任意の一部が、CPUおよび当該CPUにて解析実行されるプログラムにて実現され、あるいは、ワイヤードロジックによるハードウェアとして実現され得る。
[System configuration, etc.]
Further, each component of each illustrated apparatus is functionally conceptual, and does not necessarily need to be physically configured as illustrated. In other words, the specific form of distribution / integration of each device is not limited to that shown in the figure, and all or a part thereof may be functionally or physically distributed or arbitrarily distributed in arbitrary units according to various loads or usage conditions. Can be integrated and configured. Furthermore, all or a part of each processing function performed in each device may be realized by a CPU and a program that is analyzed and executed by the CPU, or may be realized as hardware by wired logic.

また、本実施形態において説明した各処理のうち、自動的に行われるものとして説明した処理の全部または一部を手動的に行うこともでき、あるいは、手動的に行われるものとして説明した処理の全部または一部を公知の方法で自動的に行うこともできる。この他、上記文書中や図面中で示した処理手順、制御手順、具体的名称、各種のデータやパラメータを含む情報については、特記する場合を除いて任意に変更することができる。   Also, among the processes described in this embodiment, all or part of the processes described as being performed automatically can be performed manually, or the processes described as being performed manually can be performed. All or a part can be automatically performed by a known method. In addition, the processing procedure, control procedure, specific name, and information including various data and parameters shown in the above-described document and drawings can be arbitrarily changed unless otherwise specified.

[プログラム]
一実施形態として、論理関係認識装置10は、パッケージソフトウェアやオンラインソフトウェアとして上記の論理関係認識を実行する論理関係認識プログラムを所望のコンピュータにインストールさせることによって実装できる。例えば、上記の論理関係認識プログラムを情報処理装置に実行させることにより、情報処理装置を論理関係認識装置10として機能させることができる。ここで言う情報処理装置には、デスクトップ型またはノート型のパーソナルコンピュータが含まれる。また、その他にも、情報処理装置にはスマートフォン、携帯電話機やPHS(Personal Handyphone System)等の移動体通信端末、さらには、PDA(Personal Digital Assistant)等のスレート端末等がその範疇に含まれる。
[program]
As an embodiment, the logical relationship recognition apparatus 10 can be implemented by installing a logical relationship recognition program for executing the logical relationship recognition as package software or online software on a desired computer. For example, the information processing apparatus can function as the logical relation recognition apparatus 10 by causing the information processing apparatus to execute the above logical relation recognition program. The information processing apparatus referred to here includes a desktop or notebook personal computer. In addition, the information processing apparatus includes mobile communication terminals such as smartphones, mobile phones and PHS (Personal Handyphone System), and slate terminals such as PDA (Personal Digital Assistant).

また、論理関係認識装置10は、ユーザが使用する端末装置をクライアントとし、当該クライアントに上記の論理関係認識に関するサービスを提供する論理関係認識サーバ装置として実装することもできる。例えば、論理関係認識サーバ装置は、帳票を入力とし、木構造データを出力とする論理関係認識サービスを提供するサーバ装置として実装される。この場合、論理関係認識サーバ装置は、Webサーバとして実装することとしてもよいし、アウトソーシングによって上記の論理関係認識に関するサービスを提供するクラウドとして実装することとしてもかまわない。   The logical relationship recognition apparatus 10 can also be implemented as a logical relationship recognition server device that uses a terminal device used by a user as a client and provides the client with the above-described service related to logical relationship recognition. For example, the logical relationship recognition server device is implemented as a server device that provides a logical relationship recognition service that takes a form as input and outputs tree structure data. In this case, the logical relationship recognition server device may be implemented as a Web server, or may be implemented as a cloud that provides the above-described service related to logical relationship recognition by outsourcing.

図45は、プログラムが実行されることにより論理関係認識装置が実現されるコンピュータの一例を示す図である。コンピュータ1000は、例えば、メモリ1010、CPU1020を有する。また、コンピュータ1000は、ハードディスクドライブインタフェース1030、ディスクドライブインタフェース1040、シリアルポートインタフェース1050、ビデオアダプタ1060、ネットワークインタフェース1070を有する。これらの各部は、バス1080によって接続される。   FIG. 45 is a diagram illustrating an example of a computer in which the logical relationship recognition apparatus is realized by executing a program. The computer 1000 includes a memory 1010 and a CPU 1020, for example. The computer 1000 also includes a hard disk drive interface 1030, a disk drive interface 1040, a serial port interface 1050, a video adapter 1060, and a network interface 1070. These units are connected by a bus 1080.

メモリ1010は、ROM(Read Only Memory)1011およびRAM1012を含む。ROM1011は、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。ハードディスクドライブインタフェース1030は、ハードディスクドライブ1090に接続される。ディスクドライブインタフェース1040は、ディスクドライブ1100に接続される。例えば磁気ディスクや光ディスク等の着脱可能な記憶媒体が、ディスクドライブ1100に挿入される。シリアルポートインタフェース1050は、例えばマウス1110、キーボード1120に接続される。ビデオアダプタ1060は、例えばディスプレイ1130に接続される。   The memory 1010 includes a ROM (Read Only Memory) 1011 and a RAM 1012. The ROM 1011 stores a boot program such as BIOS (Basic Input Output System). The hard disk drive interface 1030 is connected to the hard disk drive 1090. The disk drive interface 1040 is connected to the disk drive 1100. For example, a removable storage medium such as a magnetic disk or an optical disk is inserted into the disk drive 1100. The serial port interface 1050 is connected to a mouse 1110 and a keyboard 1120, for example. The video adapter 1060 is connected to the display 1130, for example.

ハードディスクドライブ1090は、例えば、OS1091、アプリケーションプログラム1092、プログラムモジュール1093、プログラムデータ1094を記憶する。すなわち、論理関係認識装置10の各処理を規定するプログラムは、コンピュータにより実行可能なコードが記述されたプログラムモジュール1093として実装される。プログラムモジュール1093は、例えばハードディスクドライブ1090に記憶される。例えば、論理関係認識装置10における機能構成と同様の処理を実行するためのプログラムモジュール1093が、ハードディスクドライブ1090に記憶される。なお、ハードディスクドライブ1090は、SSDにより代替されてもよい。   The hard disk drive 1090 stores, for example, an OS 1091, an application program 1092, a program module 1093, and program data 1094. That is, a program that defines each process of the logical relationship recognition apparatus 10 is implemented as a program module 1093 in which a code executable by a computer is described. The program module 1093 is stored in the hard disk drive 1090, for example. For example, a program module 1093 for executing processing similar to the functional configuration in the logical relationship recognition apparatus 10 is stored in the hard disk drive 1090. Note that the hard disk drive 1090 may be replaced by an SSD.

また、上述した実施形態の処理で用いられる設定データは、プログラムデータ1094として、例えばメモリ1010やハードディスクドライブ1090に記憶される。そして、CPU1020が、メモリ1010やハードディスクドライブ1090に記憶されたプログラムモジュール1093やプログラムデータ1094を必要に応じてRAM1012に読み出して実行する。   The setting data used in the processing of the above-described embodiment is stored as program data 1094 in, for example, the memory 1010 or the hard disk drive 1090. Then, the CPU 1020 reads the program module 1093 and the program data 1094 stored in the memory 1010 and the hard disk drive 1090 to the RAM 1012 and executes them as necessary.

なお、プログラムモジュール1093やプログラムデータ1094は、ハードディスクドライブ1090に記憶される場合に限らず、例えば着脱可能な記憶媒体に記憶され、ディスクドライブ1100等を介してCPU1020によって読み出されてもよい。あるいは、プログラムモジュール1093およびプログラムデータ1094は、ネットワーク(LAN、WAN(Wide Area Network)等)を介して接続された他のコンピュータに記憶されてもよい。そして、プログラムモジュール1093およびプログラムデータ1094は、他のコンピュータから、ネットワークインタフェース1070を介してCPU1020によって読み出されてもよい。   The program module 1093 and the program data 1094 are not limited to being stored in the hard disk drive 1090, but may be stored in, for example, a removable storage medium and read out by the CPU 1020 via the disk drive 1100 or the like. Alternatively, the program module 1093 and the program data 1094 may be stored in another computer connected via a network (LAN, WAN (Wide Area Network), etc.). The program module 1093 and the program data 1094 may be read by the CPU 1020 from another computer via the network interface 1070.

10 論理関係認識装置
20 制御部
30 記憶部
201 抽出部
202 解析部
203 表分類部
204 縦表取得部
205 横表取得部
206 直交表取得部
207 表整合部
208 第1の削除部
209 第2の削除部
210 列挙分類部
211 縦列挙取得部
212 横列挙取得部
213 列挙整合部
214 包含関係取得部
215 包含グラフ生成部
216 項目名間合成部
217 表合成部
218 列挙合成部
219 追加部
301 表リスト
302 列挙リスト
303 包含グラフ
DESCRIPTION OF SYMBOLS 10 Logical relationship recognition apparatus 20 Control part 30 Storage part 201 Extraction part 202 Analysis part 203 Table classification part 204 Vertical table acquisition part 205 Horizontal table acquisition part 206 Orthogonal table acquisition part 207 Table matching part 208 1st deletion part 209 2nd deletion part 209 2nd Deletion unit 210 Enumeration classification unit 211 Vertical enumeration acquisition unit 212 Horizontal enumeration acquisition unit 213 Enumeration matching unit 214 Inclusion relation acquisition unit 215 Inclusion graph generation unit 216 Inter-name name synthesis unit 217 Table synthesis unit 218 Enumeration synthesis unit 219 Addition unit 301 Table list 302 Enumeration list 303 Inclusion graph

Claims (8)

帳票の項目名または項目値を表す領域に関する情報をノードとして表し、前記ノード間の隣接関係をエッジとして表したグラフを基に、前記ノードのうち、あらかじめ設定された条件を満たすノードを、項目名を表す領域のノードである項目名ノードとして抽出する抽出部と、
前記エッジを基に、前記項目名ノードから表の起点となるノードである起点ノードを抽出し、前記起点ノードを起点とした表を、上端と左端の両方に項目名が存在する直交表、上端に項目名が存在する縦表、および左端に項目名が存在する横表のうちのいずれかに分類する表分類部と、
前記直交表における前記項目名ノード間の縦方向の論理関係、前記直交表における前記項目名ノード間の横方向の論理関係、前記直交表における前記項目名ノードと前記項目名ノード以外のノードである項目値ノードとの間の縦方向の論理関係、および前記直交表における前記項目名ノードと前記項目値ノードとの間の横方向の論理関係を取得する直交表取得部と、
前記縦表における前記項目名ノード間の縦方向の論理関係、および前記縦表における前記項目名ノードと前記項目値ノードとの間の縦方向の論理関係を取得する縦表取得部と、
前記横表における前記項目名ノード間の横方向の論理関係、および前記横表における前記項目名ノードと前記項目値ノードとの間の横方向の論理関係を取得する横表取得部と、
前記直交表、前記縦表および前記横表から、不整合な表であることを示す所定の条件を満たす表を除外した合成対象の表を特定する第1の特定部と、
1つのノードの所定の方向に、複数のノードが隣接している場合、前記1つのノードと前記複数のノードとの隣接関係を表すエッジを削除する第1の削除部と、
前記項目名ノードのうち、所定の方向に項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、前記項目値ノードとの隣接関係を表すエッジを削除する第2の削除部と、
前記第1の削除部および前記第2の削除部によってエッジの削除が行われた前記グラフを基に、前記項目名ノードと前記項目値ノードとの間の論理関係を取得する第1の取得部と、
前記第1の削除部によってエッジの削除が行われた前記グラフを基に、前記項目名ノード間の包含関係を取得する第2の取得部と、
前記第1の取得部によって取得された論理関係のうち、前記合成対象の表に含まれるノードに関する論理関係を除外した合成対象の列挙に関する論理関係を特定する第2の特定部と、
前記第2の取得部によって取得された包含関係のうち、前記合成対象の表に関する論理関係および前記合成対象の列挙に関する論理関係のいずれにも含まれない包含関係を基に第1の木構造のデータを作成する第1の合成部と、
前記合成対象の表に関する論理関係を基に木構造のデータを作成し、当該木構造のデータと前記第1の木構造のデータとを合成した第2の木構造のデータを作成する第2の合成部と、
前記合成対象の列挙に関する論理関係を基に木構造のデータを作成し、当該木構造のデータと前記第2の木構造のデータとを合成した第3の木構造のデータを作成する第3の合成部と、
を有することを特徴とする論理関係認識装置。
Based on a graph that represents information related to the area representing the item name or item value of the form as a node and the adjacent relationship between the nodes as an edge, a node that satisfies a preset condition is selected as the item name. An extraction unit that extracts as an item name node that is a node of an area that represents
Based on the edge, a starting node that is a node that is a starting point of the table is extracted from the item name node, and a table starting from the starting node is an orthogonal table having item names on both the upper end and the left end, and the upper end A table classification part that classifies the table into one of a vertical table in which the item name is present and a horizontal table in which the item name is present on the left end;
A vertical logical relationship between the item name nodes in the orthogonal table, a horizontal logical relationship between the item name nodes in the orthogonal table, and a node other than the item name node and the item name node in the orthogonal table. An orthogonal table acquisition unit for acquiring a vertical logical relationship between item value nodes, and a horizontal logical relationship between the item name node and the item value node in the orthogonal table;
A vertical table acquisition unit that acquires a vertical logical relationship between the item name nodes in the vertical table, and a vertical logical relationship between the item name node and the item value node in the vertical table;
A horizontal table acquisition unit for acquiring a horizontal logical relationship between the item name nodes in the horizontal table, and a horizontal logical relationship between the item name node and the item value node in the horizontal table;
A first specifying unit that specifies a table to be synthesized excluding a table that satisfies a predetermined condition indicating that the table is inconsistent from the orthogonal table, the vertical table, and the horizontal table;
A first deletion unit that deletes an edge representing an adjacency relationship between the one node and the plurality of nodes when a plurality of nodes are adjacent to each other in a predetermined direction of the one node;
Among the item name nodes, an item name node that is adjacent to an item value node that is a node of an area that represents an item value in a predetermined direction, and an edge that represents an adjacency relationship between the item value node are deleted Delete part,
A first acquisition unit that acquires a logical relationship between the item name node and the item value node based on the graph in which an edge is deleted by the first deletion unit and the second deletion unit. When,
A second acquisition unit that acquires an inclusion relationship between the item name nodes based on the graph in which an edge is deleted by the first deletion unit;
A second specifying unit for specifying a logical relationship related to enumeration of synthesis targets excluding a logical relationship related to a node included in the synthesis target table among the logical relationships acquired by the first acquisition unit;
Of the inclusion relationships acquired by the second acquisition unit, the first tree structure based on the inclusion relationship that is not included in either the logical relationship related to the table to be combined and the logical relationship related to the enumeration of the combination target. A first synthesis unit for creating data;
A tree structure data is created based on a logical relationship regarding the table to be synthesized, and a second tree structure data is created by synthesizing the tree structure data and the first tree structure data. A synthesis unit;
A tree structure data is created based on the logical relationship relating to the synthesis target enumeration, and a third tree structure data is created by synthesizing the tree structure data and the second tree structure data. A synthesis unit;
A logical relationship recognition apparatus comprising:
前記表分類部は、前記起点ノードの右側に接続する第1のノード群が全て項目名かつ前記第1のノード群の高さが前記起点ノードの高さと同じであることである第1の条件、および、前記起点ノードの下側に接続する第2のノード群が全て項目名かつ前記第2のノード群の幅が前記起点ノードの幅と同じであることである第2の条件が満たされる場合、前記起点ノードを起点とする表を直交表に分類し、前記第1の条件が満たされ、前記第2の条件が満たされない場合、前記起点ノードを起点とする表を横表に分類し、前記第2の条件が満たされ、前記第1の条件が満たされない場合、前記起点ノードを起点とする表を縦表に分類し、
前記第1の特定部は、前記直交表、前記縦表および前記横表から、下側にも右側にも前記項目値ノードが存在しない前記項目名ノードを有する直交表と、下側に前記項目値ノードが存在しない前記項目名ノードを有する縦表と、右側に前記項目値ノードが存在しない前記項目名ノードを有する横表と、を除外することを特徴とする請求項1に記載の論理関係認識装置。
The table classification unit includes a first condition that all the first node groups connected to the right side of the starting node are item names and the height of the first node group is the same as the height of the starting node. And the second condition is that all the second node groups connected to the lower side of the starting node are item names and the width of the second node group is the same as the width of the starting node. In this case, the table starting from the starting node is classified as an orthogonal table, and when the first condition is satisfied and the second condition is not satisfied, the table starting from the starting node is classified as a horizontal table. If the second condition is satisfied and the first condition is not satisfied, the table starting from the starting node is classified into a vertical table,
The first specifying unit includes, from the orthogonal table, the vertical table, and the horizontal table, an orthogonal table having the item name node where the item value node does not exist on either the lower side or the right side, and the item on the lower side. The logical relationship according to claim 1, wherein a vertical table having the item name node for which no value node exists and a horizontal table having the item name node for which the item value node does not exist on the right side are excluded. Recognition device.
前記第1の合成部は、前記合成対象の表および前記合成対象の列挙に含まれるノードのうち、前記直交表の起点ノードと、前記縦表の起点ノードおよび当該起点ノードの右側に接続するノード群のうち最も上側にあるノード群と、前記横表の起点ノードおよび当該起点ノードの下側に接続するノード群のうち最も左側にあるノード群と、列挙の項目名ノードと、を前記第1の木構造のデータに含めることを特徴とする請求項1または2に記載の論理関係認識装置。   The first synthesizing unit includes a node connected to the origin node of the orthogonal table, the origin node of the vertical table, and the right side of the origin node among the nodes included in the synthesis target table and the synthesis target enumeration A node group on the uppermost side of the group, a node group on the leftmost side of the node group connected to the lower side of the starting node of the horizontal table and the starting node, and an item name node of enumeration The logical relationship recognition apparatus according to claim 1, wherein the logical relation recognition device is included in data having a tree structure. 前記直交表取得部は、項目名および当該項目名の右側にある項目名または項目値の組み合わせを前記横方向の論理関係として取得し、項目名および当該項目名の下側にある項目名または項目値の組み合わせを前記縦方向の論理関係として取得し、
前記縦表取得部は、項目名および当該項目名の下側にある項目名または項目値の組み合わせを前記縦方向の論理関係として取得し、
前記横表取得部は、項目名および当該項目名の右側にある項目名または項目値の組み合わせを前記横方向の論理関係として取得することを特徴とする請求項1から3のいずれか1項に記載の論理関係認識装置。
The orthogonal table acquisition unit acquires a combination of an item name and an item name on the right side of the item name or an item value as a logical relationship in the horizontal direction, and an item name or item below the item name and the item name. A combination of values is acquired as the logical relationship in the vertical direction,
The vertical table acquisition unit acquires a combination of an item name and an item name or item value below the item name as a logical relationship in the vertical direction,
The said horizontal table acquisition part acquires the combination of the item name and the item name on the right side of the said item name, or item value as the said horizontal direction logical relationship, The any one of Claim 1 to 3 characterized by the above-mentioned. The logical relationship recognition device described.
前記第1の削除部は、1つのノードの左側または上側に、複数のノードが隣接している場合、前記1つのノードと前記複数のノードとの隣接関係を表すエッジを削除し、
前記第2の削除部は、前記項目名ノードのうち、左側または上側に、項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、前記項目値ノードとの隣接関係を表すエッジを削除することを特徴とする請求項1または2に記載の論理関係認識装置。
The first deletion unit, when a plurality of nodes are adjacent to the left or upper side of one node, deletes an edge representing an adjacency relationship between the one node and the plurality of nodes;
The second deletion unit includes an item name node adjacent to an item value node that is a node of an area representing an item value on the left or upper side of the item name nodes, and an adjacency relationship between the item value nodes. The logical relationship recognition apparatus according to claim 1, wherein an edge representing the information is deleted.
前記第2の取得部は、第1の項目名ノードの右側に隣接する第1のノード群のうち少なくとも1つが前記項目名ノードであり、かつ、前記第1のノード群に含まれる全てのノードの高さが前記第1の項目名ノードの高さ以下であり、かつ、前記第1のノード群の左上端のノードの頂点と、前記第1の項目名ノードの頂点が重なっている場合、前記第1の項目名ノードが前記第1のノード群を包含していると判定し、第2の項目名ノードの下側に隣接する第2のノード群のうち少なくとも1つが前記項目名ノードであり、かつ、前記第2のノード群に含まれる全てのノードの幅が前記第2の項目名ノードの幅以下であり、かつ、前記第2のノード群の左上端のノードの頂点と、前記第1の項目名ノードの頂点が重なっている場合、前記第2の項目名ノードが前記第2のノード群を包含していると判定することを特徴とする請求項5に記載の論理関係認識装置。   In the second acquisition unit, at least one of the first node groups adjacent to the right side of the first item name node is the item name node, and all the nodes included in the first node group The height of the first item name node is equal to or less than the height of the first item name node, and the vertex of the upper left node of the first node group overlaps the vertex of the first item name node, It is determined that the first item name node includes the first node group, and at least one of the second node groups adjacent to the lower side of the second item name node is the item name node. And the width of all the nodes included in the second node group is equal to or less than the width of the second item name node, and the vertex of the upper left node of the second node group, and If the vertices of the first item name node overlap, the second term Logical relationship recognition apparatus according to claim 5 in which the name node and determines that encompasses the second node group. 論理関係認識装置で実行される論理関係認識方法であって、
帳票の項目名または項目値を表す領域に関する情報をノードとして表し、前記ノード間の隣接関係をエッジとして表したグラフを基に、前記ノードのうち、あらかじめ設定された条件を満たすノードを、項目名を表す領域のノードである項目名ノードとして抽出する抽出工程と、
前記エッジを基に、前記項目名ノードから表の起点となるノードである起点ノードを抽出し、前記起点ノードを起点とした表を、上端と左端の両方に項目名が存在する直交表、上端に項目名が存在する縦表、および左端に項目名が存在する横表のうちのいずれかに分類する表分類工程と、
前記直交表における前記項目名ノード間の縦方向の論理関係、前記直交表における前記項目名ノード間の横方向の論理関係、前記直交表における前記項目名ノードと前記項目名ノード以外のノードである項目値ノードとの間の縦方向の論理関係、および前記直交表における前記項目名ノードと前記項目値ノードとの間の横方向の論理関係を取得する直交表取得工程と、
前記縦表における前記項目名ノード間の縦方向の論理関係、および前記縦表における前記項目名ノードと前記項目値ノードとの間の縦方向の論理関係を取得する縦表取得工程と、
前記横表における前記項目名ノード間の横方向の論理関係、および前記横表における前記項目名ノードと前記項目値ノードとの間の横方向の論理関係を取得する横表取得工程と、
前記直交表、前記縦表および前記横表から、不整合な表であることを示す所定の条件を満たす表を除外した合成対象の表を特定する第1の特定工程と、
1つのノードの所定の方向に、複数のノードが隣接している場合、前記1つのノードと前記複数のノードとの隣接関係を表すエッジを削除する第1の削除工程と、
前記項目名ノードのうち、所定の方向に項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、前記項目値ノードとの隣接関係を表すエッジを削除する第2の削除工程と、
前記第1の削除工程および前記第2の削除工程によってエッジの削除が行われた前記グラフを基に、前記項目名ノードと前記項目値ノードとの間の論理関係を取得する第1の取得工程と、
前記第1の削除工程によってエッジの削除が行われた前記グラフを基に、前記項目名ノード間の包含関係を取得する第2の取得工程と、
前記第1の取得工程によって取得された論理関係のうち、前記合成対象の表に含まれるノードに関する論理関係を除外した合成対象の列挙に関する論理関係を特定する第2の特定工程と、
前記第2の取得工程によって取得された包含関係のうち、前記合成対象の表に関する論理関係および前記合成対象の列挙に関する論理関係のいずれにも含まれない包含関係を基に第1の木構造のデータを作成する第1の合成工程と、
前記合成対象の表に関する論理関係を基に木構造のデータを作成し、当該木構造のデータと前記第1の木構造のデータとを合成した第2の木構造のデータを作成する第2の合成工程と、
前記合成対象の列挙に関する論理関係を基に木構造のデータを作成し、当該木構造のデータと前記第2の木構造のデータとを合成した第3の木構造のデータを作成する第3の合成工程と、
を含んだことを特徴とする論理関係認識方法。
A logical relationship recognition method executed by a logical relationship recognition device,
Based on a graph that represents information related to the area representing the item name or item value of the form as a node and the adjacent relationship between the nodes as an edge, a node that satisfies a preset condition is selected as the item name. An extraction step of extracting as an item name node that is a node of an area representing
Based on the edge, a starting node that is a node that is a starting point of the table is extracted from the item name node, and a table starting from the starting node is an orthogonal table having item names on both the upper end and the left end, and the upper end A table classification process for classifying the table into one of a vertical table in which the item name exists in the table and a horizontal table in which the item name exists on the left end;
A vertical logical relationship between the item name nodes in the orthogonal table, a horizontal logical relationship between the item name nodes in the orthogonal table, and a node other than the item name node and the item name node in the orthogonal table. An orthogonal table acquisition step of acquiring a vertical logical relationship between the item value nodes and a horizontal logical relationship between the item name node and the item value node in the orthogonal table;
A vertical table acquisition step of acquiring a vertical logical relationship between the item name nodes in the vertical table, and a vertical logical relationship between the item name node and the item value node in the vertical table;
A horizontal table acquisition step of acquiring a horizontal logical relationship between the item name nodes in the horizontal table and a horizontal logical relationship between the item name node and the item value node in the horizontal table;
A first specifying step of specifying a table to be synthesized by excluding a table satisfying a predetermined condition indicating that the table is inconsistent from the orthogonal table, the vertical table, and the horizontal table;
When a plurality of nodes are adjacent to each other in a predetermined direction of one node, a first deletion step of deleting an edge representing an adjacent relationship between the one node and the plurality of nodes;
Among the item name nodes, an item name node that is adjacent to an item value node that is a node of an area that represents an item value in a predetermined direction, and an edge that represents an adjacency relationship between the item value node are deleted. Delete process,
A first acquisition step of acquiring a logical relationship between the item name node and the item value node based on the graph in which an edge is deleted by the first deletion step and the second deletion step. When,
A second acquisition step of acquiring an inclusion relationship between the item name nodes based on the graph in which an edge is deleted by the first deletion step;
A second specifying step of specifying a logical relationship related to enumeration of synthesis targets, excluding a logical relationship related to nodes included in the synthesis target table, among the logical relationships acquired in the first acquisition step;
Of the inclusion relationships acquired by the second acquisition step, the first tree structure based on the inclusion relationship that is not included in either the logical relationship related to the table to be combined and the logical relationship related to the enumeration of the combination target. A first synthesis step for creating data;
A tree structure data is created based on a logical relationship regarding the table to be synthesized, and a second tree structure data is created by synthesizing the tree structure data and the first tree structure data. A synthesis process;
A tree structure data is created based on the logical relationship relating to the synthesis target enumeration, and a third tree structure data is created by synthesizing the tree structure data and the second tree structure data. A synthesis process;
The logical relationship recognition method characterized by including.
コンピュータに、
帳票の項目名または項目値を表す領域に関する情報をノードとして表し、前記ノード間の隣接関係をエッジとして表したグラフを基に、前記ノードのうち、あらかじめ設定された条件を満たすノードを、項目名を表す領域のノードである項目名ノードとして抽出する抽出ステップと、
前記エッジを基に、前記項目名ノードから表の起点となるノードである起点ノードを抽出し、前記起点ノードを起点とした表を、上端と左端の両方に項目名が存在する直交表、上端に項目名が存在する縦表、および左端に項目名が存在する横表のうちのいずれかに分類する表分類ステップと、
前記直交表における前記項目名ノード間の縦方向の論理関係、前記直交表における前記項目名ノード間の横方向の論理関係、前記直交表における前記項目名ノードと前記項目名ノード以外のノードである項目値ノードとの間の縦方向の論理関係、および前記直交表における前記項目名ノードと前記項目値ノードとの間の横方向の論理関係を取得する直交表取得ステップと、
前記縦表における前記項目名ノード間の縦方向の論理関係、および前記縦表における前記項目名ノードと前記項目値ノードとの間の縦方向の論理関係を取得する縦表取得ステップと、
前記横表における前記項目名ノード間の横方向の論理関係、および前記横表における前記項目名ノードと前記項目値ノードとの間の横方向の論理関係を取得する横表取得ステップと、
前記直交表、前記縦表および前記横表から、不整合な表であることを示す所定の条件を満たす表を除外した合成対象の表を特定する第1の特定ステップと、
1つのノードの所定の方向に、複数のノードが隣接している場合、前記1つのノードと前記複数のノードとの隣接関係を表すエッジを削除する第1の削除ステップと、
前記項目名ノードのうち、所定の方向に項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、前記項目値ノードとの隣接関係を表すエッジを削除する第2の削除ステップと、
前記第1の削除ステップおよび前記第2の削除ステップによってエッジの削除が行われた前記グラフを基に、前記項目名ノードと前記項目値ノードとの間の論理関係を取得する第1の取得ステップと、
前記第1の削除ステップによってエッジの削除が行われた前記グラフを基に、前記項目名ノード間の包含関係を取得する第2の取得ステップと、
前記第1の取得ステップによって取得された論理関係のうち、前記合成対象の表に含まれるノードに関する論理関係を除外した合成対象の列挙に関する論理関係を特定する第2の特定ステップと、
前記第2の取得ステップによって取得された包含関係のうち、前記合成対象の表に関する論理関係および前記合成対象の列挙に関する論理関係のいずれにも含まれない包含関係を基に第1の木構造のデータを作成する第1の合成ステップと、
前記合成対象の表に関する論理関係を基に木構造のデータを作成し、当該木構造のデータと前記第1の木構造のデータとを合成した第2の木構造のデータを作成する第2の合成ステップと、
前記合成対象の列挙に関する論理関係を基に木構造のデータを作成し、当該木構造のデータと前記第2の木構造のデータとを合成した第3の木構造のデータを作成する第3の合成ステップと、
を実行させることを特徴とする論理関係認識プログラム。
On the computer,
Based on a graph that represents information related to the area representing the item name or item value of the form as a node and the adjacent relationship between the nodes as an edge, a node that satisfies a preset condition is selected as the item name. An extraction step of extracting as an item name node that is a node of an area representing
Based on the edge, a starting node that is a node that is a starting point of the table is extracted from the item name node, and a table starting from the starting node is an orthogonal table having item names on both the upper end and the left end, and the upper end A table classification step for classifying the table into one of a vertical table in which the item name is present and a horizontal table in which the item name is present on the left end;
A vertical logical relationship between the item name nodes in the orthogonal table, a horizontal logical relationship between the item name nodes in the orthogonal table, and a node other than the item name node and the item name node in the orthogonal table. An orthogonal table acquisition step for acquiring a vertical logical relationship between item value nodes and a horizontal logical relationship between the item name node and the item value node in the orthogonal table;
A vertical table acquisition step of acquiring a vertical logical relationship between the item name nodes in the vertical table and a vertical logical relationship between the item name node and the item value node in the vertical table;
A horizontal table acquisition step for acquiring a horizontal logical relationship between the item name nodes in the horizontal table and a horizontal logical relationship between the item name node and the item value node in the horizontal table;
A first specifying step of specifying a table to be synthesized excluding a table satisfying a predetermined condition indicating that the table is inconsistent from the orthogonal table, the vertical table, and the horizontal table;
A first deletion step of deleting an edge representing an adjacency relationship between the one node and the plurality of nodes when a plurality of nodes are adjacent to each other in a predetermined direction of the one node;
Among the item name nodes, an item name node that is adjacent to an item value node that is a node of an area that represents an item value in a predetermined direction, and an edge that represents an adjacency relationship between the item value node are deleted Delete step,
A first acquisition step of acquiring a logical relationship between the item name node and the item value node based on the graph in which an edge is deleted by the first deletion step and the second deletion step. When,
A second acquisition step of acquiring an inclusion relationship between the item name nodes based on the graph in which an edge is deleted by the first deletion step;
A second specifying step of specifying a logical relationship regarding enumeration of synthesis targets excluding a logical relationship regarding nodes included in the synthesis target table among the logical relationships acquired by the first acquisition step;
Of the inclusion relationships acquired by the second acquisition step, the first tree structure based on the inclusion relationship not included in any of the logical relationship related to the table to be combined and the logical relationship related to the enumeration of the combination target. A first synthesis step for creating data;
A tree structure data is created based on a logical relationship regarding the table to be synthesized, and a second tree structure data is created by synthesizing the tree structure data and the first tree structure data. A synthesis step;
A tree structure data is created based on the logical relationship relating to the synthesis target enumeration, and a third tree structure data is created by synthesizing the tree structure data and the second tree structure data. A synthesis step;
A logical relationship recognition program characterized in that
JP2016138932A 2016-07-13 2016-07-13 Logical relationship recognition apparatus, logical relationship recognition method, and logical relationship recognition program Active JP6568021B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016138932A JP6568021B2 (en) 2016-07-13 2016-07-13 Logical relationship recognition apparatus, logical relationship recognition method, and logical relationship recognition program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016138932A JP6568021B2 (en) 2016-07-13 2016-07-13 Logical relationship recognition apparatus, logical relationship recognition method, and logical relationship recognition program

Publications (2)

Publication Number Publication Date
JP2018010489A JP2018010489A (en) 2018-01-18
JP6568021B2 true JP6568021B2 (en) 2019-08-28

Family

ID=60995651

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016138932A Active JP6568021B2 (en) 2016-07-13 2016-07-13 Logical relationship recognition apparatus, logical relationship recognition method, and logical relationship recognition program

Country Status (1)

Country Link
JP (1) JP6568021B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7275617B2 (en) * 2019-02-06 2023-05-18 日本電信電話株式会社 Information processing device, discrimination method and discrimination program
JP7211157B2 (en) 2019-02-27 2023-01-24 日本電信電話株式会社 Information processing device, association method and association program

Also Published As

Publication number Publication date
JP2018010489A (en) 2018-01-18

Similar Documents

Publication Publication Date Title
US10191889B2 (en) Systems, apparatuses and methods for generating a user interface by performing computer vision and optical character recognition on a graphical representation
US20140115155A1 (en) Network graph evolution rule generation
US20180322508A1 (en) Identifying clusters for service management operations
JP2011191938A (en) Layout converter, layout conversion program, and layout conversion method
JP6102947B2 (en) Image processing apparatus and feature detection method
JP2009070133A (en) Ontology construction support device, program, and ontology construction support method
JP6568021B2 (en) Logical relationship recognition apparatus, logical relationship recognition method, and logical relationship recognition program
KR20170135670A (en) Selection control method, selection control device, and recording medium
JP5354747B2 (en) Application state recognition method, apparatus and program
JP6542712B2 (en) Logical relation recognition device, logical relation recognition method and logical relation recognition program
US20140365279A1 (en) Information management device, information management method, and non-transitory storage medium
Vernier et al. A stable greedy insertion treemap algorithm for software evolution visualization
JP2017037486A (en) Data processing method, data processing program and information processor
KR20170062106A (en) System and method for combining workflow
JP2013125524A (en) Learning device and method for gene learning
JP2004192555A (en) Information management method, device and program
JP2013162133A5 (en)
JP6612680B2 (en) Logical relationship recognition apparatus, logical relationship recognition method, and logical relationship recognition program
CN111752663B (en) Method and device for repairing layout compatibility problem in Web application
US20160092412A1 (en) Document processing method, document processing apparatus, and document processing program
JP6354497B2 (en) Display area specifying device, display area specifying method, and program
JP6718473B2 (en) Screen difference extraction device and program
JP7388553B2 (en) Identification device, identification method and identification program
JP2002211099A (en) Method and apparatus for generating trapping region as well as trapping region generating program, and trapping region generating program storage medium
JP5133275B2 (en) Hierarchical structure modification processing apparatus, hierarchical structure modification method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180821

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190701

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190801

R150 Certificate of patent or registration of utility model

Ref document number: 6568021

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150