JP2014142769A - Text extraction device, text extraction method and text extraction program - Google Patents

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

Info

Publication number
JP2014142769A
JP2014142769A JP2013010200A JP2013010200A JP2014142769A JP 2014142769 A JP2014142769 A JP 2014142769A JP 2013010200 A JP2013010200 A JP 2013010200A JP 2013010200 A JP2013010200 A JP 2013010200A JP 2014142769 A JP2014142769 A JP 2014142769A
Authority
JP
Japan
Prior art keywords
text
document
character string
extraction
target document
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.)
Pending
Application number
JP2013010200A
Other languages
Japanese (ja)
Inventor
Hayato Akatsuka
隼 赤塚
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 Docomo Inc
Original Assignee
NTT Docomo Inc
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 NTT Docomo Inc filed Critical NTT Docomo Inc
Priority to JP2013010200A priority Critical patent/JP2014142769A/en
Publication of JP2014142769A publication Critical patent/JP2014142769A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PROBLEM TO BE SOLVED: To appropriately extract a text even when it is not possible to acquire another document which can be grouped with a document as the extraction object of the text.SOLUTION: A text extraction device 10 comprises: a division data creation part 120 for extracting one or more elements each including a character string from an object document as a text extraction object; a text identifier creation part 170 for extracting a morpheme from a related document related to the object document; a featured value generation part 210 for determining whether or not the extracted morpheme is included in the element, and for, when determining that the extracted morpheme is included in the element, increasing scores indicating a level at which the text of the object document is included in the element to calculate the scores about the element; and a text determination part 220 for specifying the element including the text from among the respective elements on the basis of the scores.

Description

本発明は、文書から本文を抽出する本文抽出装置、本文抽出方法及び本文抽出プログラムに関する。   The present invention relates to a text extracting device, a text extracting method, and a text extracting program for extracting text from a document.

近年ではインターネットの普及により、ブログ、ニュース、写真、動画、音楽といった無数のコンテンツが日々生成されている。スマートフォンの普及により、今後更にコンテンツが増える可能性が高い。インターネット利用者は、インターネット上での検索サービスを利用することで、莫大なコンテンツの中から当該利用者が所望するコンテンツを発掘することが可能である。そういったコンテンツを発掘するためには、コンテンツの本文を示すテキスト情報を、例えばHTML(HyperText Markup Language)で記述されたコンテンツから適切に抽出することが必要である。上記のような点から、サービスとしてコンテンツから本文を特定する技術のニーズが高まっている。   In recent years, countless contents such as blogs, news, photos, videos, and music are generated every day due to the spread of the Internet. The spread of smartphones is likely to increase the content in the future. By using a search service on the Internet, an Internet user can find out a content desired by the user from an enormous amount of content. In order to discover such content, it is necessary to appropriately extract text information indicating the content body from content described in, for example, HTML (HyperText Markup Language). In view of the above, there is an increasing need for a technique for identifying a text from content as a service.

コンテンツからの本文抽出のニーズは検索サービスに留まらない。近年ではウェブのコンテンツを雑誌風に見せるスマートフォンアプリやウェブサービスが流行している。これらのサービスでは、雑誌風にコンテンツを表示するために、汎用的な方法でコンテンツから本文を特定し抽出を行う必要がある。   The need for text extraction from content is not limited to search services. In recent years, smartphone applications and web services that show web content like a magazine have become popular. In these services, in order to display content in a magazine style, it is necessary to specify and extract the text from the content by a general-purpose method.

HTML等のマークアップ言語によって記述されたコンテンツからHTMLタグを除去し本文のみを抽出することは技術的に困難である。理由としてはHTMLのテキストには広告や本文と直接関係のないテキストが含まれることも多く、ノイズが非常に多いため本文がHTML上のどこに位置するか判定するのが困難なためである。   It is technically difficult to remove the HTML tag from the content described in a markup language such as HTML and extract only the text. This is because the HTML text often includes text that is not directly related to the advertisement or the text, and it is difficult to determine where the text is located on the HTML because there is a lot of noise.

特許文献1ではHTMLテキストからHTMLタグを全て除去しテキストデータに変換し、同じサイトのHTMLテキストをグループ化して、文字列毎の統計量を計算して、当該統計量を用いて本文を抽出している。   In Patent Document 1, all HTML tags are removed from HTML text, converted to text data, HTML texts of the same site are grouped, a statistic is calculated for each character string, and the text is extracted using the statistic. ing.

特開2006−338364号公報JP 2006-338364 A

しかしながら、特許文献1に記載された手法では、文書から本文を抽出するために、同じサイトのHTMLテキスト等の本文の抽出対象となる文書とグループ化可能な別の文書が必要となる。即ち、特許文献1に記載された手法では、本文の抽出対象となる文書とグループ化可能な別の文書を得られない場合には、文書から本文を抽出することができない。   However, in the technique described in Patent Document 1, in order to extract the text from the document, another document that can be grouped with the document from which the text such as HTML text of the same site is extracted is required. That is, according to the method described in Patent Document 1, if another document that can be grouped with the document from which the text is to be extracted cannot be obtained, the text cannot be extracted from the document.

本発明は、上記の問題点に鑑みてなされたものであり、本文の抽出対象となる文書とグループ化可能な別の文書を得られない場合であっても本文を適切に抽出することができる本文抽出装置、本文抽出方法及び本文抽出プログラムを提供することを目的とする。   The present invention has been made in view of the above-described problems, and even when another document that can be grouped with a document from which the text is to be extracted cannot be obtained, the text can be appropriately extracted. It is an object to provide a text extracting device, a text extracting method, and a text extracting program.

上記の目的を達成するために、本発明に係る本文抽出装置は、本文抽出対象となる対象文書を入力する対象文書入力手段と、対象文書入力手段によって入力された対象文書からそれぞれ文字列が含まれる1つ以上の要素を抽出する要素抽出手段と、対象文書と関連する関連文書を入力する関連文書入力手段と、関連文書入力手段によって入力された関連文書から文字列を抽出する文字列抽出手段と、文字列抽出手段によって抽出された文字列が要素抽出手段によって抽出された要素に含まれているか否か判断し、含まれていると判断した場合に当該要素について当該要素が対象文書の本文を含む度合いを示すスコアを増加させることでスコアを算出するスコア算出手段と、スコア算出手段によって算出されたスコアに基づいて各要素のうち対象文書の本文を含む要素を特定する特定手段と、特定手段によって特定された要素に応じた情報を出力する出力手段と、を備える。   In order to achieve the above object, a text extraction apparatus according to the present invention includes a target document input unit that inputs a target document that is a text extraction target, and a character string from each of the target documents input by the target document input unit. Element extracting means for extracting one or more elements, related document input means for inputting a related document related to the target document, and character string extracting means for extracting a character string from the related document input by the related document input means And whether or not the character string extracted by the character string extracting unit is included in the element extracted by the element extracting unit, and if it is determined that the element is included, the element is the text of the target document. A score calculating means for calculating a score by increasing a score indicating the degree of inclusion, and a pair of elements based on the score calculated by the score calculating means Comprising specifying means for specifying an element that contains the body of the document, and output means for outputting information corresponding to the identified element by a particular means.

例えば、インターネット上のコンテンツに対するマイクロブログのコメントは、当該コンテンツの本文に係る記載がなされていることが多い。このコメントを用いることで、そのコンテンツが何について記載されているかを把握することが可能である。また、解析対象の文書のメタデータも同様に文書の内容を示しているものがある。本発明に係る本文抽出装置では、マイクロブログのコメントやメタデータ等を関連文書として、対象文書から抽出された要素に対して、対象文書の本文を含む度合いを示すスコアが算出されて、本文を含む要素が特定される。上記の関連文書は、同じサイトのHTMLテキスト等の本文の抽出対象となる文書とグループ化可能な文書ではない。即ち、本発明に係る本文抽出装置によれば、本文の抽出対象となる文書とグループ化可能な別の文書を得られない場合であっても本文を適切に抽出することができる。   For example, a microblog comment on content on the Internet often has a description relating to the text of the content. By using this comment, it is possible to grasp what the content is described. Some of the metadata of the document to be analyzed similarly indicates the contents of the document. In the text extracting device according to the present invention, a score indicating the degree of inclusion of the text of the target document is calculated with respect to the elements extracted from the target document using the microblog comment, metadata, or the like as a related document. The containing element is specified. The related document is not a document that can be grouped with a document from which a body text such as HTML text of the same site is extracted. That is, according to the text extracting apparatus of the present invention, the text can be appropriately extracted even when another document that can be grouped with the text from which the text is to be extracted cannot be obtained.

要素抽出手段は、予め対象文書に含まれうるタグを示すタグ情報を抽出対象として記憶しておき、記憶したタグ情報によって示される要素を抽出することとすることができる。この構成によれば、対象文書がHTMLによる文書である場合等に適切に要素を抽出することができる。   The element extraction means may store tag information indicating tags that can be included in the target document in advance as an extraction target, and extract an element indicated by the stored tag information. According to this configuration, elements can be appropriately extracted when the target document is an HTML document.

要素抽出手段は、予め対象文書に含まれうるタグを示すタグ情報を除外対象として記憶しておき、記憶したタグ情報によって示される要素を抽出対象から除外することとすることができる。この構成によれば、予め本文が含まれないと考えられる要素を解析対象とすることができ、効率的かつ適切に本発明を実施することができる。   The element extraction means stores in advance tag information indicating a tag that can be included in the target document as an exclusion target, and can exclude an element indicated by the stored tag information from the extraction target. According to this configuration, an element that is considered not to include a text in advance can be an analysis target, and the present invention can be implemented efficiently and appropriately.

文字列抽出手段は、形態素解析を行うことで関連文書から文字列を抽出することとすることができる。この構成によれば、適切に関連文書から文字列を抽出することができ、適切に本発明を実施することができる。   The character string extraction means can extract a character string from a related document by performing morphological analysis. According to this configuration, a character string can be appropriately extracted from a related document, and the present invention can be appropriately implemented.

関連文書入力手段は、関連文書として対象文書のメタデータを入力し、スコア算出手段は、文字列に対応する特徴語スコアを予め記憶しておき、文字列抽出手段によって抽出された文字列に対応する特徴語スコアに基づいてスコアを算出する、こととすることができる。この構成によれば、メタデータを関連文書として用いて適切に本発明を実施することができる。   The related document input unit inputs the metadata of the target document as the related document, and the score calculation unit stores the feature word score corresponding to the character string in advance and corresponds to the character string extracted by the character string extracting unit The score can be calculated based on the feature word score. According to this configuration, the present invention can be appropriately implemented using metadata as a related document.

関連文書入力手段は、関連文書として対象文書を示す情報が文字列に含まれる文書を入力し、スコア算出手段は、文字列抽出手段によって抽出された文字列の出現頻度に基づいてスコアを算出する、こととすることができる。この構成によれば、URL(Uniform Resource Locator)等の対象文書を示す情報を含むマイクロブログのコメント等を関連文書として用いて適切に本発明を実施することができる。   The related document input unit inputs a document including information indicating the target document as a related document in the character string, and the score calculation unit calculates a score based on the appearance frequency of the character string extracted by the character string extraction unit. , That can be. According to this configuration, the present invention can be appropriately implemented using a microblog comment including information indicating a target document such as a URL (Uniform Resource Locator) as a related document.

要素抽出手段によって抽出された要素について機械学習に必要となる特徴量を生成する特徴量生成手段を更に備え、特定手段は、スコア算出手段によって算出されたスコアと特徴量生成手段によって生成された特徴量とに基づく機械学習によって各要素のうち対象文書の本文を含む要素を特定する、こととすることができる。この構成によれば、機械学習により適切に本文を判断することができる。   The image processing apparatus further includes a feature amount generation unit that generates a feature amount necessary for machine learning with respect to the element extracted by the element extraction unit, and the specifying unit includes the score calculated by the score calculation unit and the feature generated by the feature amount generation unit. It is possible to specify an element including the text of the target document among the elements by machine learning based on the quantity. According to this configuration, the text can be appropriately determined by machine learning.

特徴量生成手段は、要素抽出手段によって抽出された要素に他の文書へのリンクを含むか否かに基づいて特徴量を生成することとすることができる。この構成によれば、対象文書に含まれる他の文書へのリンクにも基づいて適切に本文を判断することができる。   The feature quantity generation means can generate the feature quantity based on whether or not the element extracted by the element extraction means includes a link to another document. According to this configuration, it is possible to appropriately determine the text based on links to other documents included in the target document.

特徴量生成手段は、要素抽出手段によって抽出された要素に含まれる文字列における、句読点の数又は文字列の長さに基づいて特徴量を生成することとすることができる。この構成によれば、対象文書に含まれる文字列の文章らしさにも基づいて適切に本文を判断することができる。   The feature quantity generation means may generate the feature quantity based on the number of punctuation marks or the length of the character string in the character string included in the element extracted by the element extraction means. According to this configuration, it is possible to appropriately determine the text based on the text likeness of the character string included in the target document.

ところで、本発明は、上記のように本文抽出装置の発明として記述できる他に、以下のように本文抽出方法及び本文抽出プログラムの発明としても記述することができる。これはカテゴリが異なるだけで、実質的に同一の発明であり、同様の作用及び効果を奏する。   By the way, the present invention can be described as an invention of a text extracting device as described above, and can also be described as an invention of a text extracting method and a text extracting program as follows. This is substantially the same invention only in different categories, and has the same operations and effects.

即ち、本発明に係る本文抽出方法は、本文抽出対象となる対象文書を入力する対象文書入力ステップと、対象文書入力ステップにおいて入力された対象文書からそれぞれ文字列が含まれる1つ以上の要素を抽出する要素抽出ステップと、対象文書と関連する関連文書を入力する関連文書入力ステップと、関連文書入力ステップにおいて入力された関連文書から文字列を抽出する文字列抽出ステップと、文字列抽出ステップにおいて抽出された文字列が要素抽出ステップにおいて抽出された要素に含まれているか否か判断し、含まれていると判断した場合に当該要素について当該要素が対象文書の本文を含む度合いを示すスコアを増加させることでスコアを算出するスコア算出ステップと、スコア算出ステップにおいて算出されたスコアに基づいて各要素のうち対象文書の本文を含む要素を特定する特定ステップと、特定ステップにおいて特定された要素に応じた情報を出力する出力ステップと、を含む。   That is, the text extraction method according to the present invention includes a target document input step for inputting a target document that is a text extraction target, and one or more elements each including a character string from the target document input in the target document input step. In the element extraction step to extract, the related document input step to input the related document related to the target document, the character string extraction step to extract the character string from the related document input in the related document input step, and the character string extraction step It is determined whether or not the extracted character string is included in the element extracted in the element extraction step, and when it is determined that the extracted character string is included, a score indicating a degree that the element includes the body of the target document is determined for the element. A score calculation step for calculating a score by increasing the score, and a score calculated in the score calculation step Te including a specifying step of specifying an element that contains the body of the target document of each element, and an output step of outputting information corresponding to the specified elements in a specific step.

また、本発明に係る本文抽出プログラムは、コンピュータを、本文抽出対象となる対象文書を入力する対象文書入力手段と、対象文書入力手段によって入力された対象文書からそれぞれ文字列が含まれる1つ以上の要素を抽出する要素抽出手段と、対象文書と関連する関連文書を入力する関連文書入力手段と、関連文書入力手段によって入力された関連文書から文字列を抽出する文字列抽出手段と、文字列抽出手段によって抽出された文字列が要素抽出手段によって抽出された要素に含まれているか否か判断し、含まれていると判断した場合に当該要素について当該要素が対象文書の本文を含む度合いを示すスコアを増加させることでスコアを算出するスコア算出手段と、スコア算出手段によって算出されたスコアに基づいて各要素のうち対象文書の本文を含む要素を特定する特定手段と、特定手段によって特定された要素に応じた情報を出力する出力手段と、として機能させる。   In the text extraction program according to the present invention, the computer includes a target document input unit that inputs a target document that is a text extraction target, and one or more character strings each including a character string from the target document input by the target document input unit. Element extracting means for extracting the elements of the document, related document input means for inputting a related document related to the target document, character string extracting means for extracting a character string from the related document input by the related document input means, and a character string It is determined whether or not the character string extracted by the extraction unit is included in the element extracted by the element extraction unit, and when it is determined that the character string is included, the degree to which the element includes the text of the target document is determined. A score calculation means for calculating a score by increasing the score shown, and a pair of elements based on the score calculated by the score calculation means Specifying means for specifying an element that contains the body of the document, to function as, and output means for outputting information corresponding to the identified element by a particular means.

本発明では、マイクロブログのコメントやメタデータ等を関連文書として、対象文書から抽出された要素に対して、対象文書の本文を含む度合いを示すスコアが算出されて、本文を含む要素が特定される。上記の関連文書は、同じサイトのHTMLテキスト等の本文の抽出対象となる文書とグループ化可能な文書ではない。即ち、本発明によれば、本文の抽出対象となる文書とグループ化可能な別の文書を得られない場合であっても本文を適切に抽出することができる。   In the present invention, a comment indicating the degree to which the text of the target document is included is calculated for the elements extracted from the target document using microblog comments and metadata as related documents, and the element including the text is specified. The The related document is not a document that can be grouped with a document from which a body text such as HTML text of the same site is extracted. That is, according to the present invention, the text can be appropriately extracted even when another document that can be grouped with the document from which the text is to be extracted cannot be obtained.

本発明の実施形態に係る本文抽出装置の機能構成を示す図である。It is a figure which shows the function structure of the text extraction apparatus which concerns on embodiment of this invention. 本文の抽出対象の文書の例を示す図である。It is a figure which shows the example of the document of the extraction object of a text. 対象文書から要素を抽出するために用いられる情報を示す図である。It is a figure which shows the information used in order to extract an element from a target document. 文書分割データ記憶部に記憶される情報を示すテーブルである。It is a table which shows the information memorized by a document division data storage part. 関連文書としてメタデータを用いる場合の情報を示す図である。It is a figure which shows the information in the case of using metadata as a related document. 関連文書としてマイクロブログの情報を用いる場合の情報を示す図である。It is a figure which shows the information in the case of using the information of a microblog as a related document. 対象文書から要素が本文を含むものか否かを判定するために生成される情報を示すテーブルである。It is a table which shows the information produced | generated in order to determine whether an element contains the text from a target document. 本発明の実施形態に係る本文抽出装置のハードウェア構成を示す図である。It is a figure which shows the hardware constitutions of the text extraction apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る本文抽出装置で実行される処理(本文抽出方法)のうち、対象文書の入力に係る処理を示すフローチャートである。It is a flowchart which shows the process which concerns on the input of an object document among the processes (text extraction method) performed with the text extraction apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る本文抽出装置で実行される処理(本文抽出方法)のうち、関連文書としてメタデータを用いた場合の本文識別子を生成する処理を示すフローチャートである。It is a flowchart which shows the process which produces | generates the text identifier at the time of using metadata as a related document among the processes (text extraction method) performed with the text extraction apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る本文抽出装置で実行される処理(本文抽出方法)のうち、関連文書としてマイクロブログのコメントを用いた場合の本文識別子を生成する処理を示すフローチャートである。It is a flowchart which shows the process which produces | generates the text identifier at the time of using the comment of a microblog as a related document among the processes (text extraction method) performed with the text extraction apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る本文抽出装置で実行される処理(本文抽出方法)のうち、本文を抽出する処理を示すフローチャートである。It is a flowchart which shows the process which extracts the text among the processes (text extraction method) performed with the text extraction apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る本文抽出プログラムの構成を、記録媒体と共に示す図である。It is a figure which shows the structure of the text extraction program which concerns on embodiment of this invention with a recording medium.

以下、図面と共に本発明に係る本文抽出装置、本文抽出方法及び本文抽出プログラムについて詳細に説明する。なお、図面の説明においては同一要素には同一符号を付し、重複する説明を省略する。   Hereinafter, a text extracting device, a text extracting method, and a text extracting program according to the present invention will be described in detail with reference to the drawings. In the description of the drawings, the same elements are denoted by the same reference numerals, and redundant description is omitted.

図1に本実施形態に係る本文抽出装置10を示す。本文抽出装置10は、本文抽出対象となる対象文書から本文を抽出する装置である。本文抽出対象となる対象文書は、例えば、インターネット上で公開されているWebコンテンツである。当該コンテンツは、例えば、表示される文字列を含む。当該コンテンツは、例えば、HTMLによって記載されている。Webコンテンツには、主たる内容をなす部分である本文を含み、また、本文以外にも広告等の本文以外の文字列を多く含む。本実施形態に係る本文抽出装置10は、本文である文字列と本文以外の文字列とが混在しうる対象文書から本文を抽出する装置である。このように抽出された本文は、例えば、上述した雑誌風なコンテンツの生成に用いられる。   FIG. 1 shows a text extracting apparatus 10 according to the present embodiment. The text extraction device 10 is a device that extracts a text from a target document that is a text extraction target. The target document that is the subject of text extraction is, for example, Web content published on the Internet. The content includes, for example, a character string to be displayed. The content is described in, for example, HTML. The Web content includes a main body that is a main part, and includes many character strings other than the main body such as advertisements in addition to the main body. The text extraction apparatus 10 according to the present embodiment is an apparatus that extracts a text from a target document in which a character string that is a text and a character string other than the text can be mixed. The text extracted in this way is used, for example, for generating the magazine-like content described above.

本文抽出装置10は、対象文書を取得(受信)できるように当該対象文書を出力する装置(例えば、Webサーバ)とインターネット等のネットワークを介して接続されている。また、後述するように本文の抽出には、対象文書と関連する関連文書を用いる。本文抽出装置10は、当該関連文書を取得(受信)できるように当該関連文書を出力する装置(例えば、例えば、マイクロブログのサービスを提供するサーバ)とインターネット等のネットワークを介して接続されている。   The text extracting device 10 is connected to a device (for example, a Web server) that outputs a target document so as to acquire (receive) the target document via a network such as the Internet. Further, as will be described later, a related document related to the target document is used for extracting the text. The text extracting device 10 is connected to a device (for example, a server that provides a microblog service) that outputs the relevant document so that the relevant document can be acquired (received) via a network such as the Internet. .

図1に示すように本文抽出装置10は、文書入力部100と、文書記憶部110と、分割データ作成部120と、文書分割データ記憶部130と、メタデータ入力部140と、マイクロブログ入力部150と、マイクロブログ記憶部160と、本文識別子作成部170と、本文識別子記憶部180と、ノイズ判定部190と、本文ノイズ記憶部200と、特徴量生成部210と、本文判定部220と、分割データ結合部230とを備えて構成されている。   As shown in FIG. 1, the text extracting apparatus 10 includes a document input unit 100, a document storage unit 110, a divided data creation unit 120, a document divided data storage unit 130, a metadata input unit 140, and a microblog input unit. 150, a microblog storage unit 160, a text identifier creation unit 170, a text identifier storage unit 180, a noise determination unit 190, a text noise storage unit 200, a feature value generation unit 210, a text determination unit 220, The divided data combining unit 230 is provided.

文書入力部100は、本文抽出対象となる対象文書を入力する対象文書入力手段である。文書入力部100は、例えば、インターネット経由でWebサーバに対してURLを指定して文書を要求することで、対象文書を取得(受信)する。文書入力部100は、予め対象文書の取得元となるサイトを記憶しておき、指定されたタイミングで当該サイトから対象文書を取得する。当該サイトや対象文書を取得するタイミングを示す情報は、本文抽出装置10の管理者等によって予め本文抽出装置10に入力されている。取得される対象文書は、複数であってもよい。   The document input unit 100 is a target document input unit that inputs a target document that is a text extraction target. For example, the document input unit 100 acquires (receives) a target document by requesting a document by specifying a URL to a Web server via the Internet. The document input unit 100 stores a site from which the target document is acquired in advance, and acquires the target document from the site at a designated timing. Information indicating the timing for acquiring the site and the target document is input to the text extracting device 10 in advance by an administrator of the text extracting device 10 or the like. A plurality of target documents may be acquired.

対象文書は、例えば、図2(a)に示すようにHTMLによって記述されたものである。図2に示すようにHTMLによって記述された文書(HTML文書)には、“<”及び“>”によって示されるタグが含まれており、タグによって要素に区切られている。当該タグには、要素の内容等に応じて複数の種類がある。   For example, the target document is described in HTML as shown in FIG. As shown in FIG. 2, a document (HTML document) described in HTML includes tags indicated by “<” and “>”, and is divided into elements by tags. There are a plurality of types of tags depending on the contents of the elements.

文書入力部100は、取得した対象文書にURL(例えば、http://xxx.com)を対応付けて文書記憶部110に入力する。文書記憶部110は、文書入力部100から入力された対象文書を記憶する手段である。   The document input unit 100 associates a URL (for example, http://xxx.com) with the acquired target document and inputs it to the document storage unit 110. The document storage unit 110 is a unit that stores the target document input from the document input unit 100.

分割データ作成部120は、文書入力部100によって入力されて文書記憶部110によって記憶されている対象文書から、それぞれ文字列が含まれる1つ以上の要素を抽出する要素抽出手段である。分割データ作成部120は、本文抽出対象エリア記憶部121と、本文抽出対象エリア特定部122と、除去対象要素記憶部123と、要素除去部124と、分割対象要素記憶部125と、文書分割部126とを備えて構成される。要素の抽出は、具体的には以下のようにHTML文書をタグに基づいて分割することで行われる。なお、本発明における要素は、必ずしもHTML文書の要素と一致している必要はない。   The divided data creation unit 120 is an element extraction unit that extracts one or more elements each containing a character string from the target document input by the document input unit 100 and stored in the document storage unit 110. The divided data creation unit 120 includes a text extraction target area storage unit 121, a text extraction target area specifying unit 122, a removal target element storage unit 123, an element removal unit 124, a split target element storage unit 125, and a document division unit. 126. Specifically, the extraction of elements is performed by dividing an HTML document based on tags as follows. Note that the elements in the present invention do not necessarily match the elements of the HTML document.

本文抽出対象エリア記憶部121は、対象文書における本文抽出対象とする部分(要素)のタグを示すタグ情報を抽出対象として記憶しておく。このタグ情報は、本文抽出装置10の管理者等によって予め本文抽出装置10に入力されている。本文抽出対象エリア記憶部121に記憶されるタグ情報は、例えば、図3(a)に示す情報である。   The text extraction target area storage unit 121 stores tag information indicating a tag of a part (element) as a text extraction target in the target document as an extraction target. This tag information is input to the text extracting device 10 in advance by an administrator of the text extracting device 10 or the like. The tag information stored in the text extraction target area storage unit 121 is, for example, information illustrated in FIG.

本文抽出対象エリア特定部122は、文書記憶部110に記憶されている対象文書を読み出して、当該対象文書から本文の抽出対象とする本文抽出対象エリア(部分)を特定する。具体的には、本文抽出対象エリア特定部122は、本文抽出対象エリア記憶部121によって記憶されているタグ情報を読み出して、当該タグ情報によって示される要素である本文抽出対象エリアを抽出する(該当する要素のみを残す)。図2(b)に、対象文書から本文抽出対象エリアとして抽出された情報(<target_a>のタグによって示される要素)の例を示す。   The text extraction target area specifying unit 122 reads the target document stored in the document storage unit 110 and specifies the text extraction target area (part) from which the text is to be extracted from the target document. Specifically, the text extraction target area specifying unit 122 reads tag information stored in the text extraction target area storage unit 121 and extracts a text extraction target area that is an element indicated by the tag information (corresponding Leave only the elements you want). FIG. 2B shows an example of information (element indicated by a tag of <target_a>) extracted as a text extraction target area from the target document.

HTML文書によっては、本文が含まれる可能性が高い部分が特定のタグで示されることがある。例えば、特定の企業の広告を採用しているページは、最適な広告を出すにあたり解析してほしいテキストエリアを“AdSense”との記載を含むタグで示される要素としている(当該要素で囲っている)ことが多い。このタグで示される要素は本文が含まれる可能性が非常に高い。これにより、本文抽出の精度が向上する。本文抽出対象エリア特定部122は、抽出した情報を要素除去部124に出力する。   Depending on the HTML document, a part that has a high possibility of including the text may be indicated by a specific tag. For example, in a page that employs an advertisement of a specific company, a text area that is desired to be analyzed in order to place an optimal advertisement is set as an element indicated by a tag including the description “AdSense” (enclosed by the element). ) Often. The element indicated by this tag is very likely to contain the text. This improves the accuracy of text extraction. The text extraction target area specifying unit 122 outputs the extracted information to the element removing unit 124.

除去対象要素記憶部123は、対象文書における本文抽出対象から除外する部分(要素)のタグを示すタグ情報を除外対象として記憶しておく。このタグ情報は、本文抽出装置10の管理者等によって予め本文抽出装置10に入力されている。除去対象要素記憶部123に記憶されるタグ情報は、例えば、図3(b)に示す情報である。例えば、本文とは関係ない<script>のタグが除外対象のタグ情報とされる。   The removal target element storage unit 123 stores tag information indicating a tag of a portion (element) to be excluded from the text extraction target in the target document as an exclusion target. This tag information is input to the text extracting device 10 in advance by an administrator of the text extracting device 10 or the like. The tag information stored in the removal target element storage unit 123 is, for example, information illustrated in FIG. For example, a tag of <script> that is not related to the text is tag information to be excluded.

要素除去部124は、本文抽出対象エリア特定部122から入力された本文抽出対象エリアの情報から、本文の抽出対象としない不要な要素(部分)を除外(除去)する。具体的には、要素除去部124は、除去対象要素記憶部123によって記憶されているタグ情報を読み出して、当該タグ情報によって示される要素を本文抽出対象エリアから除外する。図2(c)に、除去が行われた本文抽出対象エリアの情報(<script>のタグによって示される要素が除外された情報)の例を示す。このように不要なタグによって示される要素を除去することでノイズを減らすことができる。本文抽出対象エリア特定部122は、上記のように除外を行った情報を文書分割部126に出力する。   The element removal unit 124 excludes (removes) unnecessary elements (portions) not to be extracted from the text from the information on the text extraction target area input from the text extraction target area specifying unit 122. Specifically, the element removal unit 124 reads the tag information stored in the removal target element storage unit 123, and excludes the element indicated by the tag information from the text extraction target area. FIG. 2C shows an example of information on the text extraction target area that has been removed (information in which the element indicated by the tag <script> is excluded). In this way, noise can be reduced by removing elements indicated by unnecessary tags. The text extraction target area specifying unit 122 outputs the information that has been excluded as described above to the document dividing unit 126.

分割対象要素記憶部125は、対象文書を分割する単位である部分(要素)のタグを示すタグ情報を記憶しておく。このタグ情報は、本文抽出装置10の管理者等によって予め本文抽出装置10に入力されている。分割対象要素記憶部125に記憶されるタグ情報は、例えば、図3(c)に示す情報である。例えば、<div>や<p>のタグが、分割される単位であるタグ情報とされる。   The division target element storage unit 125 stores tag information indicating a tag of a portion (element) that is a unit for dividing the target document. This tag information is input to the text extracting device 10 in advance by an administrator of the text extracting device 10 or the like. The tag information stored in the division target element storage unit 125 is, for example, information illustrated in FIG. For example, tags such as <div> and <p> are tag information that is a unit to be divided.

文書分割部126は、要素除去部124から入力された本文抽出対象エリアの情報を分割する。具体的には、文書分割部126は、分割対象要素記憶部125によって記憶されているタグ情報を読み出して、当該タグ情報によって示される要素の単位で本文抽出対象エリアの情報を分割する。このように対象文書を分割することで、適切な単位で要素が本文を含むか否かを判断することができる。文書分割部126は、上記のように分割した情報を文書分割データ記憶部130に出力する。   The document dividing unit 126 divides the text extraction target area information input from the element removing unit 124. Specifically, the document dividing unit 126 reads the tag information stored in the division target element storage unit 125 and divides the text extraction target area information in units of elements indicated by the tag information. By dividing the target document in this way, it can be determined whether or not the element includes the text in an appropriate unit. The document dividing unit 126 outputs the information divided as described above to the document divided data storage unit 130.

なお、本文抽出対象エリア特定部122、要素除去部124及び文書分割部126による処理を、必ずしも全て行う必要はなく何れかを行うこととしてもよい。   Note that the processing by the text extraction target area specifying unit 122, the element removing unit 124, and the document dividing unit 126 does not necessarily have to be performed all, and any of them may be performed.

文書分割データ記憶部130は、文書分割部126から入力された分割後の対象文書を記憶する手段である。文書分割データ記憶部130は、図4に示すようなテーブルに情報を格納することで情報を記憶する。図4のテーブルに示すように、文書分割データ記憶部130は、URL、パス及びテキストを対応付けて記憶する。URLは、対象文書の取得元を示す情報である。パスは分割された要素をユニークに特定する情報である。パスは、例えば、XPathの表現方法を用いて記述される。パスは、例えば、文書分割部126による分割時等に生成される。なお、パスは、文書内の要素をユニークに特定できる情報であればXPathである必要はない。   The document division data storage unit 130 is a unit that stores the target document after division input from the document division unit 126. The document division data storage unit 130 stores information by storing information in a table as shown in FIG. As shown in the table of FIG. 4, the document division data storage unit 130 stores URLs, paths, and texts in association with each other. The URL is information indicating the acquisition source of the target document. The path is information that uniquely identifies the divided element. The path is described using, for example, an XPath expression method. The path is generated, for example, when the document is divided by the document dividing unit 126. The path need not be XPath as long as it is information that can uniquely identify an element in the document.

テキストは、本文の抽出対象の文字列を含む分割された対象文書の要素である。文書分割データ記憶部130に記憶される情報は、ツリー構造となっていてもよい。即ち、あるテキストが別のテキストを含む構造となっていてもよい。例えば、図4に示すhtml/body/div[3]のパスのテキストは、html/body/div[3]/div[1]のパスのテキストを含んでいる。なお、パスは、同一レベルに複数の同じ名前の要素が存在する場合には、識別できる必要がある。また、文書分割データ記憶部130は、図4に示すように複数の分割された対象文書が記憶されていてもよい。文書分割データ記憶部130に記憶される単位が、対象文書の本文を含むか否かの判定の単位となる。   The text is an element of the divided target document including the character string to be extracted from the body. Information stored in the document division data storage unit 130 may have a tree structure. That is, a certain text may have a structure including another text. For example, the text of the path of html / body / div [3] shown in FIG. 4 includes the text of the path of html / body / div [3] / div [1]. Note that a path must be identifiable when there are multiple elements with the same name at the same level. Further, as shown in FIG. 4, the document division data storage unit 130 may store a plurality of divided target documents. The unit stored in the document divided data storage unit 130 is a unit for determining whether or not the text of the target document is included.

メタデータ入力部140は、対象文書と関連する関連文書を入力する関連文書入力手段の一つである。上述したように関連文書は、対象文書から本文を抽出するために用いる情報である。メタデータ入力部140は、関連文書として対象文書のメタデータを入力する。メタデータは、対象文書についてのデータであり、本実施形態においては文字列を含むものである。例えば、対象文書がHTML文書であった場合には、メタデータは当該HTML文書の概要を説明する文章のデータである。このようなメタデータは、例えば、HTML文書の生成者によって用意される。メタデータは、例えば、HTML文書中にdescriptionという記載を含むタグによって示される要素である。例えば、対象文書が図5(a)に示すようなものである場合、要素300の部分がメタデータに相当する。   The metadata input unit 140 is one of related document input means for inputting a related document related to the target document. As described above, the related document is information used to extract the text from the target document. The metadata input unit 140 inputs metadata of the target document as a related document. The metadata is data about the target document, and includes a character string in this embodiment. For example, when the target document is an HTML document, the metadata is text data explaining an outline of the HTML document. Such metadata is prepared, for example, by a creator of an HTML document. The metadata is an element indicated by a tag including a description “description” in an HTML document, for example. For example, when the target document is as shown in FIG. 5A, the element 300 corresponds to metadata.

