Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5520732B2 - Text extraction method, text extraction device, text extraction program - Google Patents
[go: Go Back, main page]

JP5520732B2 - Text extraction method, text extraction device, text extraction program - Google Patents

Text extraction method, text extraction device, text extraction program Download PDF

Info

Publication number
JP5520732B2
JP5520732B2 JP2010168546A JP2010168546A JP5520732B2 JP 5520732 B2 JP5520732 B2 JP 5520732B2 JP 2010168546 A JP2010168546 A JP 2010168546A JP 2010168546 A JP2010168546 A JP 2010168546A JP 5520732 B2 JP5520732 B2 JP 5520732B2
Authority
JP
Japan
Prior art keywords
node
boundary
determination result
text
body part
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2010168546A
Other languages
Japanese (ja)
Other versions
JP2012027852A (en
Inventor
尚樹 藤田
宜仁 安田
伸章 廣嶋
良治 片岡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NTT Inc
NTT Inc USA
Original Assignee
Nippon Telegraph and Telephone Corp
NTT Inc USA
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp, NTT Inc USA filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2010168546A priority Critical patent/JP5520732B2/en
Publication of JP2012027852A publication Critical patent/JP2012027852A/en
Application granted granted Critical
Publication of JP5520732B2 publication Critical patent/JP5520732B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Machine Translation (AREA)
  • Document Processing Apparatus (AREA)

Description

本発明は、HTMLやXMLなどのマークアップ言語で記述され、構造化された文書から本文部分を抽出する技術に関する。   The present invention relates to a technique for extracting a body part from a structured document described in a markup language such as HTML or XML.

現在、インターネット上には多数のWebページが存在している。このWebページ、即ちHTMLやXMLなどのタグにより構造化された文書は、ツリー構造(木構造)で表すことができる。このツリー構造は、ノード(節点、頂点)とノード間を結ぶエッジ(枝、辺)あるいはリンクで表現され、下位のノードは上位のノードの範囲の中に含まれるという性質を有している。   Currently, there are many web pages on the Internet. This Web page, that is, a document structured by tags such as HTML and XML can be represented by a tree structure (tree structure). This tree structure is expressed by nodes (nodes, vertices) and edges (branches, sides) or links connecting the nodes, and lower nodes are included in the range of upper nodes.

このノードは、ツリー構造に含まれる要素やテキストを示す一つの単位を意味している。HTML文書を一例に説明すれば、「<html><body><p>これは特許です。</p><i>patent</i></body></html>」というHTML文書には,要素ノード「html」・「body」・「p」・「i」と、テキストノード「これは特許です。」・「patent」が含まれている。   This node means one unit indicating an element or text included in the tree structure. Taking an HTML document as an example, the HTML document “<html> <body> <p> This is a patent. </ P> <i> patent </ i> </ body> </ html>” , Element nodes “html”, “body”, “p”, “i”, and text nodes “this is a patent” and “patent”.

ここでは要素ノード「body」にとって下位の要素ノード「p」・「i」は子ノード(child node)、要素ノード「p」「i」にとって上位の要素ノード「body」は親ノード(parent node)、要素ノード「p」「i」は同じ親ノードの兄弟ノードである。   Here, the lower element nodes “p” and “i” for the element node “body” are child nodes, and the upper element node “body” for the element nodes “p” and “i” is the parent node. , Element nodes “p” and “i” are sibling nodes of the same parent node.

各要素ノードは、最上位のノード(ルートノード)から当該要素ノードまでに経由した各ノードを列挙した文字列で表され、これを便宜上タグパスと呼ぶ。これは「XPath」と呼ばれる表記法を用いてもよく、例えば「/html/body/p」のように表される。   Each element node is represented by a character string that enumerates each node passed from the highest node (root node) to the element node, and this is called a tag path for convenience. This may use a notation called “XPath”, for example, “/ html / body / p”.

このようなツリー構造を利用すれば、文書内のある部分を抽出する場合にツリー構造における特定の要素ノードの配下の全ノードを抽出することで、段落や表など文書内の構造的な区切りに沿った範囲を抽出することができる。   By using such a tree structure, when extracting a certain part in the document, all nodes under a specific element node in the tree structure are extracted, so that a structural delimiter in the document such as a paragraph or table can be obtained. The range along can be extracted.

構造化された文書から本文部分を抽出する公知技術としては、タグ情報を除去してテキスト情報のみとして、テキスト情報を行単位で解析し、特徴付けを行い、その特徴から本文部分を抽出する手法が非特許文献1に提案されている。ここでは特徴から本文部分を抽出する際には一般的に機械学習が用いられる。この機械学習では判定対象の特徴をベクトル化し、正例か不例かの判定ラベルを付与した訓練データを複数用意し、訓練データから正例と不例の判定基準を作成することで、判定ラベルの付与されていないベクトルを入力した際に本文か否かを判定する2値分類器として利用できる。これらの手法はサポートベクターマシンや単純ベイズなどの手法がある。本文抽出に用いる場合には、判定対象となる部分が本文か否かという2値分類器を作成すればよい。   A well-known technique for extracting a body part from a structured document is to remove the tag information and use only text information, analyze the text information in line units, characterize it, and extract the body part from the features Is proposed in Non-Patent Document 1. In this case, machine learning is generally used when extracting a text part from a feature. In this machine learning, the features of the judgment target are vectorized, multiple training data with a positive or unexplained judgment label are prepared, and the judgment label of the positive case and the unexplained case is created from the training data. Can be used as a binary classifier that determines whether or not the text is input when a vector not assigned is input. These methods include methods such as support vector machines and naive Bayes. When used for text extraction, a binary classifier that determines whether or not the part to be determined is a text should be created.

また、同一サイトのWebページはヘッダーやフッター及びメニュー部分などに類似性があるという性質からテキスト情報のみとした上で、類似部分を除外することで本文部分を抽出する手法が特許文献1に提案されている。   Also, Patent Document 1 proposes a method for extracting the text part by excluding the similar part after considering only the text information from the property that the Web page of the same site has a similar header, footer, menu part, etc. Has been.

特開2006−338364JP 2006-338364 A

新納浩幸,佐々木稔”Webページ内の目的部分の自動抽出” 情報処理学会自然言語処理研究会 2004−NL・162(6) pp.33−40Hiroyuki Shinno, Satoshi Sasaki “Automatic Extraction of Target Part in a Web Page” Information Processing Society of Japan Natural Language Processing Study Group 2004-NL ・ 162 (6) pp. 33-40

しかしながら、従来の手法は、ツリー構造を利用して本文部分を抽出しているものの、文書から本部文分を十分に抽出できないおそれがある。すなわち、非特許文献1のようにテキスト情報のみでは、一般的に機械学習を用いても本文か否かを完全に判定することは難しく、すべての本文部分を抽出しえないおそれがある。   However, although the conventional method extracts the body part using the tree structure, there is a possibility that the headquarter sentence cannot be sufficiently extracted from the document. That is, as in Non-Patent Document 1, it is difficult to completely determine whether or not the text is textually even if machine learning is used, and there is a possibility that all text parts cannot be extracted.

また、特許文献1のように、同一サイト内のWeb文書の類似性を利用する手法では、同一サイトのページを多数取得した上で比較する必要があるため、新しいサイトの少数ページのみを解析する場合には対応できないおそれがある。   Also, as disclosed in Patent Document 1, in the method using the similarity of Web documents in the same site, it is necessary to obtain a large number of pages on the same site and compare them. Therefore, only a small number of pages in the new site are analyzed. It may not be possible to deal with cases.

本発明は、上述のような従来技術の問題点を解決するためになされたものであり、ツリー構造で表現される文書から本文部分を高い精度で抽出可能な技術の提供を解決課題としている。   The present invention has been made to solve the above-described problems of the prior art, and an object of the present invention is to provide a technique capable of extracting a body part with high accuracy from a document expressed in a tree structure.

そこで、本発明は、まず、機械学習の判定基準を用いた2値分類によるツリー構造で表現される文書のノード毎に本文か否かを判定する。つぎに本文判定範囲を下位ノード(例えば末端のリーフノード)から上位に遡って本文部分の境界を求め、該境界の下位を本文部分とする。   Therefore, according to the present invention, first, it is determined whether or not the document is a body for each node of a document expressed by a tree structure based on binary classification using a criterion for machine learning. Next, the boundary of the text part is obtained by going back from the lower node (for example, the terminal leaf node) to the upper part of the text determination range, and the lower part of the boundary is set as the text part.

本発明の一態様は、学習用文書のツリー構造における各ノードの特徴情報と、該各特徴情報が本文部分として正例か否かを分類したラベルとを用いて機械学習した学習結果に基づきツリー構造で構造化された文書から本文部分を抽出する文書抽出方法であって、本文部分判定手段が、入力文書のノード毎に抽出された特徴情報を前記学習結果に基づき分類して各ノードが本文部分か否かを判定する本文部分判定ステップと、境界取得手段が、入力文書のツリー構造中、下位ノードに対する本文部分判定ステップの判定結果に応じて該下位ノードから上位ノードに遡って本文部分の境界を順次に探索し、該境界を取得する境界取得ステップと、本文抽出手段が、境界取得ステップで取得した境界配下の文字列を本文部分として抽出する本文抽出ステップと、を有する。   One aspect of the present invention is a tree based on a learning result obtained by machine learning using feature information of each node in a tree structure of a learning document and a label that classifies whether each feature information is a positive example as a body part. A document extraction method for extracting a body part from a document structured by a structure, wherein a body part determination unit classifies feature information extracted for each node of an input document based on the learning result, and each node is a body text. A body part determination step for determining whether or not a part is included, and a boundary acquisition means, in the tree structure of the input document, from the lower node to the upper node according to the determination result of the body part determination step for the lower node, A boundary acquisition step for sequentially searching for a boundary and acquiring the boundary, and a text extraction unit for extracting a character string under the boundary acquired in the boundary acquisition step as a body part. Has a step, a.

本発明の他の態様は、ツリー構造に構造化された文書から本文領域を抽出する文書抽出装置であって、学習用文書のツリー構造における各ノードの特徴情報と、該各特徴情報が本文部分として正例か否かを分類したラベルとを用いて機械学習した結果を保持するデータベースと、入力文書のノード毎に抽出された特徴情報を、データベースの保持情報に基づき分類して各ノードが本文部分か否かを判定する本文部分判定手段と、入力文書のツリー構造中、下位ノードに対する本文部分判定手段の判定結果に応じて該下位ノードから上位ノードに遡って本文部分の境界を順次に探索し、該境界を取得する境界取得手段と、境界取得手段で取得した境界配下の文字列を本文部分として抽出する本文抽出手段と、を備える。   Another aspect of the present invention is a document extraction device that extracts a text region from a document structured in a tree structure, wherein the feature information of each node in the tree structure of the learning document, and each feature information is a text part A database that holds the results of machine learning using labels classified as positive or negative as a feature, and feature information extracted for each node of the input document is classified based on the information held in the database, and each node is a text A body part determination unit that determines whether or not a part is included, and in the tree structure of the input document, the body part boundary is sequentially searched from the lower node to the upper node according to the determination result of the body part determination unit for the lower node. And a boundary acquisition unit that acquires the boundary and a text extraction unit that extracts a character string under the boundary acquired by the boundary acquisition unit as a text part.

なお、本発明は、前記装置としてコンピュータを機能させるための本文抽出プログラムの態様としてもよい。このプログラムは、ネットワークや記録媒体を通じて提供することができる。   In addition, this invention is good also as an aspect of the text extraction program for functioning a computer as said apparatus. This program can be provided through a network or a recording medium.

本発明によれば、ツリー構造で表現される文書から本文部分を高い精度で抽出することができる。   According to the present invention, a body part can be extracted with high accuracy from a document expressed in a tree structure.

本発明の実施形態に係る本文抽出装置の構成図。The lineblock diagram of the text extraction device concerning the embodiment of the present invention. 同 データ処理図。The data processing diagram. 同 境界取得機能部の処理を示すフローチャート。The flowchart which shows the process of the same boundary acquisition function part. 同 境界探索機能部の境界探索処理を示すフローチャート。The flowchart which shows the boundary search process of the boundary search function part. 同 境界探索処理の実施例1のフローチャート。10 is a flowchart of Example 1 of the boundary search process. 同 境界探索処理の実施例2のフローチャート。10 is a flowchart of Example 2 of the boundary search process. 同 境界探索機能処理の具体例を示すツリー構造図。The tree structure figure which shows the specific example of the same boundary search function process. 同 対象ノード補正処理のフローチャート。The flowchart of the same object node correction process.

以下、本発明の実施形態に係る本文抽出装置を説明する。この抽出装置は、HTML文書やXML文書などのマークアップ言語で記述された文書、即ちツリー構造で表現される文書から本文部分(本文領域)を抽出する。   Hereinafter, a text extracting apparatus according to an embodiment of the present invention will be described. This extraction device extracts a body part (body area) from a document described in a markup language such as an HTML document or an XML document, that is, a document expressed in a tree structure.

具体的には、機械学習による判定基準を用いた2値分類の判定に加え、ツリー構造における末端(最底辺)のリーフノード(葉ノード)から周辺情報(親ノードおよび兄弟ノードの2値分類結果)を考慮して親ノードが本文かを確認し、順次上位ノードに遡って本文と他の部分の境界ノードを探索し、探索の結果として得られた境界ノードの配下のテキストをすべて抽出する。ここではツリー構造では上位ノードが本文であれば、下位ノードはすべて本文である性質を応用し、下位ノードのすべてではなく、最適な閾値以上であればよいとする。   Specifically, in addition to the determination of binary classification using a criterion based on machine learning, the peripheral information (parent node and sibling node binary classification results) from the leaf node (leaf node) at the end (bottom side) in the tree structure ) In consideration of whether or not the parent node is the body text, and sequentially search the boundary nodes of the body text and other parts by going back to the upper node, and extract all the text under the boundary node obtained as a result of the search. Here, in the tree structure, if the upper node is a body, the property that all lower nodes are the body is applied.

したがって、前記2値分類の判定結果に対して、多数決のような形式で上位ノードが真に本文に該当する否かが再度確認され、前記2値分類の判定結果が間違っていた場合には該判定結果を補正し、本文部分の抽出精度が向上する。   Therefore, it is reconfirmed whether or not the upper node truly corresponds to the text in the form of majority decision with respect to the determination result of the binary classification, and if the determination result of the binary classification is wrong, The determination result is corrected, and the extraction accuracy of the body part is improved.

≪装置構成例≫
図1に基づき前記抽出装置の構成例を説明する。この抽出装置1は、様々なタスクに応じてWebページに記述された特定の情報を収集し、再構築してユーザに提示するシステムなどに利用される。例えば、Webページのニュース記事から該ニュース記事のタイトルと本文とを抽出するタスクなどが挙げられる。
≪Example of device configuration≫
A configuration example of the extraction device will be described with reference to FIG. The extraction device 1 is used in a system that collects specific information described on a Web page according to various tasks, reconstructs it, and presents it to a user. For example, a task for extracting the title and body of a news article from a news article on a Web page can be cited.

前記抽出装置1は、コンピュータにより構成され、通常のコンピュータのハードウェアリソース、例えばCPU,メモリ(RAM)、ハードディスクドライブ装置などのハードウェアリソースを備えている。このハードウェアリソースとソフトウェアリソース(OS,アプリケーションなど)の協働の結果、前記抽出装置1は、図1に示すように、機械学習用データ記憶部2,機械学習機能部3,本文部分判定モデルDB4,解析対象文書記憶部5,解析対象データ作成機能部6,解析対象データ記憶部7,本文部分判定機能部8,本文部分判定データ記憶部9,境界取得機能部10,境界判定データ記憶部11,本文抽出機能部12を実装する。   The extraction device 1 is configured by a computer and includes hardware resources of a normal computer, for example, hardware resources such as a CPU, a memory (RAM), and a hard disk drive device. As a result of the cooperation of the hardware resource and the software resource (OS, application, etc.), the extraction device 1 has a machine learning data storage unit 2, a machine learning function unit 3, a body part determination model as shown in FIG. DB4, analysis target document storage unit 5, analysis target data creation function unit 6, analysis target data storage unit 7, body part determination function unit 8, body part determination data storage unit 9, boundary acquisition function unit 10, boundary determination data storage unit 11. Implement the text extraction function unit 12.

この各記憶部2.5.7.9.11および前記判定モデルDB4は、それぞれメモリ(RAM)あるいはハードディスクドライブ装置などの記憶・保存手段に構築されているものとする。この各部2〜12により文書のツリー構造およびタグ情報を利用した本文抽出が実行される。   Each of the storage units 2.5.7.9.11 and the determination model DB 4 are constructed in storage / storing means such as a memory (RAM) or a hard disk drive device. The text extraction using the tree structure and tag information of the document is executed by these units 2 to 12.

すなわち、機械学習用文書に基づき機械学習の結果を収集する事前処理と、入力された未知の文書から本文部分を抽出する抽出処理とが行われる。この事前処理は前記各部2〜4を通じて行われる一方、抽出処理は前記各部5〜12を通じて行われる。なお、事前処理は未知の入力文書の抽出処理に先立ってあらかじめ実施しておくものとする。以下、図2に基づき事前処理と抽出処理のデータ処理内容を説明する。   That is, pre-processing for collecting machine learning results based on the machine learning document and extraction processing for extracting a body part from the input unknown document are performed. The pre-processing is performed through the units 2 to 4, while the extraction process is performed through the units 5 to 12. Note that the pre-processing is performed in advance prior to the unknown input document extraction processing. Hereinafter, the data processing contents of the pre-processing and the extraction processing will be described with reference to FIG.

≪事前処理内容≫
まず、事前処理を説明すれば、図示省略の入力部を通じて幅広いジャンルの機械学習用文書、即ちHTML文書やXML文書などのツリー構造で表現される文書を入力する。この機械学習用文書の各要素ノードから抽出された特徴情報と、該各特徴情報に事前に付与した判定レベルとを機械学習用データとして前記データ記憶部2に記憶しておく。
≪Pre-processing contents≫
First, pre-processing will be described. Through a not-shown input unit, a wide variety of machine learning documents, that is, documents expressed in a tree structure such as an HTML document or an XML document are input. Feature information extracted from each element node of the machine learning document and a determination level given in advance to each feature information are stored in the data storage unit 2 as machine learning data.

この特徴情報には、テキスト内容に関する素性とタグ情報に関する素性とを利用する。このテキスト内容に関する素性には、要素の配下に含まれるテキスト量や上位及び下位の要素ノードの内容などが用いられ、非特許文献1(2.2.2 素性の設定)に記載された13種類の素性を用いてもよい。また、タグ情報に関する素性は、HTMLのタグ情報など機械学習の手法でどのタグが本文かを学習する際に一般的に用いられるものでよい。例えば下位の要素ノードの中での特定タグの割合などが用いられる。この素性に対するマッチング結果を「1 or 0」で示し、例えば特徴情報を「2:1」のように素性Noとマッチング結果を対に表すものとする。   The feature information uses a feature related to text content and a feature related to tag information. For the feature related to the text content, the amount of text included under the element and the contents of the upper and lower element nodes are used. The 13 types described in Non-Patent Document 1 (2.2.2 Feature Setting) The features of may be used. The feature related to the tag information may be generally used when learning which tag is the text by a machine learning method such as HTML tag information. For example, the ratio of a specific tag among the lower element nodes is used. The matching result for this feature is indicated by “1 or 0”. For example, the feature information and the matching result are represented as a pair such as “2: 1” in the feature information.

判定ラベルは、各特徴情報が本文部分として正例であれば「+1」を付与し、不例であれば「−1」を付与する。この判定ラベルと特徴情報の前記マッチング結果とを併せて機械学習用データを出力する。図2中のD1は、前記データ記憶部2に記憶された機械学習用データの一例を示している。ここでは「2:1,3:1,17:1,30:1・・・」と「1:1,3:1,12:1,60:1・・・」とは特徴情報を示し、「+1」と「−1」は該特徴情報の判定ラベルを示し、それぞれをペアにデータ格納されている。   The determination label is assigned “+1” if each feature information is a positive example as a body part, and “−1” if it is not. The determination label and the matching result of the feature information are combined to output machine learning data. D1 in FIG. 2 indicates an example of machine learning data stored in the data storage unit 2. Here, “2: 1, 3: 1, 17: 1, 30: 1...” And “1: 1, 3: 1, 12: 1, 60: 1. “+1” and “−1” indicate determination labels of the feature information, and data is stored in pairs.

機械学習機能部3は、前記データ記憶部2に記憶された機械学習用データを用いて2値分類の機械学習を行い、本文部分判定モデルを作成する(本文部分判定モデル作成ステップ)。例えば機械学習用データを「x=特徴情報」、「y=判定ラベル(1 or −1)」とし、正解クラスに最も適合する関数関係「y=f(x)」を求める。これにより抽出処理時に未知の文書の特徴情報に関係関数を適用し、正解クラスを得ることが可能となる。ここで作成された本文部分判定モデルは、前記判定モデルDB4に格納される。なお、機械学習には、例えばサポートベクターマシン(SVM)や単純ベイズなどの手法を用いることができる。   The machine learning function unit 3 performs machine learning of binary classification using the machine learning data stored in the data storage unit 2 and creates a body part determination model (body part determination model creation step). For example, the machine learning data is “x = feature information” and “y = determination label (1 or −1)”, and a function relationship “y = f (x)” that best matches the correct class is obtained. As a result, the correct function class can be obtained by applying the relational function to the feature information of the unknown document during the extraction process. The text part determination model created here is stored in the determination model DB 4. For machine learning, a method such as support vector machine (SVM) or naive Bayes can be used.

≪抽出処理内容≫
つぎに抽出処理は、前記入力部に解析対象の文書、即ちHTML文書やXML文書などのツリー構造で表現される文書を入力することで開始される。例えばインターネット経由で収集したWebページを解析対象の文書として入力することができる。ここで入力されたれた解析対象の文書は、前記文書記憶部5に記憶される。
≪Extraction process contents≫
Next, the extraction process is started by inputting a document to be analyzed into the input unit, that is, a document expressed in a tree structure such as an HTML document or an XML document. For example, Web pages collected via the Internet can be input as documents to be analyzed. The document to be analyzed input here is stored in the document storage unit 5.

その後に前記データ作成機能部6は、前記文書記憶部5を参照して解析対象文書を取得する。この解析対象文書の要素ノード毎に特徴情報を抽出し、該特徴情報を当該要素ノードのタグパスと併せて解析対象データを作成する(解析対象データ作成ステップ)。この特徴情報は事前処理と同様なものとし、作成された解析対象データは出力され、前記データ記憶部7に記憶される。   Thereafter, the data creation function unit 6 refers to the document storage unit 5 and acquires the analysis target document. Feature information is extracted for each element node of the analysis target document, and analysis target data is created by combining the feature information with the tag path of the element node (analysis target data creation step). The feature information is the same as that in the pre-processing, and the created analysis target data is output and stored in the data storage unit 7.

図2中のD2は、前記データ記憶部7に記憶された解析対象データの一例を示している。ここでは「/html/body」と「/html/body/div」とはタグパスを示し、「1:1,2:1,11:1,35:1」と「1:1,3:1,14:1,45:1」とは特徴情報を示し、それぞれをペアにデータ格納されている。   D <b> 2 in FIG. 2 indicates an example of analysis target data stored in the data storage unit 7. Here, “/ html / body” and “/ html / body / div” indicate tag paths, “1: 1, 2: 1, 11: 1, 35: 1” and “1: 1, 3: 1, “14: 1, 45: 1” indicates feature information, and data is stored in pairs.

前記判定機能部8は、前記データ記憶部7および前記判定モデルDB4を参照して解析対象データと本文部分判定モデルとを取得する。この取得後に解析対象データを素性ベクトルとして、サポートベクターマシンなどにより本文部分判定モデルを用いた2値分類を行い、特徴情報が本文部分か否かの判定結果を「−1」から「+1」の数値で表し(「+」=本文部分、「−」=非本文部分)、該特徴情報に対応するタグパスと併せて本文部分判定データを作成する(本文部分判定ステップ)。このとき2値分類は、サポートベクターマシンに限らず、機械学習機能部3の学習のときに利用した手法と同様であればよく、単純ベイズなどの手法を用いることもできる。作成された本文部分判定データは出力され、前記データ記憶部9に記憶される。   The determination function unit 8 refers to the data storage unit 7 and the determination model DB 4 to acquire analysis target data and a body part determination model. After this acquisition, the analysis target data is used as a feature vector and binary classification using a body part determination model is performed by a support vector machine or the like, and the determination result of whether the feature information is a body part is changed from “−1” to “+1”. It is expressed by a numerical value (“+” = text part, “−” = non-text part), and text part determination data is created together with the tag path corresponding to the feature information (text part determination step). At this time, the binary classification is not limited to the support vector machine, and may be the same as the technique used when learning by the machine learning function unit 3, and a technique such as naive Bayes can also be used. The created text part determination data is output and stored in the data storage unit 9.

図2中のD3は、前記データ記憶部9に記憶された本文部分判定データの一例を示している。ここでは「/html/body」と「/html/body/div」とはタグパスを示し、「−0.42」と「+0.86」とは判定結果とを示し、それぞれペアにしてデータ格納されている。   D3 in FIG. 2 shows an example of the text part determination data stored in the data storage unit 9. Here, “/ html / body” and “/ html / body / div” indicate tag paths, “−0.42” and “+0.86” indicate determination results, and data is stored in pairs. ing.

境界取得機能部10は、前記抽出装置1の主要処理、即ち本文部分判定データを用いて入力文書の本文部分と他の部分との境界となる要素ノード(境界ノード)のタグパスを境界判定データとして取得する(境界取得ステップ)。   The boundary acquisition function unit 10 uses the tag path of the element node (boundary node) as a boundary between the main part of the input document and the other part using the main process of the extraction device 1, that is, the body part determination data as boundary determination data. Acquire (boundary acquisition step).

ここでは境界取得機能部10は、まず前記データ記憶部9を参照して本文部分判定データを取得する。この本文部分判定データから入力文書のツリー構造中、末端(最底辺)の要素ノードであって、判定結果が本文部分(判定結果=「+」)の各リーフノードを取得する。   Here, the boundary acquisition function unit 10 first acquires the text part determination data with reference to the data storage unit 9. From this body part determination data, each leaf node of the end (bottom side) element node in the tree structure of the input document whose determination result is the body part (determination result = “+”) is acquired.

そして、取得したリーフノードの情報(タグパス)に対して境界探索処理を実行する。すなわち、リーフノードの親ノードと兄弟ノードの判定結果を考慮し、上位ノードのどこまでが本文部分かを探索する。このとき「親ノードが本分部分と判定されているか否か(親ノード=「+」)」と「兄弟ノードの何割が本文部分と判定されているか(兄弟ノードの何割が「+」と判定されているか否か)」を探索の判断基準とする。この本文部分と判定された兄弟ノードの割合は任意とし、あらかじめ閾値として設定されるものとする。   Then, boundary search processing is executed on the acquired leaf node information (tag path). That is, considering the determination result of the parent node and the sibling node of the leaf node, the search is made for how far the upper node is the body part. At this time, “whether or not the parent node is determined to be the main part (parent node =“ + ”)” and “percentage of the sibling node is determined to be the body part (percentage of the sibling node is“ + ”) Is determined as a criterion for search. The ratio of sibling nodes determined to be the body part is arbitrary and is set as a threshold value in advance.

ここでは各リーフノードから順次に上位の要素ノードに遡って境界探索処理を実施し、最上位の要素ノードを当該リーフノードから得られた本文部分の境界とする。このとき全てのリーフノードから抽出された境界の中で重複している要素ノードや他の要素ノードの下位に含まれている要素ノードを除去し、境界判定データを作成する。作成された境界判定データ(境界ノードのタグパス)は出力され、前記データ記憶部11に記憶される。   Here, the boundary search process is performed sequentially from each leaf node to the upper element node, and the highest element node is set as the boundary of the body part obtained from the leaf node. At this time, the element nodes that are duplicated in the boundaries extracted from all the leaf nodes and the element nodes included in the lower order of other element nodes are removed, and boundary determination data is created. The created boundary determination data (boundary node tag path) is output and stored in the data storage unit 11.

図2中のD4は、前記データ記憶部11に記憶された境界判定データの一例を示している。ここでは境界ノードのタグパスを「/html/body/div/div」と「/html/body/div/td」と示している。   D4 in FIG. 2 shows an example of boundary determination data stored in the data storage unit 11. Here, the tag paths of the boundary nodes are shown as “/ html / body / div / div” and “/ html / body / div / td”.

前記抽出機能部12は、前記文書記憶部5.11を参照して解析対象の文書と境界判定データとを取得し、解析対象の文書から境界判定データのすべての境界ノードの配下のテキスト、即ち境界ノードの成長方向(下方向)における要素ノードのテキストを本文部分として抽出する(本文部分抽出ステップ)。抽出されたテキストは、ロボット型検索エンジンのインデックス作成に利用することもできる。   The extraction function unit 12 refers to the document storage unit 5.11 to acquire the analysis target document and boundary determination data, and from the analysis target document, text under all boundary nodes of the boundary determination data, that is, The text of the element node in the growth direction (downward) of the boundary node is extracted as a body part (body part extraction step). The extracted text can also be used to create an index for a robot type search engine.

≪境界取得手段10の具体的処理内容≫
以下、図3に基づき前記抽出装置1の主要処理、即ち境界取得機能部10の具体的内容を詳細に説明する。ここでは境界取得機能部10は、図3に示すように、境界ノードのタグパスを探索する境界探索機能部10aを有しているものとする。
<< Specific Processing Contents of Boundary Acquisition Unit 10 >>
In the following, the main processing of the extraction apparatus 1, that is, the specific contents of the boundary acquisition function unit 10 will be described in detail with reference to FIG. Here, it is assumed that the boundary acquisition function unit 10 includes a boundary search function unit 10a that searches for a tag path of a boundary node as illustrated in FIG.

S01.S02:境界取得機能部10は、前記データ記憶部9の本文部分判定データを参照して本文部分と判定されているリーフノードの情報(タグパス)を取得する(S01)。ここで取得したすべてのリーフノードの情報(タグパス)に対して境界探索が実行される(S02)。   S01. S02: The boundary acquisition function unit 10 acquires the information (tag path) of the leaf node determined as the body part by referring to the body part determination data in the data storage unit 9 (S01). A boundary search is performed on the information (tag path) of all the leaf nodes acquired here (S02).

S03:境界取得機能部10は、S01で取得したリーフノードを探索対象ノードとし、そのタグパスを境界探索機能部10aに送って、境界探索機能部10aに境界ノードのタグパスを探索させる。境界探索機能部10aにて探索された境界ノードのタグパスは境界取得機能部10に送られる。   S03: The boundary acquisition function unit 10 sets the leaf node acquired in S01 as a search target node, sends the tag path to the boundary search function unit 10a, and causes the boundary search function unit 10a to search for the tag path of the boundary node. The tag path of the boundary node searched by the boundary search function unit 10a is sent to the boundary acquisition function unit 10.

