JP6612680B2 - 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 PDFInfo
- Publication number
- JP6612680B2 JP6612680B2 JP2016111296A JP2016111296A JP6612680B2 JP 6612680 B2 JP6612680 B2 JP 6612680B2 JP 2016111296 A JP2016111296 A JP 2016111296A JP 2016111296 A JP2016111296 A JP 2016111296A JP 6612680 B2 JP6612680 B2 JP 6612680B2
- Authority
- JP
- Japan
- Prior art keywords
- node
- item name
- nodes
- relationship
- item
- 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
Links
Images
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
しかしながら、従来の技術には、帳票に縦列挙、横列挙、縦列挙と横列挙の複合型、または列挙型入れ子構造が含まれる場合、帳票の項目名間の論理関係、および項目名と項目値との間の論理関係を正確に認識することができない場合があるという問題があった。 However, in the conventional technology, when a form includes vertical enumeration, horizontal enumeration, a composite type of vertical enumeration and horizontal enumeration, or enumerated type nested structure, the logical relationship between the item names of the form, and the item names and item values There is a problem in that the logical relationship between and cannot be recognized correctly.
例えば、縦列挙の場合、縦方向に項目名に対応した同じ幅の罫線枠が複数存在する場合がある。さらに、それぞれの項目名は項目値を持ち、項目値に対応した罫線枠の幅も、項目名に対応した罫線枠の幅と同じである。このような場合、従来の技術では、どの罫線枠が項目名であるかを特定することができないため、項目名間の論理関係、および項目名と項目値との間の論理関係を正確に認識することは困難である。 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.
本発明の論理関係認識装置は、帳票の項目名または項目値を表す領域に関する情報をノードとして表し、前記ノード間の隣接関係をエッジとして表したグラフを基に、前記ノードのうち、あらかじめ設定された条件を満たすノードを、項目名を表す領域のノードである項目名ノードとして抽出する抽出部と、1つのノードの所定の方向に、複数のノードが隣接している場合、前記1つのノードと前記複数のノードとの隣接関係を表すエッジを削除する第1の削除部と、前記項目名ノードのうち、所定の方向に項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、前記項目値ノードとの隣接関係を表すエッジを削除する第2の削除部と、前記第1の削除部および前記第2の削除部によってエッジの削除が行われた前記グラフを基に、前記項目名ノードと前記項目値ノードとの間の論理関係を取得する第1の取得部と、前記第1の削除部によってエッジの削除が行われた前記グラフを基に、前記項目名ノード間の包含関係を取得する第2の取得部と、前記第1の取得部によって取得された論理関係、および前記第2の取得部によって取得された包含関係を合成した木構造のデータを作成する合成部と、を有することを特徴とする。 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 satisfying the condition as an item name node that is a node in an area representing an item name, and when a plurality of nodes are adjacent in a predetermined direction of one node, An item in which an item value node, which is a node in an area representing an item value in a predetermined direction, is adjacent to the first deletion unit that deletes an edge representing an adjacent relationship with the plurality of nodes. A second deletion unit that deletes an edge representing an adjacency relationship between the name node and the item value node, and the deletion of the edge is performed by the first deletion unit and the second deletion unit Based on the rough, based on the first acquisition unit that acquires the logical relationship between the item name node and the item value node, and the graph in which the edge deletion is performed by the first deletion unit, A second acquisition unit that acquires an inclusion relationship between the item name nodes, a logical relationship acquired by the first acquisition unit, and a tree structure that combines the inclusion relationship acquired by the second acquisition unit And a synthesis unit for creating data.
また、本発明の論理関係認識方法は、論理関係認識装置で実行される論理関係認識方法であって、帳票の項目名または項目値を表す領域に関する情報をノードとして表し、前記ノード間の隣接関係をエッジとして表したグラフを基に、前記ノードのうち、あらかじめ設定された条件を満たすノードを、項目名を表す領域のノードである項目名ノードとして抽出する抽出工程と、1つのノードの所定の方向に、複数のノードが隣接している場合、前記1つのノードと前記複数のノードとの隣接関係を表すエッジを削除する第1の削除工程と、前記第1の削除工程によってエッジの削除が行われた前記グラフを基に、前記項目名ノード間の包含関係を取得する第2の取得工程と、前記項目名ノードのうち、所定の方向に項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、前記項目値ノードとの隣接関係を表すエッジを削除する第2の削除工程と、前記第1の削除工程および前記第2の削除工程によってエッジの削除が行われた前記グラフを基に、前記項目名ノードと前記項目値ノードとの間の論理関係を取得する第1の取得工程と、前記第1の取得工程によって取得された論理関係、および前記第2の取得工程によって取得された包含関係を合成した木構造のデータを作成する合成工程と、を含んだことを特徴とする。 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 And extracting a node satisfying a preset condition from among the nodes as an item name node that is a node in a region representing an item name, and a predetermined value of one node When a plurality of nodes are adjacent to each other in the direction, a first deletion step of deleting an edge representing an adjacency relationship between the one node and the plurality of nodes, and deletion of an edge by the first deletion step A second acquisition step of acquiring an inclusion relationship between the item name nodes based on the performed graph; and a node of an area representing an item value in a predetermined direction among the item name nodes An item name node adjacent to an item value node, a second deletion step of deleting an edge representing an adjacency relationship between the item value node, an edge formed by the first deletion step and the second deletion 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 the deletion is performed, and a logical relationship acquired by the first acquisition step, And a synthesizing step of creating data of a tree structure obtained by synthesizing the inclusion relation acquired in the second acquiring step.
本発明の論理関係認識プログラムは、コンピュータに、帳票の項目名または項目値を表す領域に関する情報をノードとして表し、前記ノード間の隣接関係をエッジとして表したグラフを基に、前記ノードのうち、あらかじめ設定された条件を満たすノードを、項目名を表す領域のノードである項目名ノードとして抽出する抽出ステップと、1つのノードの所定の方向に、複数のノードが隣接している場合、前記1つのノードと前記複数のノードとの隣接関係を表すエッジを削除する第1の削除ステップと、前記第1の削除ステップによってエッジの削除が行われた前記グラフを基に、前記項目名ノード間の包含関係を取得する第2の取得ステップと、前記項目名ノードのうち、所定の方向に項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、前記項目値ノードとの隣接関係を表すエッジを削除する第2の削除ステップと、前記第1の削除ステップおよび前記第2の削除ステップによってエッジの削除が行われた前記グラフを基に、前記項目名ノードと前記項目値ノードとの間の論理関係を取得する第1の取得ステップと、前記第1の取得ステップによって取得された論理関係、および前記第2の取得ステップによって取得された包含関係を合成した木構造のデータを作成する合成ステップと、を実行させることを特徴とする。 The logical relationship recognition program of the present invention represents information relating to an area representing an item name or item value of a form as a node on a computer, and based on a graph representing an adjacency relationship between the nodes as an edge, An extraction step of extracting a node that satisfies a preset condition as an item name node that is a node in an area representing an item name, and when a plurality of nodes are adjacent in a predetermined direction of one node, the 1 A first deletion step of deleting an edge representing an adjacent relationship between one node and the plurality of nodes, and the item name nodes between the item name nodes based on the graph in which the deletion of the edge is performed by the first deletion step. A second acquisition step of acquiring an inclusion relationship, and an item value node that is a node of an area representing an item value in a predetermined direction is adjacent to the item name node The edge is deleted by the second deletion step of deleting the edge representing the adjacent relationship between the item name node and the item value node, and the first deletion step and the second deletion step. Based on the graph, a first acquisition step of acquiring a logical relationship between the item name node and the item value node, a logical relationship acquired by the first acquisition step, and the second acquisition And a synthesizing step for creating tree-structured data obtained by synthesizing the inclusion relation acquired in the step.
本発明によれば、帳票に縦列挙、横列挙、縦列挙と横列挙の複合型、または列挙型入れ子構造が含まれる場合であっても、帳票の項目名間の論理関係、および項目名と項目値との間の論理関係を正確に認識することができる。 According to the present invention, even when the form includes a vertical enumeration, a horizontal enumeration, a composite type of vertical enumeration and horizontal enumeration, or an enumerated type nested structure, the logical relationship between the item names of the form, and the item names and The logical relationship between the item values can be recognized accurately.
以下に、本願に係る論理関係認識装置、論理関係認識方法および論理関係認識プログラムの実施形態を図面に基づいて詳細に説明する。なお、この実施形態により本発明が限定されるものではない。 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 an enumerated 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 an enumerated 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:whilte},{!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: whilte}, {! 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 format also includes an enumeration. 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 structure of the enumeration format (step S5), converts the recognized result into a data structure of a predetermined format (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〜8を用いて、論理関係認識システムによる論理関係認識処理の対象である列挙の種類について説明する。なお、図2〜8の各符号はノードを表しており、以降の説明では、説明のために、これらの符号が示すノードを、単にノードと呼ぶ場合と、項目名ノードまたは項目値ノードと呼ぶ場合がある。 Next, the types of enumeration that are targets of logical relationship recognition processing by the logical relationship recognition system will be described with reference to FIGS. 2 to 8 represent nodes. In the following description, for the sake of explanation, the nodes indicated by these symbols are simply referred to as nodes, and are referred to as item name nodes or item value nodes. There is a case.
図2は、縦列挙の一例を示す図である。図2に示すように、縦列挙は、項目名同士、および項目名と項目値の関係である論理関係を、縦方向に複数有する。例えば、ノードa1とa2、およびノードa4とa5は、項目名と項目値の論理関係を有する。図3は、横列挙の一例を示す図である。図3に示すように、横列挙は、論理関係を横方向に複数有する。例えば、ノードb1とb2は、項目名と項目値の論理関係を有する。なお、図2〜8において、網掛け部分は項目名を表し、網掛けでない部分は項目値を表している。 FIG. 2 is a diagram illustrating an example of vertical listing. As shown in FIG. 2, 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. For example, the nodes a1 and a2 and the nodes a4 and a5 have a logical relationship between item names and item values. FIG. 3 is a diagram illustrating an example of horizontal enumeration. As shown in FIG. 3, the horizontal enumeration has a plurality of logical relationships in the horizontal direction. For example, the nodes b1 and b2 have a logical relationship between item names and item values. 2 to 8, the shaded portion represents an item name, and the portion not shaded represents an item value.
図4は、縦列挙と横列挙の複合型の一例を示す図である。図4に示すように、縦列挙と横列挙の複合型の場合、縦列挙および横列挙が1つの様式内に存在する。例えば、ノードc1とc2、およびノードc3とc4は、横列挙である。また、例えば、ノードc5とc7、およびノードc6とc8は、縦列挙である。 FIG. 4 is a diagram illustrating an example of a combined type of vertical enumeration and horizontal enumeration. As shown in FIG. 4, in the case of a combined type of vertical enumeration and horizontal enumeration, vertical enumeration and horizontal enumeration exist in one mode. For example, nodes c1 and c2 and nodes c3 and c4 are listed horizontally. For example, nodes c5 and c7 and nodes c6 and c8 are listed vertically.
図5〜8は、列挙型入れ子構造の一例を示す図である。図5に示すように、列挙型入れ子構造は、縦方向または横方向に、入れ子になった複数の列挙を有する。例えば、ノードd1とd2は項目名同士の論理関係を有する。さらに、ノードd2とd3は、項目名と項目値の論理関係を有する。このように、ノードd2とd3の論理関係は、ノードd1とd2の論理関係の入れ子になっている。 5 to 8 are diagrams illustrating an example of an enumerated type nested structure. As shown in FIG. 5, the enumerated nested structure has a plurality of nested enumerations in the vertical or horizontal direction. For example, nodes d1 and d2 have a logical relationship between item names. Further, the nodes d2 and d3 have a logical relationship between item names and item values. Thus, the logical relationship between the nodes d2 and d3 is a nesting of the logical relationship between the nodes d1 and d2.
また、図6に示すように、例えば、ノードe1とe2は項目名同士の論理関係を有する。さらに、ノードe2とe3は、項目名と項目値の論理関係を有する。このように、ノードe2とe3の論理関係は、ノードe1とe2の論理関係の入れ子になっている。 As shown in FIG. 6, for example, nodes e1 and e2 have a logical relationship between item names. Further, the nodes e2 and e3 have a logical relationship between item names and item values. Thus, the logical relationship between the nodes e2 and e3 is a nesting of the logical relationship between the nodes e1 and e2.
また、図7に示すように、例えば、ノードf1とf2は項目名同士の論理関係を有する。また、ノードf2とf3は項目名同士の論理関係を有する。さらに、ノードf3とf4は、項目名と項目値の論理関係を有する。このように、ノードf3とf4の論理関係は、ノードf2とf3の論理関係の入れ子になっている。さらに、ノードf2とf3の論理関係は、ノードf1とf2の論理関係の入れ子になっている。 Also, as shown in FIG. 7, for example, the nodes f1 and f2 have a logical relationship between item names. Nodes f2 and f3 have a logical relationship between item names. Further, the nodes f3 and f4 have a logical relationship between item names and item values. Thus, the logical relationship between the nodes f3 and f4 is a nesting of the logical relationship between the nodes f2 and f3. Further, the logical relationship between the nodes f2 and f3 is a nesting of the logical relationship between the nodes f1 and f2.
また、図8に示すように、例えば、ノードg2とg3は、項目名と項目値の論理関係を有する。また、ノードg6とg7は項目名同士の論理関係を有する。また、ノードg7とg8は、項目名と項目値の論理関係を有する。このように、ノードg7とg8の論理関係は、ノードg6とg7の論理関係の入れ子になっている。しかし、ノードg2とg3の論理関係は、ノードg7とg8の論理関係、およびノードg6とg7の論理関係との間に入れ子関係はない。 As shown in FIG. 8, for example, nodes g2 and g3 have a logical relationship between item names and item values. Nodes g6 and g7 have a logical relationship between item names. Nodes g7 and g8 have a logical relationship between item names and item values. Thus, the logical relationship between the nodes g7 and g8 is a nesting of the logical relationship between the nodes g6 and g7. However, the logical relationship between the nodes g2 and g3 is not nested between the logical relationship between the nodes g7 and g8 and the logical relationship between the nodes g6 and g7.
[第1の実施形態の構成]
次に、図9を用いて、第1の実施形態に係る論理関係認識装置の構成について説明する。図9は、第1の実施形態に係る論理関係認識装置の構成の一例を示す図である。図9に示すように、論理関係認識装置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. 9 is a diagram illustrating an example of the configuration of the logical relationship recognition apparatus according to the first embodiment. As illustrated in FIG. 9, the logical
制御部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、第1の削除部203、第2の削除部204、分類部205、縦列挙取得部206、横列挙取得部207、包含関係取得部208、包含グラフ生成部209、項目名間合成部210、列挙合成部211および追加部212を有する。
The
記憶部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を記憶する。
The
ここで、論理関係認識装置10による論理関係認識処理について説明するとともに、論理関係認識装置10の各部の詳細について説明する。抽出部201は、帳票の項目名または項目値を表す領域に関する情報をノードとして表し、ノード間の隣接関係をエッジとして表したグラフ、すなわち様式グラフを基に、ノードのうち、あらかじめ設定された条件を満たすノードを、項目名を表す領域のノードである項目名ノードとして抽出する。
Here, the logical relationship recognition processing by the logical
ここで、項目名ノードを抽出する際のルールは、解析部202によって作成される。解析部202は、あらかじめテキストファイル等として作成された解析前の視覚表現のルールを読み込み、読み込んだ視覚表現のルールから条件およびアクションを解析し、コンピュータで認識可能な視覚表現ルールを作成する。なお、以降の説明で、単に視覚表現ルールと呼ぶ場合は、解析後の視覚表現ルールのことを指すこととする。
Here, a rule for extracting the item name node is created by the
第1の削除部203は、1つのノードの所定の方向に、複数のノードが隣接している場合、1つのノードと複数のノードとの隣接関係を表すエッジを削除する。なお、第1の削除部203は、1つのノードの左側または上側に、複数のノードが隣接している場合、1つのノードと複数のノードとの隣接関係を表すエッジを削除するようにしてもよい。例えば、図4の縦列挙と横列挙の複合型の場合、いずれのノードについても、左側または上側に複数ノードが隣接していないため、第1の削除部203はエッジを削除しない。また、例えば、図8の列挙型入れ子構造の場合、ノードg6の上側に複数のノードが隣接しているため、第1の削除部203は、ノードg6と、ノードg1、g2、g3、g4およびg5との隣接関係を表すエッジを削除する。
When a plurality of nodes are adjacent to each other in a predetermined direction of one node, the
また、第2の削除部204は、項目名ノードのうち、所定の方向に項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、項目値ノードとの隣接関係を表すエッジを削除する。なお、第2の削除部204は、項目名ノードのうち、左側または上側に、項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、項目値ノードとの隣接関係を表すエッジを削除するようにしてもよい。例えば、図4の縦列挙と横列挙の複合型の場合、項目名ノードc6の上側に項目値ノードc4が隣接しているため、第2の削除部204は、ノードc6とノードc4との隣接関係を表すエッジを削除する。また、例えば、図6の列挙型入れ子構造の場合、項目名ノードe4の左側に項目値ノードe3およびe7が隣接しているため、第2の削除部204は、ノードe4と、ノードe3およびe7との隣接関係を表すエッジを削除する。
In addition, the
そして、縦列挙取得部206および横列挙取得部207は、第1の削除部203および第2の削除部204によってエッジの削除が行われたグラフを基に、項目名ノードと項目値ノードとの間の論理関係を取得する。具体的に、縦列挙取得部206および横列挙取得部207は、論理関係を、図10または11に示すようなリストとして取得し、取得したリストを列挙リスト301として記憶部30に格納する。図10および11は、列挙リストの一例である。
Then, the vertical enumeration acquisition unit 206 and the horizontal enumeration acquisition unit 207, based on the graph in which the edges are deleted by the
図10は、図4の列挙の論理関係を表した列挙リストである。図10のリストの1行目は、項目名ノードc1の横方向の子がノードc2であることを表している。また、図10のリストの3行目は、項目名ノードc5の縦方向の子がノードc7であることを表している。 FIG. 10 is an enumeration list showing the logical relationship of the enumeration of FIG. The first line of the list in FIG. 10 indicates that the horizontal child of the item name node c1 is the node c2. Further, the third line of the list of FIG. 10 indicates that the vertical child of the item name node c5 is the node c7.
図11は、図7の列挙の論理関係を表した列挙リストである。図11のリストの1行目は、項目名ノードf3の横方向の子がノードf4であることを表している。また、図11のリストの2行目は、項目名ノードf9の横方向の子がノードf10であることを表している。 FIG. 11 is an enumeration list showing the logical relationship of the enumeration of FIG. The first line of the list of FIG. 11 indicates that the horizontal child of the item name node f3 is the node f4. The second line of the list of FIG. 11 indicates that the horizontal child of the item name node f9 is the node f10.
また、例えば、図8の列挙型入れ子構造の場合、第1の削除部203によって、ノードg6と、ノードg1、g2、g3、g4およびg5との隣接関係を表すエッジが削除されているため、縦列挙取得部206および横列挙取得部207が、項目名ノードg2の縦方向の子をg8とするような論理関係を取得することはない。
Further, for example, in the case of the enumerated type nested structure of FIG. 8, the
また、例えば、図8の列挙型入れ子構造の場合、第2の削除部204によって、ノードg14と、ノードg13およびg17との隣接関係を表すエッジが削除されているため、縦列挙取得部206および横列挙取得部207が、項目名ノードg12の横方向の子をg15とするような論理関係を取得することはない。
Further, for example, in the case of the enumerated type nested structure of FIG. 8, since the edge indicating the adjacency relationship between the node g14 and the nodes g13 and g17 is deleted by the
包含関係取得部208は、第1の削除部203によってエッジの削除が行われたグラフを基に、項目名ノード間の包含関係を取得する。また、包含グラフ生成部209は、包含関係取得部208によって取得された包含関係を基に、図12に示すようなグラフを生成し、生成したグラフを包含グラフ302として記憶部30に格納する。図12は、包含グラフについて説明するための図である。図12の破線は縦方向の包含関係を表している。また、図12の実線は横方向の包含関係を表している。以後、対象ノードが縦方向(または横方向)に他のノードを1つ以上包含する場合、対象ノードを縦方向(または横方向)の包含ノードと呼ぶ。また、包含関係のあるノードのうち、他のノードに包含されないノードを主のノード、包含される他のノードを従のノードと呼ぶ。
The inclusion
図12の包含グラフは、図7の列挙型入れ子構造に対応したものである。図7および12に示すように、ノードf2は、ノードf3、f5、f7、f9およびf11を横方向に包含している。また、ノードf13は、ノードf14、f16、f18、f20、f22およびf24を横方向に包含している。また、ノードf1は、ノードf2およびf13を縦方向に包含している。また、f1が主のノード、f2、f3、f5、f7、f9、f11、f13、f14、f16、f18、f20、f22、f2が従のノードとなる。 The inclusion graph of FIG. 12 corresponds to the enumerated type nested structure of FIG. As shown in FIGS. 7 and 12, the node f2 includes nodes f3, f5, f7, f9, and f11 in the horizontal direction. The node f13 includes nodes f14, f16, f18, f20, f22, and f24 in the horizontal direction. The node f1 includes nodes f2 and f13 in the vertical direction. Further, f1 is a main node, and f2, f3, f5, f7, f9, f11, f13, f14, f16, f18, f20, f22, and f2 are subordinate nodes.
具体的に、包含関係取得部208は、第1の項目名ノードの右側に隣接する第1のノード群のうち少なくとも1つが項目名ノードであり、かつ、第1のノード群に含まれる全てのノードの高さが第1の項目名ノードの高さ以下であり、かつ、第1のノード群の左上端のノードの頂点と、第1の項目名ノードの頂点が重なっている場合、第1の項目名ノードが第1のノード群を横方向に包含していると判定する。また、包含関係取得部208は、第2の項目名ノードの下側に隣接する第2のノード群のうち少なくとも1つが項目名ノードであり、かつ、第2のノード群に含まれる全てのノードの幅が第2の項目名ノードの幅以下であり、かつ、第2のノード群の左上端のノードの頂点と、第1の項目名ノードの頂点が重なっている場合、第2の項目名ノードが第2のノード群を縦方向に包含していると判定する。
Specifically, the inclusion
例えば、図7に示すように、項目名ノードf2の右側に隣接するノード群のうち、少なくともノードf3は項目名ノードである。また、項目名ノードf2の右側に隣接するノード群に含まれる全てのノードの高さは、全て項目名ノードf2の高さ以下である。また、項目名ノードf2の右側に隣接するノード群の左上端のノード、すなわちノードf3の頂点は、項目名ノードf2の頂点と重なり、かつ項目名ノードf2の右側に隣接するノード群の左下端のノード、すなわちノードf4の頂点は項目名ノードf2の頂点と重なる。これより、包含関係取得部208は、項目名ノードf2が、項目名ノードf2の右側に隣接するノード群を包含していると判定する。
For example, as shown in FIG. 7, at least the node f3 is an item name node in the node group adjacent to the right side of the item name node f2. The heights of all nodes included in the node group adjacent to the right side of the item name node f2 are all equal to or lower than the height of the item name node f2. Also, the upper left node of the node group adjacent to the right side of the item name node f2, that is, the vertex of the node f3 overlaps with the vertex of the item name node f2, and the lower left end of the node group adjacent to the right side of the item name node f2. , That is, the vertex of the node f4 overlaps the vertex of the item name node f2. Accordingly, the inclusion
なお、包含関係取得部208の処理対象となる様式グラフは、第1の削除部203によるエッジの削除は行われているが、第2の削除部204によるエッジの削除は行われていないものである。このため、例えば、ノードf4と、ノードf5およびf7との間の隣接関係を表すエッジは削除されていない。そのため、包含関係取得部208は、項目名ノードf2が、ノードf5およびf7を横方向に包含していると判定する。
Note that the format graph to be processed by the inclusion
項目名間合成部210は、包含グラフを、図13に示すような、木構造のデータとして表す。図13は、包含グラフについて説明するための図である。そして、項目名間合成部210および列挙合成部211は、縦列挙取得部206および横列挙取得部207によって取得された論理関係と、包含関係取得部208によって取得された包含関係と、を合成した木構造のデータを作成する。また、追加部212は、項目名間合成部210および列挙合成部211によって作成された木構造のデータに、当該木構造を定義する根ノードを追加する。
The item
例えば、列挙合成部211は、図10のリストを基に、図14に示す木構造のデータを作成する。そして、追加部212は、当該木構造のデータに根ノード「form1」を追加する。図14は、木構造のデータの一例である。なお、この場合、図4の列挙には包含関係が存在しないため、項目名間合成部210は、包含グラフを作成しない。
For example, the
また、例えば、列挙合成部211は、図11のリストおよび図13の包含グラフを基に、図15に示す木構造のデータを作成する。そして、追加部212は、当該木構造のデータに根ノード「form2」を追加する。図15は、木構造のデータの一例である。なお、根ノードは様式を構成する論理関係を示すために追加しているため、様式を構成する情報が必要なければ追加部212は必須ではない。
Further, for example, the
なお、木構造データの各ノードである木ノードは、例えば項目名または項目値の文字列等の帳票の書式情報から取得された情報の他に、子や親のノードを識別する情報、子や親のノードとの隣接方向、および当該木ノードが列挙に含まれるものであることを示す情報等を有する。 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 enumeration, and the like.
[第1の実施形態の処理]
次に、論理関係認識装置10の処理の流れについて説明する。まず、図16を用いて抽出部201の処理について説明する。図16は、抽出部の処理の流れを示すフローチャートである。図16に示すように、まず、抽出部201は、様式グラフおよび解析後視覚表現ルールを読み込む(ステップS11)。次に、抽出部201は、様式グラフから解析後視覚表現ルールの条件を満たすノード群を選択する(ステップS12)。次に、抽出部201は、選択したノード群の項目名属性を項目名に設定、すなわち項目名であることを示すフラグの値をtrueにする(ステップS13)。最後に、抽出部201は、様式グラフとGとして返す(ステップS14)。
[Process of First Embodiment]
Next, the processing flow of the logical
次に、図17を用いて解析部202の処理について説明する。図17は、解析部の処理の流れを示すフローチャートである。解析部202は、視覚表現ルールを基に解析後視覚表現ルールを作成する。まず、解析部202は、視覚表現ルール群を読み込む(ステップS21)。次に、解析部202は、ArrayまたはHash型の変数rule_listを生成する(ステップS22)。以降、解析部202は、読み込んだ視覚表現ルールを1つずつ処理する(ステップS23、S27)。
Next, processing of the
まず、解析部202は、視覚表現ルールの条件を解析する(ステップS24)。次に、解析部202は、視覚表現ルールのアクションを解析する(ステップS25)。そして、解析部202は、解析した条件およびアクションを解析後視覚表現ルールとしてrule_listに格納する(ステップS26)。解析部202は、全ての視覚表現ルールについて処理を行った後、解析後視覚表現ルール群が格納されたrule_listを出力する(ステップS28)。
First, the
次に、図18を用いて、第1の削除部203の処理について説明する。図18は、第1の削除部の処理の流れを示すフローチャートである。まず、第1の削除部203は、様式グラフを読み込む(ステップS31)。
Next, processing of the
次に、第1の削除部203は、様式グラフの各ノードについて、以下の処理を行う(ステップS32、S37)。まず、左方向に隣接するノードの本数が2本以上である場合(ステップS33、true)、第1の削除部203は、左方向に隣接するノードと対象ノードの隣接関係を削除する(ステップS34)。また、左方向に隣接するノードの本数が2本以上でない場合(ステップS33、false)、第1の削除部203は、隣接関係を削除しない。
Next, the
次に、上方向に隣接するノードの本数が2本以上である場合(ステップS35、true)、第1の削除部203は、上方向に隣接するノードと対象ノードの隣接関係を削除する(ステップS36)。また、上方向に隣接するノードの本数が2本以上でない場合(ステップS35、false)、第1の削除部203は、隣接関係を削除しない。第1の削除部203は、全ての対象ノードについて処理を行った後、様式グラフを出力する(ステップS38)。
Next, when the number of nodes adjacent in the upward direction is two or more (step S35, true), the
例えば、図8の例では、第1の削除部203は、ノードg1、g2、g3、g4およびg5と、ノードg6との隣接関係や、ノードg13およびg17と、ノードg14との隣接関係を表すエッジを削除する。
For example, in the example of FIG. 8, the
次に、図19を用いて、第2の削除部204の処理について説明する。図19は、第2の削除部の処理の流れを示すフローチャートである。まず、第2の削除部204は、様式グラフおよび項目名ノードリストを読み込む(ステップS41)。なお、項目名ノードリストは、抽出部201によって抽出された項目名ノードのリストである。
Next, the processing of the
次に、第2の削除部204は、項目名ノードのリストの各項目名ノードについて、以下の処理を行う(ステップS42、S47)。まず、左方向に項目値ノードが隣接する場合(ステップS43、true)、第2の削除部204は、左方向に隣接するノードと対象ノードの隣接関係を削除する(ステップS44)。また、左方向に項目値ノードが隣接しない場合(ステップS43、false)、第2の削除部204は、隣接関係を削除しない。
Next, the
次に、上方向に項目値ノードが隣接する場合(ステップS45、true)、第2の削除部204は、上方向に隣接するノードと対象ノードの隣接関係を削除する(ステップS46)。また、上方向に項目値ノードが隣接しない場合(ステップS45、false)、第2の削除部204は、隣接関係を削除しない。第2の削除部204は、全ての対象ノードについて処理を行った後、様式グラフを出力する(ステップS48)。
Next, when the item value node is adjacent in the upward direction (step S45, true), the
例えば、図8の例では、第2の削除部204は、ノードg3とノードg4との隣接関係や、ノードg8と、ノードg12およびg13との隣接関係や、ノードg14およびg17と、ノードg15との隣接関係を表すエッジを削除する。
For example, in the example of FIG. 8, the
次に、図20を用いて、分類部205の処理について説明する。図20は、分類部の処理の流れを示すフローチャートである。以後、対象ノードから右側に隣接しているノードを辿って得られるノードとの関係を「右側に接続する」、対象ノードから下側に隣接しているノードを辿って得られるノードとの関係を「下側に接続する」と呼ぶ。図20に示すように、まず、分類部205は、様式グラフおよび対象ノードを読み込む(ステップS51)。ここで、対象ノードが項目名でない場合(ステップS52、true)、分類部205は、列挙フラグを「列挙なし」に設定する(ステップS58)。なお、列挙フラグは、各対象ノードの分類を「縦列挙」、「横列挙」および「列挙なし」のうちのいずれかで示す変数である。また、列挙には、縦列挙と横列挙の複合型や、列挙入れ子構造も存在するが、これらの列挙は、縦列挙および横列挙の組み合わせで表現することができる。
Next, the processing of the
また、対象ノードが項目名である場合(ステップS52、false)、分類部205は、対象ノードの下側に接続するノード群をbottomsに格納し、対象ノードの右側に接続するノード群をrightsに格納する(ステップS53)。
If the target node is an item name (step S52, false), the
ここで、rightsに項目名が含まれず、rightsの個数が1である場合(ステップS54、true)、分類部205は、列挙フラグを「横列挙」に設定する(ステップS55)。また、rightsに項目名が含まれる場合、またはrightsの個数が1でない場合(ステップS54、false)、分類部205は、以下の処理を行う。
Here, when the item name is not included in rights and the number of rights is 1 (step S54, true), the
bottomsに項目名が含まれず、bottomsの個数が1である場合(ステップS56、true)、分類部205は、列挙フラグを「縦列挙」に設定する(ステップS57)。bottomsに項目名が含まれる場合、または、bottomsの個数が1でない場合(ステップS56、false)、分類部205は、列挙フラグを「列挙なし」に設定する(ステップS58)。最後に、分類部205は、列挙フラグを出力する(ステップS59)。
When the item name is not included in bottoms and the number of bottoms is 1 (step S56, true), the
例えば、図6の例では、対象ノードがノードe1である場合、分類部205は、列挙フラグを「列挙なし」にする。また、対象ノードがノードe4である場合、分類部205は、列挙フラグを「横列挙」にする。
For example, in the example of FIG. 6, when the target node is the node e1, the
次に、図21を用いて、縦列挙取得部206の処理について説明する。図21は、縦列挙取得部の処理の流れを示すフローチャートである。図21に示すように、まず、縦列挙取得部206は、様式グラフおよび対象ノードを読み込む(ステップS61)。次に、縦列挙取得部206は、bottomsに対象ノードの下側に接続するノード群を格納する(ステップS62)。ここで、bottomsに項目名が含まれている場合(ステップS63、true)、縦列挙取得部206は、処理を終了する。また、bottomsに項目名が含まれていない場合(ステップS63、false)、縦列挙取得部206は、親を対象ノード、子をbottoms、方向を縦とする論理関係を取得する(ステップS64)。そして、縦列挙取得部206は、取得した論理関係を列挙リスト301に追加する(ステップS65)。 Next, processing of the vertical enumeration acquisition unit 206 will be described with reference to FIG. FIG. 21 is a flowchart illustrating a process flow of the vertical enumeration acquisition unit. As shown in FIG. 21, first, the vertical enumeration acquiring unit 206 reads a style graph and a target node (step S61). Next, the vertical enumeration acquisition unit 206 stores a node group connected to the lower side of the target node in bottoms (step S62). Here, when the item name is included in bottoms (step S63, true), the vertical enumeration acquisition unit 206 ends the process. If the item name is not included in bottoms (step S63, false), the vertical enumeration acquisition unit 206 acquires a logical relationship in which the parent is the target node, the child is bottoms, and the direction is vertical (step S64). Then, the vertical enumeration acquiring unit 206 adds the acquired logical relationship to the enumeration list 301 (step S65).
例えば、図2の例では、対象ノードがノードa1である場合、縦列挙取得部206は、bottomsにはノードa2およびa3を格納し、親をノードa1、子をノードa2およびa3、方向を縦とする論理関係を取得する。また、対象ノードがノードa4である場合、縦列挙取得部206は、bottomsにはノードa5を格納し、親をノードa4、子をノードa5、方向を縦とする論理関係を取得する。 For example, in the example of FIG. 2, when the target node is the node a1, the vertical enumeration acquisition unit 206 stores the nodes a2 and a3 in bottoms, the parent is the node a1, the child is the nodes a2 and a3, and the direction is the vertical Get the logical relationship. When the target node is the node a4, the vertical enumeration acquisition unit 206 stores the node a5 in bottoms, and acquires a logical relationship in which the parent is the node a4, the child is the node a5, and the direction is vertical.
次に、図22を用いて、横列挙取得部207の処理について説明する。図22は、横列挙取得部の処理の流れを示すフローチャートである。図22に示すように、まず、横列挙取得部207は、様式グラフおよび対象ノードを読み込む(ステップS71)。次に、横列挙取得部207は、rightsに対象ノードの右側に接続するノード群を格納する(ステップS72)。ここで、rightsに項目名が含まれている場合(ステップS73、true)、横列挙取得部207は、処理を終了する。また、rightsに項目名が含まれていない場合(ステップS73、false)、横列挙取得部207は、親を対象ノード、子をrights、方向を横とする論理関係を取得する(ステップS74)。そして、横列挙取得部207は、取得した論理関係を列挙リスト301に追加する(ステップS75)。 Next, the process of the horizontal enumeration acquisition unit 207 will be described with reference to FIG. FIG. 22 is a flowchart showing the flow of processing of the horizontal enumeration acquisition unit. As shown in FIG. 22, first, the horizontal enumeration acquisition unit 207 reads the style graph and the target node (step S71). Next, the horizontal enumeration acquisition unit 207 stores a node group connected to the right side of the target node in rights (step S72). Here, when the item name is included in rights (step S73, true), the horizontal enumeration acquisition unit 207 ends the process. If the item name is not included in rights (step S73, false), the horizontal enumeration acquisition unit 207 acquires a logical relationship in which the parent is the target node, the child is rights, and the direction is horizontal (step S74). Then, the horizontal enumeration acquisition unit 207 adds the acquired logical relationship to the enumeration list 301 (step S75).
例えば、図3の例では、対象ノードがノードb1である場合、横列挙取得部207は、rightsにノードb2を格納し、親をノードb1、子をノードb2、方向を横とする論理関係を取得する。また、対象ノードがノードb3である場合、横列挙取得部207は、rightsにノードb4を格納し、親ノードをb3、子をb4、方向を横とする論理関係を取得する。 For example, in the example of FIG. 3, when the target node is the node b1, the horizontal enumeration acquisition unit 207 stores the node b2 in rights, sets the parent as the node b1, the child as the node b2, and the direction as the horizontal relationship. get. When the target node is the node b3, the horizontal enumeration acquisition unit 207 stores the node b4 in rights, and acquires a logical relationship in which the parent node is b3, the child is b4, and the direction is horizontal.
次に、図23を用いて、包含関係取得部208の処理について説明する。図23は、包含関係取得部の処理の流れを示すフローチャートである。包含関係取得部208は、まず、様式グラフを読み込む(ステップS81)。
Next, processing of the inclusion
ここで、包含関係取得部208は、様式グラフに含まれる各ノードについて、以下の処理を行う(ステップS82、S87)。まず、ノード自身が項目名、かつ右方向に隣接するノードに項目名のノードを含む場合(ステップS83、true)、包含関係取得部208は、右側の包含関係を取得する(ステップS84)。右側の包含関係を取得する処理の詳細については後述する。また、ノード自身が項目名でない場合、または右方向に隣接するノードに項目名のノードを含まない場合(ステップS83、false)、包含関係取得部208は、右側の包含関係を取得しない。
Here, the inclusion
次に、ノード自身が項目名、かつ下方向に隣接するノードに項目名のノードを含む場合(ステップS85、true)、包含関係取得部208は、下側の包含関係を取得する(ステップS86)。下側の包含関係を取得する処理の詳細については後述する。また、ノード自身が項目名でない場合、または下方向に隣接するノードに項目名のノードを含まない場合(ステップS85、false)、包含関係取得部208は、右側の包含関係を取得しない。包含関係取得部208は、全てのノードについて処理を行った後、取得した包含関係を包含関係リストとして出力する(ステップS88)。
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 S85, true), the inclusion
次に、図24を用いて、右側の包含関係を取得する処理について説明する。図24は、右側の包含関係を取得する処理の流れを示すフローチャートである。図24に示すように、まず、包含関係取得部208は、対象ノードおよび様式グラフを読み込む(ステップS101)。次に、包含関係取得部208は、min_yに、対象ノードの右側にあるノード群のy座標の最小値を格納し、max_yに、対象ノードの右側にあるノード群のy座標の最大値を格納する(ステップS102)。
Next, the process of acquiring the right inclusion relationship will be described with reference to FIG. FIG. 24 is a flowchart showing the flow of processing for acquiring the right inclusion relationship. As shown in FIG. 24, first, the inclusion
ここで、対象ノードのy座標の範囲が対象ノードの右側のノード群のy座標の範囲と一致する場合(ステップS103、true)、包含関係取得部208は、listに、対象ノードの右側のノード群を格納する(ステップS107)。なお、包含関係取得部208は、対象ノードの右側のノード群のy座標の範囲を、min_yおよびmax_yを用いて計算する。そして、包含関係取得部208は、listに含まれるノードそれぞれについて以下の処理を行う(ステップS108、S110)。包含関係取得部208は、それぞれのノードrを対象ノードとするたびに、ステップS102に戻り再帰処理を実行する(ステップS109)。
When the y-coordinate range of the target node matches the y-coordinate range of the right node group of the target node (step S103, true), the inclusion
また、対象ノードのy座標の範囲が対象ノードの右側のノード群のy座標の範囲と一致しない場合(ステップS103、false)であって、包含するノードの中に項目値が含まれない場合(ステップS104、false)、包含関係取得部208は、右側に包含する従のノード集合(list)を初期化する(ステップS105)。また、包含するノードの中に項目値が含まれる場合(ステップS104、true)、包含関係取得部208は、初期化を行わない。最後に、包含関係取得部208は、listを出力する(ステップS106)。
Also, 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 S103, false), and the item value is not included in the included node ( In step S104, false), the inclusion
次に、図25を用いて、下側の包含関係を取得する処理について説明する。図25は、下側の包含関係を取得する処理の流れを示すフローチャートである。図25に示すように、まず、包含関係取得部208は、対象ノードおよび様式グラフを読み込む(ステップS151)。次に、包含関係取得部208は、min_xに、対象ノードの下側にあるノード群のx座標の最小値を格納し、max_xに、対象ノードの下側にあるノード群のx座標の最大値を格納する(ステップS152)。
Next, processing for acquiring the lower inclusion relationship will be described with reference to FIG. FIG. 25 is a flowchart showing the flow of processing for acquiring the lower inclusion relationship. As shown in FIG. 25, first, the inclusion
ここで、対象ノードのx座標の範囲が対象ノードの下側のノード群のx座標の範囲と一致する場合(ステップS153、true)、包含関係取得部208は、listに、対象ノードの下側のノード群を格納する(ステップS157)。なお、包含関係取得部208は、対象ノードの下側のノード群のy座標の範囲を、min_xおよびmax_xを用いて計算する。そして、包含関係取得部208は、listに含まれるノードそれぞれについて以下の処理を行う(ステップS158、S160)。包含関係取得部208は、それぞれのノードrを対象ノードとするたびに、ステップS152に戻り再帰処理を実行する(ステップS159)。
If the x-coordinate range of the target node matches the x-coordinate range of the lower node group of the target node (step S153, true), the inclusion
また、対象ノードのx座標の範囲が対象ノードの下側のノード群のx座標の範囲と一致しない場合(ステップS153、false)であって、包含するノードの中に項目値が含まれない場合(ステップS154、false)、包含関係取得部208は、下側に包含する従のノード集合(list)を初期化する(ステップS155)。また、包含するノードの中に項目値が含まれる場合(ステップS154、true)、包含関係取得部208は、初期化を行わない。最後に、包含関係取得部208は、listを出力する(ステップS156)。
Further, 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 S153, false), and the item value is not included in the included node (Step S154, false), the inclusion
次に、図26を用いて、包含グラフ生成部209の処理について説明する。図26は、包含グラフ生成部の処理の流れを示すフローチャートである。図26に示すように、まず、包含グラフ生成部209は、様式グラフおよび包含関係リストを読み込む(ステップS201)。次に、包含グラフ生成部209は、Nvに、包含関係リストから取得した縦方向の包含ノードを格納し、Nhに、包含関係リストから取得した横方向の包含ノードを格納し、IGに、新規包含グラフ集合を格納する(ステップS202)。
Next, processing of the inclusion
ここで、包含グラフ生成部209は、NvおよびNhに含まれる各包含ノードiについて、以下の処理を行う(ステップS203、S213)。以後、他のノードの包含関係から、包含グラフに対象ノードが既に割り当てられている場合、対象ノードを「分割済みのノード」と呼ぶ。まず、包含ノードiが分割済みである場合(ステップS204、true)、包含グラフ生成部209は、次の包含ノードの処理に進む。また、包含ノードiが分割済みでない場合(ステップS204、false)、包含グラフ生成部209は、incに包含ノードiおよび従の項目名ノード集合を格納する(ステップS205)。
Here, the inclusion
ここで、incの中で分割済みのノードがある場合(ステップS206、true)、包含グラフ生成部209は、生成済包含グラフから従のノードが重なっているグラフを探し、当該包含ノードをnに格納する(ステップS207)。次に、包含グラフ生成部209は、包含ノードnを起点とする包含グラフ内にあるノードに追加されていないノード群を追加する(ステップS208)。そして、包含グラフ生成部209は、包含ノードの包含する方向、または項目名の並びから包含方向を設定する(ステップS209)。
Here, when there is a divided node in inc (step S206, true), the inclusion
一方、incの中で分割済みのノードがない場合(ステップS206、false)、包含グラフ生成部209は、新規包含グラフを生成する(ステップS210)。そして、包含グラフ生成部209は、主のノードが包含する方向、または項目名の並びから包含方向を設定し(ステップS211)、新規包含グラフを包含グラフ集合IGに追加する(ステップS212)。包含グラフ生成部209は、全てのiについて処理を行った後、包含グラフ集合IGを出力する(ステップS214)。
On the other hand, when there is no divided node in inc (step S206, false), the inclusion
このように、包含グラフ生成部209は、包含関係のあるノードのうち、包含するノードの数が多いものを優先して処理していく。包含グラフ生成部209は、まず、様式グラフ内の全ての包含関係を取得し、包含方向にノードを探索していく。また、例えば、図7の例では、図12に示すような包含グラフが生成される。また、図8の例では、g1はg6に包含されていないため、g6を起点とした包含グラフとは別に、g1を起点とした包含グラフが生成される。
In this way, the inclusion
次に、図27を用いて、項目名間合成部210の処理について説明する。図27は、項目名間合成部の処理の流れを示すフローチャートである。図27に示すように、まず、項目名間合成部210は、様式グラフ、包含グラフ302、列挙リスト301および始点ノード群を読み込む(ステップS301)。次に、項目名間合成部210は、新規木構造Tを生成する(ステップS302)。なお、始点ノード群は、包含グラフの起点となるノードの集合である。
Next, processing of the item
ここで、項目名間合成部210は、始点ノード群に含まれる各始点ノードについて、以下の処理を行う(ステップS303、S319)。まず、項目名間合成部210は、包含グラフからノードが項目名のノード群を求め、childrenに格納する(ステップS304)。次に、項目名間合成部210は、子をchildren、親をなしとする始点ノード用の新規木ノードtを生成する(ステップS305)。そして、項目名間合成部210は、対象木ノードをtとする(ステップS306)。そして、項目名間合成部210は、対象木ノードの種類を設定せずに木構造に追加する(ステップS307)。
Here, the inter-item
ここで、対象木ノードが列挙リストにある場合(ステップS308、false)、項目名間合成部210は、次の始点ノードの処理に移行する。対象木ノードが列挙リストにない場合(ステップS308、true)であって、さらに、対象木ノードが横方向に包含するノード集合が存在する場合(ステップS309、true)、項目名間合成部210は、対象木ノードの種類を包含に設定する(ステップS310)。そして、項目名間合成部210は、横に包含するノード集合の次のノードを対象ノードとし、ステップS307へ戻り、再帰処理を行う(ステップS311、S312、S313)。
Here, when the target tree node is in the enumeration list (step S308, false), the inter-name-
対象木ノードが列挙リストにない場合(ステップS308、true)であって、さらに、対象木ノードが横方向に包含するノード集合が存在せず(ステップS309、false)、対象木ノードが縦方向に包含するノード集合が存在する場合(ステップS314、true)、項目名間合成部210は、対象木ノードの種類を包含に設定する(ステップS315)。そして、項目名間合成部210は、横に包含するノード集合の次のノードを対象ノードとし、ステップS307へ戻り、再帰処理を行う(ステップS316、S317、S318)。項目名間合成部210は、全ての始点ノードについて処理を行った後、木構造データを出力する(ステップS320)。
When the target tree node is not in the enumeration list (step S308, true), there is no node set that the target tree node includes in the horizontal direction (step S309, false), and the target tree node is in the vertical direction. If there is an included node set (step S314, true), the item
なお、対象木ノードが列挙リストにない場合(ステップS308、true)であって、さらに、対象木ノードが横方向に包含するノード集合が存在せず(ステップS309、false)、対象木ノードが縦方向に包含するノード集合が存在しない場合(ステップS314、false)、項目名間合成部210は、次の始点ノードの処理に移行する。
When the target tree node is not in the enumeration list (step S308, true), there is no node set that the target tree node includes in the horizontal direction (step S309, false), and the target tree node is vertical. If there is no node set included in the direction (step S314, false), the inter-name-
次に、図28を用いて、列挙合成部211の処理について説明する。図28に示すように、列挙合成部211は、まず、様式グラフ、列挙リスト301および木構造データを読み込む(ステップS341)。
Next, processing of the
そして、列挙合成部211は、列挙リスト301の各ノードごとに以下の処理を行う(ステップS342、S347)。まず、列挙合成部211は、新規木ノードを生成する(ステップS343)。次に、列挙合成部211は、木ノードの子を列挙リストの子に設定する(ステップS344)。そして、列挙合成部211は、木ノードを木構造データに合成する(ステップS346)。列挙合成部211は、以上の処理を全てのノードについて行った後、木構造データを出力する(ステップS348)。例えば、図7の例では、図13に示すような木構造データが出力される。
The
次に、図29を用いて、追加部212の処理について説明する。図29は、追加部の処理の流れを示すフローチャートである。図29に示すように、まず、追加部212は、様式グラフおよび木構造データを読み込み、Sに木構造データを格納し、Gに様式グラフを格納する(ステップS351)。次に、追加部212は、ndsに親なしのノード集合を格納し、strに任意の文字列を格納する(ステップS352)。ここで、追加部212は、ndsの左または上方向にある罫線枠外の文字列が取得できれば、取得した文字列をstrに格納する(ステップS353)。
Next, processing of the adding
罫線枠外の文字列が発見されなかった場合(ステップS354、false)、追加部212は、strに格納した任意の文字列を有し、種類を様式とする木ノードをndsの親として木構造データに追加する(ステップS355)。また、罫線枠外の文字列が発見された場合(ステップS354、true)、追加部212は、strに格納した任意の文字列を有し、種類を様式とする木ノードをndsの親として木構造データに追加する(ステップS356)。最後に、追加部212は、木構造データを出力する(ステップS357)。
When a character string outside the ruled line frame is not found (step S354, false), the adding
なお、任意の文字列としては、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は、帳票の項目名または項目値を表す領域に関する情報をノードとして表し、ノード間の隣接関係をエッジとして表したグラフを基に、ノードのうち、あらかじめ設定された条件を満たすノードを、項目名を表す領域のノードである項目名ノードとして抽出する。また、第1の削除部203は、1つのノードの所定の方向に、複数のノードが隣接している場合、1つのノードと複数のノードとの隣接関係を表すエッジを削除する。また、第2の削除部204は、項目名ノードのうち、所定の方向に項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、項目値ノードとの隣接関係を表すエッジを削除する。
[Effect of the first embodiment]
The
縦列挙取得部206および横列挙取得部207は、第1の削除部203および第2の削除部204によってエッジの削除が行われたグラフを基に、項目名ノードと項目値ノードとの間の論理関係を取得する。また、包含関係取得部208は、第1の削除部203によってエッジの削除が行われたグラフを基に、項目名ノード間の包含関係を取得する。また、項目名間合成部210および列挙合成部211は、縦列挙取得部206および横列挙取得部207によって取得された論理関係と、包含関係取得部208によって取得された包含関係と、を合成した木構造のデータを作成する。
The vertical enumeration acquisition unit 206 and the horizontal enumeration acquisition unit 207 are arranged between the item name node and the item value node based on the graph in which the edge is deleted by the
このため、本実施形態によれば、帳票に縦列挙、横列挙、縦列挙と横列挙の複合型、または列挙型入れ子構造が含まれる場合であっても、帳票の項目名間の論理関係、および項目名と項目値との間の論理関係を正確に認識することができるようになる。さらに、本実施形態では、論理関係を半自動的に取得することができるため、帳票の半構造データの取得および活用を効率的に行うことができるようになる。 Therefore, according to the present embodiment, even if the form includes vertical enumeration, horizontal enumeration, a composite type of vertical enumeration and horizontal enumeration, or an enumerated type nested structure, the logical relationship between the item names of the forms, In addition, 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.
また、第1の削除部203は、1つのノードの左側または上側に、複数のノードが隣接している場合、1つのノードと複数のノードとの隣接関係を表すエッジを削除してもよい。また、第2の削除部204は、項目名ノードのうち、左側または上側に、項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、項目値ノードとの隣接関係を表すエッジを削除してもよい。一般的に帳票の項目名間や項目名と項目値との位置関係は、左から右、または上から下である場合が多い。このため、削除する隣接関係の方向を左側と上側に設定しておくことで、多くの帳票に対応するこが可能になる。
In addition, when a plurality of nodes are adjacent to the left side or the upper side of one node, the
包含関係取得部208は、第1の項目名ノードの右側に隣接する第1のノード群のうち少なくとも1つが項目名ノードであり、かつ、第1のノード群に含まれる全てのノードの高さが第1の項目名ノードの高さ以下であり、かつ、第1のノード群の左上端のノードの頂点と、第1の項目名ノードの頂点が重なっている場合、第1の項目名ノードが第1のノード群を包含していると判定する。また、包含関係取得部208は、第2の項目名ノードの下側に隣接する第2のノード群のうち少なくとも1つが項目名ノードであり、かつ、第2のノード群に含まれる全てのノードの幅が第2の項目名ノードの幅以下であり、かつ、第2のノード群の左上端のノードの頂点と、第1の項目名ノードの頂点が重なっている場合、第2の項目名ノードが第2のノード群を包含していると判定する。このように、ノードの隣接関係、高さおよび幅を利用することによって、包含関係を正確に認識することができる。
The inclusion
[その他の実施形態]
論理関係認識の対象は、帳票形式に整形可能であれば、Web画面やシステムGUIであってもよい。例えば、図30に示すようなWeb上で航空券を行うようなWeb画面から、項目名および項目値を取得し、帳票形式に整形することで、当該Web画面を論理関係認識処理の対象とすることができる。図30は、その他の実施形態について説明するための図である。
[Other Embodiments]
The logical relationship recognition target may be a Web screen or a system GUI as long as it can be formatted into a form format. For example, an item name and an item value are acquired from a Web screen on which a ticket is made on the Web as shown in FIG. 30, and the Web screen is subjected to logical relationship recognition processing by formatting it into a form format. be able to. FIG. 30 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
また、論理関係認識装置10は、ユーザが使用する端末装置をクライアントとし、当該クライアントに上記の論理関係認識に関するサービスを提供する論理関係認識サーバ装置として実装することもできる。例えば、論理関係認識サーバ装置は、帳票を入力とし、木構造データを出力とする論理関係認識サービスを提供するサーバ装置として実装される。この場合、論理関係認識サーバ装置は、Webサーバとして実装することとしてもよいし、アウトソーシングによって上記の論理関係認識に関するサービスを提供するクラウドとして実装することとしてもかまわない。
The logical
図31は、プログラムが実行されることにより論理関係認識装置が実現されるコンピュータの一例を示す図である。コンピュータ1000は、例えば、メモリ1010、CPU1020を有する。また、コンピュータ1000は、ハードディスクドライブインタフェース1030、ディスクドライブインタフェース1040、シリアルポートインタフェース1050、ビデオアダプタ1060、ネットワークインタフェース1070を有する。これらの各部は、バス1080によって接続される。
FIG. 31 is a diagram illustrating an example of a computer in which a logical relationship recognition apparatus is realized by executing a program. The
メモリ1010は、ROM(Read Only Memory)1011およびRAM1012を含む。ROM1011は、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。ハードディスクドライブインタフェース1030は、ハードディスクドライブ1090に接続される。ディスクドライブインタフェース1040は、ディスクドライブ1100に接続される。例えば磁気ディスクや光ディスク等の着脱可能な記憶媒体が、ディスクドライブ1100に挿入される。シリアルポートインタフェース1050は、例えばマウス1110、キーボード1120に接続される。ビデオアダプタ1060は、例えばディスプレイ1130に接続される。
The
ハードディスクドライブ1090は、例えば、OS1091、アプリケーションプログラム1092、プログラムモジュール1093、プログラムデータ1094を記憶する。すなわち、論理関係認識装置10の各処理を規定するプログラムは、コンピュータにより実行可能なコードが記述されたプログラムモジュール1093として実装される。プログラムモジュール1093は、例えばハードディスクドライブ1090に記憶される。例えば、論理関係認識装置10における機能構成と同様の処理を実行するためのプログラムモジュール1093が、ハードディスクドライブ1090に記憶される。なお、ハードディスクドライブ1090は、SSDにより代替されてもよい。
The hard disk drive 1090 stores, for example, an
また、上述した実施形態の処理で用いられる設定データは、プログラムデータ1094として、例えばメモリ1010やハードディスクドライブ1090に記憶される。そして、CPU1020が、メモリ1010やハードディスクドライブ1090に記憶されたプログラムモジュール1093やプログラムデータ1094を必要に応じてRAM1012に読み出して実行する。
The setting data used in the processing of the above-described embodiment is stored as
なお、プログラムモジュール1093やプログラムデータ1094は、ハードディスクドライブ1090に記憶される場合に限らず、例えば着脱可能な記憶媒体に記憶され、ディスクドライブ1100等を介してCPU1020によって読み出されてもよい。あるいは、プログラムモジュール1093およびプログラムデータ1094は、ネットワーク(LAN、WAN(Wide Area Network)等)を介して接続された他のコンピュータに記憶されてもよい。そして、プログラムモジュール1093およびプログラムデータ1094は、他のコンピュータから、ネットワークインタフェース1070を介してCPU1020によって読み出されてもよい。
The
10 論理関係認識装置
20 制御部
30 記憶部
201 抽出部
202 解析部
203 第1の削除部
204 第2の削除部
205 分類部
206 縦列挙取得部
207 横列挙取得部
208 包含関係取得部
209 包含グラフ生成部
210 項目名間合成部
211 列挙合成部
212 追加部
301 列挙リスト
302 包含グラフ
DESCRIPTION OF
Claims (5)
1つのノードの所定の方向に、複数のノードが隣接している場合、前記1つのノードと前記複数のノードとの隣接関係を表すエッジを削除する第1の削除部と、
前記項目名ノードのうち、所定の方向に項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、前記項目値ノードとの隣接関係を表すエッジを削除する第2の削除部と、
前記第1の削除部および前記第2の削除部によってエッジの削除が行われた前記グラフを基に、前記項目名ノードと前記項目値ノードとの間の論理関係を取得する第1の取得部と、
前記第1の削除部によってエッジの削除が行われた前記グラフを基に、前記項目名ノード間の包含関係を取得する第2の取得部と、
前記第1の取得部によって取得された論理関係、および前記第2の取得部によって取得された包含関係を合成した木構造のデータを作成する合成部と、
を有することを特徴とする論理関係認識装置。 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
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 synthesis unit that creates data of a tree structure obtained by synthesizing the logical relationship acquired by the first acquisition unit and the inclusion relationship acquired by the second acquisition unit;
A logical relationship recognition apparatus comprising:
前記第2の削除部は、前記項目名ノードのうち、左側または上側に、項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、前記項目値ノードとの隣接関係を表すエッジを削除することを特徴とする請求項1に記載の論理関係認識装置。 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 data is deleted.
帳票の項目名または項目値を表す領域に関する情報をノードとして表し、前記ノード間の隣接関係をエッジとして表したグラフを基に、前記ノードのうち、あらかじめ設定された条件を満たすノードを、項目名を表す領域のノードである項目名ノードとして抽出する抽出工程と、
1つのノードの所定の方向に、複数のノードが隣接している場合、前記1つのノードと前記複数のノードとの隣接関係を表すエッジを削除する第1の削除工程と、
前記第1の削除工程によってエッジの削除が行われた前記グラフを基に、前記項目名ノード間の包含関係を取得する第2の取得工程と、
前記項目名ノードのうち、所定の方向に項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、前記項目値ノードとの隣接関係を表すエッジを削除する第2の削除工程と、
前記第1の削除工程および前記第2の削除工程によってエッジの削除が行われた前記グラフを基に、前記項目名ノードと前記項目値ノードとの間の論理関係を取得する第1の取得工程と、
前記第1の取得工程によって取得された論理関係、および前記第2の取得工程によって取得された包含関係を合成した木構造のデータを作成する合成工程と、
を含んだことを特徴とする論理関係認識方法。 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
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;
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;
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 synthesis step of creating data of a tree structure obtained by synthesizing the logical relationship acquired by the first acquisition step and the inclusion relationship acquired by the second acquisition step;
The logical relationship recognition method characterized by including.
帳票の項目名または項目値を表す領域に関する情報をノードとして表し、前記ノード間の隣接関係をエッジとして表したグラフを基に、前記ノードのうち、あらかじめ設定された条件を満たすノードを、項目名を表す領域のノードである項目名ノードとして抽出する抽出ステップと、
1つのノードの所定の方向に、複数のノードが隣接している場合、前記1つのノードと前記複数のノードとの隣接関係を表すエッジを削除する第1の削除ステップと、
前記第1の削除ステップによってエッジの削除が行われた前記グラフを基に、前記項目名ノード間の包含関係を取得する第2の取得ステップと、
前記項目名ノードのうち、所定の方向に項目値を表す領域のノードである項目値ノードが隣接している項目名ノードと、前記項目値ノードとの隣接関係を表すエッジを削除する第2の削除ステップと、
前記第1の削除ステップおよび前記第2の削除ステップによってエッジの削除が行われた前記グラフを基に、前記項目名ノードと前記項目値ノードとの間の論理関係を取得する第1の取得ステップと、
前記第1の取得ステップによって取得された論理関係、および前記第2の取得ステップによって取得された包含関係を合成した木構造のデータを作成する合成ステップと、
を実行させることを特徴とする論理関係認識プログラム。 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
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;
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;
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 synthesis step of creating data of a tree structure obtained by synthesizing the logical relationship acquired by the first acquisition step and the inclusion relationship acquired by the second acquisition step;
A logical relationship recognition program characterized in that
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016111296A JP6612680B2 (en) | 2016-06-02 | 2016-06-02 | Logical relationship recognition apparatus, logical relationship recognition method, and logical relationship recognition program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016111296A JP6612680B2 (en) | 2016-06-02 | 2016-06-02 | Logical relationship recognition apparatus, logical relationship recognition method, and logical relationship recognition program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2017219883A JP2017219883A (en) | 2017-12-14 |
JP6612680B2 true JP6612680B2 (en) | 2019-11-27 |
Family
ID=60657743
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016111296A Active JP6612680B2 (en) | 2016-06-02 | 2016-06-02 | Logical relationship recognition apparatus, logical relationship recognition method, and logical relationship recognition program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6612680B2 (en) |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4871889B2 (en) * | 2008-01-18 | 2012-02-08 | 株式会社日立ソリューションズ | Table recognition method and table recognition apparatus |
JP6325472B2 (en) * | 2015-03-03 | 2018-05-16 | 日本電信電話株式会社 | Data structure extraction device, data structure extraction method, and data structure extraction program |
-
2016
- 2016-06-02 JP JP2016111296A patent/JP6612680B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2017219883A (en) | 2017-12-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6183376B2 (en) | Index generation apparatus and method, search apparatus, and search method | |
US9575950B2 (en) | Systems and methods for managing spreadsheet models | |
JP5974115B2 (en) | Expression detection engine | |
KR101773574B1 (en) | Method for chart visualizing of data table | |
JP5936138B2 (en) | Apparatus and method for generating operation procedure manual | |
WO2020008991A1 (en) | Verification automation device, verification automation method, and computer-readable recording medium | |
JPWO2016006276A1 (en) | Index generation apparatus and index generation method | |
JP6318513B2 (en) | Representative color extraction apparatus, representative color extraction method, program, and recording medium | |
JP6542712B2 (en) | Logical relation recognition device, logical relation recognition method and logical relation recognition program | |
CN103279347B (en) | The synchronous method of a kind of general software product line domain model and application model | |
JP6612680B2 (en) | Logical relationship recognition apparatus, logical relationship recognition method, and logical relationship recognition program | |
JP6568021B2 (en) | Logical relationship recognition apparatus, logical relationship recognition method, and logical relationship recognition program | |
US11656601B2 (en) | Method and electronic generation device for generating at least one configuration file for an automation tool, related computer program | |
JP2020060919A (en) | System migration support device, system migration support method and program | |
Vernier et al. | A stable greedy insertion treemap algorithm for software evolution visualization | |
JP5875961B2 (en) | Source code similarity evaluation program, source code similarity evaluation apparatus, and computer-readable storage medium | |
JP2019101889A (en) | Test execution device and program | |
JP2017045354A (en) | Software development support program, software development support apparatus, and software development support method | |
JP2011118550A (en) | Program and information processing system | |
JP2013008237A (en) | Related information extraction program, related information extraction method and related information extraction apparatus | |
JP2017076161A (en) | Analyzing method, analyzing device, and analyzing program | |
JP6518000B2 (en) | Analyzer, analysis method and analysis program | |
JP5202598B2 (en) | Workflow management device and workflow management program | |
WO2021240823A1 (en) | Identification device, identification method, and identification program | |
JP7439955B2 (en) | Operation support device, operation support method, and operation support program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180606 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20190422 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20190514 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190625 |
|
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: 20191029 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20191031 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6612680 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |