JP2014142769A - Text extraction device, text extraction method and text extraction program - Google Patents
Text extraction device, text extraction method and text extraction program Download PDFInfo
- 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
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
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
しかしながら、特許文献1に記載された手法では、文書から本文を抽出するために、同じサイトのHTMLテキスト等の本文の抽出対象となる文書とグループ化可能な別の文書が必要となる。即ち、特許文献1に記載された手法では、本文の抽出対象となる文書とグループ化可能な別の文書を得られない場合には、文書から本文を抽出することができない。
However, in the technique described in
本発明は、上記の問題点に鑑みてなされたものであり、本文の抽出対象となる文書とグループ化可能な別の文書を得られない場合であっても本文を適切に抽出することができる本文抽出装置、本文抽出方法及び本文抽出プログラムを提供することを目的とする。 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.
以下、図面と共に本発明に係る本文抽出装置、本文抽出方法及び本文抽出プログラムについて詳細に説明する。なお、図面の説明においては同一要素には同一符号を付し、重複する説明を省略する。 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
本文抽出装置10は、対象文書を取得(受信)できるように当該対象文書を出力する装置(例えば、Webサーバ)とインターネット等のネットワークを介して接続されている。また、後述するように本文の抽出には、対象文書と関連する関連文書を用いる。本文抽出装置10は、当該関連文書を取得(受信)できるように当該関連文書を出力する装置(例えば、例えば、マイクロブログのサービスを提供するサーバ)とインターネット等のネットワークを介して接続されている。
The
図1に示すように本文抽出装置10は、文書入力部100と、文書記憶部110と、分割データ作成部120と、文書分割データ記憶部130と、メタデータ入力部140と、マイクロブログ入力部150と、マイクロブログ記憶部160と、本文識別子作成部170と、本文識別子記憶部180と、ノイズ判定部190と、本文ノイズ記憶部200と、特徴量生成部210と、本文判定部220と、分割データ結合部230とを備えて構成されている。
As shown in FIG. 1, the
文書入力部100は、本文抽出対象となる対象文書を入力する対象文書入力手段である。文書入力部100は、例えば、インターネット経由でWebサーバに対してURLを指定して文書を要求することで、対象文書を取得(受信)する。文書入力部100は、予め対象文書の取得元となるサイトを記憶しておき、指定されたタイミングで当該サイトから対象文書を取得する。当該サイトや対象文書を取得するタイミングを示す情報は、本文抽出装置10の管理者等によって予め本文抽出装置10に入力されている。取得される対象文書は、複数であってもよい。
The
対象文書は、例えば、図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
分割データ作成部120は、文書入力部100によって入力されて文書記憶部110によって記憶されている対象文書から、それぞれ文字列が含まれる1つ以上の要素を抽出する要素抽出手段である。分割データ作成部120は、本文抽出対象エリア記憶部121と、本文抽出対象エリア特定部122と、除去対象要素記憶部123と、要素除去部124と、分割対象要素記憶部125と、文書分割部126とを備えて構成される。要素の抽出は、具体的には以下のようにHTML文書をタグに基づいて分割することで行われる。なお、本発明における要素は、必ずしもHTML文書の要素と一致している必要はない。
The divided
本文抽出対象エリア記憶部121は、対象文書における本文抽出対象とする部分(要素)のタグを示すタグ情報を抽出対象として記憶しておく。このタグ情報は、本文抽出装置10の管理者等によって予め本文抽出装置10に入力されている。本文抽出対象エリア記憶部121に記憶されるタグ情報は、例えば、図3(a)に示す情報である。
The text extraction target
本文抽出対象エリア特定部122は、文書記憶部110に記憶されている対象文書を読み出して、当該対象文書から本文の抽出対象とする本文抽出対象エリア(部分)を特定する。具体的には、本文抽出対象エリア特定部122は、本文抽出対象エリア記憶部121によって記憶されているタグ情報を読み出して、当該タグ情報によって示される要素である本文抽出対象エリアを抽出する(該当する要素のみを残す)。図2(b)に、対象文書から本文抽出対象エリアとして抽出された情報(<target_a>のタグによって示される要素)の例を示す。
The text extraction target
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
除去対象要素記憶部123は、対象文書における本文抽出対象から除外する部分(要素)のタグを示すタグ情報を除外対象として記憶しておく。このタグ情報は、本文抽出装置10の管理者等によって予め本文抽出装置10に入力されている。除去対象要素記憶部123に記憶されるタグ情報は、例えば、図3(b)に示す情報である。例えば、本文とは関係ない<script>のタグが除外対象のタグ情報とされる。
The removal target
要素除去部124は、本文抽出対象エリア特定部122から入力された本文抽出対象エリアの情報から、本文の抽出対象としない不要な要素(部分)を除外(除去)する。具体的には、要素除去部124は、除去対象要素記憶部123によって記憶されているタグ情報を読み出して、当該タグ情報によって示される要素を本文抽出対象エリアから除外する。図2(c)に、除去が行われた本文抽出対象エリアの情報(<script>のタグによって示される要素が除外された情報)の例を示す。このように不要なタグによって示される要素を除去することでノイズを減らすことができる。本文抽出対象エリア特定部122は、上記のように除外を行った情報を文書分割部126に出力する。
The
分割対象要素記憶部125は、対象文書を分割する単位である部分(要素)のタグを示すタグ情報を記憶しておく。このタグ情報は、本文抽出装置10の管理者等によって予め本文抽出装置10に入力されている。分割対象要素記憶部125に記憶されるタグ情報は、例えば、図3(c)に示す情報である。例えば、<div>や<p>のタグが、分割される単位であるタグ情報とされる。
The division target
文書分割部126は、要素除去部124から入力された本文抽出対象エリアの情報を分割する。具体的には、文書分割部126は、分割対象要素記憶部125によって記憶されているタグ情報を読み出して、当該タグ情報によって示される要素の単位で本文抽出対象エリアの情報を分割する。このように対象文書を分割することで、適切な単位で要素が本文を含むか否かを判断することができる。文書分割部126は、上記のように分割した情報を文書分割データ記憶部130に出力する。
The
なお、本文抽出対象エリア特定部122、要素除去部124及び文書分割部126による処理を、必ずしも全て行う必要はなく何れかを行うこととしてもよい。
Note that the processing by the text extraction target
文書分割データ記憶部130は、文書分割部126から入力された分割後の対象文書を記憶する手段である。文書分割データ記憶部130は、図4に示すようなテーブルに情報を格納することで情報を記憶する。図4のテーブルに示すように、文書分割データ記憶部130は、URL、パス及びテキストを対応付けて記憶する。URLは、対象文書の取得元を示す情報である。パスは分割された要素をユニークに特定する情報である。パスは、例えば、XPathの表現方法を用いて記述される。パスは、例えば、文書分割部126による分割時等に生成される。なお、パスは、文書内の要素をユニークに特定できる情報であればXPathである必要はない。
The document division
テキストは、本文の抽出対象の文字列を含む分割された対象文書の要素である。文書分割データ記憶部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
メタデータ入力部140は、対象文書と関連する関連文書を入力する関連文書入力手段の一つである。上述したように関連文書は、対象文書から本文を抽出するために用いる情報である。メタデータ入力部140は、関連文書として対象文書のメタデータを入力する。メタデータは、対象文書についてのデータであり、本実施形態においては文字列を含むものである。例えば、対象文書がHTML文書であった場合には、メタデータは当該HTML文書の概要を説明する文章のデータである。このようなメタデータは、例えば、HTML文書の生成者によって用意される。メタデータは、例えば、HTML文書中にdescriptionという記載を含むタグによって示される要素である。例えば、対象文書が図5(a)に示すようなものである場合、要素300の部分がメタデータに相当する。
The
メタデータ入力部140は、予め図5(b)に示すような、対象文書からメタデータを抽出するエリアを特定するために必要なパスあるいはクエリを予め記憶している。パスあるいはクエリは、本文抽出装置10の管理者等によって予め本文抽出装置10に入力されている。図5(b)に示す例では、XPathのクエリの記述方法を用いて記載された情報であるが、メタデータを含むエリアを抽出できる記述方法であれば別の方法で記述してもよい。メタデータ入力部140は、文書記憶部110に記憶されている対象文書を読み出して、上記のパスあるいはクエリを用いてメタデータの抽出を行う。なお、メタデータは対象文書から抽出しているが、メタデータ自体が独立した対象文書と関連する関連文書とみなしうる。
The
また、メタデータ入力部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
マイクロブログ入力部150は、対象文書と関連する関連文書を入力する関連文書入力手段の一つである。マイクロブログ入力部150は、関連文書としてマイクロブログの情報を入力する。理解を容易にするため、ここではマイクロブログのツイッターの例をとって説明する。ツイッターでは、URLを付けてそのURLに対してコメントを書くことが多い。このURLが対象文書の取得元を示すものであれば、当該URLに対するコメントを用いて対象文書から本文を抽出することができる。
The
マイクロブログ入力部150は、例えば、インターネット経由でマイクロブログのサービスを提供すると共に文書を保存するサーバに対して文書の取得を要求して取得(受信)することとしてもよいし、当該サーバからストリーミングでドキュメントのデータを受信することとしてもよい。文書入力部100は、予め関連文書の取得元となるサイトを記憶しておき、指定されたタイミングで当該サイトから対象文書を取得する。当該サイトや対象文書を取得するタイミングを示す情報は、本文抽出装置10の管理者等によって予め本文抽出装置10に入力されている。取得される対象文書は、複数であってもよい。
The
マイクロブログ入力部150は、上記のサーバから取得した文書から、対象文書のURLが含まれる文書を抽出して取得する。なお、対象文書のURLは予めマイクロブログ入力部150に記憶されている。即ち、マイクロブログ入力部150は、関連文書として対象文書を示す情報が文字列に含まれる文書(マイクロブログのコメント)を入力する。マイクロブログ入力部150は、入力したマイクロブログのコメントをマイクロブログ記憶部160に出力する。
The
マイクロブログ記憶部160は、マイクロブログ入力部150から入力されたマイクロブログのコメントを記憶する手段である。マイクロブログ記憶部160は、図6(a)に示すようなテーブルに情報を格納することで情報を記憶する。図6(a)のテーブルに示すように、マイクロブログ記憶部160は、URL、UserID及びテキストを対応付けて記憶する。URLは、マイクロブログのコメントに含まれる対象文書のURLを示す情報である。UserIDは、当該コメントを投稿したユーザを特定する情報である。UserIDは、マイクロブログ入力部150によるマイクロブログのコメントの取得時に合わせて取得されている。テキストは、マイクロブログのコメント本体である文字列である。
The
本文識別子作成部170は、メタデータあるいはマイクロブログのコメントである関連文書から文字列を抽出する文字列抽出手段である。本文識別子作成部170は、抽出した文字列に基づいて対象文書の本文の抽出に用いる本文識別子を作成する。図1に示すように本文識別子作成部170は、メタデータによる本文識別子作成部171と、関連コメントによる本文識別子作成部172とを備えて構成される。
The text
メタデータによる本文識別子作成部171は、メタデータ入力部140から入力されたメタデータに対して形態素解析を行うことで、当該メタデータから形態素(単語)である文字列を抽出する。抽出された形態素は、対象文書から本文を抽出するための本文識別子として用いられる。また、メタデータによる本文識別子作成部171は、上記の形態素解析による得られうる形態素毎に当該形態素に対応する特徴語スコアを予め記憶しておく。このようにメタデータによる本文識別子作成部171は、より詳細には後述するスコア算出手段の一部である。特徴語スコアは、例えば、本文抽出装置10の管理者等によって予め設定されて、本文抽出装置10に入力されている。この特徴語スコアは、例えば、当該形態素が含まれる文章が対象文書の本文である度合いが高い程、高い値となるように設定される。メタデータによる本文識別子作成部171は、例えば、図5(c)に示すテーブル(デフォルト識別子スコア辞書)に情報を格納することで形態素に対応する特徴語スコアを記憶しておく。
The body
メタデータによる本文識別子作成部171は、メタデータに係る対象文書のURL、得られた形態素、及び予め当該形態素に対応して記憶された特徴語スコアを関連付けて本文識別子記憶部180に記憶させる。本文識別子記憶部180は、例えば、図5(d)に示すテーブルに情報を格納することで上記の情報を記憶する。
The body
関連コメントによる本文識別子作成部172は、マイクロブログ記憶部160に記憶されたマイクロブログのコメントの情報を読み出す。続いて、関連コメントによる本文識別子作成部172は、読み出した情報のうちのテキスト(図6(a)のテキスト欄の情報)から、解析に利用しない、URL、ハッシュタグ、アットマークから始まるユーザ名等の情報を除外する(正規化処理を行う)。正規化処理が行われた情報は、例えば、図6(b)に示す情報である。
The text
続いて、関連コメントによる本文識別子作成部172は、正規化後のテキストに対して形態素解析を行うことで、当該テキストから形態素(単語)である文字列を抽出する。抽出された形態素は、対象文書から本文を抽出するための本文識別子として用いられる。続いて、関連コメントによる本文識別子作成部172は、形態素の出現頻度に基づいて以下のように形態素毎のスコアをTFIDF値として算出する。まず、対象文書(当該対象文書のURL)及び抽出された形態素毎にTF(Term Frequency)値を求める。まず、関連コメントによる本文識別子作成部172は、対象文書のURLに対応付けられたマイクロブログのコメントのテキストから得られた形態素を処理対象とする。続いて、形態素毎に、形態素解析により得られた当該形態素の数を、形態素解析により得られた全ての形態素の数で割ることでTF値を算出する。算出されたTF値は、図6(c)に示すようにURL及び形態素毎の値となる。
Subsequently, the body
また、関連コメントによる本文識別子作成部172は、1URL(対象文書1つ)に紐付くコメント群を1ドキュメントとみなしてIDF(Inverse Document Frequency)値を算出する。IDF値の算出には、複数の対象文書のURLに対応付けられたマイクロブログのコメントのテキストから得られた形態素を用いる。複数の対象文書は、本文抽出装置10の管理者等によって予め設定されている。関連コメントによる本文識別子作成部172は、形態素毎に、総ドキュメント数(対象文書のURLの数)を、コメントが当該形態素を含むドキュメント数で割って対数を取ることでIDF値を算出する。算出されたIDF値は、図6(d)に示すように形態素毎の値となる。
In addition, the body
関連コメントによる本文識別子作成部172は、形態素毎に算出したTF値とIDF値との積を取ることで、TFIDF値を算出する。上記のように、関連コメントによる本文識別子作成部172は、1URL(対象文書1つ)に紐付くコメント群を1ドキュメントとみなしてTFIDFを求める。また、IDF値を、1ユーザに紐付くコメント群を1ドキュメントとみなして算出してTFIDF値を算出することとしてもよい。このTFIDF値は、例えば、当該形態素が特徴的な言葉である度合い、即ち、当該形態素が含まれる文章が対象文書の本文である度合いを示すものである。このように関連コメントによる本文識別子作成部172は、より詳細には後述するスコア算出手段の一部である。
The body
関連コメントによる本文識別子作成部172は、コメントに係る対象文書のURL、得られた形態素、及び算出したTFIDF値を関連付けて本文識別子記憶部180に記憶させる。本文識別子記憶部180は、例えば、図6(e)に示すテーブルに情報を格納することで上記の情報を記憶する。
The body
ノイズ判定部190は、対象文書に含まれるノイズを判定するための情報を取得するための手段である。例えば、本実施形態では、HTML文書の構造を活用したノイズの判定を行う。ウェブページでは、広告であったり、他サイトへのリンク集であったり、他の文書(関連するウェブページ)へのリンクが連鎖する場合、つまりリンクリストである場合には本文とは関係がないノイズである可能性が高い。リンクリストを含む要素(HTMLタグ)を本文抽出対象外、あるいは本文である可能性が低いものとして判断することで、本文抽出の精度を向上する。
The
具体的には、ノイズ判定部190は、文書分割データ記憶部130によって記憶されている対象文書の要素を取得する。ノイズ判定部190は、要素のテキストのなかにリンクを示す<a>タグが含まれるか否かを判断する。ノイズ判定部190は、要素毎に<a>タグが含まれている数(リンクの数)をノイズに係る情報として取得する。また、ノイズ判定部190は、要素毎に<a>タグに含まれる文字列の長さと<a>タグに含まれない文字列の長さとの比の値を算出してノイズに係る情報として取得する。
Specifically, the
ノイズ判定部190は、取得したノイズに係る情報を本文ノイズ記憶部200に記憶させる。ノイズに係る情報は、後述する機械学習における特徴量として利用される(チューニングポイントが設けられる)。このようにノイズ判定部190は、より詳細には後述する特徴量生成手段の一部である。
The
特徴量生成部210は、文書分割データ記憶部130によって記憶されている対象文書の要素について当該要素が対象文書を含むか否かを判断するための情報を生成する手段である。
The feature
特徴量生成部210は、本文識別子作成部170によって関連文書から抽出された形態素が上記の要素に含まれているか否かを判断し、含まれていると判断した場合に当該要素について当該要素が対象文書の本文を含む度合いを示すスコアを増加させることでスコアを算出するスコア算出手段である。
The feature
特徴量生成部210は、文書分割データ記憶部130によって記憶されている対象文書の要素を取得する。また、本文識別子記憶部180に記憶されている本文を抽出するための情報(例えば、図5(d)、図6(e)に示す情報)を取得する。ここで取得される本文を抽出するための情報は、対象文書の要素と同一のURLに係る情報である。特徴量生成部210は、本文識別子記憶部180に記憶されている形態素が対象文書の要素に含まれているか否かを判断する。特徴量生成部210は、本文識別子記憶部180に記憶されている形態素が対象文書の要素に含まれていると判断すると、当該形態素に対応付けられたスコア(特徴語スコア又はTFIDF値)を当該要素に対して合算して合計スコアを算出する。なお、各要素の合計スコアの初期値は、例えばゼロにする。
The feature
例えば、対象文書の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
要素毎のスコアは、メタデータによるスコア、マイクロブログのコメントによるスコアとそれぞれ分けることとしてもよい。算出される要素(パス)毎の合計スコアは、例えば、図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
本文の判定に機械学習を用いる場合には、特徴量生成部210は、更に機械学習に必要となる特徴量を生成(取得する)する。例えば、特徴量生成部210は、ノイズ判定部190によって生成され本文ノイズ記憶部200に記憶された要素毎のノイズに係る情報を取得して特徴量とする。
When machine learning is used for the determination of the text, the feature
あるいは、特徴量生成部210は、対象文書の要素に含まれる文字列における、句読点の数又は文字列の長さに基づいて、当該要素の特徴量を生成する。具体的には、特徴量生成部210は、当該要素に含まれる文字列から句読点の数、及び文字列の長さを特定して、その数あるいは長さの情報を各要素の特徴量とする。要素毎の特徴量は、例えば、図7(b)に示すような情報として取得される。図7(b)に示す特徴量の「1:0.7、2:1、3:3、…」との記載は、1つ目の特徴量(素性)の値が0.7、2つ目の特徴量(素性)の値が1、3つ目の特徴量(素性)の値が3であることを示している。なお、特徴量には上記の合計スコアが含まれている。上記のように特徴量生成部210は、特徴量生成手段でもある。
Alternatively, the feature
本文判定部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
本文判定部220は、特徴量生成部210から入力された要素毎の合計スコアを含む特徴量に基づく機械学習によって、各要素のうち対象文書の本文を含む要素を判定することとしてもよい。本文判定部220は、各要素の特徴量を機械学習における説明変数とし、当該要素が本文か否かを示す値を機械学習における目的変数として、機械学習によって得られた学習モデル(機械学習器)を用いて上記の判定を行う。なお、機械学習を用いる場合には、予め本文がどこに含まれるか予めわかっている文書を準備し、それを用いて予め学習を行わせておく。
The
上記の学習モデルは、例えば、対象文書の本文を示す度合いを示す値を要素毎に出力するものとし、その値が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
分割データ結合部230は、本文判定部220から入力された要素に応じた情報を出力する出力手段である。分割データ結合部230は、本文判定部220から入力された要素の文字列(テキスト)を対象文書毎に結合する。なお、ツリー構造の要素のうち、含まれる文字列が重複する要素が本文と判定された場合にはそのうち最上位の要素のみを結合対象の要素としてもよい。分割データ結合部230は、本文抽出装置10に接続された他の装置に結合された文字列(テキスト)を対象文書の本文として送信する等して出力する。具体的には、対象文書の本文として「今日の天気晴れ、気温は30度の晴れ」といった文字列を出力する。このように本文抽出装置10によって抽出されて出力された本文である文字列は、例えば、上述した雑誌風なコンテンツの生成に用いられる。以上が、本文抽出装置10の機能構成である。
The divided
図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
引き続いて、図9〜12のフローチャートを用いて、本実施形態に係る本文抽出装置10で実行される処理である本文抽出方法を説明する。図9に示すように、本処理では、まず、文書入力部100によって、対象文書が取得されて本文抽出装置10に入力され、文書記憶部110に記憶される(S01、対象文書入力ステップ)。
Subsequently, a text extraction method, which is a process executed by the
続いて、分割データ作成部120によって、文書記憶部110に記憶された対象文書から、本文が含まれるか否かの判定対象となる要素が抽出される(S02〜S05、要素抽出ステップ)。具体的には、以下のように行われる。まず、本文抽出対象エリア特定部122によって、本文抽出対象エリア記憶部121に記憶されている情報に基づいて、対象文書から本文抽出対象エリアが特定される(本文抽出対象エリアが絞り込まれる)(S02)。
Subsequently, the divided
続いて、要素除去部124によって、除去対象要素記憶部123に記憶されている情報に基づいて、本文抽出対象エリアから、本文の抽出対象としない不要な要素が除外される(S03)。続いて、文書分割部126によって、分割対象要素記憶部125に記憶された情報に基づいて、本文抽出対象エリアが分割される(S04)。分割された要素の情報が、文書分割データ記憶部130に記憶される(S05)。以上が、図9に示す対象文書に係る処理である。
Subsequently, the
本文抽出装置10では、上記の対象文書に係る処理の一方で、図10及び図11に示すような関連文書に係る処理も行われる、図10に示す処理は、関連文書としてメタデータを用いた場合の処理である。本処理は、図9に示す対象文書に係る処理(少なくともS01の処理)が行われた後に行われる。
In the
本処理では、まず、メタデータ入力部140によって、メタデータを抽出するためのクエリが読み出される(S11、関連文書入力ステップ)。続いて、メタデータ入力部140によって、文書記憶部110に記憶された対象文書が読み出される(S12、関連文書入力ステップ)。続いて、続いて、メタデータ入力部140によって、上記のクエリが用いられて対象文書からメタデータ対象エリア(メタデータ)が抽出される(S13、関連文書入力ステップ)。
In this process, first, the
続いて、メタデータによる本文識別子作成部171によって、メタデータ入力部140によって抽出されたメタデータに対して形態素解析が行われて形態素が抽出される(S14、文字列抽出ステップ)。続いて、メタデータによる本文識別子作成部171によって、デフォルト識別子スコア辞書が参照されて、抽出された形態素に特徴語スコアが対応付けられる(S15、文字列抽出ステップ)。得られた形態素及び特徴語スコアは、本文識別子記憶部180に記憶される(S16、文字列抽出ステップ)。以上が、図10に示す関連文書としてメタデータを用いた場合の処理である。
Subsequently, the morpheme is extracted by performing morpheme analysis on the metadata extracted by the
続いて、図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
続いて、関連コメントによる本文識別子作成部172によって、マイクロブログ記憶部160に記憶されたマイクロブログのコメントの情報が読み出される。続いて、読み出された情報のうちのテキストから、解析に利用しない、URL、ハッシュタグ、アットマークから始まるユーザ名等の情報が除外される(正規化処理が行われる)(S22)。続いて、関連コメントによる本文識別子作成部172によって、正規化処理が行われたテキストに対して形態素解析が行われて形態素が抽出される(S23、文字列抽出ステップ)。
Subsequently, the comment information of the microblog stored in the
続いて、関連コメントによる本文識別子作成部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
続いて、図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
また、機械学習によって本文の判定が行われる場合には、スコア以外の特徴量が求められる(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
続いて、本文判定部220によって、要素毎に特徴量に基づいて、当該要素に対象文書の要素を含むか否かの判定が行われる(S33、特定ステップ)。この判定は、上述したように合計スコアと閾値との比較、あるいは機械学習によって得られた学習モデルに基づいて行われる。本文を含むと判定された要素の情報は、本文判定部220から分割データ結合部230に入力される。続いて、分割データ結合部230によって、要素の文字列が結合されて、対象文書の本文を示す情報として出力される(S34、出力ステップ)。以上が、本実施形態に係る本文抽出装置10で実行される処理である本文抽出方法である。
Subsequently, the
インターネット上のコンテンツに対するマイクロブログのコメントは、当該コンテンツの本文に係る記載がなされていることが多い。このコメントを用いることで、そのコンテンツが何について記載されているかを把握することが可能である。また、解析対象の文書のメタデータも同様に文書の内容を示しているものがある。本実施形態においては、マイクロブログのコメントやメタデータ等を関連文書として、対象文書から抽出された要素に対して、対象文書の本文を含む度合いを示すスコアが算出されて、本文を含む要素が特定される。上記の関連文書は、同じサイトの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
また、本実施形態のようにタグを用いて要素を抽出することとすれば、対象文書が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
本文抽出プログラム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
なお、本文抽出プログラム40は、その一部若しくは全部が、通信回線等の伝送媒体を介して伝送され、他の機器により受信されて記録(インストールを含む)される構成としてもよい。また、本文抽出プログラム40の各モジュールは、1つのコンピュータでなく、複数のコンピュータのいずれかにインストールされてもよい。その場合、当該複数のコンピュータによるコンピュータシステムよって上述した一連の本文抽出プログラム40の処理が行われる。
Note that a part or all of the
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
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〜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.
前記対象文書入力ステップにおいて入力された対象文書からそれぞれ文字列が含まれる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.
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) |
-
2013
- 2013-01-23 JP JP2013010200A patent/JP2014142769A/en active Pending
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 |