図4に基づき境界探索機能部10aの境界探索処理を説明する。ここでは入力タグパス、即ち境界探索機能部10aに送られたリーフノード(探索対象ノード)のタグパスは「CUR_PATH」とする。まず、境界探索機能部10aは、タグパス「CUR_PATH」の周辺ノードの判定結果の値を取得する(S11)。   The boundary search process of the boundary search function unit 10a will be described with reference to FIG. Here, the input tag path, that is, the tag path of the leaf node (search target node) sent to the boundary search function unit 10a is “CUR_PATH”. First, the boundary search function unit 10a acquires values of determination results of neighboring nodes of the tag path “CUR_PATH” (S11).

すなわち、境界探索機能部10aは、前記データ記憶部9を参照して、本文部分判定データD3からタグパス「CUR_PATH」の親ノードおよび兄弟ノードの判定結果を取得する。ここで図4中の「PARENT_PATH」は親ノードのタグパスを示し、「BROTHER_PATH_xx」は「xx番目」の兄弟ノードのタグパスを示している。   That is, the boundary search function unit 10a refers to the data storage unit 9 and acquires the determination result of the parent node and the sibling node of the tag path “CUR_PATH” from the body part determination data D3. Here, “PARENT_PATH” in FIG. 4 indicates the tag path of the parent node, and “BROOTHER_PATH_xx” indicates the tag path of the “xx-th” sibling node.

つぎにS11で取得した親ノードに対する判定結果が正例か否か、即ち判定結果の値が「0」以上か否かを確認する(S12)。確認の結果、親ノードに対する判定結果の値が「0」以上であればS13に進む一方、該値が「0」未満であればS14に進む。   Next, it is confirmed whether or not the determination result for the parent node acquired in S11 is a positive example, that is, whether or not the value of the determination result is “0” or more (S12). As a result of the confirmation, if the value of the determination result for the parent node is “0” or more, the process proceeds to S13, whereas if the value is less than “0”, the process proceeds to S14.

S13〜S16では、ツリーの構造の性質、即ち親ノードが本文部分であれば子ノードは必ず本文部分であることを利用し、兄弟ノードの本文部分の割合を勘案し、(A)親ノードが本文部分にも拘らず不例と判定されている場合、(B)親ノードが非本文部分にも拘らず正例と判定されている場合を改善する。   In S13 to S16, the nature of the tree structure, that is, if the parent node is a body part, the child node is always the body part, and the ratio of the body part of sibling nodes is taken into account. When it is determined that the text is a non-example regardless of the body part, (B) the case where the parent node is determined as a normal example regardless of the non-text part is improved.

具体的には、S13.S14では、S11で取得した兄弟ノードに対する判定結果が正例か否か、即ち兄弟ノードに対する判定結果の値「0」以上の割合が事前に設定された閾値以上か否かを確認する。このとき兄弟ノードの数量は、自ノード、即ちタグパス「CUR_PATH」のノード自体も含めるものとする。   Specifically, S13. In S14, it is confirmed whether or not the determination result for the sibling node acquired in S11 is a positive example, that is, whether or not the ratio of the determination result value “0” or more for the sibling node is equal to or greater than a preset threshold value. At this time, the number of sibling nodes includes its own node, that is, the node itself of the tag path “CUR_PATH”.

S13の確認の結果、前記割合が閾値未満であれば、親ノードに対する本文部分判定データの値「0」以上は誤りと最終判定し、タグパス「CUR_PATH」を境界ノードのタグパスとして境界取得機能部10に送る(S15)。一方、前記割合が閾値以上であれば、親ノードに対する判定結果の値「0」以上は正しと最終判定し、タグパス「CUR_PATH」を親ノードのタグパス「PARENT_PATH」に置き換え、該タグパス「PARENT_PATH」に対してS11以降の処理を行う(S16)。   As a result of the confirmation in S13, if the ratio is less than the threshold, the body part determination data value “0” or more for the parent node is finally determined as an error, and the boundary acquisition function unit 10 uses the tag path “CUR_PATH” as the tag path of the boundary node. (S15). On the other hand, if the ratio is equal to or greater than the threshold, the determination result value “0” or higher for the parent node is finally determined to be correct, the tag path “CUR_PATH” is replaced with the parent node tag path “PARENT_PATH”, and the tag path “PARENT_PATH”. Then, the processing after S11 is performed (S16).

S14の確認の結果、前記割合が閾値未満であれば、親ノードに対する判定結果の値「0」未満は正しいと最終判定し、タグパス「CUR_PATH」を境界ノードのタグパスとして境界取得機能部10に送る(S15)。一方、前記割合が閾値以上であれば、親ノードに対する判定結果の値「0」未満は誤りと最終判定し、タグパス「CUR_PATH」を親ノードのタグパス「PARENT_PATH」に置き換え、該タグパス「PARENT_PATH」に対してS11以降の処理を行う(S16)。   If the ratio is less than the threshold value as a result of the confirmation in S14, it is finally determined that the determination result value “0” for the parent node is correct, and the tag path “CUR_PATH” is sent to the boundary acquisition function unit 10 as the tag path of the boundary node. (S15). On the other hand, if the ratio is equal to or greater than the threshold, the determination result for the parent node less than “0” is finally determined to be an error, the tag path “CUR_PATH” is replaced with the parent node tag path “PARENT_PATH”, and the tag path “PARENT_PATH”. On the other hand, the process after S11 is performed (S16).

このようなS13.S14中、兄弟ノードが自ノード、即ちタグパス「CUR_PATH」のノードのみの場合には前記割合が100%なため、S13.S14のいずれの場合でも必ずS16にて親ノードのタグパスに置換され、S11以降の処理が行われる。なお、S11〜S16の境界探索の結果、最上位(/html/bodyなど)まで境界探索が終了すれば該最上位のタグパスを、S15で境界ノードのタグパスとして出力する。   Such S13. In S14, when the sibling node is only its own node, that is, the node of the tag path “CUR_PATH”, the ratio is 100%, so S13. In any case of S14, it is always replaced with the tag path of the parent node in S16, and the processing after S11 is performed. As a result of the boundary search in S11 to S16, when the boundary search is completed up to the highest level (/ html / body etc.), the highest tag path is output as the tag path of the boundary node in S15.

ここでS13.S14の閾値は、親ノードの判定結果に対する検証精度、即ち本文抽出の精度が高くなるように調整されているものとする。この本文抽出の精度を(1)正解率(precision):本文部分として抽出された文が真に本文部分である割合、(2)再現率(recall):抽出された本文部分が本来抽出される本文部分に対する割合で表して説明すれば、S13.S14共に閾値を高く設定すると親ノードが満たすべき子ノードの正解割合が高くなり、確実に本文部分のノードのみ上位に遡って探索される。   Here, S13. It is assumed that the threshold value of S14 is adjusted so that the verification accuracy with respect to the determination result of the parent node, that is, the accuracy of text extraction is increased. The accuracy of the text extraction is as follows: (1) accuracy rate (precise): the rate at which the sentence extracted as the text part is truly the text part, (2) recall: (recall): the extracted text part is originally extracted If expressed in terms of the ratio to the body part, S13. If the threshold value is set high in both S14, the correct answer ratio of the child nodes that the parent node should satisfy increases, and only the node in the body part is reliably searched backward.

しかしながら、本来ならば本文部分の親ノードが本文部分と推定されないこともあり、正解率は向上するが再現率が低下するおそれがある。例えば兄弟ノードの前記割合が「7割」であっても、閾値が「8割」に設定されていれば、上位ノードに遡らないため、再現率は低下する。一方、閾値を低く設定すると親ノードは比較的容易に本文部分とみなされるため、再現率は向上するものの、非本文部分の親ノードも本文部分とされ、正解率が低下するおそれがある。   However, the parent node of the body part may not be estimated as the body part, so that the correct answer rate may be improved but the recall rate may be lowered. For example, even if the ratio of sibling nodes is “70%”, if the threshold is set to “80%”, the recall is not traced back to the upper node, so the recall rate is lowered. On the other hand, if the threshold value is set low, the parent node is regarded as a text part relatively easily, so the recall rate is improved, but the parent node of the non-text part is also considered as the text part, and the correct answer rate may decrease.

そこで、正解率と再現率のいずれを重視するかは本文抽出の利用目的(タスク)に応じて調整し、S13.S14の閾値を設定するものとする。例えば非本文部分が若干含まれても問題の無い利用目的であれば閾値を低めに調整すればよく、非本文部分が含まれていると問題の生ずる利用目的であれば閾値を高めに調整すればよい。このときS13.S14の閾値は、同じ値に設定してもよいが、異なる値の組合せの評価実験で高精度の本文抽出結果を得られたため、異なる値の組合せを用いることが好ましい。   Therefore, whether to focus on the correct answer rate or the recall rate is adjusted according to the purpose (task) of text extraction, and S13. Assume that the threshold value of S14 is set. For example, if there is no problem even if a non-text part is included, the threshold may be adjusted to a lower value. If a non-text part contains a problem, the threshold may be adjusted higher. That's fine. At this time, S13. Although the threshold value of S14 may be set to the same value, it is preferable to use a combination of different values because a highly accurate text extraction result was obtained in an evaluation experiment of a combination of different values.

S04.S05:境界取得機能部10は、S03で境界探索機能部10aから送られた境界ノードのタグパスが既に境界判定データに存在するか否かを確認する(S04)。確認の結果、境界判定データに存在しなければ該タグパスを境界判定データとして前記データ記憶部11に記憶させる。一方、既に境界判定データに存在すれば該タグパスを除去し、処理を終了する(S05)。   S04. S05: The boundary acquisition function unit 10 checks whether the tag path of the boundary node sent from the boundary search function unit 10a in S03 already exists in the boundary determination data (S04). As a result of the confirmation, if it does not exist in the boundary determination data, the tag path is stored in the data storage unit 11 as boundary determination data. On the other hand, if it already exists in the boundary determination data, the tag path is removed and the process is terminated (S05).

≪実施例1≫
図5に基づき境界探索処理の実施例を説明する。ここでは各要素ノードには探索フラグ「0 or 1」が立てられているものとする。この探索フラグ「1」はリーフノードおよび境界探索時に最終判定が終了済の要素ノードを示し、探索フラグ「0」は、境界探索時の最終判定が未終了の要素ノードを示している。
Example 1
An example of boundary search processing will be described with reference to FIG. Here, it is assumed that a search flag “0 or 1” is set in each element node. The search flag “1” indicates a leaf node and an element node whose final determination has been completed at the boundary search, and a search flag “0” indicates an element node whose final determination has not been completed at the boundary search.