メタデータ入力部140は、予め図5(b)に示すような、対象文書からメタデータを抽出するエリアを特定するために必要なパスあるいはクエリを予め記憶している。パスあるいはクエリは、本文抽出装置10の管理者等によって予め本文抽出装置10に入力されている。図5(b)に示す例では、XPathのクエリの記述方法を用いて記載された情報であるが、メタデータを含むエリアを抽出できる記述方法であれば別の方法で記述してもよい。メタデータ入力部140は、文書記憶部110に記憶されている対象文書を読み出して、上記のパスあるいはクエリを用いてメタデータの抽出を行う。なお、メタデータは対象文書から抽出しているが、メタデータ自体が独立した対象文書と関連する関連文書とみなしうる。   The metadata input unit 140 stores in advance a path or query necessary for specifying an area for extracting metadata from the target document as shown in FIG. The path or query is input to the text extracting device 10 in advance by an administrator of the text extracting device 10 or the like. In the example shown in FIG. 5B, the information is described using the XPath query description method, but may be described by another method as long as the description method can extract the area including the metadata. The metadata input unit 140 reads the target document stored in the document storage unit 110 and extracts metadata using the above-described path or query. Although the metadata is extracted from the target document, the metadata itself can be regarded as a related document related to the independent target document.

また、メタデータ入力部140は、上記のようにHTML文書に含まれるメタデータを取得する以外にも、例えば、HTML文書に付随している、図5(e)に示すようなRSS(RDF site summary、rich Site summary、really simple syndication)をメタデータとして取得することとしてもよい。メタデータ入力部140は、取得したRSSから更に特定のタグを示す要素をメタデータとして取得することとしてもよい。特定のタグは、例えば、同一URLのアイテムを対象に記事の説明を含む要素のタグであるdescriptionタグである。メタデータ入力部140は、抽出したメタデータを本文識別子作成部170に入力する。   In addition to acquiring the metadata included in the HTML document as described above, the metadata input unit 140, for example, has an RSS (RDF site) attached to the HTML document as shown in FIG. summary, rich Site summary, and really simple syndication) may be acquired as metadata. The metadata input unit 140 may acquire an element indicating a specific tag from the acquired RSS as metadata. The specific tag is, for example, a description tag that is a tag of an element including an article description for an item having the same URL. The metadata input unit 140 inputs the extracted metadata to the body identifier creation unit 170.

マイクロブログ入力部150は、対象文書と関連する関連文書を入力する関連文書入力手段の一つである。マイクロブログ入力部150は、関連文書としてマイクロブログの情報を入力する。理解を容易にするため、ここではマイクロブログのツイッターの例をとって説明する。ツイッターでは、URLを付けてそのURLに対してコメントを書くことが多い。このURLが対象文書の取得元を示すものであれば、当該URLに対するコメントを用いて対象文書から本文を抽出することができる。   The microblog input unit 150 is one of related document input means for inputting a related document related to the target document. The microblog input unit 150 inputs microblog information as a related document. For ease of understanding, here is an example of microblogging Twitter. Twitter often adds a URL and writes a comment for that URL. If this URL indicates the acquisition source of the target document, a text can be extracted from the target document using a comment for the URL.

マイクロブログ入力部150は、例えば、インターネット経由でマイクロブログのサービスを提供すると共に文書を保存するサーバに対して文書の取得を要求して取得(受信)することとしてもよいし、当該サーバからストリーミングでドキュメントのデータを受信することとしてもよい。文書入力部100は、予め関連文書の取得元となるサイトを記憶しておき、指定されたタイミングで当該サイトから対象文書を取得する。当該サイトや対象文書を取得するタイミングを示す情報は、本文抽出装置10の管理者等によって予め本文抽出装置10に入力されている。取得される対象文書は、複数であってもよい。   The microblog input unit 150 may acquire and receive (receive) a document from a server that provides a microblog service via the Internet and requests a server that stores the document, for example. It is also possible to receive document data. The document input unit 100 stores a site from which a related document is acquired in advance, and acquires a target document from the site at a designated timing. Information indicating the timing for acquiring the site and the target document is input to the text extracting device 10 in advance by an administrator of the text extracting device 10 or the like. A plurality of target documents may be acquired.

マイクロブログ入力部150は、上記のサーバから取得した文書から、対象文書のURLが含まれる文書を抽出して取得する。なお、対象文書のURLは予めマイクロブログ入力部150に記憶されている。即ち、マイクロブログ入力部150は、関連文書として対象文書を示す情報が文字列に含まれる文書(マイクロブログのコメント)を入力する。マイクロブログ入力部150は、入力したマイクロブログのコメントをマイクロブログ記憶部160に出力する。   The microblog input unit 150 extracts and acquires a document including the URL of the target document from the document acquired from the server. The URL of the target document is stored in advance in the microblog input unit 150. That is, the microblog input unit 150 inputs a document (microblog comment) including information indicating the target document as a related document in a character string. The microblog input unit 150 outputs the input microblog comment to the microblog storage unit 160.

マイクロブログ記憶部160は、マイクロブログ入力部150から入力されたマイクロブログのコメントを記憶する手段である。マイクロブログ記憶部160は、図6(a)に示すようなテーブルに情報を格納することで情報を記憶する。図6(a)のテーブルに示すように、マイクロブログ記憶部160は、URL、UserID及びテキストを対応付けて記憶する。URLは、マイクロブログのコメントに含まれる対象文書のURLを示す情報である。UserIDは、当該コメントを投稿したユーザを特定する情報である。UserIDは、マイクロブログ入力部150によるマイクロブログのコメントの取得時に合わせて取得されている。テキストは、マイクロブログのコメント本体である文字列である。   The microblog storage unit 160 is means for storing a microblog comment input from the microblog input unit 150. The microblog storage unit 160 stores information by storing the information in a table as shown in FIG. As shown in the table of FIG. 6A, the microblog storage unit 160 stores URLs, UserIDs, and texts in association with each other. The URL is information indicating the URL of the target document included in the microblog comment. UserID is information that identifies the user who posted the comment. The UserID is acquired when the microblog input unit 150 acquires a microblog comment. The text is a character string that is a comment body of the microblog.

本文識別子作成部170は、メタデータあるいはマイクロブログのコメントである関連文書から文字列を抽出する文字列抽出手段である。本文識別子作成部170は、抽出した文字列に基づいて対象文書の本文の抽出に用いる本文識別子を作成する。図1に示すように本文識別子作成部170は、メタデータによる本文識別子作成部171と、関連コメントによる本文識別子作成部172とを備えて構成される。   The text identifier creating unit 170 is a character string extracting unit that extracts a character string from related documents that are metadata or microblog comments. The body identifier creating unit 170 creates a body identifier used for extracting the body of the target document based on the extracted character string. As shown in FIG. 1, the body identifier creating unit 170 includes a body identifier creating unit 171 based on metadata and a body identifier creating unit 172 based on related comments.

メタデータによる本文識別子作成部171は、メタデータ入力部140から入力されたメタデータに対して形態素解析を行うことで、当該メタデータから形態素(単語)である文字列を抽出する。抽出された形態素は、対象文書から本文を抽出するための本文識別子として用いられる。また、メタデータによる本文識別子作成部171は、上記の形態素解析による得られうる形態素毎に当該形態素に対応する特徴語スコアを予め記憶しておく。このようにメタデータによる本文識別子作成部171は、より詳細には後述するスコア算出手段の一部である。特徴語スコアは、例えば、本文抽出装置10の管理者等によって予め設定されて、本文抽出装置10に入力されている。この特徴語スコアは、例えば、当該形態素が含まれる文章が対象文書の本文である度合いが高い程、高い値となるように設定される。メタデータによる本文識別子作成部171は、例えば、図5(c)に示すテーブル(デフォルト識別子スコア辞書)に情報を格納することで形態素に対応する特徴語スコアを記憶しておく。   The body identifier creation unit 171 based on metadata extracts a character string that is a morpheme (word) from the metadata by performing morphological analysis on the metadata input from the metadata input unit 140. The extracted morpheme is used as a body identifier for extracting the body from the target document. Further, the text-body identifier creating unit 171 based on metadata stores in advance a feature word score corresponding to the morpheme for each morpheme that can be obtained by the morpheme analysis. As described above, the metadata-based body text identifier creation unit 171 is a part of score calculation means described later in more detail. The feature word score is preset by, for example, an administrator of the text extracting device 10 and input to the text extracting device 10. This feature word score is set so that, for example, the higher the degree that the sentence including the morpheme is the body of the target document, the higher the value is. The text identifier creation unit 171 based on metadata stores the feature word score corresponding to the morpheme by storing information in a table (default identifier score dictionary) shown in FIG. 5C, for example.

メタデータによる本文識別子作成部171は、メタデータに係る対象文書のURL、得られた形態素、及び予め当該形態素に対応して記憶された特徴語スコアを関連付けて本文識別子記憶部180に記憶させる。本文識別子記憶部180は、例えば、図5(d)に示すテーブルに情報を格納することで上記の情報を記憶する。   The body identifier creating unit 171 using metadata associates the URL of the target document related to the metadata, the obtained morpheme, and the feature word score stored in advance corresponding to the morpheme, and stores them in the body identifier storage unit 180. The text identifier storage unit 180 stores the information by storing the information in a table shown in FIG.

関連コメントによる本文識別子作成部172は、マイクロブログ記憶部160に記憶されたマイクロブログのコメントの情報を読み出す。続いて、関連コメントによる本文識別子作成部172は、読み出した情報のうちのテキスト(図6(a)のテキスト欄の情報)から、解析に利用しない、URL、ハッシュタグ、アットマークから始まるユーザ名等の情報を除外する(正規化処理を行う)。正規化処理が行われた情報は、例えば、図6(b)に示す情報である。   The text identifier creating unit 172 based on the related comments reads the microblog comment information stored in the microblog storage unit 160. Subsequently, the body identifier creating unit 172 based on the related comment uses the text (information in the text column in FIG. 6A) of the read information, and the user name starting from the URL, hash tag, and at-sign that is not used for analysis. Etc. are excluded (normalization processing is performed). The information on which the normalization process has been performed is, for example, information illustrated in FIG.

続いて、関連コメントによる本文識別子作成部172は、正規化後のテキストに対して形態素解析を行うことで、当該テキストから形態素(単語)である文字列を抽出する。抽出された形態素は、対象文書から本文を抽出するための本文識別子として用いられる。続いて、関連コメントによる本文識別子作成部172は、形態素の出現頻度に基づいて以下のように形態素毎のスコアをTFIDF値として算出する。まず、対象文書(当該対象文書のURL)及び抽出された形態素毎にTF(Term Frequency)値を求める。まず、関連コメントによる本文識別子作成部172は、対象文書のURLに対応付けられたマイクロブログのコメントのテキストから得られた形態素を処理対象とする。続いて、形態素毎に、形態素解析により得られた当該形態素の数を、形態素解析により得られた全ての形態素の数で割ることでTF値を算出する。算出されたTF値は、図6(c)に示すようにURL及び形態素毎の値となる。   Subsequently, the body identifier creating unit 172 based on the related comments performs a morphological analysis on the normalized text to extract a character string that is a morpheme (word) from the text. The extracted morpheme is used as a body identifier for extracting the body from the target document. Subsequently, the body identifier creating unit 172 based on the related comments calculates a score for each morpheme as a TFIDF value based on the appearance frequency of the morpheme as follows. First, a TF (Term Frequency) value is obtained for each target document (URL of the target document) and each extracted morpheme. First, the body identifier creating unit 172 based on the related comment sets the morpheme obtained from the text of the microblog comment associated with the URL of the target document as the processing target. Subsequently, for each morpheme, a TF value is calculated by dividing the number of morphemes obtained by morpheme analysis by the number of all morphemes obtained by morpheme analysis. The calculated TF value is a value for each URL and morpheme as shown in FIG.

