JP5482165B2 - Program and information extraction device - Google Patents
Program and information extraction device Download PDFInfo
- Publication number
- JP5482165B2 JP5482165B2 JP2009279784A JP2009279784A JP5482165B2 JP 5482165 B2 JP5482165 B2 JP 5482165B2 JP 2009279784 A JP2009279784 A JP 2009279784A JP 2009279784 A JP2009279784 A JP 2009279784A JP 5482165 B2 JP5482165 B2 JP 5482165B2
- Authority
- JP
- Japan
- Prior art keywords
- pattern
- tree structure
- search
- node
- tree
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000605 extraction Methods 0.000 title claims description 29
- 238000007689 inspection Methods 0.000 claims description 92
- 238000000034 method Methods 0.000 claims description 34
- 238000012360 testing method Methods 0.000 claims description 6
- 238000012545 processing Methods 0.000 description 14
- 230000006837 decompression Effects 0.000 description 12
- 230000002776 aggregation Effects 0.000 description 6
- 238000004220 aggregation Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 238000005065 mining Methods 0.000 description 5
- 238000007418 data mining Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000013138 pruning Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000010845 search algorithm Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本発明は、プログラム及び情報抽出装置に関する。 The present invention relates to a program and an information extraction device.
多量のデータを分析して有意な情報を引き出すデータマイニングという技術がある。こうしたデータマイニングでは扱うデータ量が増加すると計算コストが指数関数的に増加するため、冗長な処理を省略することが行われている。例えば下記の特許文献1には、冗長となるパターンを省略して処理する枝刈処理が記載されている。 There is a technique called data mining that analyzes a large amount of data and extracts significant information. In such data mining, if the amount of data handled increases, the calculation cost increases exponentially, so redundant processing is omitted. For example, the following Patent Document 1 describes a pruning process in which a redundant pattern is omitted.
また、XML等の木構造情報(ツリーデータ)群に頻出する木構造のパターンを抽出するサブツリーマイニングに関し、要素の親子関係が厳密に一致する木構造のパターンを得るInduced Subtree Miningでは、木構造のパターンを伸張する際に既に探索した範囲から木構造のパターンの末端に共通する要素を追加できる場合(すなわち、新たなリーフノードを追加できる場合)には、上記木構造のパターンの伸張探索処理を省略しているものがある。 In addition, with regard to sub-tree mining for extracting a tree structure pattern that frequently appears in a tree structure information (tree data) group such as XML, Induced Subtree Mining that obtains a tree structure pattern in which the parent-child relationship of elements exactly matches, When a common element can be added to the end of the tree structure pattern from the already searched range when extending the pattern (that is, when a new leaf node can be added), the tree structure pattern extension search process is performed. Some are omitted.
要素間の親子関係が厳密に保たれていなくとも先祖子孫関係が保たれていれば同じ木構造のパターンとして抽出するEmbedded Subtree Miningでは、木構造のパターンの末端だけではなく内部にも要素が追加された場合を考慮して冗長な探索を招くか否かを判定する必要がある。 Extracted as the same tree structure pattern if the ancestor-descendant relationship is maintained even if the parent-child relationship between elements is not strictly maintained. In Embedded Subtree Mining, elements are added not only at the end of the tree structure pattern but also inside It is necessary to determine whether or not a redundant search is caused in consideration of the case where the search is performed.
本発明の目的は、複数の木構造情報に頻出する木構造パターンを伸張しながら探索する過程でその木構造パターンの内部に要素を追加した場合に冗長な探索を招く木構造パターンを判定するプログラム及び情報抽出装置を提供することにある。 An object of the present invention is a program for determining a tree structure pattern that causes a redundant search when an element is added to the tree structure pattern in the process of searching while expanding the tree structure pattern that frequently appears in a plurality of tree structure information And providing an information extraction device.
上記目的を達成するために、請求項1に記載の発明は、コンピュータを、複数の木構造情報の中から予め定められた数の木構造情報に共通して含まれる木構造のパターンを保持する保持手段、前記保持手段に保持された木構造のパターンから予め定められた条件に基づいてパスを選択するとともに、当該選択されたパスに要素を追加して前記木構造のパターンを伸張する伸張箇所を選択する選択手段、及び、前記木構造のパターンに含まれるいずれかの要素を検査対象要素とし、前記木構造のパターンにおける前記検査対象要素と前記伸張箇所とに基づいて前記複数の木構造情報のそれぞれについて定められる検査範囲から、前記木構造のパターンにおける前記検査対象要素とその子要素との間に要素を追加した共通のパターンが検出される場合に、前記木構造のパターンの前記伸張箇所に新たな要素を追加したパターンの探索を行わないと判定する判定手段として機能させるためのプログラムである。 In order to achieve the above object, according to the first aspect of the present invention, a computer holds a tree structure pattern that is commonly included in a predetermined number of tree structure information among a plurality of tree structure information. An extension part for selecting a path based on a predetermined condition from a tree structure pattern held in the holding means and adding a component to the selected path to expand the tree structure pattern And selecting means for selecting any element included in the tree structure pattern, and the plurality of tree structure information based on the inspection target element and the extension location in the tree structure pattern A common pattern in which an element is added between the inspection target element and its child element in the tree structure pattern is detected from the inspection range determined for each of In case a program for functioning as a determination means not to perform a search pattern that adds a new element to the extension portion of the pattern of the tree structure.
また、請求項2に記載の発明は、請求項1に記載のプログラムにおいて、前記判定手段は、前記定められる検査範囲から、前記木構造のパターンにおける前記検査対象要素とその1つの子要素との間に要素を追加した共通のパターンが検出される場合に、前記木構造のパターンの前記伸張箇所に新たな要素を追加したパターンの探索を行わないと判定することを特徴とする。 Further, the invention according to claim 2 is the program according to claim 1, wherein the determination means determines whether the inspection target element and its one child element in the pattern of the tree structure from the determined inspection range. When a common pattern with elements added between them is detected, it is determined not to search for a pattern in which a new element is added to the decompressed portion of the tree structure pattern.
また、請求項3に記載の発明は、請求項1又は2に記載のプログラムにおいて、前記判定手段は、前記定められる検査範囲から、前記木構造のパターンにおける前記検査対象要素とその複数の子要素とのそれぞれに接続する要素を追加した共通のパターンが検出される場合に、前記木構造のパターンの前記伸張箇所に新たな要素を追加したパターンの探索を行わないと判定することを特徴とする。 According to a third aspect of the present invention, in the program according to the first or second aspect, the determination means includes the inspection target element and the plurality of child elements in the tree structure pattern from the predetermined inspection range. When a common pattern in which an element connected to each of the patterns is added is detected, it is determined not to search for a pattern in which a new element is added to the extension portion of the tree structure pattern. .
また、請求項4に記載の発明は、請求項1から3のいずれかに記載のプログラムにおいて、前記判定手段はさらに、前記定められる検査範囲から、前記木構造のパターンにおける前記検査対象要素に新たな子要素を追加した共通のパターンが検出される場合に、前記木構造のパターンの前記伸張箇所に新たな要素を追加したパターンの探索を行わないと判定することを特徴とする。 According to a fourth aspect of the present invention, in the program according to any one of the first to third aspects, the determination means further adds a new element to the inspection target element in the tree structure pattern from the determined inspection range. When a common pattern to which a child element is added is detected, it is determined not to search for a pattern in which a new element is added to the extension location of the tree structure pattern.
また、請求項5に記載の発明は、請求項1から4のいずれかに記載のプログラムにおいて、前記コンピュータをさらに、前記木構造のパターンにおける前記検査対象要素と前記伸張箇所とに基づいて、前記複数の木構造情報のそれぞれについて前記検査対象要素とその子要素との間に追加された要素の候補を検出する基準位置を設定する設定手段として機能させるためのプログラムである。 The invention according to claim 5 is the program according to any one of claims 1 to 4, wherein the computer is further based on the element to be inspected and the extension location in the pattern of the tree structure. A program for causing each of a plurality of tree structure information to function as a setting unit that sets a reference position for detecting candidate elements added between the inspection target element and its child elements.
また、請求項6に記載の発明は、請求項1から5のいずれかに記載のプログラムにおいて、前記コンピュータをさらに、前記判定手段により前記木構造のパターンの前記伸張箇所に新たな要素を追加した伸張パターンの探索を行うと判定した場合に、当該伸張パターンの候補を前記複数の木構造情報の中から探索する探索手段、前記探索手段により探索された前記伸張パターンの候補に基づいて生成した木構造のパターンを前記保持手段に保持させる手段、前記保持手段に保持された木構造のパターンを前記選択手段、前記判定手段、前記探索手段により伸張する処理を再帰的に実行する手段として機能させるためのプログラムである。 The invention according to claim 6 is the program according to any one of claims 1 to 5, wherein the computer further adds a new element to the extension portion of the tree structure pattern by the determination unit. When it is determined that the expansion pattern is to be searched, search means for searching for the extension pattern candidate from the plurality of tree structure information, and a tree generated based on the extension pattern candidate searched by the search means A function for holding a structure pattern in the holding means; and a function for recursively executing a process of expanding the tree structure pattern held in the holding means by the selection means, the determination means, and the search means. It is a program.
また、請求項7に記載の発明は、複数の木構造情報の中から予め定められた数の木構造情報に共通して含まれる木構造のパターンを保持する保持手段と、前記保持手段に保持された木構造のパターンから予め定められた条件に基づいてパスを選択するとともに、当該選択されたパスに要素を追加して前記木構造のパターンを伸張する伸張箇所を選択する選択手段と、前記木構造のパターンに含まれるいずれかの要素を検査対象要素とし、前記木構造のパターンにおける前記検査対象要素と前記伸張箇所とに基づいて前記複数の木構造情報のそれぞれについて定められる検査範囲から、前記木構造のパターンにおける前記検査対象要素とその子要素との間に要素を追加した共通のパターンが検出される場合に、前記木構造のパターンの前記伸張箇所に新たな要素を追加したパターンの探索を行わないと判定する判定手段と、を含むことを特徴とする情報抽出装置である。 According to a seventh aspect of the present invention, there is provided a holding means for holding a tree structure pattern included in common to a predetermined number of tree structure information from among a plurality of tree structure information, and the holding means holding the tree structure pattern. Selecting a path based on a predetermined condition from the tree-structured pattern selected, and selecting means for adding an element to the selected path and selecting an extension location for extending the tree-structure pattern; Any element included in the tree structure pattern is an inspection target element, and from the inspection range determined for each of the plurality of tree structure information based on the inspection target element and the extension location in the tree structure pattern, The expansion of the tree structure pattern when a common pattern is detected in which an element is added between the inspection target element and its child elements in the tree structure pattern A determination unit not to perform the search of the added pattern a new element at an information extraction device which comprises a.
請求項1及び7に記載の発明によれば、複数の木構造情報に頻出する木構造パターンを伸張しながら探索する過程でその木構造パターンの内部に要素を追加した場合に冗長な探索を招く木構造パターンを判定できる。 According to the first and seventh aspects of the invention, a redundant search is caused when an element is added to the tree structure pattern in the process of searching while expanding the tree structure pattern that frequently appears in a plurality of tree structure information. A tree structure pattern can be determined.
請求項2に記載の発明によれば、木構造パターンにおける検査対象要素とその1つの子要素との間に要素を追加したパターンと探索されるパターンが重複する場合に伸張探索を省略できる。 According to the second aspect of the present invention, the extended search can be omitted when the pattern to be searched overlaps with the pattern in which the element is added between the inspection target element and its one child element in the tree structure pattern.
請求項3に記載の発明によれば、木構造パターンにおける検査対象要素とその複数の子要素との間に設けられる分岐要素を追加したパターンと探索されるパターンが重複する場合に伸張探索を省略できる。 According to the third aspect of the present invention, the extension search is omitted when the pattern to which the branch element provided between the inspection target element and the plurality of child elements in the tree structure pattern is added overlaps with the searched pattern. it can.
請求項4に記載の発明によれば、木構造パターンにおける検査対象要素に新たな子要素を追加したパターンと探索されるパターンが重複する場合に伸張探索を省略できる。 According to the fourth aspect of the present invention, the extension search can be omitted when the pattern to be searched overlaps with the pattern in which a new child element is added to the inspection target element in the tree structure pattern.
請求項5に記載の発明によれば、本構成を有しない場合と比較して、冗長な探索となるか否かの判定を効率化できる。 According to the fifth aspect of the present invention, it is possible to improve the efficiency of determining whether or not the search is redundant as compared with the case where the present configuration is not provided.
請求項6に記載の発明によれば、複数の木構造情報に頻出する木構造パターンがより多くの要素を有するように伸張する際に冗長な伸張探索処理のステップ数を低減できる。 According to the sixth aspect of the present invention, it is possible to reduce the number of steps of redundant decompression search processing when decompressing so that a tree structure pattern that frequently appears in a plurality of tree structure information has more elements.
以下、本発明を実施するための実施の形態(以下、実施形態という)を、図面に従って説明する。 Hereinafter, embodiments for carrying out the present invention (hereinafter referred to as embodiments) will be described with reference to the drawings.
図1には、本実施形態に係る情報抽出装置10の機能ブロック図を示した。図1に示されるように、情報抽出装置10は、ツリーデータ保持部12、パターン候補探索部14、パターン情報保持部16、パターン出現情報保持部18、パターン伸張箇所選択部20、伸張パターン存在範囲管理部22、及び冗長性判定部24を含む。上記の各部の機能は、CPU等の制御手段、メモリ等の記憶手段、外部デバイスとデータを送受信する入出力手段等を備えたコンピュータが、コンピュータ読み取り可能な情報記憶媒体に格納されたプログラムを読み込み実行することで実現されるものとしてよい。なお、プログラムは情報記憶媒体によってコンピュータたる情報抽出装置10に供給されることとしてもよいし、インターネット等のデータ通信手段を介して供給されることとしてもよい。以下、情報抽出装置10が有する各部の機能について詳細に説明する。
FIG. 1 shows a functional block diagram of an
ツリーデータ保持部12は、半導体メモリや磁気ディスク装置等の記憶装置を含み構成され、複数の木構造情報(以下、ツリーデータ)を保持するものである。ツリーデータは、複数の要素(以下、ノード)をその親子関係に基づいて接続したデータである。なお、ツリーデータにおいて頂点に位置するノードをルートノード、末端に位置するノードをリーフノード、ノード間を接続する線をエッジ、ルートノードからリーフノードへと辿る経路をパス、各ノードに該当する具体的情報をラベルと呼称する。ツリーデータ保持部12に保持されるツリーデータは、図示しない入力デバイスを介してユーザーから入力されてもよいし、他のデバイスからのデータ転送により取得することとしてもよい。 The tree data holding unit 12 includes a storage device such as a semiconductor memory or a magnetic disk device, and holds a plurality of tree structure information (hereinafter, tree data). Tree data is data in which a plurality of elements (hereinafter, nodes) are connected based on their parent-child relationships. In the tree data, the node located at the apex is the root node, the node located at the end is the leaf node, the line connecting the nodes is the edge, the path from the root node to the leaf node is the path, and each node corresponds to each node The target information is called a label. The tree data held in the tree data holding unit 12 may be input from a user via an input device (not shown), or may be acquired by data transfer from another device.
図2には、ツリーデータ保持部12に保持されるツリーデータの一例を示した。図2に示されたツリーデータは、ツリーデータ保持部12に保持される複数のツリーデータの一部である。本実施形態では、ツリーデータ保持部12に保持される複数のツリーデータのうち予め定められた条件を満たす木構造のパターンを抽出する処理を行う。上記条件は、例えば複数のツリーデータの中から予め定められた数(又は割合)のツリーデータに共通した、先祖子孫関係が一致する木構造のパターンであること(すなわちEmbedded Subtree Miningを用いる)としてよい。木構造のパターンを抽出する対象とするツリーデータは、ツリーデータ保持部12に保持されるツリーデータのすべてとしてもよいし、その一部を選択することとしてもよい。 FIG. 2 shows an example of tree data held in the tree data holding unit 12. The tree data shown in FIG. 2 is a part of a plurality of tree data held in the tree data holding unit 12. In the present embodiment, a process of extracting a tree structure pattern that satisfies a predetermined condition from among a plurality of tree data held in the tree data holding unit 12 is performed. The above condition is, for example, a tree structure pattern that is common to a predetermined number (or percentage) of tree data among a plurality of tree data and that has an identical ancestor-descendant relationship (that is, using Embedded Subtree Mining). Good. The tree data to be extracted from the tree structure pattern may be all of the tree data held in the tree data holding unit 12, or a part thereof may be selected.
パターン候補探索部14は、ツリーデータ保持部12に保持される複数のツリーデータの中から指定されたパターンに合致する候補を探索するものである。具体的には、パターン候補探索部14は、処理時点で得られている木構造のパターンに要素を加えて伸張したパターンに該当する候補を各ツリーデータから探索し、探索された候補が予め定められた条件(例えば予め定められた数以上あること)を満たせば、当該候補を上記の木構造のパターンに加えていく探索処理を行うものである。なお、パターン候補探索部14は、伸張パターンの探索を、伸張箇所の候補となるノードを各ツリーデータから探索することにより行うこととしてよい。また、パターン候補探索部14は、各ツリーデータに頻出する木構造のパターンについて指定された初期パターンが存在する場合には当該初期パターンに基づいて探索処理を開始することとしてよく、指定された初期パターンが存在しない場合には1ノードを初期パターンとして探索処理を開始することとしてよい。
The pattern
パターン情報保持部16は、パターン候補探索部14により探索された木構造パターンを保持するものである。パターン情報保持部16は、パターン候補探索部14により順次探索された木構造パターンをすべて保持することとしてもよいし、その一部を選択的に保持することとしてもよい。
The pattern
パターン出現情報保持部18は、パターン候補探索部14により探索された木構造パターンがツリーデータ保持部12に保持される各ツリーデータのどこに出現しているかを示すパターン出現情報を保持するものである。
The pattern appearance
パターン伸張箇所選択部20は、パターン情報保持部16に保持される木構造パターンにノードを追加して伸張する箇所を選択するものである。本実施形態では木構造パターンを深さ優先により探索する(深さ優先探索)こととし、パターン伸張箇所選択部20は、伸張対象とする木構造パターンの右端のパス(以下、RMP(Right Most Path))を選択し、当該選択したRMPのノード又はエッジを新たなノードを追加する伸張箇所として選択することとしてよい。なお、深さ優先探索とは、探索を開始するノードから下方向にパスを辿っていき、複数のパスに分岐するノードでは左側のノードを選択してリーフノードに至るまで探索し、リーフノードに至ると、他のパスとの分岐点まで戻り、分岐点からは当該他のパスを辿り、ここでも分岐点では左側のノードを選択してリーフノードに至るまで探索する、という処理を繰り返す探索である。
The pattern expansion
図3には、探索される木構造パターンの一例を、図4にはRMP上に設定された伸張箇所の一例を示した。図3は、ツリーデータに共通して含まれる木構造パターンの一例であり、右端のパスがRMPとなる。 FIG. 3 shows an example of a tree structure pattern to be searched, and FIG. 4 shows an example of a decompression location set on the RMP. FIG. 3 is an example of a tree structure pattern that is commonly included in the tree data, and the rightmost path is RMP.
図4に示されるように、RMPへのノードの追加は、図4(A)のようにRMPの各ノードの新たな子ノードとして追加することとしてもよいし、図4(B)のようにノードとノード間のエッジ上にノードを入れ込むものも含むこととしてもよい。 As shown in FIG. 4, the addition of a node to the RMP may be added as a new child node of each node of the RMP as shown in FIG. 4A, or as shown in FIG. It is good also as what includes a node on the edge between nodes.
伸張パターン存在範囲管理部22は、パターン伸張箇所選択部20により選択された伸張箇所にノードを追加した部分木構造が存在するツリーデータ上の存在範囲を管理するものである。伸張パターン存在範囲管理部22は、伸張ノードを追加する前の木構造パターンのツリーデータ上における出現箇所に基づいて、上記存在範囲を特定し管理することとしてよい。伸張パターン存在範囲管理部22において管理される情報は、伸張箇所が選択された際に伸張パターンの存在範囲を絞り込む際に用いられるとともに、伸張パターンの候補を探索する際にも用いられることとしてよい。
The expansion pattern existence
冗長性判定部24は、検査対象ノード選択部26、第1冗長性判定部28、第2冗長性判定部30、第3冗長性判定部32、集計基準位置設定部34を含み、パターン伸張箇所選択部20により選択された伸張箇所にノードを追加したパターンが冗長な探索となるか否かを判定するものである。冗長な探索となると判定された場合にはそのパターンについての探索処理は省略される。以下、冗長性判定部24による判定処理の詳細について説明する。
The
検査対象ノード選択部26は、伸張箇所が選択されたパターンに含まれるノードの1つを検査対象ノードとして順次選択するものである。検査対象ノード選択部26による検査対象ノードの選択順序は特に限定されるものではなく、例えば左側のパスの上位ノードから順に選択することとしてもよいし、伸張箇所の兄弟ノード、親ノード、子ノード等の周囲にあるノードから順に選択することとしてもよい。後者の方法により、XMLデータのように構造が定義されているデータにおいて伸張箇所と同じラベルが出現し易い伸張箇所の周囲のノードから検査を行うことで、他の部分から検査を行う場合に比べて枝刈処理の効率が向上する。
The inspection target
第1冗長性判定部28は、検査対象ノード選択部26により選択された検査対象ノードに新たなリーフノードを追加したパターンが冗長な探索となるか否かを判定するものである。具体的には、第1冗長性判定部28は、パターン伸張箇所と、検査対象ノードとに基づいて定められた、パターンの探索がすでに行われているか、パターンを包含する他のパターンの探索範囲となる範囲に、検査対象ノードについてラベルが共通する新たなリーフノードが存在する場合には、冗長性ありと判定する。
The first
図5には、第1冗長性判定部28における、検査対象ノードに関する検査範囲を示した。図5においては、パターンにおける検査対象ノードとその子ノードをツリーデータ上で対応させた例を示している。図5に示されるように、検査対象ノードに関する検査範囲は、まず、検査対象ノードに接続する各子ノードの左側の領域が選ばれ、そして検査対象ノードがRMPにあるか否か、そして伸張箇所と検査対象ノードとの位置関係に応じて右端の子ノードの右側の領域も検査範囲に選ばれる。そして、各ツリーデータについて定めた検査範囲から同じラベルのノードが検出された場合には冗長性ありと判定される。また、第1冗長性判定部28は、検査対象ノードがルートノードである場合に、当該ルートノードに新たなルートノードを追加したパターンが冗長な探索となるか否かについても判定することとしてよい。
FIG. 5 shows the inspection range related to the inspection target node in the first
第2冗長性判定部30は、検査対象ノード選択部26により選択された検査対象ノードとその1つの子ノードとの間に新たなノード(1エッジ上ノード)を追加したパターンが冗長な探索となるか否かを判定するものである。具体的には、第2冗長性判定部30は、パターン伸張箇所と、検査対象ノードとに基づいて定められた、パターンの探索がすでに行われているか、パターンを包含する他のパターンの探索範囲となる範囲に、検査対象ノードについてラベルが共通する新たな1エッジ上ノードが存在する場合には、冗長性ありと判定する。なお、検査対象ノードに子ノードがない場合には1エッジ上ノードは存在しないため、第2冗長性判定部30による冗長性判定を省略してよい。
The second
図6には、第2冗長性判定部30における、検査対象ノードに関する検査範囲を示した。図6においては、パターンにおける検査対象ノードとその子ノードをツリーデータ上で対応させた例を示している。図6に示されるように、検査対象ノードに関する検査範囲は、検査対象ノードとその子ノードとの間の領域となる。そして、各ツリーデータについて定めた検査範囲から同じラベルのノードが検出された場合には冗長性ありと判定される。ただし、図7に例示されるように、検査対象ノードに複数の子ノードがあり、検査対象ノードとその一部の子ノードの分岐点ノードとなるノードは1エッジ上ノードには該当しないため、こうしたノードはラベルの検出対象から除外する。
FIG. 6 shows the inspection range related to the inspection target node in the second
第3冗長性判定部32は、検査対象ノード選択部26により選択された検査対象ノードとその複数の子ノードとの間に各ノードに接続する新たなノード(分岐点ノード)を追加したパターンが冗長な探索となるか否かを判定するものである。具体的には、第3冗長性判定部32は、パターン伸張箇所と、検査対象ノードに基づいて定められた、パターンの探索がすでに行われているか、パターンを包含する他のパターンの探索範囲となる範囲に、検査対象ノードについてラベルが共通する新たな分岐点ノードが存在する場合には、冗長性ありと判定する。分岐点ノードは、図7におけるノードLaに相当し、当該ノードLaが検査範囲となる。なお、検査対象ノードに複数の子ノードがない場合には分岐点ノードは存在しないため、第3冗長性判定部32による冗長性判定を省略してよい。
The third
なお、第3冗長性判定部32は、検査対象ノードの子ノードに関して取り得る組み合わせの各々について検査範囲を定め、ラベルが共通する分岐点ノードの存在を検査することとする。
Note that the third
集計基準位置設定部34は、検査対象ノードと伸張箇所とに基づいて、伸張箇所を伸張させたパターンが冗長な探索となるか否かを判定する際にラベルが共通する新リーフノード、1エッジ上ノード、又は分岐点ノードの存在を集計する基準となるツリーデータ上の位置(集計基準位置)を設定するものである。集計基準位置設定部34は、ツリーデータ上において、パターンの伸張箇所に該当するノードが複数存在する場合に、検査対象ノード、伸張箇所に基づいて、集計基準位置を設定する。例えば集計基準位置は、検査対象ノードが存在するパス上から、検査対象ノードと伸張箇所と検査対象パターンの子ノードとの関係に応じて選択した位置としてよい。この集計基準位置の設定の具体例については以下に述べる。
The total reference
図8には、伸張箇所の上位に検査対象ノードがある場合に設定される集計基準位置の一例を示した。図8(A)に示されるように、ツリーデータ上において伸張箇所に該当するノードが複数あり、さらに検査対象ノードの出現箇所も複数ある場合に、集計基準位置となり得るノードのうち最上位にあるものを集計基準位置として設定することとしてよい。 FIG. 8 shows an example of the total reference position that is set when there is a node to be inspected at the upper part of the extension part. As shown in FIG. 8A, when there are a plurality of nodes corresponding to the expansion locations on the tree data, and there are also a plurality of appearance locations of the nodes to be inspected, the node is at the top of the nodes that can be the aggregation reference position. A thing may be set as the total reference position.
また、図8(B)に示されるように、ツリーデータ上において伸張箇所に該当するノードが複数あり、伸張箇所とは異なるパス上に検査対象ノードの出現箇所が複数ある場合には、伸張箇所、検査対象ノードがそれぞれ存在するパスが上位側で交わる位置を集計基準位置として設定することとしてよい。 Also, as shown in FIG. 8B, when there are a plurality of nodes corresponding to the expansion location on the tree data and there are a plurality of locations where the inspection target node appears on a path different from the expansion location, the expansion location The position at which the paths where the nodes to be inspected each intersect on the upper side may be set as the total reference position.
図9には、伸張箇所、検査対象ノードが一致する場合に設定される集計基準位置の一例を示した。図9に例示されるように、伸張箇所と検査対象ノードが一致する場合であって、ツリーデータ上において伸張箇所に該当するノードが複数ある場合に、集計基準位置は伸張箇所の最上位の位置として設定することとしてよい。 FIG. 9 shows an example of the total reference position that is set when the extension location matches the inspection target node. As illustrated in FIG. 9, when the extension location matches the inspection target node and there are a plurality of nodes corresponding to the extension location on the tree data, the aggregation reference position is the highest position of the extension location. It may be set as
図10には、伸張箇所の下位に検査対象ノードが位置する場合に設定される集計基準位置の一例を示した。図10に示されるように、ツリーデータ上において伸張箇所の子ノードのうちより下位に位置するものの位置に応じて集計基準位置を設定することとしてよい。 FIG. 10 shows an example of the total reference position that is set when the inspection target node is positioned below the extended portion. As shown in FIG. 10, the aggregation reference position may be set according to the position of the child node located at a lower position among the child nodes at the expansion location on the tree data.
冗長性の判定は、各ツリーデータについて設定した集計基準位置について他のツリーデータとの共通ラベルがあったか否かのフラグを記録し、すべての集計基準位置について他のツリーデータとの共通ラベルがあったとのフラグが記録された場合に冗長性があると判定し、そうでない場合には冗長性がないと判定することで行うこととしてよい。そして、冗長性判定部24は、第1乃至第3冗長性判定部32のいずれかにより冗長性があると判定された場合に冗長性ありと判定することとする。
The redundancy is determined by recording a flag indicating whether or not there is a common label with other tree data for the aggregation reference position set for each tree data, and there is a common label with other tree data for all the aggregation reference positions. It may be determined by determining that there is redundancy when the flag is recorded, and otherwise determining that there is no redundancy. The
パターン候補探索部14は、処理対象とするパターンの伸張箇所について冗長性判定部24により冗長性があると判定された場合にはその伸張箇所を伸張したパターンについての探索処理は行わないこととし、冗長性がないと判定されたパターンについてのみ探索処理を行うこととする。パターン候補探索部14により伸張されたパターンに基づいて探索された新たな木構造パターンはパターン情報保持部16に格納される。そして情報抽出装置10は、パターンの探索、探索されたパターンの伸張箇所の選択、選択された伸張箇所の冗長性判定、冗長性がない伸張パターンに基づくパターンの探索という処理を再帰的に繰り返すことで、より要素数の多い木構造パターンを抽出する。
The pattern
図11には、図2に示したツリーデータから探索されるパターンの例を示した。拡張パターンの探索される順序により、図11に示されるパターンP1とパターンP1を拡張したパターンが既に探索された後に、他のパターンP2〜P4を伸張しようとする際には、以下の冗長性判定が行われる。 FIG. 11 shows an example of a pattern searched from the tree data shown in FIG. When the patterns P1 and P1 shown in FIG. 11 are already searched for in the order in which the extended patterns are searched, and the other patterns P2 to P4 are to be expanded, the following redundancy determination is performed. Is done.
まず、パターンP2のラベルAのノードを伸張箇所、ラベルBのノードを検査対象ノードとすると、第1冗長性判定部28により検査対象ノードの子ノードであるラベルDのノードが検査範囲から共通して見つかるため、このパターンP2の上記伸張箇所にノードを追加した伸張パターンは冗長な探索となると判定される。
First, assuming that the label A node of the pattern P2 is the extension location and the label B node is the inspection target node, the first
次に、パターンP3のラベルCのノードを伸張箇所、ラベルAのノードを検査対象ノードとすると、第2冗長性判定部30により検査対象ノードとその子ノードKとの間に設けられる1エッジ上ノードにラベルJのノードが共通して見つかるため、このパターンP3の上記伸張箇所にノードを追加した伸張パターンは冗長な探索となると判定される。
Next, assuming that the node of the label C of the pattern P3 is an expanded portion and the node of the label A is a node to be inspected, the node on one edge provided between the node to be inspected and its child node K by the second
さらに、パターンP4のラベルCのノードを伸張箇所、ラベルAのノードを検査対象ノードとすると、第3冗長性判定部32により検査対象ノードとその子ノードD,Eとの間に設けられる分岐点ノードにラベルBのノードが共通して見つかるため、このパターンP4の上記伸張箇所にノードを追加した伸張パターンは冗長な探索となると判定される。
Further, assuming that the node of label C in pattern P4 is the extension location and the node of label A is the node to be inspected, a branch point node provided between the node to be inspected and its child nodes D and E by the third
次に、図12,図13,図14に示したフローチャートを参照しながら、情報抽出装置10により行われる処理の流れの例を説明する。
Next, an example of the flow of processing performed by the
図12は、情報抽出装置10により行われる情報抽出処理の例を示すフローチャートを示している。図12に示されるように、情報抽出装置10はツリーデータ保持部12に保持されるツリーデータについて頻出するノード(頻出ノード)を探索し(S101)、未処理の頻出ノードが残っている場合には(S102:Y)、未処理の頻出ノードを選択して(S103)、パターンデータを作成して(S104)、パターンの伸張探索処理を行う(S105)。パターンの伸張探索処理の詳細については後述する。パターンの伸張探索処理が終了するとS102に戻り、未処理の頻出ノードが残っていない場合には(S102:N)、処理を終了する。
FIG. 12 is a flowchart illustrating an example of information extraction processing performed by the
図13は、パターンの伸張探索処理の例を示すフローチャートを示している。図13に示されるように、情報抽出装置10は、パターンからRMPを選定し(S201)、選定したRMP上に未処理の伸張箇所があるか否かを判断する(S202)。ここで、情報抽出装置10は、未処理の伸張箇所があると判断する場合には(S202:Y)、未処理の伸張箇所の1つを選択し(S203)、伸張箇所にノードを追加した伸張パターンの冗長性判定処理を行う(S204)。冗長性判定処理の詳細については後述する。
FIG. 13 is a flowchart illustrating an example of pattern expansion search processing. As shown in FIG. 13, the
情報抽出装置10は、冗長性判定処理により冗長性があると判定された場合には(S205:Y)、その判定結果を記録し、処理S202に戻ってそれ以降の処理を繰り返す。一方で、情報抽出装置10は、冗長性判定処理により冗長性がないと判定された場合には(S205:N)、伸張箇所にノードを追加した伸張パターンの候補をツリーデータから探索する(S206)。
When it is determined that there is redundancy in the redundancy determination process (S205: Y), the
情報抽出装置10は、探索されたパターンの候補について未処理のものがある場合には(S207:Y)、未処理のパターン候補を1つ選択し(S208)、パターンの伸張探索処理を再帰的に実行する(S209)。そして、情報抽出装置10は、未処理のパターン候補がなくなると(S207:N)、S202に戻りそれ以降の処理を繰り返す。なお、S202において未処理の伸張箇所がないと判断された場合には(S202:N)、親プロセスにリターンする。
If there is an unprocessed pattern candidate for the searched pattern candidate (S207: Y), the
図14には、冗長性判定処理の例を示すフローチャートを示した。図14に示されるように、情報抽出装置10は、伸張箇所が選定されたパターンの中から未処理の検査対象ノードがある場合には(S301:Y)、未処理の検査対象ノードを1つ選択する(S302)。
FIG. 14 shows a flowchart illustrating an example of the redundancy determination process. As shown in FIG. 14, when there is an unprocessed inspection target node from the pattern in which the decompression location is selected (S301: Y), the
情報抽出装置10は、検査対象ノードに対する新たなリーフノードを追加したパターンが冗長な探索となるか否かを判定(第1冗長性判定)し(S303)、冗長な探索となると判定した場合には(S303:Y)、冗長性ありと記録して(S306)、リターンする。また、情報抽出装置10は、第1冗長性判定により冗長性が判定されない場合には(S303:N)、検査対象ノードとその子ノードとの間に設けられる1エッジ上ノードを追加したパターンが冗長な探索となるか否かを判定(第2冗長性判定)し(S304)、冗長な探索となると判定した場合には(S304:Y)、冗長性ありと記録して(S306)、リターンする。さらに、情報抽出装置10は、第2冗長性判定により冗長性が判定されない場合には(S304:N)、検査対象ノードとその複数の子ノードとの間に設けられる分岐点ノードを追加したパターンが冗長な探索となるか否かを判定(第3冗長性判定)し(S305)、冗長な探索となると判定した場合には(S304:Y)、冗長性ありと記録して(S306)、リターンする。情報抽出装置10は、未処理の検査対象ノードがなくなった場合には(S301:N)、冗長性なしと記録して(S307)、リターンする。
The
なお、上記の冗長性判定処理では、第1冗長性判定から第3冗長性判定の順に実行することとしたが、冗長性判定の順序はこれに限定されない。また、上記の冗長性判定処理において、検査対象ノードの子ノードの有無及び子ノードの数に応じて第1冗長性判定から第3冗長性判定の中から不要な冗長性判定処理を省略することとしてよい。 In the above redundancy determination process, the first redundancy determination to the third redundancy determination are executed in this order. However, the redundancy determination order is not limited to this. Further, in the above redundancy determination processing, unnecessary redundancy determination processing is omitted from the first redundancy determination to the third redundancy determination depending on the presence / absence of child nodes of the node to be inspected and the number of child nodes. As good as
上記の実施形態に係る情報抽出装置10では、Embedded Subtree Miningにおいて、探索されたパターンを伸張した伸張パターンについての探索を開始する前に、パターンの内部にノードを埋め込んだ場合に他のパターンとの関係で冗長な探索となるか否かを判別し、冗長と判別された伸張パターンについての探索を行わないようにしたことで、こうした構成を有さない場合に比べて、ツリーデータに頻出する木構造パターンを抽出するのに要する処理ステップの数が低減される。
In the
本発明は上記の実施形態に限定されるものではなく、例えば上記の実施形態では伸張箇所をRMPから選択しているが、パターン探索のアルゴリズムを適切に設定すれば左端のパス(LMP)や他の条件に基づいて選択されたパスから選択することとしても構わない。 The present invention is not limited to the above-described embodiment. For example, in the above-described embodiment, the decompression location is selected from the RMP, but if the pattern search algorithm is appropriately set, the leftmost path (LMP) or other It is also possible to select from the paths selected based on the above condition.
10 情報抽出装置、12 ツリーデータ保持部、14 パターン候補探索部、16 パターン情報保持部、18 パターン出現情報保持部、20 パターン伸張箇所選択部、22 伸張パターン存在範囲管理部、24 冗長性判定部、26 検査対象ノード選択部、28 第1冗長性判定部、30 第2冗長性判定部、32 第3冗長性判定部、34 集計基準位置設定部。
DESCRIPTION OF
Claims (6)
それぞれ複数の要素を親子関係に基づき接続して構成される複数の木構造情報の中から予め定められた数の木構造情報に共通して含まれる、要素間の先祖子孫関係を示す木構造のパターンを保持する保持手段、
前記保持手段に保持された1つの木構造のパターンから予め定められた条件に基づいてパスを選択するとともに、当該選択されたパスに要素を追加して前記1つの木構造のパターンを伸張する伸張箇所を選択する選択手段、
前記1つの木構造のパターンの前記伸張箇所に追加する要素の候補を、前記複数の木構造情報から探索する探索手段、及び、
前記1つの木構造のパターンに含まれるいずれかの要素を検査対象要素とし、前記1つの木構造のパターンにおける前記検査対象要素と前記伸張箇所とに基づいて定められる、前記保持手段に保持される他の木構造のパターンに含まれる検査範囲において、前記1つの木構造のパターンにおける前記検査対象要素とその子要素を含み、前記検査対象要素とその子要素との間に要素が含まれる場合に、前記1つの木構造のパターンの前記伸張箇所について前記探索手段による探索を行わないと判定する判定手段
として機能させるためのプログラム。 Computer
A tree structure that indicates the ancestor-descendant relationship between elements included in a predetermined number of tree structure information among a plurality of tree structure information configured by connecting a plurality of elements based on a parent-child relationship . Holding means for holding the pattern,
Extension that selects a path from a single tree structure pattern held in the holding means based on a predetermined condition and adds an element to the selected path to expand the one tree structure pattern A selection means for selecting a location,
Search means for searching for candidate elements to be added to the extension location of the one tree structure pattern from the plurality of tree structure information; and
Wherein one of the elements included in the pattern of a single tree is inspected element is determined on the basis of said extension portion and the inspection target element in the pattern of said one of the tree, is held by the holding means In the inspection range included in another tree structure pattern, when the inspection target element and its child element in the one tree structure pattern are included, and an element is included between the inspection target element and its child element , program for functioning as a determination means not to perform a search by said searching means with the extension portion of the pattern of one of the tree.
ことを特徴とする請求項1に記載のプログラム。 The determining means is the inspection range in which the determined, said comprising one of the inspection target element in the pattern of the tree structure and its one child element contains elements between said object element and one child element that case, the program according to claim 1, wherein the determining not to perform the search by said one of said search means with said extension portion of the pattern of the tree structure.
ことを特徴とする請求項1又は2に記載のプログラム。 The determination means includes the inspection target element and the plurality of child elements thereof in the one tree structure pattern in the defined inspection range , and the inspection target is between the inspection target element and the plurality of child elements. claims when containing the elements to be connected to each element and the plurality of child elements, wherein the determining not to perform the search by said one of said search means with said extension portion of the pattern of the tree structure The program according to 1 or 2.
ことを特徴とする請求項1から3のいずれかに記載のプログラム。 Said determining means further, in the inspection range in which the determined, if the include the inspected elements in the pattern of one of the tree include child elements connected to the test target element, the pattern of said one of the tree structure the program according to any one of claims 1 to 3, with the extended portion, wherein the determining not to perform the search by said search means.
前記探索手段により探索された前記伸張箇所に追加する要素の候補が、前記複数の木構造情報の中に予め定められた数以上ある場合に、該候補の要素を前記1つの木構造のパターンの前記伸張箇所に追加した新たな木構造のパターンを前記保持手段に保持させる手段、
前記保持手段に保持された木構造のパターンを前記選択手段、前記判定手段、前記探索手段により伸張する処理を再帰的に実行する手段
として機能させるための請求項1から4のいずれかに記載のプログラム。 The computer further,
Pattern before Symbol candidate elements to be added to the extension portion, which is searched by the search means, in advance when others above defined, the elements of the candidate one tree in the plurality of tree structure information Means for causing the holding means to hold a new tree structure pattern added to the stretched portion of
Said selecting means the pattern of the tree structure which is held by the holding means, the determining means, according to any one of claims 1 to 4 for operating the process of decompressing as a means for performing recursively by said searching means program.
前記保持手段に保持された1つの木構造のパターンから予め定められた条件に基づいてパスを選択するとともに、当該選択されたパスに要素を追加して前記1つの木構造のパターンを伸張する伸張箇所を選択する選択手段と、
前記1つの木構造のパターンの前記伸張箇所に追加する要素の候補を、前記複数の木構造情報から探索する探索手段と、
前記1つの木構造のパターンに含まれるいずれかの要素を検査対象要素とし、前記1つの木構造のパターンにおける前記検査対象要素と前記伸張箇所とに基づいて定められる、前記保持手段に保持される他の木構造のパターンに含まれる検査範囲に、前記1つの木構造のパターンにおける前記検査対象要素とその子要素を含み、前記検査対象要素とその子要素との間に要素が含まれる場合に、前記1つの木構造のパターンの前記伸張箇所について前記探索手段による探索を行わないと判定する判定手段と、
を含むことを特徴とする情報抽出装置。 A tree structure that indicates the ancestor-descendant relationship between elements included in a predetermined number of tree structure information among a plurality of tree structure information configured by connecting a plurality of elements based on a parent-child relationship . Holding means for holding the pattern;
Extension that selects a path from a single tree structure pattern held in the holding means based on a predetermined condition and adds an element to the selected path to expand the one tree structure pattern A selection means for selecting a location;
Search means for searching for candidate elements to be added to the extension location of the one tree structure pattern from the plurality of tree structure information;
Wherein one of the elements included in the pattern of a single tree is inspected element is determined on the basis of said extension portion and the inspection target element in the pattern of said one of the tree, is held by the holding means When the inspection range included in another tree structure pattern includes the inspection target element and its child element in the one tree structure pattern, and an element is included between the inspection target element and its child element , a determination unit not to perform the search by the searching means with the extension portion of the pattern of one tree,
An information extraction apparatus comprising:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009279784A JP5482165B2 (en) | 2009-12-09 | 2009-12-09 | Program and information extraction device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009279784A JP5482165B2 (en) | 2009-12-09 | 2009-12-09 | Program and information extraction device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2011123619A JP2011123619A (en) | 2011-06-23 |
| JP5482165B2 true JP5482165B2 (en) | 2014-04-23 |
Family
ID=44287462
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2009279784A Expired - Fee Related JP5482165B2 (en) | 2009-12-09 | 2009-12-09 | Program and information extraction device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5482165B2 (en) |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4815934B2 (en) * | 2005-08-02 | 2011-11-16 | 日本電気株式会社 | Text mining device, text mining method, text mining program |
| JP4957618B2 (en) * | 2008-03-28 | 2012-06-20 | 富士ゼロックス株式会社 | Information processing apparatus and information processing program |
-
2009
- 2009-12-09 JP JP2009279784A patent/JP5482165B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2011123619A (en) | 2011-06-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8667015B2 (en) | Data extraction method, computer program product and system | |
| CN101751333A (en) | Method, computer program and computer system for assisting in analyzing program | |
| US8117569B1 (en) | Method and mechanism for implementing a minimum spanning tree | |
| KR20150137388A (en) | System and method for processing data | |
| KR20100060734A (en) | System for visualization of patent information by forming the keyword based semantic network and method therefor | |
| CN114579977A (en) | Code vulnerability detection method for embedded operating system | |
| CA2719835A1 (en) | Method of deriving an integrated circuit schematic diagram | |
| JP5482165B2 (en) | Program and information extraction device | |
| US9275467B2 (en) | Incremental contour-extraction scheme for binary image segments | |
| US8510693B2 (en) | Changing abstraction level of portion of circuit design during verification | |
| JP5396843B2 (en) | Search method and search device | |
| JP2010272006A (en) | Relation extraction apparatus, relation extraction method and program | |
| US20170052887A1 (en) | To-be-stubbed target determining apparatus, to-be-stubbed target determining method and non-transitory recording medium storing to-be-stubbed target determining program | |
| US9582624B2 (en) | Circuit component migration method and apparatus | |
| CN114296726B (en) | A code generation method, device, computer equipment and storage medium | |
| KR101769247B1 (en) | Method and apparatus for comparing strings using hierarchical interval tree | |
| KR101837236B1 (en) | Basic block size considering execution path exploration method and system for improving the code coverage | |
| JP2005326161A (en) | Failure candidate identification system and failure candidate identification method | |
| JP5526947B2 (en) | Search program, search device, and search method | |
| JP5628365B2 (en) | Search device | |
| JP2016024784A (en) | Bug prediction device, method, and program | |
| JP5253286B2 (en) | Common data flow extraction system and common data flow extraction method | |
| JP5434500B2 (en) | Tree structure processing apparatus and program | |
| JP5237400B2 (en) | Search device | |
| JP4935768B2 (en) | Information processing apparatus and information processing program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20121115 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130927 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20131105 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20131225 |
|
| 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: 20140121 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140203 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 5482165 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| LAPS | Cancellation because of no payment of annual fees |