また、図5中のS21はS11に相当し、S23はS12に相当し、S25はS13に相当し、S26はS14に相当し、S29はS15に相当し、S30はS16に相当し、S22.S24.S27.S28が追加されている点で図4と相違している。また、S29.S30で探索フラグの切り替えが追加されている点でも図4と相違している。   5 corresponds to S11, S23 corresponds to S12, S25 corresponds to S13, S26 corresponds to S14, S29 corresponds to S15, S30 corresponds to S16, S22. S24. S27. 4 is different from FIG. 4 in that S28 is added. In addition, S29. It is also different from FIG. 4 in that search flag switching is added in S30.

この実施例の詳細を説明すれば、リーフノードのタグパス「CUR_PATH」が入力されると、境界探索機能部10aは本文部分判定データD3からタグパス「CUR_PATH」の親ノード「PARENT_PATH」および各兄弟ノード「BROTHER_PATH_xx」の判定結果の値を取得する(S21)。この取得後に兄弟ノードの探索フラグ「0 or 1」を確認する(S22)。   Describing the details of this embodiment, when the tag path “CUR_PATH” of the leaf node is input, the boundary search function unit 10a reads the parent node “PARENT_PATH” of the tag path “CUR_PATH” and each sibling node “ The value of the determination result of “BROTHER_PATH_xx” is acquired (S21). After this acquisition, the search flag “0 or 1” of the sibling node is confirmed (S22).

このS22の確認の結果、すべての兄弟ノードの探索フラグが「1」であれば、S23〜S26の処理を実施する。このときS25の確認時に兄弟ノードの正例の割合(前記判定結果の値「0」以上の割合)が前記閾値未満であれば、親ノードの判定結果の値「0」以上は誤りと最終判定し、該値を「0」未満に補正して(S27)、S29に進む。また、S25で前記割合が前記閾値以上であれば、親ノードの判定結果の値「0」以上は正しいと最終判定し、S30に進む。   If the search flag of all sibling nodes is “1” as a result of the confirmation in S22, the processes in S23 to S26 are performed. At this time, if the ratio of positive examples of sibling nodes (the ratio of the determination result value “0” or higher) is less than the threshold value at the time of confirmation in S25, the determination result value “0” or higher of the parent node is final as an error. Then, the value is corrected to be less than “0” (S27), and the process proceeds to S29. If the ratio is equal to or greater than the threshold value in S25, it is finally determined that the value “0” or higher of the determination result of the parent node is correct, and the process proceeds to S30.

S26で前記割合が前記閾値以上であれば、親ノードの判定結果の値「0」未満は誤りと最終判定し、該値を「0」以上に補正して(S27)、S30に進む。また、S26で前記割合が前記閾値未満であれば、親ノードの判定結果の値「0」以上は正しいと最終判定し、S29に進む。   If the ratio is equal to or greater than the threshold value in S26, it is finally determined that an error is less than “0” of the determination result of the parent node, and the value is corrected to “0” or more (S27), and the process proceeds to S30. If the ratio is less than the threshold value in S26, it is finally determined that the value “0” or more of the determination result of the parent node is correct, and the process proceeds to S29.

S29では、親ノードの探索フラグを「1」に切り替え、S15と同様に「CUR_PATH」を境界ノードのタグパスとして境界取得機能部10に送る。また、S30でも、親ノードの探索フラグを「1」に切り替え、S16と同様にタグパス「CUR_PATH」を「PARENT_PATH」に置き換えて、該タグパスに対するS21以降の処理を開始する。   In S29, the search flag of the parent node is switched to “1”, and “CUR_PATH” is sent to the boundary acquisition function unit 10 as a tag path of the boundary node as in S15. Also in S30, the search flag of the parent node is switched to “1”, the tag path “CUR_PATH” is replaced with “PARENT_PATH” in the same manner as in S16, and the processes after S21 for the tag path are started.

一方、S22でいずれかの兄弟ノードの探索フラグが「0」であれば、該兄弟ノードのリーフノードの一つを境界探索機能部10aに入力する(S24)。この場合には「CUR_PATH」を入力とする境界探索を待機させ、該兄弟ノードのリーフノードのタグパス入力に基づくS23〜S30の境界探索を優先し、S29.S30で該兄弟ノードの探索フラグを「1」に切り替える。   On the other hand, if the search flag of any sibling node is “0” in S22, one of the leaf nodes of the sibling node is input to the boundary search function unit 10a (S24). In this case, the boundary search with “CUR_PATH” as input is waited, and the boundary search in S23 to S30 based on the tag path input of the leaf node of the sibling node is prioritized, and S29. In S30, the search flag of the sibling node is switched to “1”.

このとき該兄弟ノードが正例なときにその下位のリーフノードの前記割合が前記閾値未満であれば、S27で該兄弟ノードの判定結果が補正される。また、該兄弟ノードが不例なときにその下位のリーフノードの前記割合が前記閾値以上であれば、S28で該兄弟ノードの判定結果が補正される。   At this time, if the sibling node is a normal example and the ratio of the leaf nodes below it is less than the threshold, the determination result of the sibling node is corrected in S27. If the sibling node is unprecedented and the ratio of the leaf nodes below it is equal to or greater than the threshold, the determination result of the sibling node is corrected in S28.

このような優先探索処理の終了後、即ち探索フラグ「1」への切り替え後に「CUR_PATH」を入力とする境界探索処理を再開する。このとき優先探索処理時に兄弟ノードの判定結果の値がS27.S28で補正されていれば、再開された境界探索処理時におけるS25.S26の前記割合は、該補正後の最終判定結果に基づき算出する。これによりS25.S26の前記割合の正確性が増し、S29の境界として出力されるタグパスの精度を向上させることができる。なお、優先探索処理のS29で出力されたタグパスは、兄弟ノードの部分ツリー(部分木)に関するものであるため、「CUR_PATH」を入力とする境界探索では無視するものとする。   After such priority search processing is completed, that is, after switching to the search flag “1”, the boundary search processing using “CUR_PATH” as input is resumed. At this time, the value of the determination result of the sibling node is S27. If corrected in S28, S25. The ratio of S26 is calculated based on the final determination result after the correction. As a result, S25. The accuracy of the ratio of S26 increases, and the accuracy of the tag path output as the boundary of S29 can be improved. Note that the tag path output in S29 of the priority search process is related to a partial tree (partial tree) of the sibling node, and is therefore ignored in the boundary search with “CUR_PATH” as an input.

≪実施例2≫
図6に基づき境界探索処理の他の実施例を説明する。図6中のS31は、S21に相当し、S34はS22に相当し、S35はS23に相当し、S36はS24に相当し、S37はS25に相当し、S38はS26に相当し、S39はS27に相当し、S40はS28に相当し、S41はS29に相当し、S42はS30に相当し、S32.S33.S36aが追加されている点で図5と相違している。
<< Example 2 >>
Another embodiment of the boundary search process will be described with reference to FIG. S31 in FIG. 6 corresponds to S21, S34 corresponds to S22, S35 corresponds to S23, S36 corresponds to S24, S37 corresponds to S25, S38 corresponds to S26, and S39 corresponds to S27. , S40 corresponds to S28, S41 corresponds to S29, S42 corresponds to S30, S32. S33. This is different from FIG. 5 in that S36a is added.

この実施例によれば、リーフノードのタグパス「CUR_PATH」が入力されると、境界探索機能部10aは本文部分判定データD3からタグパス「CUR_PATH」の親ノード「PARENT_PATH」および各兄弟ノード「BROTHER_PATH_xx」の判定結果の値を取得する(S31)。この取得後に親ノードの探索フラグが「0 or 1」を確認する(S32)。   According to this embodiment, when the tag path “CUR_PATH” of the leaf node is input, the boundary search function unit 10a receives the parent node “PARENT_PATH” of the tag path “CUR_PATH” and the sibling nodes “BROOTHER_PATH_xx” from the text portion determination data D3. The value of the determination result is acquired (S31). After this acquisition, the parent node search flag is confirmed to be “0 or 1” (S32).

S32の確認の結果、親ノードの探索フラグが「0」であれば、「CUR_PATH」のリーフノードは兄弟ノード中、最初の入力であるから、図5の境界探索処理と同様にS34〜S42の処理を実施する。   As a result of the confirmation in S32, if the search flag of the parent node is “0”, the leaf node of “CUR_PATH” is the first input in the sibling nodes, so that the processing in S34 to S42 is similar to the boundary search process of FIG. Implement the process.

一方、S32の確認の結果、親ノードの探索フラグが「1」であれば、該親ノードの判定結果の値が「0」以上か否かを確認する(S33)。ここで親ノードの探索フラグは「1」のときには該親ノードは「CUR_PATH」と兄弟のリーフノードのタグパス入力時に最終判定が既に行われている。したがって、例えば親ノードの判定結果がS39.S40で補正されていれば、該補正後の判定結果の値が「0」以上か否か確認される。   On the other hand, if the search flag of the parent node is “1” as a result of the confirmation in S32, it is confirmed whether or not the value of the determination result of the parent node is “0” or more (S33). Here, when the parent node search flag is “1”, the parent node has already been subjected to final determination when “CUR_PATH” and the tag path of the sibling leaf node are input. Therefore, for example, the determination result of the parent node is S39. If it is corrected in S40, it is confirmed whether or not the value of the corrected determination result is “0” or more.

このS32の確認の結果、親ノードの探索フラグが「1」であれば、該親ノードの判定結果の値が「0」以上か否かを確認する(S33)。ここで親ノードの探索フラグは「1」のときには該親ノードは「CUR_PATH」と兄弟のリーフノードのタグパス入力時に最終判定が既に行われている。したがって、例えば親ノードの判定結果がS39.S40で補正されていれば、該補正後の判定結果の値が「0」以上か否か確認される。   If the search flag of the parent node is “1” as a result of the confirmation in S32, it is confirmed whether or not the value of the determination result of the parent node is “0” or more (S33). Here, when the parent node search flag is “1”, the parent node has already been subjected to final determination when “CUR_PATH” and the tag path of the sibling leaf node are input. Therefore, for example, the determination result of the parent node is S39. If it is corrected in S40, it is confirmed whether or not the value of the corrected determination result is “0” or more.

このS33の確認の結果、判定結果の値が「0」以上であれば、タグパス「CUR_PATH」を「PARENT_PATH」に置き換えて、該タグパスを入力とするS31以降の処理を実施する。一方、S33の確認の結果、判定結果の値「0」未満であれば、「CUR_PATH」を境界ノードのタグパスとして出力する(S41)。このとき親ノードの探索フラグは「1」のままとし、「CUR_PATH」と兄弟のリーフノード入力時にもS32.S33の確認を行う。このように兄弟ノードの入力時における親ノードの最終判定結果(補正結果など)を利用することで、重複処理を回避し、境界探索の処理効率を向上させることができる。   As a result of the confirmation in S33, if the value of the determination result is “0” or more, the tag path “CUR_PATH” is replaced with “PARENT_PATH”, and the processes after S31 with the tag path as an input are performed. On the other hand, if the determination result is less than “0” as a result of the confirmation in S33, “CUR_PATH” is output as the tag path of the boundary node (S41). At this time, the search flag of the parent node remains “1”, and even when “CUR_PATH” and a sibling leaf node are input, S 32. Confirmation of S33 is performed. In this way, by using the final determination result (correction result or the like) of the parent node when the sibling node is input, it is possible to avoid duplication processing and improve the processing efficiency of boundary search.