また、関連コメントによる本文識別子作成部172は、1URL(対象文書1つ)に紐付くコメント群を1ドキュメントとみなしてIDF(Inverse Document Frequency)値を算出する。IDF値の算出には、複数の対象文書のURLに対応付けられたマイクロブログのコメントのテキストから得られた形態素を用いる。複数の対象文書は、本文抽出装置10の管理者等によって予め設定されている。関連コメントによる本文識別子作成部172は、形態素毎に、総ドキュメント数(対象文書のURLの数)を、コメントが当該形態素を含むドキュメント数で割って対数を取ることでIDF値を算出する。算出されたIDF値は、図6(d)に示すように形態素毎の値となる。   In addition, the body identifier creating unit 172 based on related comments calculates an IDF (Inverse Document Frequency) value by regarding a comment group associated with one URL (one target document) as one document. For the calculation of the IDF value, morphemes obtained from microblog comment text associated with URLs of a plurality of target documents are used. A plurality of target documents are set in advance by an administrator of the text extracting apparatus 10 or the like. For each morpheme, the body identifier creation unit 172 based on the related comment calculates an IDF value by taking the logarithm by dividing the total number of documents (the number of URLs of the target document) by the number of documents in which the comment includes the morpheme. The calculated IDF value is a value for each morpheme as shown in FIG.

関連コメントによる本文識別子作成部172は、形態素毎に算出したTF値とIDF値との積を取ることで、TFIDF値を算出する。上記のように、関連コメントによる本文識別子作成部172は、1URL(対象文書1つ)に紐付くコメント群を1ドキュメントとみなしてTFIDFを求める。また、IDF値を、1ユーザに紐付くコメント群を1ドキュメントとみなして算出してTFIDF値を算出することとしてもよい。このTFIDF値は、例えば、当該形態素が特徴的な言葉である度合い、即ち、当該形態素が含まれる文章が対象文書の本文である度合いを示すものである。このように関連コメントによる本文識別子作成部172は、より詳細には後述するスコア算出手段の一部である。   The body identifier creating unit 172 based on the related comment calculates the TFIDF value by taking the product of the TF value calculated for each morpheme and the IDF value. As described above, the body identifier creation unit 172 based on the related comments regards a comment group associated with one URL (one target document) as one document and obtains TFIDF. Further, the TFIDF value may be calculated by calculating the IDF value by regarding a comment group associated with one user as one document. This TFIDF value indicates, for example, the degree to which the morpheme is a characteristic word, that is, the degree to which the text containing the morpheme is the text of the target document. As described above, the body identifier creating unit 172 based on the related comment is a part of score calculation means described later in more detail.

関連コメントによる本文識別子作成部172は、コメントに係る対象文書のURL、得られた形態素、及び算出したTFIDF値を関連付けて本文識別子記憶部180に記憶させる。本文識別子記憶部180は、例えば、図6(e)に示すテーブルに情報を格納することで上記の情報を記憶する。   The body identifier creation unit 172 based on the related comment stores the URL of the target document related to the comment, the obtained morpheme, and the calculated TFIDF value in the body identifier storage unit 180 in association with each other. The text identifier storage unit 180 stores the above information by storing the information in a table shown in FIG.

ノイズ判定部190は、対象文書に含まれるノイズを判定するための情報を取得するための手段である。例えば、本実施形態では、HTML文書の構造を活用したノイズの判定を行う。ウェブページでは、広告であったり、他サイトへのリンク集であったり、他の文書(関連するウェブページ)へのリンクが連鎖する場合、つまりリンクリストである場合には本文とは関係がないノイズである可能性が高い。リンクリストを含む要素(HTMLタグ)を本文抽出対象外、あるいは本文である可能性が低いものとして判断することで、本文抽出の精度を向上する。   The noise determination unit 190 is a means for acquiring information for determining noise included in the target document. For example, in this embodiment, noise is determined using the structure of an HTML document. In the case of a web page, if it is an advertisement, a collection of links to other sites, or links to other documents (related web pages) are linked, that is, if it is a linked list, it is not related to the main text. There is a high possibility of noise. By determining that an element (HTML tag) including a link list is not subject to text extraction or has a low possibility of being a text, the accuracy of text extraction is improved.

具体的には、ノイズ判定部190は、文書分割データ記憶部130によって記憶されている対象文書の要素を取得する。ノイズ判定部190は、要素のテキストのなかにリンクを示す<a>タグが含まれるか否かを判断する。ノイズ判定部190は、要素毎に<a>タグが含まれている数(リンクの数)をノイズに係る情報として取得する。また、ノイズ判定部190は、要素毎に<a>タグに含まれる文字列の長さと<a>タグに含まれない文字列の長さとの比の値を算出してノイズに係る情報として取得する。   Specifically, the noise determination unit 190 acquires the elements of the target document stored in the document division data storage unit 130. The noise determination unit 190 determines whether an <a> tag indicating a link is included in the text of the element. The noise determination unit 190 acquires the number (number of links) including the <a> tag for each element as information related to noise. Further, the noise determination unit 190 calculates the value of the ratio between the length of the character string included in the <a> tag and the length of the character string not included in the <a> tag for each element, and obtains it as information related to noise. To do.

ノイズ判定部190は、取得したノイズに係る情報を本文ノイズ記憶部200に記憶させる。ノイズに係る情報は、後述する機械学習における特徴量として利用される(チューニングポイントが設けられる)。このようにノイズ判定部190は、より詳細には後述する特徴量生成手段の一部である。   The noise determination unit 190 stores the information related to the acquired noise in the body noise storage unit 200. Information related to noise is used as a feature amount in machine learning described later (a tuning point is provided). As described above, the noise determination unit 190 is a part of a feature amount generation unit described later in more detail.

特徴量生成部210は、文書分割データ記憶部130によって記憶されている対象文書の要素について当該要素が対象文書を含むか否かを判断するための情報を生成する手段である。   The feature quantity generation unit 210 is a unit that generates information for determining whether or not the element of the target document stored in the document division data storage unit 130 includes the target document.

特徴量生成部210は、本文識別子作成部170によって関連文書から抽出された形態素が上記の要素に含まれているか否かを判断し、含まれていると判断した場合に当該要素について当該要素が対象文書の本文を含む度合いを示すスコアを増加させることでスコアを算出するスコア算出手段である。   The feature quantity generation unit 210 determines whether or not the morpheme extracted from the related document by the body identifier creation unit 170 is included in the element, and if it is determined that the element is included, It is a score calculation means for calculating a score by increasing the score indicating the degree of including the text of the target document.

特徴量生成部210は、文書分割データ記憶部130によって記憶されている対象文書の要素を取得する。また、本文識別子記憶部180に記憶されている本文を抽出するための情報(例えば、図5(d)、図6(e)に示す情報)を取得する。ここで取得される本文を抽出するための情報は、対象文書の要素と同一のURLに係る情報である。特徴量生成部210は、本文識別子記憶部180に記憶されている形態素が対象文書の要素に含まれているか否かを判断する。特徴量生成部210は、本文識別子記憶部180に記憶されている形態素が対象文書の要素に含まれていると判断すると、当該形態素に対応付けられたスコア(特徴語スコア又はTFIDF値)を当該要素に対して合算して合計スコアを算出する。なお、各要素の合計スコアの初期値は、例えばゼロにする。   The feature quantity generation unit 210 acquires the elements of the target document stored in the document division data storage unit 130. In addition, information for extracting the text stored in the text identifier storage unit 180 (for example, information shown in FIGS. 5D and 6E) is acquired. The information for extracting the text acquired here is information related to the same URL as the element of the target document. The feature quantity generation unit 210 determines whether or not the morpheme stored in the body identifier storage unit 180 is included in the element of the target document. When the feature quantity generation unit 210 determines that the morpheme stored in the body identifier storage unit 180 is included in the element of the target document, the feature amount generation unit 210 uses the score (feature word score or TFIDF value) associated with the morpheme The total score is calculated by summing up the elements. Note that the initial value of the total score of each element is set to zero, for example.

例えば、対象文書のURLについて「今日」、「天気」、「晴れ」という形態素に対してそれぞれ0.1、1.0、4.0というスコアが本文識別子記憶部180に記憶されていた場合、「今日の天気<p>晴れ<p>」という要素の合計スコアは0.1+1.0+4.0=5.1となる。   For example, when the URLs of the target document have the scores of 0.1, 1.0, and 4.0 stored in the body identifier storage unit 180 for the morphemes “Today”, “Weather”, and “Sunny”, respectively, The total score of the element “Today's weather <p> sunny <p>” is 0.1 + 1.0 + 4.0 = 5.1.

要素毎のスコアは、メタデータによるスコア、マイクロブログのコメントによるスコアとそれぞれ分けることとしてもよい。算出される要素(パス)毎の合計スコアは、例えば、図7(a)に示すような情報として取得される。特徴量生成部210は、生成した合計スコアを示す情報を本文判定部220に入力する。   The score for each element may be separated from the score based on metadata and the score based on microblog comments. The total score for each element (path) calculated is acquired as information as shown in FIG. The feature quantity generation unit 210 inputs information indicating the generated total score to the text determination unit 220.

本文の判定に機械学習を用いる場合には、特徴量生成部210は、更に機械学習に必要となる特徴量を生成(取得する)する。例えば、特徴量生成部210は、ノイズ判定部190によって生成され本文ノイズ記憶部200に記憶された要素毎のノイズに係る情報を取得して特徴量とする。   When machine learning is used for the determination of the text, the feature value generation unit 210 further generates (acquires) feature values necessary for machine learning. For example, the feature amount generation unit 210 acquires information related to noise for each element generated by the noise determination unit 190 and stored in the text noise storage unit 200 and uses it as a feature amount.

あるいは、特徴量生成部210は、対象文書の要素に含まれる文字列における、句読点の数又は文字列の長さに基づいて、当該要素の特徴量を生成する。具体的には、特徴量生成部210は、当該要素に含まれる文字列から句読点の数、及び文字列の長さを特定して、その数あるいは長さの情報を各要素の特徴量とする。要素毎の特徴量は、例えば、図7(b)に示すような情報として取得される。図7(b)に示す特徴量の「1:0.7、2:1、3:3、…」との記載は、1つ目の特徴量(素性)の値が0.7、2つ目の特徴量(素性)の値が1、3つ目の特徴量(素性)の値が3であることを示している。なお、特徴量には上記の合計スコアが含まれている。上記のように特徴量生成部210は、特徴量生成手段でもある。   Alternatively, the feature value generation unit 210 generates the feature value of the element based on the number of punctuation marks or the length of the character string in the character string included in the element of the target document. Specifically, the feature value generation unit 210 specifies the number of punctuation marks and the length of the character string from the character string included in the element, and uses the number or length information as the feature value of each element. . The feature amount for each element is acquired as information as shown in FIG. 7B, for example. In the description of the feature quantity “1: 0.7, 2: 1, 3: 3,...” Shown in FIG. 7B, the first feature quantity (feature) has a value of 0.7 and 2 The value of the feature value (feature) of the eye is 1, and the value of the third feature value (feature) is 3. The feature amount includes the above total score. As described above, the feature quantity generation unit 210 is also a feature quantity generation unit.

本文判定部220は、特徴量生成部210から入力された要素毎の合計スコアに基づいて、各要素のうち対象文書の本文を含む要素を判定することで特定する特定手段である。例えば、本文判定部220は、閾値を記憶しておき、合計スコアが閾値を超える要素を、本文を含む要素として判定する。なお、閾値は、本文抽出装置10の管理者等によって予め設定されて、本文抽出装置10に入力されている。例えば、合計スコアが図7(a)に示す例であり、閾値が3.5であった場合には、パスが、html/body/div[3]/div[1]及びhtml/body/div[3]/div[1]/p[1]の要素を、本文を含む要素として判定する。   Based on the total score for each element input from the feature value generation unit 210, the body determination unit 220 is a specifying unit that specifies the elements including the body of the target document among the elements. For example, the text determination unit 220 stores a threshold value, and determines an element whose total score exceeds the threshold as an element including the text. The threshold value is set in advance by the administrator of the text extracting device 10 and is input to the text extracting device 10. For example, when the total score is an example shown in FIG. 7A and the threshold is 3.5, the paths are html / body / div [3] / div [1] and html / body / div. The element of [3] / div [1] / p [1] is determined as an element including the text.