なお、S36の兄弟ノードのリーフノード入力による境界探索処理時に該兄弟ノードの親ノードの探索フラグが「1」に切り替えられている場合がある。そこで、S36aでは、該親ノードの探索フラグを再確認し、探索フラグが「1」であればS33に進む一方、「0」であればS35以降の処理を実施させている。   Note that the search flag of the parent node of the sibling node may be switched to “1” during the boundary search processing by the leaf node input of the sibling node in S36. Therefore, in S36a, the search flag of the parent node is reconfirmed. If the search flag is “1”, the process proceeds to S33, while if it is “0”, the process from S35 is performed.

≪具体的な処理例≫
以下、図7に基づき境界探索機能部10aの具体的な処理例を説明する。ここでは図6の実施例2に基づきツリー構造T中から本文部分の境界ノードを探索するものとする。このとき最初にサブツリーST1のリーフノード「P」のタグパスが境界探索機能部10aに入力されるものとする。また、境界探索機能部10aは、不例のリーフノードを入力可能に設定されているものとする。
≪Specific processing example≫
Hereinafter, a specific processing example of the boundary search function unit 10a will be described with reference to FIG. Here, the boundary node of the body part is searched from the tree structure T based on the second embodiment of FIG. At this time, the tag path of the leaf node “P” of the subtree ST1 is first input to the boundary search function unit 10a. Further, it is assumed that the boundary search function unit 10a is set to be able to input an unprecedented leaf node.

この図7中、(A)はツリー構造Tの各ノードに対する本文部分判定データの判定結果を示し、(B)はツリー構造Tの各ノードに対する最終判定の結果を示している。このツリー構造T中、サブツリーST1.ST2は本来の本文部分とし、サブツリーST3.ST4は本来の非本文部分とする。なお、S25.S26の閾値は、共に70%に設定されているものとする。   In FIG. 7, (A) shows the determination result of the body part determination data for each node of the tree structure T, and (B) shows the final determination result for each node of the tree structure T. In this tree structure T, subtrees ST1. ST2 is the original body part, and subtree ST3. ST4 is the original non-text part. In addition, S25. It is assumed that both thresholds of S26 are set to 70%.

ここでサブツリーST1のリーフノード「P」のタグパスは、最初に境界探索機能部10aに入力されるため、S32では探索フラグ「0」と確認される。また、兄弟ノード「P」はすべてリーフノードであるから、S34では各兄弟ノードの探索フラグ「1」と確認される。   Here, since the tag path of the leaf node “P” of the subtree ST1 is first input to the boundary search function unit 10a, the search flag is confirmed to be “0” in S32. Further, since all the sibling nodes “P” are leaf nodes, the search flag “1” of each sibling node is confirmed in S34.

そして、サブツリーST1は、図7中の(A)に示すように、親ノード「DIV」および兄弟ノード「P」の判定結果がすべて正例と判定されていることから、親ノード「DIV」の正例は、図7中の(B)に示すように、S35.S37を通じて正しいものと最終判定される。したがって、S42で親ノード「DIV」の探索フラグを「1」に切り替え、タグパスを該親ノードに置き換えて、該親ノードのタグパスがS31に入力される。   Then, as shown in FIG. 7A, the sub-tree ST1 determines that the determination results of the parent node “DIV” and the sibling node “P” are all positive examples. As shown in FIG. 7B, the positive example is S35. Through S37, it is finally determined as correct. Therefore, the search flag of the parent node “DIV” is switched to “1” in S42, the tag path is replaced with the parent node, and the tag path of the parent node is input to S31.

このときS32で「DIV」の親ノード「BODY」の探索フラグ「0」と確認され、S34でサブツリーST2〜ST4の「DIV」の案索フラグ「0」と確認される。したがって、S36でサブツリーST2〜ST4のリーフノードが順に境界探索機能部10aに入力され、サブツリーST1の「DIV」入力の境界探索を待機させ、サブツリーST2〜ST4の境界探索を優先させる。   At this time, the search flag “0” of the parent node “BODY” of “DIV” is confirmed in S32, and the search flag “0” of “DIV” in the subtrees ST2 to ST4 is confirmed in S34. Accordingly, the leaf nodes of the subtrees ST2 to ST4 are sequentially input to the boundary search function unit 10a in S36, and the boundary search of the “DIV” input of the subtree ST1 is waited, and the boundary search of the subtrees ST2 to ST4 is prioritized.

サブツリーST2は、図7中の(A)に示すように、親ノード「DIV」が不例と判定され、兄弟ノード「P」がすべて正例と判定されている。したがって、親ノード「DIV」の不例は、図7中の(B)に示すように、S35.S38を通じて誤りと最終判定され、親ノード「DIV」をS40で正例に補正し、S42で親ノード「DIV」の探索フラグを「1」に切り替え、タグパスを親ノード「DIV」に置き換える。   In the subtree ST2, as shown in (A) of FIG. 7, the parent node “DIV” is determined to be an unprecedented example, and all of the sibling nodes “P” are determined to be positive examples. Therefore, the non-example of the parent node “DIV” is shown in FIG. An error is finally determined through S38, the parent node "DIV" is corrected to a positive example in S40, the search flag of the parent node "DIV" is switched to "1" in S42, and the tag path is replaced with the parent node "DIV".

ここで置き換えた「DIV」のタグパスがS31に入力されるものの、S32で親ノード「BODY」の探索フラグ「0」と確認され、S34でサブツリーST3.ST4の「DIV」の探索フラグ「0」と確認されることから、該「DIV」入力の境界探索を待機させ、サブツリーST3.ST4の境界探索を優先させる。   Although the tag path of “DIV” replaced here is input to S31, the search flag “0” of the parent node “BODY” is confirmed in S32, and subtree ST3. Since the search flag “0” of “DIV” in ST4 is confirmed, the boundary search of the “DIV” input is made to wait, and the subtree ST3. Prioritize the ST4 boundary search.

サブツリーST3は、図7中の(A)に示すように、親ノード「DIV」が正例と判定され、一つの子ノード「P」が正例と判定され、他の子ノード「P」がすべて不例と判定されている。この場合には、親ノード「DIV」の判定結果は、図7中の(B)に示すように、正例の子ノード「P」を入力とする境界探索時にS39で補正される。   In the subtree ST3, as shown in FIG. 7A, the parent node “DIV” is determined as a positive example, one child node “P” is determined as a positive example, and the other child node “P” is determined as a positive example. All are determined to be unprecedented. In this case, as shown in FIG. 7B, the determination result of the parent node “DIV” is corrected in S39 during the boundary search using the positive child node “P” as an input.

すなわち、該子ノード「P」は、親ノードの判定結果が「正例」なため(S35)、S37の確認に移行する。このとき他のすべての兄弟ノードが不例と判定されているため、兄弟ノードの正例の割合は「25%」にすぎず、S37の閾値未満と確認される。そうすると、親ノード「DIV」の正例は誤りと最終判定され、該親ノードをS39で不例に補正する。この場合は、S41で親ノードの探索フラグが「1」に切り替えられ、入力ノード「P」のタグパスが境界ノードのタグパスとして出力される。   That is, the child node “P” shifts to the confirmation of S37 because the determination result of the parent node is “correct example” (S35). At this time, since all other sibling nodes are determined to be unprecedented, the proportion of the sibling nodes is only “25%”, which is confirmed to be less than the threshold of S37. Then, the positive example of the parent node “DIV” is finally determined to be an error, and the parent node is corrected to an exceptional case in S39. In this case, the search flag of the parent node is switched to “1” in S41, and the tag path of the input node “P” is output as the tag path of the boundary node.

サブツリーST4は、親ノード「DIV」および各子ノード「P」の判定結果が不例なため、S35.S38を通じて親ノード「DIV」の判定結果は正しいと判定され、該親ノードの探索フラグが「1」に切り替えられる。このときS41で出力されるタグパスは境界ノードではなく、本文部分判定データに従って不例と扱われる。   Since the determination result of the parent node “DIV” and each child node “P” is unprecedented, the subtree ST4 is S35. Through S38, the determination result of the parent node “DIV” is determined to be correct, and the search flag of the parent node is switched to “1”. At this time, the tag path output in S41 is not a boundary node, but is treated as an example according to the text part determination data.

サブツリーST3.ST4に対する探索フラグ「1」への切り替え後に、親ノード「BODY」の探索フラグが確認され(S36a)、サブツリーST2の「DIV」入力による境界探索が再開される。このとき親ノード「BODY」の探索フラグは「0」であるから、S35で該親ノード「BODY」が正例か否か確認される。ここでは親ノード「BODY」は、図7中の(A)に示すように、不例と判定されているため、S38でサブツリーST2〜ST4の「DIV」に対する正例の割合が閾値以上か否か確認される。このときサブツリーST1.ST2の「DIV」は正例と最終判定されているものの、サブツリーST3の「DIV」は不例に補正され、サブツリーST4の「DIV」は不例と判定されている。   Subtree ST3. After switching to the search flag “1” for ST4, the search flag of the parent node “BODY” is confirmed (S36a), and the boundary search by the “DIV” input of the subtree ST2 is resumed. At this time, since the search flag of the parent node “BODY” is “0”, whether or not the parent node “BODY” is a normal example is confirmed in S35. Here, since the parent node “BODY” is determined to be unprecedented as shown in (A) of FIG. 7, whether or not the ratio of positive examples to “DIV” of the subtrees ST2 to ST4 is greater than or equal to the threshold value in S38. Is confirmed. At this time, the subtree ST1. Although “DIV” in ST2 is finally determined to be a positive example, “DIV” in subtree ST3 is corrected to an unprecedented example, and “DIV” in subtree ST4 is determined to be an unexplained example.