本文判定部220は、特徴量生成部210から入力された要素毎の合計スコアを含む特徴量に基づく機械学習によって、各要素のうち対象文書の本文を含む要素を判定することとしてもよい。本文判定部220は、各要素の特徴量を機械学習における説明変数とし、当該要素が本文か否かを示す値を機械学習における目的変数として、機械学習によって得られた学習モデル(機械学習器)を用いて上記の判定を行う。なお、機械学習を用いる場合には、予め本文がどこに含まれるか予めわかっている文書を準備し、それを用いて予め学習を行わせておく。   The body determination unit 220 may determine an element including the body of the target document among the elements by machine learning based on the feature amount including the total score for each element input from the feature amount generation unit 210. The body determination unit 220 uses a feature amount of each element as an explanatory variable in machine learning, and uses a value indicating whether or not the element is a body text as an objective variable in machine learning. A learning model (machine learner) obtained by machine learning The above determination is made using. In the case of using machine learning, a document in which the text is included in advance is prepared in advance, and learning is performed in advance using the document.

上記の学習モデルは、例えば、対象文書の本文を示す度合いを示す値を要素毎に出力するものとし、その値が0以上の場合には当該要素が本文を含むものと判定し、その値が0未満の場合には当該要素が本文を含まないものと判定する。機械学習の手法としては、例えば、サポートベクターマシン(SVM)やニューラルネットワークといった教師あり機械学習を用いることができる。   The learning model described above outputs, for example, a value indicating the degree of the text of the target document for each element. If the value is 0 or more, it is determined that the element includes the text. If it is less than 0, it is determined that the element does not contain a body. As a machine learning method, for example, supervised machine learning such as a support vector machine (SVM) or a neural network can be used.

本文判定部220は、対象文書毎に本文を含む(本文である)と判定された要素を分割データ結合部230に入力する。   The body determination unit 220 inputs, to the divided data combining unit 230, elements determined to include a body (that is, the body) for each target document.

分割データ結合部230は、本文判定部220から入力された要素に応じた情報を出力する出力手段である。分割データ結合部230は、本文判定部220から入力された要素の文字列(テキスト)を対象文書毎に結合する。なお、ツリー構造の要素のうち、含まれる文字列が重複する要素が本文と判定された場合にはそのうち最上位の要素のみを結合対象の要素としてもよい。分割データ結合部230は、本文抽出装置10に接続された他の装置に結合された文字列(テキスト)を対象文書の本文として送信する等して出力する。具体的には、対象文書の本文として「今日の天気晴れ、気温は30度の晴れ」といった文字列を出力する。このように本文抽出装置10によって抽出されて出力された本文である文字列は、例えば、上述した雑誌風なコンテンツの生成に用いられる。以上が、本文抽出装置10の機能構成である。   The divided data combining unit 230 is an output unit that outputs information corresponding to the element input from the text determination unit 220. The divided data combining unit 230 combines the character strings (text) of elements input from the body determination unit 220 for each target document. Note that, when an element having an overlapping character string among the elements of the tree structure is determined to be the text, only the highest element among them may be the element to be combined. The divided data combining unit 230 outputs, for example, a character string (text) combined with another device connected to the body extracting device 10 as the body of the target document. Specifically, a character string such as “Today's sunny weather, temperature is sunny at 30 degrees” is output as the text of the target document. Thus, the character string which is the text extracted and output by the text extracting device 10 is used, for example, for generating the magazine-like content described above. The functional configuration of the text extracting device 10 has been described above.

図8に本文抽出装置10のハードウェア構成を示す。図8に示すように本文抽出装置10は、CPU(Central Processing Unit)1001、主記憶装置であるRAM(RandomAccess Memory)1002及びROM(Read Only Memory)1003、通信を行うための通信モジュール1004、並びにハードディスク等の補助記憶装置1005等のハードウェアを備えるコンピュータを含むものとして構成される。これらの構成要素がプログラム等により動作することにより、上述した本文抽出装置10の機能が発揮される。以上が、本文抽出装置10の構成である。   FIG. 8 shows a hardware configuration of the text extracting apparatus 10. As shown in FIG. 8, a text extracting device 10 includes a central processing unit (CPU) 1001, a random access memory (RAM) 1002 and a read only memory (ROM) 1003, a communication module 1004 for communication, It is configured to include a computer including hardware such as an auxiliary storage device 1005 such as a hard disk. The functions of the text extracting device 10 described above are exhibited when these components are operated by a program or the like. The above is the configuration of the text extracting apparatus 10.

引き続いて、図9〜12のフローチャートを用いて、本実施形態に係る本文抽出装置10で実行される処理である本文抽出方法を説明する。図9に示すように、本処理では、まず、文書入力部100によって、対象文書が取得されて本文抽出装置10に入力され、文書記憶部110に記憶される(S01、対象文書入力ステップ)。   Subsequently, a text extraction method, which is a process executed by the text extraction apparatus 10 according to the present embodiment, will be described using the flowcharts of FIGS. As shown in FIG. 9, in this process, first, the target document is acquired by the document input unit 100, input to the body extraction device 10, and stored in the document storage unit 110 (S01, target document input step).

続いて、分割データ作成部120によって、文書記憶部110に記憶された対象文書から、本文が含まれるか否かの判定対象となる要素が抽出される(S02〜S05、要素抽出ステップ)。具体的には、以下のように行われる。まず、本文抽出対象エリア特定部122によって、本文抽出対象エリア記憶部121に記憶されている情報に基づいて、対象文書から本文抽出対象エリアが特定される(本文抽出対象エリアが絞り込まれる)(S02)。   Subsequently, the divided data creation unit 120 extracts an element that is a determination target of whether or not the text is included from the target document stored in the document storage unit 110 (S02 to S05, element extraction step). Specifically, it is performed as follows. First, the text extraction target area specifying unit 122 specifies the text extraction target area from the target document based on the information stored in the text extraction target area storage unit 121 (the text extraction target area is narrowed down) (S02). ).

続いて、要素除去部124によって、除去対象要素記憶部123に記憶されている情報に基づいて、本文抽出対象エリアから、本文の抽出対象としない不要な要素が除外される(S03)。続いて、文書分割部126によって、分割対象要素記憶部125に記憶された情報に基づいて、本文抽出対象エリアが分割される(S04)。分割された要素の情報が、文書分割データ記憶部130に記憶される(S05)。以上が、図9に示す対象文書に係る処理である。   Subsequently, the element removal unit 124 excludes unnecessary elements not to be extracted from the text from the text extraction target area based on the information stored in the removal target element storage unit 123 (S03). Subsequently, the document dividing unit 126 divides the text extraction target area based on the information stored in the division target element storage unit 125 (S04). Information on the divided elements is stored in the document divided data storage unit 130 (S05). The above is the processing related to the target document shown in FIG.

本文抽出装置10では、上記の対象文書に係る処理の一方で、図10及び図11に示すような関連文書に係る処理も行われる、図10に示す処理は、関連文書としてメタデータを用いた場合の処理である。本処理は、図9に示す対象文書に係る処理(少なくともS01の処理)が行われた後に行われる。   In the text extracting apparatus 10, while processing related to the target document is performed, processing related to related documents as shown in FIGS. 10 and 11 is also performed. The processing shown in FIG. 10 uses metadata as related documents. Process. This process is performed after the process related to the target document shown in FIG. 9 (at least the process of S01) is performed.

本処理では、まず、メタデータ入力部140によって、メタデータを抽出するためのクエリが読み出される(S11、関連文書入力ステップ)。続いて、メタデータ入力部140によって、文書記憶部110に記憶された対象文書が読み出される(S12、関連文書入力ステップ)。続いて、続いて、メタデータ入力部140によって、上記のクエリが用いられて対象文書からメタデータ対象エリア(メタデータ)が抽出される(S13、関連文書入力ステップ)。   In this process, first, the metadata input unit 140 reads a query for extracting metadata (S11, related document input step). Subsequently, the metadata input unit 140 reads the target document stored in the document storage unit 110 (S12, related document input step). Subsequently, the metadata input area 140 extracts the metadata target area (metadata) from the target document using the above query (S13, related document input step).

続いて、メタデータによる本文識別子作成部171によって、メタデータ入力部140によって抽出されたメタデータに対して形態素解析が行われて形態素が抽出される(S14、文字列抽出ステップ)。続いて、メタデータによる本文識別子作成部171によって、デフォルト識別子スコア辞書が参照されて、抽出された形態素に特徴語スコアが対応付けられる(S15、文字列抽出ステップ)。得られた形態素及び特徴語スコアは、本文識別子記憶部180に記憶される(S16、文字列抽出ステップ)。以上が、図10に示す関連文書としてメタデータを用いた場合の処理である。   Subsequently, the morpheme is extracted by performing morpheme analysis on the metadata extracted by the metadata input unit 140 by the metadata body identifier creating unit 171 (S14, character string extraction step). Subsequently, the default identifier score dictionary is referred to by the body identifier creation unit 171 based on metadata, and the feature word score is associated with the extracted morpheme (S15, character string extraction step). The obtained morpheme and feature word score are stored in the body identifier storage unit 180 (S16, character string extraction step). The above is the processing when metadata is used as the related document shown in FIG.

続いて、図11に示す、関連文書としてマイクロブログのコメントを用いた場合の処理を説明する。本処理は、図9に示す対象文書に係る処理とは、互いに独立に行われうる。また、図10に示す処理と、図11に示す処理とは何れか一方のみが行われればよい。本処理では、まず、マイクロブログ入力部150によって、対象文書のURLが含まれるマイクロブログのコメントが取得されて本文抽出装置10に入力され、マイクロブログ記憶部160に記憶される(S21、関連文書入力ステップ)。   Next, processing when a microblog comment is used as a related document shown in FIG. 11 will be described. This process can be performed independently of the process related to the target document shown in FIG. Further, only one of the processing shown in FIG. 10 and the processing shown in FIG. 11 needs to be performed. In this process, first, a microblog comment including the URL of the target document is acquired by the microblog input unit 150, input to the text extracting device 10, and stored in the microblog storage unit 160 (S21, related document). Input step).

続いて、関連コメントによる本文識別子作成部172によって、マイクロブログ記憶部160に記憶されたマイクロブログのコメントの情報が読み出される。続いて、読み出された情報のうちのテキストから、解析に利用しない、URL、ハッシュタグ、アットマークから始まるユーザ名等の情報が除外される(正規化処理が行われる)(S22)。続いて、関連コメントによる本文識別子作成部172によって、正規化処理が行われたテキストに対して形態素解析が行われて形態素が抽出される(S23、文字列抽出ステップ)。   Subsequently, the comment information of the microblog stored in the microblog storage unit 160 is read out by the body identifier creating unit 172 based on the related comment. Subsequently, information such as a URL, a hash tag, and a user name starting with an at sign that is not used for analysis is excluded from the text of the read information (normalization processing is performed) (S22). Subsequently, the morpheme is extracted by performing morpheme analysis on the text subjected to the normalization process by the body identifier creating unit 172 based on the related comment (S23, character string extraction step).

続いて、関連コメントによる本文識別子作成部172によって、対象文書のURL及び抽出された形態素毎にTF値が算出される(S24、文字列抽出ステップ)。また、抽出された形態素毎にIDF値が算出される(S25、文字列抽出ステップ)。続いて、算出されたTF値とIDF値とから、対象文書のURL及び抽出された形態素毎にTFIDF値が算出される。得られた形態素及びTFIDF値は、本文識別子記憶部180に記憶される(S26、文字列抽出ステップ)。以上が、図11に示す関連文書としてメタデータを用いた場合の処理である。   Subsequently, the TF value is calculated for each URL and the extracted morpheme of the target document by the body identifier creation unit 172 based on the related comment (S24, character string extraction step). Further, an IDF value is calculated for each extracted morpheme (S25, character string extraction step). Subsequently, the TFIDF value is calculated for each URL and the extracted morpheme of the target document from the calculated TF value and IDF value. The obtained morpheme and TFIDF value are stored in the body identifier storage unit 180 (S26, character string extraction step). The above is the processing when metadata is used as the related document shown in FIG.

続いて、図12に示す、上記のように生成した情報に基づいて本文を抽出する処理を説明する。本処理では、まず、特徴量生成部210によって、文書分割データ記憶部130に記憶されている対象文書の各要素が、本文識別子記憶部180に当該対象文書に対応付けられて記憶されている形態素を含むか否かが判断される。続いて、特徴量生成部210によって、当該判断に基づいて要素の合計スコアが算出される(S31、スコア算出ステップ)。この合計スコアは、特徴量の一つとされる。   Next, the process of extracting the text based on the information generated as described above shown in FIG. 12 will be described. In this processing, first, the feature quantity generation unit 210 stores each element of the target document stored in the document division data storage unit 130 in the body identifier storage unit 180 in association with the target document. Whether or not is included. Subsequently, the feature amount generation unit 210 calculates the total score of the elements based on the determination (S31, score calculation step). This total score is one of the feature quantities.

また、機械学習によって本文の判定が行われる場合には、スコア以外の特徴量が求められる(S32、特徴量生成ステップ)。この特徴量は、例えば、ノイズ判定部190によって対象文書の各要素のリンクの数に基づいて算出される。算出された、本文ノイズ記憶部200に記憶されて特徴量生成部210によって取得される。また、特徴量生成部210によって、当該要素に含まれる文字列の句読点の数、及び文字列の長さから特徴量が生成されてもよい。特徴量生成部210によって生成された要素毎の特徴量を示す情報は本文判定部220に入力される。   Further, when the text is determined by machine learning, a feature amount other than the score is obtained (S32, feature amount generation step). For example, the feature amount is calculated by the noise determination unit 190 based on the number of links of each element of the target document. The calculated text content is stored in the noise storage unit 200 and acquired by the feature value generation unit 210. Further, the feature quantity generation unit 210 may generate a feature quantity from the number of punctuation marks of the character string included in the element and the length of the character string. Information indicating the feature amount for each element generated by the feature amount generation unit 210 is input to the text determination unit 220.

続いて、本文判定部220によって、要素毎に特徴量に基づいて、当該要素に対象文書の要素を含むか否かの判定が行われる(S33、特定ステップ)。この判定は、上述したように合計スコアと閾値との比較、あるいは機械学習によって得られた学習モデルに基づいて行われる。本文を含むと判定された要素の情報は、本文判定部220から分割データ結合部230に入力される。続いて、分割データ結合部230によって、要素の文字列が結合されて、対象文書の本文を示す情報として出力される(S34、出力ステップ)。以上が、本実施形態に係る本文抽出装置10で実行される処理である本文抽出方法である。   Subsequently, the body determination unit 220 determines whether or not the element includes the element of the target document based on the feature amount for each element (S33, specific step). This determination is performed based on the learning model obtained by comparing the total score and the threshold or by machine learning as described above. Information on an element determined to include a text is input from the text determining unit 220 to the divided data combining unit 230. Subsequently, the divided data combination unit 230 combines the character strings of the elements and outputs the combined information as information indicating the text of the target document (S34, output step). The above is the text extraction method that is the process executed by the text extraction apparatus 10 according to the present embodiment.

インターネット上のコンテンツに対するマイクロブログのコメントは、当該コンテンツの本文に係る記載がなされていることが多い。このコメントを用いることで、そのコンテンツが何について記載されているかを把握することが可能である。また、解析対象の文書のメタデータも同様に文書の内容を示しているものがある。本実施形態においては、マイクロブログのコメントやメタデータ等を関連文書として、対象文書から抽出された要素に対して、対象文書の本文を含む度合いを示すスコアが算出されて、本文を含む要素が特定される。上記の関連文書は、同じサイトのHTMLテキスト等の対象文書とグループ化可能な文書ではない。即ち、本実施形態によれば、本文の抽出対象となる文書とグループ化可能な別の文書を得られない場合であっても本文を適切に抽出することができる。   In many cases, microblog comments on content on the Internet are described in the body of the content. By using this comment, it is possible to grasp what the content is described. Some of the metadata of the document to be analyzed similarly indicates the contents of the document. In the present embodiment, a score indicating the degree of inclusion of the text of the target document is calculated for the elements extracted from the target document using microblog comments, metadata, and the like as related documents. Identified. The related document is not a document that can be grouped with a target document such as HTML text on the same site. That is, according to the present embodiment, the text can be appropriately extracted even when another document that can be grouped with the document from which the text is to be extracted cannot be obtained.

なお、本実施形態では、関連文書に出現している文字列が出ている場合にスコアを高くしており、出現頻度が低いほど本文である可能性が高いとみなす特許文献1に記載された方法とは根本的に手法が異なっている。   In this embodiment, the score is increased when a character string appearing in a related document appears, and it is described in Patent Document 1 that the lower the appearance frequency, the higher the possibility that the text is a text. The method is fundamentally different from the method.

また、本実施形態のようにタグを用いて要素を抽出することとすれば、対象文書がHTMLによる文書である場合等に適切に要素を抽出することができる。また、本実施形態のように本文の抽出対象から要素を除外することとすれば、予め本文が含まれないと考えられる要素を解析対象とすることができ、効率的かつ適切に本発明を実施することができる。   Further, if elements are extracted using tags as in the present embodiment, elements can be appropriately extracted when the target document is an HTML document. Further, if elements are excluded from the text extraction target as in the present embodiment, elements that are considered not to include the text in advance can be analyzed, and the present invention is implemented efficiently and appropriately. can do.

また、本実施形態のように形態素解析により関連文書から文字列を抽出することとすれば、適切に関連文書から文字列を抽出することができ、適切に本発明を実施することができる。また、上述した方法によれば、メタデータあるいはマイクロブログのコメントを関連文書として用いた場合、それぞれに適切に本発明を実施することができる。   If a character string is extracted from a related document by morphological analysis as in the present embodiment, the character string can be appropriately extracted from the related document, and the present invention can be appropriately implemented. Further, according to the above-described method, when metadata or microblog comments are used as related documents, the present invention can be implemented appropriately for each.

また、機械学習によって本文を判断することとすれば適切に本文を判断することができる。この場合、対象文書に含まれるリンクや句読点の数又は文字列の長さに基づいて特徴量を生成することで、適切に本文を判断することができる。   If the text is determined by machine learning, the text can be determined appropriately. In this case, the text can be appropriately determined by generating the feature amount based on the number of links and punctuation marks included in the target document or the length of the character string.

引き続いて、上述した一連の本文抽出装置10による処理をコンピュータに実行させるための本文抽出プログラムを説明する。図13に示すように、本文抽出プログラム40は、コンピュータに挿入されてアクセスされる、あるいはコンピュータが備える記録媒体30に形成されたプログラム格納領域31内に格納される。   Subsequently, a text extracting program for causing a computer to execute the above-described series of processing by the text extracting device 10 will be described. As shown in FIG. 13, the text extraction program 40 is stored in a program storage area 31 that is inserted into a computer and accessed, or formed in a recording medium 30 provided in the computer.

本文抽出プログラム40は、文書入力モジュール400と、文書記憶モジュール410と、分割データ作成モジュール420と、文書分割データ記憶モジュール430と、メタデータ入力モジュール440と、マイクロブログ入力モジュール450と、マイクロブログ記憶モジュール460と、本文識別子作成モジュール470と、本文識別子記憶モジュール480と、ノイズ判定モジュール490と、本文ノイズ記憶モジュール500と、特徴量生成モジュール510と、本文判定モジュール520と、分割データ結合モジュール530とを備えて構成される。文書入力モジュール400と、文書記憶モジュール410と、分割データ作成モジュール420と、文書分割データ記憶モジュール430と、メタデータ入力モジュール440と、マイクロブログ入力モジュール450と、マイクロブログ記憶モジュール460と、本文識別子作成モジュール470と、本文識別子記憶モジュール480と、ノイズ判定モジュール490と、本文ノイズ記憶モジュール500と、特徴量生成モジュール510と、本文判定モジュール520と、分割データ結合モジュール530とを実行させることにより実現される機能は、上述した本文抽出装置10の文書入力部100と、文書記憶部110と、分割データ作成部120と、文書分割データ記憶部130と、メタデータ入力部140と、マイクロブログ入力部150と、マイクロブログ記憶部160と、本文識別子作成部170と、本文識別子記憶部180と、ノイズ判定部190と、本文ノイズ記憶部200と、特徴量生成部210と、本文判定部220と、分割データ結合部230との機能とそれぞれ同様である。   The text extraction program 40 includes a document input module 400, a document storage module 410, a divided data creation module 420, a document divided data storage module 430, a metadata input module 440, a microblog input module 450, and a microblog storage. Module 460, text identifier creation module 470, text identifier storage module 480, noise determination module 490, text noise storage module 500, feature quantity generation module 510, text determination module 520, and divided data combination module 530 It is configured with. Document input module 400, document storage module 410, divided data creation module 420, document divided data storage module 430, metadata input module 440, microblog input module 450, microblog storage module 460, and body identifier Realized by executing the creation module 470, the body identifier storage module 480, the noise determination module 490, the body noise storage module 500, the feature amount generation module 510, the body determination module 520, and the divided data combination module 530. The functions to be performed include the document input unit 100, the document storage unit 110, the divided data creation unit 120, the document divided data storage unit 130, the metadata input unit 140, and the microblog input of the text extracting device 10 described above. 150, a microblog storage unit 160, a text identifier creation unit 170, a text identifier storage unit 180, a noise determination unit 190, a text noise storage unit 200, a feature value generation unit 210, a text determination unit 220, The function is the same as that of the divided data combination unit 230.

なお、本文抽出プログラム40は、その一部若しくは全部が、通信回線等の伝送媒体を介して伝送され、他の機器により受信されて記録(インストールを含む)される構成としてもよい。また、本文抽出プログラム40の各モジュールは、1つのコンピュータでなく、複数のコンピュータのいずれかにインストールされてもよい。その場合、当該複数のコンピュータによるコンピュータシステムよって上述した一連の本文抽出プログラム40の処理が行われる。   Note that a part or all of the text extraction program 40 may be transmitted via a transmission medium such as a communication line and received and recorded (including installation) by another device. Further, each module of the text extraction program 40 may be installed in any one of a plurality of computers instead of one computer. In that case, a series of processes of the text extraction program 40 described above are performed by the computer system of the plurality of computers.

10…本文抽出装置、100…文書入力部、110…文書記憶部、120…分割データ作成部、121…本文抽出対象エリア記憶部、122…本文抽出対象エリア特定部、123…除去対象要素記憶部、124…要素除去部、125…分割対象要素記憶部、126…文書分割部、130…文書分割データ記憶部、140…メタデータ入力部、150…マイクロブログ入力部、160…マイクロブログ記憶部、170…本文識別子作成部、171…メタデータによる本文識別子作成部、172…関連コメントによる本文識別子作成部、180…本文識別子記憶部、190…ノイズ判定部、200…本文ノイズ記憶部、210…特徴量生成部、220…本文判定部、230…分割データ結合部、1001…CPU、1002…RAM、1003…ROM、1004…通信モジュール、1005…補助記憶装置、30…記録媒体、31…プログラム格納領域、40…本文抽出プログラム、400…文書入力モジュール、410…文書記憶モジュール、420…分割データ作成モジュール、430…文書分割データ記憶モジュール、440…メタデータ入力モジュール、450…マイクロブログ入力モジュール、460…マイクロブログ記憶モジュール、470…本文識別子作成モジュール、480…本文識別子記憶モジュール、490…ノイズ判定モジュール、500…本文ノイズ記憶モジュール、510…特徴量生成モジュール、520…本文判定モジュール、530…分割データ結合モジュール。   DESCRIPTION OF SYMBOLS 10 ... Text extraction apparatus, 100 ... Document input part, 110 ... Document storage part, 120 ... Divided data preparation part, 121 ... Text extraction object area storage part, 122 ... Text extraction object area specification part, 123 ... Removal object element storage part , 124 element removal unit, 125 division target element storage unit, 126 document division unit, 130 document division data storage unit, 140 metadata input unit, 150 microblog input unit, 160 microblog storage unit, 170 ... Text identifier creation unit, 171 ... Text identifier creation unit based on metadata, 172 ... Text identifier creation unit based on related comments, 180 ... Text identifier storage unit, 190 ... Noise determination unit, 200 ... Text noise storage unit, 210 ... Features Quantity generation unit, 220 ... text determination unit, 230 ... divided data combination unit, 1001 ... CPU, 1002 ... RAM, 1003 ... OM, 1004 ... communication module, 1005 ... auxiliary storage device, 30 ... recording medium, 31 ... program storage area, 40 ... text extraction program, 400 ... document input module, 410 ... document storage module, 420 ... divided data creation module, 430 Document division data storage module 440 Metadata input module 450 Microblog input module 460 Microblog storage module 470 Text identifier creation module 480 Text identifier storage module 490 Noise determination module 500 Text noise storage module 510... Feature quantity generation module 520... Text determination module 530.