そうすると、兄弟ノードの正例の割合は50%にすぎず、S38の閾値未満と確認されるから、図7中の(B)に示すように、親ノード「BODY」の不例は正しいものと最終判定され、S41で親ノード「BODY」の探索フラグが「1」に切り替えられる。また、サブツリーST1の「DIV」のタグパスが境界ノードのタグパスとして出力される。   Then, since the proportion of positive examples of sibling nodes is only 50% and is confirmed to be less than the threshold value of S38, as shown in (B) of FIG. 7, the non-example of the parent node “BODY” is correct. The final determination is made, and the search flag of the parent node “BODY” is switched to “1” in S41. Further, the tag path “DIV” of the subtree ST1 is output as the tag path of the boundary node.

その後にサブツリーST1の「DIV」入力の境界探索が再開されるものの、既に親ノード「BODY」の探索フラグが「1」に切り替えられているので(S36a)、S33に進む。このとき親ノード「BODY」は不例と判定されているため、S41でサブツリーST2の「DIV」のタグパスが境界ノードのタグパスとして出力される。   Thereafter, although the boundary search of the “DIV” input of the subtree ST1 is resumed, the search flag of the parent node “BODY” has already been switched to “1” (S36a), and the process proceeds to S33. At this time, since it is determined that the parent node “BODY” is unprecedented, the tag path “DIV” of the subtree ST2 is output as the tag path of the boundary node in S41.

このように前記抽出装置1によれば、本文部分判定データの判定結果、即ち2値分類の判定に加えて、兄弟ノードの多数決のような形式で上位ノードの判定結果を再確認し、該本文部分判定データの判定結果に誤りがあれば補正されることから、精度の高い本文抽出が可能となる。特に、本文部分判定データに基づき機械学習データD1に含まれないWebサイト、例えば新しいサイトの少数ページでも高精度に本文抽出することもできる。   As described above, according to the extraction device 1, in addition to the determination result of the body part determination data, that is, the determination of the binary classification, the determination result of the upper node is reconfirmed in a form like a majority decision of sibling nodes, If there is an error in the determination result of the partial determination data, it is corrected, so that the text can be extracted with high accuracy. In particular, the text can be extracted with high accuracy even on a Web site that is not included in the machine learning data D1, for example, a small number of pages of a new site, based on the text part determination data.

≪境界探索処理の他例≫
本発明は、上記実施形態に限定されるものではなく、境界探索処理に探索フラグを補正(切り替え)する対象ノード補正機能部10bを境界取得機能部10に追加することもできる。
≪Other examples of boundary search processing≫
The present invention is not limited to the above embodiment, and a target node correction function unit 10b that corrects (switches) a search flag in the boundary search process may be added to the boundary acquisition function unit 10.

図8に基づき対象ノード補正機能部10bの処理を説明する。ここでは図6中のS36の兄弟ノードを入力タグパス「PARENT_PATH」とし、該兄弟ノードのリーフノードの境界探索機能部10aに対する入力は行われないものとする。   The processing of the target node correction function unit 10b will be described based on FIG. Here, it is assumed that the sibling node of S36 in FIG. 6 is the input tag path “PARENT_PATH”, and no input is made to the boundary search function unit 10a of the leaf node of the sibling node.

まず、対象ノード補正機能部10bは、入力タグパスの各子ノード「CHILD_PATH_xx」に対する探索フラグと、本文部分判定データD3の判定結果とを取得する(S51.S52)。この取得後に各子ノードの探索フラグ「0 or 1」を確認する(S53)。   First, the target node correction function unit 10b acquires a search flag for each child node “CHILD_PATH_xx” of the input tag path and a determination result of the body part determination data D3 (S51 and S52). After this acquisition, the search flag “0 or 1” of each child node is confirmed (S53).

この確認の結果、各子ノードがリーフノード等であって探索フラグ「1」であれば(S54)、入力タグパス「PARENT_PATH」に対する判定結果が正例か否かを確認する(S56)。この確認の判定結果が正例であればS57に進む一方、不例であればS58に進む。   As a result of the confirmation, if each child node is a leaf node or the like and the search flag is “1” (S54), it is confirmed whether or not the determination result for the input tag path “PARENT_PATH” is a normal example (S56). If this determination result is positive, the process proceeds to S57, and if not, the process proceeds to S58.

S57.S58では、各子ノード「CHILD_PATH_xx」の判定結果が正例の割合が閾値以上か否かを確認する。S57の確認の結果、前記割合が前記閾値以上であれば、入力タグパス「PARENT_PATH」の探索フラグを「1」に切り替え、図6中のS36に出力し、S36aに進む。一方、前記割合が前記閾値未満であれば、判定結果を不例に補正(S59)した後に、同様に入力タグパス「PARENT_PATH」の探索フラグを「1」に切り替え、図6中のS36に出力し、S36aに進む。   S57. In S58, it is confirmed whether or not the determination result of each child node “CHILD_PATH_xx” is greater than or equal to the threshold value. As a result of the confirmation in S57, if the ratio is equal to or greater than the threshold value, the search flag of the input tag path “PARENT_PATH” is switched to “1”, output to S36 in FIG. 6, and the process proceeds to S36a. On the other hand, if the ratio is less than the threshold value, the search result of the input tag path “PARENT_PATH” is similarly switched to “1” after the determination result is corrected (S59) as an example, and output to S36 in FIG. The process proceeds to S36a.

S58の確認の結果、前記割合が前記閾値未満であれば、入力タグパス「PARENT_PATH」の探索フラグを「1」に切り替え、図6中のS36に出力し、S36aに進む。一方、前記割合が前記閾値以上であれば、判定結果を正例に補正(S59)した後に、同様に入力タグパス「PARENT_PATH」の探索フラグを「1」に切り替え、図6中のS36に出力し、S36aに進む。   As a result of the confirmation in S58, if the ratio is less than the threshold, the search flag of the input tag path “PARENT_PATH” is switched to “1”, output to S36 in FIG. 6, and the process proceeds to S36a. On the other hand, if the ratio is equal to or greater than the threshold, the search result of the input tag path “PARENT_PATH” is similarly switched to “1” after the determination result is corrected to a positive example (S59), and output to S36 in FIG. The process proceeds to S36a.

このようにS59で入力タグパスの判定結果が補正されるため、兄弟ノードの判定結果の補正結果に基づき37.S38の割合を算出でき、境界探索の精度を向上させることができる。   As described above, since the determination result of the input tag path is corrected in S59, 37. The ratio of S38 can be calculated, and the accuracy of the boundary search can be improved.

一方、S53の確認の結果、探索フラグ「0」の子ノードがあれば、入力タグパス「PARENT_PATH」の対象ノード補正処理を待機させ、該子ノードのタグパスを対象ノード補正機能部10bに入力し(S55)、該タグパスを入力とするS51〜S59の補正処理を優先させる。この入力タグパスの待機は、すべての子ノードの探索フラグが「1」の親ノード、例えばリーフノードの親ノードの入力まで繰り返される。そして、探索フラグ「1」の親ノードから順次上位ノードまで遡って処理を再開し、待機中の最上位ノードの探索フラグが「1」になれば、S56に進む。   On the other hand, if there is a child node with the search flag “0” as a result of the confirmation in S53, the target node correction processing of the input tag path “PARENT_PATH” is made to wait, and the tag path of the child node is input to the target node correction function unit 10b ( S55), priority is given to the correction processing of S51 to S59 using the tag path as an input. This standby of the input tag path is repeated until the input of the parent node whose search flag of all the child nodes is “1”, for example, the parent node of the leaf node. Then, the processing is resumed sequentially from the parent node of the search flag “1” to the upper node, and if the search flag of the uppermost node in the standby state becomes “1”, the process proceeds to S56.

≪プログラムなど≫
本発明は、前記各部2〜12の一部若しくは全部としてコンピュータを機能させる本文抽出プログラムとして構成することもできる。この場合には前記各ステップ(S01〜S05.S11〜S16.S21〜S30.S31〜S41.S51〜S59を含む)の全ステップあるいは一部のステップをコンピュータに実行させる。
≪Programs≫
The present invention can also be configured as a text extraction program that causes a computer to function as a part or all of each of the units 2 to 12. In this case, the computer is caused to execute all or some of the steps (including S01 to S05.S11 to S16.S21 to S30.S31 to S41.S51 to S59).

このプログラムは、Webサイトや電子メールなどネットワークを通じて提供することができる。また、前記プログラムは、CD−ROM,DVD−ROM,CD−R,CD−RW,DVD−R,DVD−RW,MO,HDD,BD−ROM,BR−R,BD−REなどの記録媒体に記録して、保存・配布することも可能である。この記録媒体は、記録媒体駆動装置を利用して読み出され、そのプログラムコード自体が前記実施形態の処理を実現するので、該記録媒体も本発明を構成する。   This program can be provided through a network such as a website or e-mail. The program is stored in a recording medium such as a CD-ROM, DVD-ROM, CD-R, CD-RW, DVD-R, DVD-RW, MO, HDD, BD-ROM, BR-R, BD-RE. It is also possible to record, save and distribute. This recording medium is read using a recording medium driving device, and the program code itself realizes the processing of the above embodiment, so that the recording medium also constitutes the present invention.

1…本文抽出装置
2…機械学習用データ記憶部
3…機械学習機能部
4…本文部分判定モデルDB(データベース)
5…解析対象文書記憶部
6…解析対象データ作成機能部
7…解析対象データ記憶部
8…本文部分判定機能部(本文部分判定手段)
9…本文部分判定データ記憶部
10…境界取得機能部(境界取得手段)
10a…境界探索機能部
10b…対象ノード補正機能部
11…境界判定データ記憶部
12…本文抽出機能部(本文抽出手段)
D1…機械学習用データ
D2…解析対象データ
D3…本文部分判定データ
D4…境界判定データ
DESCRIPTION OF SYMBOLS 1 ... Text extracting device 2 ... Data storage part for machine learning 3 ... Machine learning function part 4 ... Text part determination model DB (database)
5 ... Analysis target document storage unit 6 ... Analysis target data creation function unit 7 ... Analysis target data storage unit 8 ... Text part determination function part (text part determination means)
9 ... Text part determination data storage unit 10 ... Boundary acquisition function unit (boundary acquisition means)
DESCRIPTION OF SYMBOLS 10a ... Boundary search function part 10b ... Target node correction | amendment function part 11 ... Boundary determination data storage part 12 ... Text extraction function part (text extraction means)
D1 ... Machine learning data D2 ... Analysis target data D3 ... Text part judgment data D4 ... Boundary judgment data

Claims (7)

学習用文書のツリー構造における各ノードの特徴情報と、該各特徴情報が本文部分として正例か否かを分類したラベルとを用いて機械学習した学習結果に基づきツリー構造で構造化された文書から本文部分を抽出する文書抽出方法であって、
本文部分判定手段が、入力文書のノード毎に抽出された特徴情報を前記学習結果に基づき分類して各ノードが本文部分か否かを判定する本文部分判定ステップと、
境界取得手段が、入力文書のツリー構造中、本文部分判定ステップの判定結果が本文部分であるリーフノードを取得し、リーフノードを下位ノードとして、下位ノードに対する前記判定結果に応じて該下位ノードから上位ノードに遡って本文部分の境界を順次に探索し、該境界を取得する境界取得ステップと、
本文抽出手段が、境界取得ステップで取得した境界配下の文字列を本文部分として抽出する本文抽出ステップと、を有し、
境界取得ステップは、前記境界を探索する探索対象ノードの前記判定結果が本文部分のときに、
前記判定結果中、探索対象ノードの兄弟ノードに対する本文部分の割合が閾値以上でなければ、該探索対象ノードを前記境界とする一方、
前記割合が前記閾値以上であれば、探索対象ノードを親ノードに置き換えて前記境界を探索する
ことを特徴とする文書抽出方法。
A document structured in a tree structure based on learning results of machine learning using feature information of each node in the tree structure of the learning document and a label that classifies whether each feature information is a positive example as a body part A document extraction method for extracting a body part from
A text part determination step for classifying the feature information extracted for each node of the input document based on the learning result to determine whether each node is a text part,
Border acquisition means, a tree structure of the input document, body part determination step of the determination result acquires a leaf node is a body part, a leaf node as a lower node, from the lower level node in response to the determination result of lower nodes A boundary acquisition step of sequentially searching the boundary of the text part going back to the upper node and acquiring the boundary;
A text extraction means for extracting a text string under the boundary acquired in the boundary acquisition step as a text part;
In the boundary acquisition step, when the determination result of the search target node for searching for the boundary is a body part,
In the determination result, if the ratio of the body part to the sibling node of the search target node is not equal to or greater than the threshold, the search target node is set as the boundary,
If the ratio is equal to or greater than the threshold value, the search target node is replaced with a parent node, and the boundary is searched.
境界取得ステップは、探索対象の親ノードに対する前記判定結果が本文部分のときに前記割合が前記閾値以上でなければ、該親ノードの前記判定結果を非本文部分に補正する一方、
探索対象の親ノードに対する前記判定結果が非本文部分のときに前記割合が前記閾値以上であれば、該親ノードの前記判定結果を本文部分に補正する
ことを特徴とする請求項1記載の文書抽出方法。
The boundary acquisition step corrects the determination result of the parent node to a non-text part if the ratio is not equal to or greater than the threshold when the determination result for the parent node to be searched is a text part.
2. The document according to claim 1, wherein when the determination result with respect to a parent node to be searched is a non-text part, the determination result of the parent node is corrected to a text part if the ratio is equal to or greater than the threshold. Extraction method.
境界取得ステップは、前記兄弟ノードが子ノードを有していれば、該子ノードを探索対象ノードとする前記境界の探索を優先し、
該探索を優先した結果、兄弟ノードの前記判定結果が補正されていれば、補正後の判定結果に基づき前記割合を求める
ことを特徴とする請求項2記載の本文抽出方法。
In the boundary acquisition step, if the sibling node has a child node, priority is given to the search for the boundary using the child node as a search target node,
The method according to claim 2, wherein if the determination result of the sibling node is corrected as a result of prioritizing the search, the ratio is obtained based on the corrected determination result.
ツリー構造に構造化された文書から本文領域を抽出する文書抽出装置であって、
学習用文書のツリー構造における各ノードの特徴情報と、該各特徴情報が本文部分として正例か否かを分類したラベルとを用いて機械学習した結果を保持するデータベースと、
入力文書のノード毎に抽出された特徴情報を、データベースの保持情報に基づき分類して各ノードが本文部分か否かを判定する本文部分判定手段と、
入力文書のツリー構造中、本文部分判定手段の判定結果が本文部分であるリーフノードを取得し、リーフノードを下位ノードとして、下位ノードに対する前記判定結果に応じて該下位ノードから上位ノードに遡って本文部分の境界を順次に探索し、該境界を取得する境界取得手段と、
境界取得手段で取得した境界配下の文字列を本文部分として抽出する本文抽出手段と、を備え、
境界取得手段は、前記境界を探索する探索対象ノードの前記判定結果が本文部分のときに、
前記判定結果中、探索対象ノードの兄弟ノードに対する本文部分の割合が閾値以上でなければ、該探索対象ノードを前記境界とする一方、
前記割合が前記閾値以上であれば、探索対象ノードを親ノードに置き換えて前記境界を探索する
ことを特徴とする文書抽出装置。
A document extraction device that extracts a body area from a document structured in a tree structure,
A database that holds the result of machine learning using feature information of each node in the tree structure of the learning document and a label that classifies whether each feature information is a positive example as a body part;
Body part determination means for classifying the feature information extracted for each node of the input document based on the information held in the database and determining whether each node is a body part;
Tree structure of the input document, the determination result of the body part determining means obtains a leaf node is a body part, a leaf node as a lower node, back from the lower level node to the upper node according to the determination result of lower nodes Boundary acquisition means for sequentially searching the boundary of the body part and acquiring the boundary;
Text extraction means for extracting a character string under the boundary acquired by the boundary acquisition means as a text part, and
The boundary acquisition means, when the determination result of the search target node for searching the boundary is a body part,
In the determination result, if the ratio of the body part to the sibling node of the search target node is not equal to or greater than the threshold, the search target node is set as the boundary,
If the ratio is equal to or greater than the threshold, the search target node is replaced with a parent node to search for the boundary.
境界取得手段は、探索対象の親ノードに対する前記判定結果が本文部分のときに前記割合が前記閾値以上でなければ、該親ノードの前記判定結果を非本文部分に補正する一方、
探索対象の親ノードに対する前記判定結果が非本文部分のときに前記割合が前記閾値以上であれば、該親ノードの前記判定結果を本文部分に補正する
ことを特徴とする請求項4記載の文書抽出装置。
The boundary acquisition unit corrects the determination result of the parent node to a non-text part if the ratio is not equal to or greater than the threshold when the determination result for the parent node to be searched is a text part.
5. The document according to claim 4, wherein when the determination result for the parent node to be searched is a non-text part, the determination result of the parent node is corrected to the text part if the ratio is equal to or greater than the threshold value. Extraction device.
境界取得手段は、前記兄弟ノードが子ノードを有していれば、該子ノードを探索対象ノードとする前記境界の探索を優先し、
該探索を優先した結果、兄弟ノードの前記判定結果が補正されていれば、補正後の判定結果に基づき前記割合を求める
ことを特徴とする請求項5記載の文書抽出装置。
If the sibling node has a child node, the boundary acquisition means prioritizes the search for the boundary with the child node as a search target node,
6. The document extracting apparatus according to claim 5, wherein if the determination result of the sibling node is corrected as a result of prioritizing the search, the ratio is obtained based on the corrected determination result.
請求項4〜請求項6のいずれか1項に記載の本文抽出装置の各手段としてコンピュータを機能させるための本文抽出プログラム。   A text extracting program for causing a computer to function as each means of the text extracting device according to any one of claims 4 to 6.
JP2010168546A 2010-07-27 2010-07-27 Text extraction method, text extraction device, text extraction program Active JP5520732B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010168546A JP5520732B2 (en) 2010-07-27 2010-07-27 Text extraction method, text extraction device, text extraction program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010168546A JP5520732B2 (en) 2010-07-27 2010-07-27 Text extraction method, text extraction device, text extraction program

Publications (2)

Publication Number Publication Date
JP2012027852A JP2012027852A (en) 2012-02-09
JP5520732B2 true JP5520732B2 (en) 2014-06-11

Family

ID=45780672

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010168546A Active JP5520732B2 (en) 2010-07-27 2010-07-27 Text extraction method, text extraction device, text extraction program

Country Status (1)

Country Link
JP (1) JP5520732B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6564811B2 (en) * 2017-05-18 2019-08-21 日本電信電話株式会社 Passage presentation control device, passage presentation method, and passage presentation program
JP7009840B2 (en) 2017-08-30 2022-01-26 富士通株式会社 Information processing equipment, information processing method and dialogue control system
WO2021019773A1 (en) * 2019-08-01 2021-02-04 日本電信電話株式会社 Structured document processing learning device, structured document processing device, structured document processing learning method, structured document processing method, and program
US20220253591A1 (en) * 2019-08-01 2022-08-11 Nippon Telegraph And Telephone Corporation Structured text processing apparatus, structured text processing method and program

Also Published As

Publication number Publication date
JP2012027852A (en) 2012-02-09

Similar Documents

Publication Publication Date Title
US8667015B2 (en) Data extraction method, computer program product and system
JP4097263B2 (en) Web application model generation apparatus, web application generation support method, and program
US10977518B1 (en) Machine learning based adaptive instructions for annotation
US20100293117A1 (en) Method and system for facilitating batch mode active learning
JP5880454B2 (en) Image identification apparatus and program
US9760347B2 (en) Method and system to identify GUI objects for non-markup-language-presented applications
CN111597347A (en) Knowledge-embedded defect report reconstruction method and device
US7822788B2 (en) Method, apparatus, and computer program product for searching structured document
US8607217B2 (en) Incremental upgrade of entity-relationship systems
JP2010501096A (en) Cooperative optimization of wrapper generation and template detection
JP5520732B2 (en) Text extraction method, text extraction device, text extraction program
Heck et al. Horizontal traceability for just‐in‐time requirements: the case for open source feature requests
CN102156747B (en) Method and device for forecasting collaborative filtering mark by introduction of social tag
CN116304012A (en) A large-scale text clustering method and device
CN120234251B (en) A self-healing UI automated detection method based on multimodal fusion
CN116029280A (en) A document key information extraction method, device, computing device and storage medium
US20250021602A1 (en) Artificial intelligence system for efficient attribute extraction
KR101580152B1 (en) Method and apparatus for text classifier based on open directory project utilizing ancestor descendant categories
CN102567016B (en) Method and device for extracting use example of application programming interface
US7454436B2 (en) Generational global name table
KR102909241B1 (en) Method of extraction-conversion and information retrieval of corporate filings electronic document using machine reading comprehension and systemt implementing thereof
JP2005044087A (en) Text mining system and program
CN114692595A (en) Repeated conflict scheme detection method based on text matching
JP2011164717A (en) System, method, and program for collecting learning data
CN120804344B (en) Methods, apparatus, and equipment for recycling recycled materials based on multimodal large language models

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120903

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130822

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130827

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131028

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140407

R150 Certificate of patent or registration of utility model

Ref document number: 5520732

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