Claims (11)

本文抽出対象となる対象文書を入力する対象文書入力手段と、
前記対象文書入力手段によって入力された対象文書からそれぞれ文字列が含まれる1つ以上の要素を抽出する要素抽出手段と、
前記対象文書と関連する関連文書を入力する関連文書入力手段と、
前記関連文書入力手段によって入力された関連文書から文字列を抽出する文字列抽出手段と、
前記文字列抽出手段によって抽出された文字列が前記要素抽出手段によって抽出された要素に含まれているか否か判断し、含まれていると判断した場合に当該要素について当該要素が前記対象文書の本文を含む度合いを示すスコアを増加させることでスコアを算出するスコア算出手段と、
前記スコア算出手段によって算出されたスコアに基づいて各要素のうち前記対象文書の本文を含む要素を特定する特定手段と、
前記特定手段によって特定された要素に応じた情報を出力する出力手段と、
を備える本文抽出装置。
A target document input means for inputting a target document from which a text is to be extracted;
Element extraction means for extracting one or more elements each containing a character string from the target document input by the target document input means;
A related document input means for inputting a related document related to the target document;
A character string extracting means for extracting a character string from the related document input by the related document input means;
It is determined whether or not the character string extracted by the character string extraction unit is included in the element extracted by the element extraction unit. If it is determined that the character string is included, the element is included in the target document. Score calculating means for calculating a score by increasing a score indicating the degree of including the body;
Specifying means for specifying an element including the text of the target document among the elements based on the score calculated by the score calculating means;
Output means for outputting information according to the element specified by the specifying means;
A text extracting device comprising:
前記要素抽出手段は、予め前記対象文書に含まれうるタグを示すタグ情報を抽出対象として記憶しておき、記憶したタグ情報によって示される要素を抽出する請求項1に記載の本文抽出装置。   The text extracting device according to claim 1, wherein the element extraction unit stores in advance tag information indicating a tag that can be included in the target document as an extraction target, and extracts an element indicated by the stored tag information. 前記要素抽出手段は、予め前記対象文書に含まれうるタグを示すタグ情報を除外対象として記憶しておき、記憶したタグ情報によって示される要素を抽出対象から除外する請求項1又は2に記載の本文抽出装置。   3. The element extraction unit according to claim 1, wherein the element extraction unit stores in advance tag information indicating a tag that can be included in the target document as an exclusion target, and excludes an element indicated by the stored tag information from the extraction target. Text extraction device. 前記文字列抽出手段は、形態素解析を行うことで関連文書から文字列を抽出する請求項1〜3の何れか一項に記載の本文抽出装置。   The said character string extraction means is a text extraction apparatus as described in any one of Claims 1-3 which extracts a character string from a related document by performing a morphological analysis. 前記関連文書入力手段は、関連文書として前記対象文書のメタデータを入力し、
前記スコア算出手段は、前記文字列に対応する特徴語スコアを予め記憶しておき、前記文字列抽出手段によって抽出された文字列に対応する特徴語スコアに基づいてスコアを算出する、請求項1〜4の何れか一項に記載の本文抽出装置。
The related document input means inputs metadata of the target document as a related document,
The score calculation unit stores a feature word score corresponding to the character string in advance, and calculates a score based on the feature word score corresponding to the character string extracted by the character string extraction unit. The text extraction device according to any one of to 4.
前記関連文書入力手段は、関連文書として前記対象文書を示す情報が文字列に含まれる文書を入力し、
前記スコア算出手段は、前記文字列抽出手段によって抽出された文字列の出現頻度に基づいてスコアを算出する、請求項1〜5の何れか一項に記載の本文抽出装置。
The related document input means inputs a document including information indicating the target document as a related document in a character string,
The text extraction device according to any one of claims 1 to 5, wherein the score calculation unit calculates a score based on an appearance frequency of the character string extracted by the character string extraction unit.
前記要素抽出手段によって抽出された要素について機械学習に必要となる特徴量を生成する特徴量生成手段を更に備え、
前記特定手段は、前記スコア算出手段によって算出されたスコアと前記特徴量生成手段によって生成された特徴量とに基づく機械学習によって各要素のうち前記対象文書の本文を含む要素を特定する、請求項1〜6の何れか一項に記載の本文抽出装置。
A feature amount generating means for generating a feature amount necessary for machine learning for the element extracted by the element extracting means;
The specifying unit specifies an element including the main body of the target document by machine learning based on the score calculated by the score calculation unit and the feature amount generated by the feature amount generation unit. The text extracting device according to any one of 1 to 6.
前記特徴量生成手段は、前記要素抽出手段によって抽出された要素に他の文書へのリンクを含むか否かに基づいて特徴量を生成する請求項7に記載の本文抽出装置。   8. The text extracting device according to claim 7, wherein the feature quantity generation unit generates a feature quantity based on whether or not the element extracted by the element extraction unit includes a link to another document. 前記特徴量生成手段は、前記要素抽出手段によって抽出された要素に含まれる文字列における、句読点の数又は文字列の長さに基づいて特徴量を生成する請求項7又は8に記載の本文抽出装置。   9. The text extraction according to claim 7 or 8, wherein the feature quantity generation means generates a feature quantity based on the number of punctuation marks or the length of the character string in the character string included in the element extracted by the element extraction means. apparatus. 本文抽出対象となる対象文書を入力する対象文書入力ステップと、
前記対象文書入力ステップにおいて入力された対象文書からそれぞれ文字列が含まれる1つ以上の要素を抽出する要素抽出ステップと、
前記対象文書と関連する関連文書を入力する関連文書入力ステップと、
前記関連文書入力ステップにおいて入力された関連文書から文字列を抽出する文字列抽出ステップと、
前記文字列抽出ステップにおいて抽出された文字列が前記要素抽出ステップにおいて抽出された要素に含まれているか否か判断し、含まれていると判断した場合に当該要素について当該要素が前記対象文書の本文を含む度合いを示すスコアを増加させることでスコアを算出するスコア算出ステップと、
前記スコア算出ステップにおいて算出されたスコアに基づいて各要素のうち前記対象文書の本文を含む要素を特定する特定ステップと、
前記特定ステップにおいて特定された要素に応じた情報を出力する出力ステップと、
を含む本文抽出方法。
A target document input step for inputting a target document to be subjected to text extraction;
An element extraction step of extracting one or more elements each containing a character string from the target document input in the target document input step;
A related document input step for inputting a related document related to the target document;
A character string extraction step of extracting a character string from the related document input in the related document input step;
It is determined whether or not the character string extracted in the character string extraction step is included in the element extracted in the element extraction step. If it is determined that the character string is included, the element is included in the target document. A score calculating step for calculating a score by increasing a score indicating a degree of including the body;
A specifying step of specifying an element including the body of the target document among the elements based on the score calculated in the score calculating step;
An output step of outputting information according to the element specified in the specifying step;
Text extraction method.
コンピュータを、
本文抽出対象となる対象文書を入力する対象文書入力手段と、
前記対象文書入力手段によって入力された対象文書からそれぞれ文字列が含まれる1つ以上の要素を抽出する要素抽出手段と、
前記対象文書と関連する関連文書を入力する関連文書入力手段と、
前記関連文書入力手段によって入力された関連文書から文字列を抽出する文字列抽出手段と、
前記文字列抽出手段によって抽出された文字列が前記要素抽出手段によって抽出された要素に含まれているか否か判断し、含まれていると判断した場合に当該要素について当該要素が前記対象文書の本文を含む度合いを示すスコアを増加させることでスコアを算出するスコア算出手段と、
前記スコア算出手段によって算出されたスコアに基づいて各要素のうち前記対象文書の本文を含む要素を特定する特定手段と、
前記特定手段によって特定された要素に応じた情報を出力する出力手段と、
として機能させる本文抽出プログラム。
Computer
A target document input means for inputting a target document from which a text is to be extracted;
Element extraction means for extracting one or more elements each containing a character string from the target document input by the target document input means;
A related document input means for inputting a related document related to the target document;
A character string extracting means for extracting a character string from the related document input by the related document input means;
It is determined whether or not the character string extracted by the character string extraction unit is included in the element extracted by the element extraction unit. If it is determined that the character string is included, the element is included in the target document. Score calculating means for calculating a score by increasing a score indicating the degree of including the body;
Specifying means for specifying an element including the text of the target document among the elements based on the score calculated by the score calculating means;
Output means for outputting information according to the element specified by the specifying means;
Text extraction program to function as.
JP2013010200A 2013-01-23 2013-01-23 Text extraction device, text extraction method and text extraction program Pending JP2014142769A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013010200A JP2014142769A (en) 2013-01-23 2013-01-23 Text extraction device, text extraction method and text extraction program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013010200A JP2014142769A (en) 2013-01-23 2013-01-23 Text extraction device, text extraction method and text extraction program

Publications (1)

Publication Number Publication Date
JP2014142769A true JP2014142769A (en) 2014-08-07

Family

ID=51424004

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013010200A Pending JP2014142769A (en) 2013-01-23 2013-01-23 Text extraction device, text extraction method and text extraction program

Country Status (1)

Country Link
JP (1) JP2014142769A (en)

Similar Documents

Publication Publication Date Title
CN107787487B (en) Deconstructing documents into component blocks for reuse in productivity applications
WO2015196910A1 (en) Search engine-based summary information extraction method, apparatus and search engine
JP5307417B2 (en) System and method for annotating documents
JP5281405B2 (en) Selecting high-quality reviews for display
US8166056B2 (en) System and method for searching annotated document collections
KR102148691B1 (en) Information retrieval method and device
US10417267B2 (en) Information processing terminal and method, and information management apparatus and method
US20090089278A1 (en) Techniques for keyword extraction from urls using statistical analysis
JP2014533407A (en) SEARCH METHOD, SEARCH DEVICE, AND SEARCH ENGINE SYSTEM
US9514113B1 (en) Methods for automatic footnote generation
CN105389329A (en) Open source software recommendation method based on group comments
Petrovski et al. The WDC gold standards for product feature extraction and product matching
US8954438B1 (en) Structured metadata extraction
Roumeliotis et al. An effective SEO techniques and technologies guide-map
US20160203147A1 (en) Page/site server, program and method for immediately displaying noteworthy place in page content
US20240134920A1 (en) Data shaping system
Krishnan et al. Dynamic and temporal user profiling for personalized recommenders using heterogeneous data sources
JP5379627B2 (en) Search control apparatus, search control method, and program
KR101583073B1 (en) Server and method for article summary service
JP2014142769A (en) Text extraction device, text extraction method and text extraction program
JP5386548B2 (en) Soaring word extraction apparatus and method
JP2015103101A (en) Text summarization device, method, and program
Man et al. The proposed algorithm for semi-structured data integration: Case study of Setiu wetland data set
JP5068356B2 (en) Blog body identification device and blog body identification method
JP2018195108A (en) Information processing apparatus, information processing method and program