JP2020046792A - Information processor, information processing method and program - Google Patents
Information processor, information processing method and program Download PDFInfo
- Publication number
- JP2020046792A JP2020046792A JP2018173193A JP2018173193A JP2020046792A JP 2020046792 A JP2020046792 A JP 2020046792A JP 2018173193 A JP2018173193 A JP 2018173193A JP 2018173193 A JP2018173193 A JP 2018173193A JP 2020046792 A JP2020046792 A JP 2020046792A
- Authority
- JP
- Japan
- Prior art keywords
- character
- classifier
- tag
- character string
- 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.)
- Granted
Links
- 230000010365 information processing Effects 0.000 title claims abstract description 47
- 238000003672 processing method Methods 0.000 title claims abstract description 6
- 238000000605 extraction Methods 0.000 claims abstract description 28
- 239000000284 extract Substances 0.000 claims abstract description 7
- 238000000034 method Methods 0.000 claims description 24
- 238000012545 processing Methods 0.000 claims description 18
- 230000007246 mechanism Effects 0.000 claims description 15
- 238000013528 artificial neural network Methods 0.000 claims description 12
- 230000008569 process Effects 0.000 claims description 10
- 230000002457 bidirectional effect Effects 0.000 claims description 3
- 230000001143 conditioned effect Effects 0.000 claims description 2
- 239000013598 vector Substances 0.000 description 126
- 230000006870 function Effects 0.000 description 21
- 230000014509 gene expression Effects 0.000 description 21
- 238000004891 communication Methods 0.000 description 18
- 238000010586 diagram Methods 0.000 description 17
- 101150095628 MDL2 gene Proteins 0.000 description 15
- 101100062770 Magnaporthe oryzae (strain 70-15 / ATCC MYA-4617 / FGSC 8958) DCL2 gene Proteins 0.000 description 15
- 230000007704 transition Effects 0.000 description 15
- 210000002569 neuron Anatomy 0.000 description 11
- 238000007476 Maximum Likelihood Methods 0.000 description 10
- 230000004913 activation Effects 0.000 description 5
- 230000015654 memory Effects 0.000 description 4
- 244000205754 Colocasia esculenta Species 0.000 description 3
- 235000006481 Colocasia esculenta Nutrition 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 241000590419 Polygonia interrogationis Species 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000003795 chemical substances by application Substances 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 239000002245 particle Substances 0.000 description 1
- 230000000306 recurrent effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000006403 short-term memory Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
Images
Landscapes
- Machine Translation (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本発明は、情報処理装置、情報処理方法、およびプログラムに関する。 The present invention relates to an information processing device, an information processing method, and a program.
従来、文書の中から、WebページのURL(Uniform Resource Locator)がハイパーリンクとして対応付けられたアンカーテキストを抽出する技術が知られている(例えば、特許文献1参照)。 2. Description of the Related Art Conventionally, there has been known a technique of extracting an anchor text in which a URL (Uniform Resource Locator) of a Web page is associated as a hyperlink from a document (for example, see Patent Document 1).
しかしながら、従来の技術では、文書の中から、予め決められた条件を満たす文字列を、アンカーテキストのような文字列として抽出していることから、現行の条件を満たさない新語や造語、流行語などについては、それらの文字列を抽出することができない場合があった。この結果、新語や造語、流行語などの文字列に対してユーザが興味関心を寄せる場合があっても、それらの文字列に対して関連するコンテンツをハイパーリンクとして対応付けることができない場合があった。 However, in the conventional technology, a character string that satisfies a predetermined condition is extracted as a character string such as an anchor text from a document. Therefore, a new word, a coined word, or a buzzword that does not satisfy the current condition is extracted. In some cases, such character strings cannot be extracted. As a result, even when the user may be interested in character strings such as new words, coined words, and buzzwords, there is a case where it is not possible to associate contents related to those character strings as hyperlinks. .
本発明は、上記の課題に鑑みてなされたものであり、関連するコンテンツに対応付けることが可能な文字列を文書から精度よく抽出することができる情報処理装置、情報処理方法、およびプログラムを提供することを目的としている。 The present invention has been made in view of the above problems, and provides an information processing apparatus, an information processing method, and a program capable of accurately extracting a character string that can be associated with related content from a document. It is intended to be.
本発明の一態様は、複数の文字が含まれる文書を取得する取得部と、入力された文字を、予め決められた条件を満たす文字列に含まれる第1文字か、前記文字列に含まれない第2文字かに分類するように学習された分類器に対して、前記文書に含まれる文字を入力して得られた前記分類器の出力結果に基づいて、前記文書から前記文字列を抽出する抽出部と、を備える情報処理装置である。
である。
One embodiment of the present invention is an acquisition unit for acquiring a document including a plurality of characters, and the input character is a first character included in a character string satisfying a predetermined condition or included in the character string. Extracting a character string from the document based on an output result of the classifier obtained by inputting a character included in the document for a classifier that has been learned to be classified as a second character that does not exist And an extraction unit that performs the processing.
It is.
本発明の一態様によれば、関連するコンテンツに対応付けることが可能な文字列を文書から精度よく抽出することができる。 According to one embodiment of the present invention, a character string that can be associated with related content can be accurately extracted from a document.
以下、本発明を適用した情報処理装置、情報処理方法、およびプログラムを、図面を参照して説明する。 Hereinafter, an information processing apparatus, an information processing method, and a program to which the present invention is applied will be described with reference to the drawings.
[概要]
情報処理装置は、一以上のプロセッサにより実現される。情報処理装置は、複数の文字が含まれる、ある着目する文書(以下、文書と称する)を取得し、取得した文書に含まれる文字を、ある分類器に入力する。
[Overview]
The information processing device is realized by one or more processors. The information processing apparatus acquires a document of interest (hereinafter, referred to as a document) including a plurality of characters, and inputs the characters included in the acquired document to a certain classifier.
分類器は、入力された文字を、予め決められた条件を満たす文字列に含まれる第1文字か、その文字列に含まれない第2文字かに分類するように学習された分類器である。予め決められた条件を満たす文字列とは、例えば、HTML(HyperText Markup Language)で記述されたウェブページにおいて、他のウェブページのURL(Uniform Resource Locator)などがハイパーリンクとして対応付けられたアンカーテキスト(アンカー文字列)であり、具体的には、<a>や</a>といった記号で囲われた文字列である。また、予め決められた条件を満たす文字列は、アンカーテキストに限られず、例えば、固有表現抽出と呼ばれる技術によって文書から抽出される固有表現を示す文字列であってもよい。固有表現は、例えば、組織名、人名、地名、日付表現、時間表現、金額表現、割合表現、固有物名などである。 The classifier is a classifier that has been learned to classify an input character into a first character included in a character string satisfying a predetermined condition or a second character not included in the character string. . The character string satisfying the predetermined condition is, for example, an anchor text in which a URL (Uniform Resource Locator) of another web page is associated as a hyperlink in a web page described in HTML (HyperText Markup Language). (Anchor character string), specifically, a character string surrounded by symbols such as <a> and </a>. Further, the character string that satisfies the predetermined condition is not limited to the anchor text, and may be, for example, a character string indicating a named entity extracted from a document by a technique called named entity extraction. The unique expression is, for example, an organization name, a person name, a place name, a date expression, a time expression, a money amount expression, a ratio expression, a unique object name, or the like.
情報処理装置は、文書に含まれる文字を分類器に入力し、その結果、得られた分類器の出力結果に基づいて、文書から、アンカーテキストなどになり得る蓋然性が高い文字列を抽出する。このように、入力された文字を、タグ付けされた文字列に含まれる文字であるのかそうでないのかを分類するように予め学習された分類器を利用することで、関連するコンテンツに対応付けることが可能な文字列を文書から精度よく抽出することができる。 The information processing apparatus inputs characters included in the document to the classifier, and extracts a character string having a high probability of becoming an anchor text or the like from the document based on the output result of the classifier obtained as a result. In this way, by using a classifier that is pre-learned to classify the input character as a character included in the tagged character string or not, it is possible to associate the input character with related content. Possible character strings can be accurately extracted from a document.
<第1実施形態>
[全体構成]
図1は、第1実施形態における情報処理装置100を含む情報処理システム1の一例を示す図である。第1実施形態における情報処理システム1は、例えば、一以上の端末装置10と、サービス提供装置20と、情報処理装置100とを備える。これらの装置は、ネットワークNWを介して接続される。また、これらの装置のうち一部は、他の装置に仮想的な装置として包含されてもよく、例えば、サービス提供装置20の機能の一部または全部が、情報処理装置100の機能によって実現される仮想マシンであってもよい。
<First embodiment>
[overall structure]
FIG. 1 is a diagram illustrating an example of an
図1に示す各装置は、ネットワークNWを介して種々の情報を送受信する。ネットワークNWは、例えば、インターネット、WAN(Wide Area Network)、LAN(Local Area Network)、プロバイダ端末、無線通信網、無線基地局、専用回線などを含む。なお、図1に示す各装置の全ての組み合わせが相互に通信可能である必要はなく、ネットワークNWは、一部にローカルなネットワークを含んでもよい。 Each device shown in FIG. 1 transmits and receives various information via the network NW. The network NW includes, for example, the Internet, a WAN (Wide Area Network), a LAN (Local Area Network), a provider terminal, a wireless communication network, a wireless base station, a dedicated line, and the like. Note that not all combinations of the devices shown in FIG. 1 need to be able to communicate with each other, and the network NW may partially include a local network.
端末装置10は、例えば、スマートフォンなどの携帯電話、タブレット端末、各種パーソナルコンピュータなどの、入力装置、表示装置、通信装置、記憶装置、および演算装置を備える端末装置である。通信装置は、NIC(Network Interface Card)などのネットワークカード、無線通信モジュールなどを含む。端末装置10では、ウェブブラウザやアプリケーションプログラムなどのUA(User Agent)が起動し、ユーザの入力する内容に応じたリクエストをサービス提供装置20に送信する。また、UAが起動された端末装置10は、サービス提供装置20から取得した情報に基づいて、表示装置に各種画像を表示させる。
The
サービス提供装置20は、例えば、UAとして起動されたウェブブラウザからのリクエスト(例えばHTTP(Hypertext Transfer Protocol)リクエスト)に応じてウェブページを端末装置10に提供するウェブサーバであってよい。ウェブページは、例えば、インターネット上において、ニュース記事のような、文書(テキスト)を含むコンテンツを配信するウェブページであってよい。また、サービス提供装置20は、UAとして起動されたアプリケーションからのリクエストに応じてコンテンツを端末装置10に提供することで、上記のウェブページと同様のサービスを提供するアプリケーションサーバであってもよい。
The
図2は、サービス提供装置20により提供されるウェブページの一例を示す図である。図示の例では、ニュース記事が掲載されたウェブページを模式的に示している。例えば、ニュース記事の文書中には、しばしば、他のウェブページのURLがハイパーリンクとして対応付けられた文字が含まれる。図示の例では、「台風10号」という文字列がハイパーリンクであることを表している。ユーザは、このようなハイパーリンクが対応付けられた文字列をクリック操作などで選択することで、その文字列に関連したコンテンツを含むウェブページにアクセスすることができる。
FIG. 2 is a diagram illustrating an example of a web page provided by the
文書中からハイパーリンクの候補となる文字列(アンカーテキスト)を抽出する方法にはいくつかの手法があり、その一つに、上述した固有表現を抽出する手法が存在する。固有表現抽出は、「BIO」方式や「BILOU」方式によって、文書中の各文字にいくつかの種類のタグをつけていくことで、予め決められた固有表現を文書中から抽出する方法である。「BIO」方式は、「Begin」の頭文字をとった「B」というタグと、「Inside」の頭文字をとった「I」というタグと、「Outside」の頭文字をとった「O」というタグのいずれかを各文字に付与する方式である。「B」タグは、固有表現の最初の文字を識別する分類子であり、「I」タグは、固有表現の内部の文字を識別する分類子であり、「O」タグは、固有表現の外側の文字(固有表現と異なる文字)を識別する分類子である。「BILOU」方式は、上述した「B」「I」「O」のタグに加えて、「Last」の頭文字をとった「L」というタグと、「Unit」の頭文字をとった「U」というタグとを含む複数のタグの中からいずれかのタグを各文字に付与する方式である。「L」タグは、固有表現の最後の文字を識別する分類子であり、「U」タグは、固有表現の単位長さと同じ文字列を識別する分類子を表しており、例えば、固有表現が一文字である場合(「B」「I」「L」のタグに該当しない場合)に、「U」のタグが付与される。「BILOU」方式は、「BIOES」方式とも称される。「BIOES」方式は、上述した「B」「I」「O」のタグに加えて、「End」の頭文字をとった「E」というタグと、「Single」の頭文字をとった「S」というタグとを含む複数のタグの中からいずれかのタグを各文字に付与する方式である。「E」タグは、「L」タグと同じ分類子であり、「S」タグは、「U」タグと同じ分類子である。 There are several methods for extracting a character string (anchor text) that is a candidate for a hyperlink from a document. One of the methods is a method for extracting the above-described named expression. Named entity extraction is a method of extracting a predetermined named entity from a document by attaching several types of tags to each character in the document by a “BIO” system or a “BIOU” system. . The “BIO” method is based on a tag “B” with an initial “Begin”, a tag “I” with an initial “Inside”, and an “O” with an initial “Outside”. Is added to each character. The “B” tag is a classifier that identifies the first character of the named entity, the “I” tag is a classifier that identifies the character inside the named entity, and the “O” tag is Is a classifier that identifies a character (a character different from the named entity). The "BIOUU" method is based on the tag "L" which has an initial of "Last" and the tag "U" which has an initial of "Unit", in addition to the tags of "B", "I" and "O" described above. And a tag is added to each character. The “L” tag is a classifier that identifies the last character of the named entity, and the “U” tag represents a classifier that identifies the same character string as the unit length of the named entity. If it is a single character (when it does not correspond to the tags of “B”, “I”, and “L”), a tag of “U” is added. The “BIOUU” system is also called a “BIOES” system. In the “BIOES” method, in addition to the tags “B”, “I”, and “O”, a tag “E” having an initial of “End” and a tag “S” having an initial of “Single” And a tag is added to each character. The “E” tag is the same classifier as the “L” tag, and the “S” tag is the same classifier as the “U” tag.
図3は、文字のタグ付け方法を説明するための図である。図示の例のように、「検索太郎は○○〇株式会社の社長です」という一つの文(センテンス)が文書中に存在すると仮定する。この場合、固有表現抽出において、「検索太郎」という文字列は、人名という固有表現のクラスに分類される文字列であり、「○○〇株式会社」という文字列は、組織名という固有表現のクラスに分類される文字列であり、「社長」という文字列は、固有物名という固有表現のクラスに分類される文字列であり、これら以外の「は」、「の」、「です」、「。」といった助詞や助動詞、句読点などの文字は、固有表現のいずれのクラスにも分類されない文字である。このような場合、図示の例のように、「検索太郎」という文字列に含まれる複数の文字のうち、最初に出現する「検」という文字には、「B」タグが付与され、「検」の後に続く「索」および「太」という文字には、「I」タグが付与され、最後に出現する「郎」という文字には、「L」タグが付与される。一方、「は」や「の」といった文字には、それらの文字が固有表現でないため、「O」タグが付与される。 FIG. 3 is a diagram for explaining a character tagging method. As shown in the example in the figure, it is assumed that a single sentence (sentence) “Search Taro is the president of XXX Corporation” exists in the document. In this case, in the named entity extraction, the character string “search Taro” is a character string classified into the named entity class of “person name”, and the character string “XX Character strings classified into classes, and the character string "President" is a character string classified into a class of a unique expression called a unique object name. Other than these, "ha", "no", "is", Characters such as particles, auxiliary verbs, and punctuation marks such as “.” Are characters that are not classified into any of the classes of named entities. In such a case, as shown in the example in the drawing, of the plurality of characters included in the character string “search Taro”, the character “test” that appears first is assigned the “B” tag, Are appended with the letter "I" to the characters "chord" and "thick", and the letter "L" is appended to the last character "ro". On the other hand, characters such as “ha” and “no” are given an “O” tag because those characters are not unique expressions.
ハイパーリンクは、一般的に、固有表現として抽出された文字列に対応付けられる。すなわち、ハイパーリンクは、「B」タグが付与された文字から始まり、「L」タグが付与された文字で終わる文字列に対応付けられ得る。また、ハイパーリンクは、予め決められた固有名詞と一致する文字列に対応付けられる場合もある。 A hyperlink is generally associated with a character string extracted as a named expression. That is, a hyperlink can be associated with a character string that starts with a character with a “B” tag and ends with a character with a “L” tag. A hyperlink may be associated with a character string that matches a predetermined proper noun.
ハイパーリンクが対応付けられる文字列は、「予め決められた条件を満たす文字列」の一例であり、予め決められた固有名詞と一致する文字列は、「予め決められた条件を満たす文字列」の他の例である。また、「B」タグが付与された文字は、「第1文字」の一例であり、「L」タグまたは「I」タグが付与された文字は、「第1文字」の他の例である。また、「O」タグまたは「U」が付与された文字は、「第2文字」の一例である。また、「B」タグが付与された文字は、「第3文字」の一例であり、「L」タグが付与された文字は、「第4文字」の一例であり、「I」タグが付与された文字は、「第5文字」の一例である。 A character string associated with a hyperlink is an example of a “character string that satisfies a predetermined condition”, and a character string that matches a predetermined proper noun is a “character string that satisfies a predetermined condition”. This is another example. The character to which the “B” tag is added is an example of “first character”, and the character to which the “L” tag or the “I” tag is added is another example of “first character”. . The character to which the “O” tag or “U” is added is an example of the “second character”. The character with the “B” tag is an example of “third character”, the character with the “L” tag is an example of “fourth character”, and the character with “I” tag is added. The given character is an example of a “fifth character”.
情報処理装置100は、サービス提供装置20によってウェブページなどを介してコンテンツとして提供される文書(例えばニュース記事など)を受信し、受信した文書から、ハイパーリンクが対応付けられやすく、アンカーテキストなどになり得る蓋然性が高い文字列を抽出する。情報処理装置100は、文書から文字列を抽出すると、その抽出した文字列を、サービス提供装置20に送信したり、抽出した文字列を含む文書をサービス提供装置20に送信したりする。これによって、サービス提供装置20は、情報処理装置100によって抽出された文字列にURLなどをハイパーリンクとして対応付け、その文字列を含む文書をコンテンツとして含むウェブページなどを端末装置10に提供する。なお、サービス提供装置20から受信する文書の各文字には、予め固有表現を識別するタグが付与されている必要はないが、タグが付与されていてもよい。
The
[情報処理装置の構成]
図4は、第1実施形態における情報処理装置100の構成の一例を示す図である。図示のように、情報処理装置100は、例えば、通信部102と、制御部110と、記憶部130とを備える。
[Configuration of Information Processing Device]
FIG. 4 is a diagram illustrating an example of a configuration of the
通信部102は、例えば、NIC等の通信インターフェースを含む。通信部102は、ネットワークNWを介して、サービス提供装置20などと通信する。例えば、通信部102は、サービス提供装置20と通信し、コンテンツとして提供される文書を受信する。
The
制御部110は、例えば、取得部112と、文字列抽出部114と、通信制御部116と、学習部118とを備える。制御部110の構成要素は、例えば、CPU(Central Processing Unit)やGPU(Graphics Processing Unit)などのプロセッサが記憶部130に格納されたプログラムを実行することにより実現される。また、制御部110の構成要素の一部または全部は、LSI(Large Scale Integration)、ASIC(Application Specific Integrated Circuit)、またはFPGA(Field-Programmable Gate Array)などのハードウェア(回路部;circuitry)により実現されてもよいし、ソフトウェアとハードウェアの協働によって実現されてもよい。また、プロセッサにより参照されるプログラムは、予め記憶部130に格納されていてもよいし、DVDやCD−ROMなどの着脱可能な記憶媒体に格納されており、その記憶媒体が情報処理装置100のドライブ装置に装着されることで記憶媒体から記憶部130にインストールされてもよい。
The
記憶部130は、例えば、HDD(Hard Disc Drive)、フラッシュメモリ、EEPROM(Electrically Erasable Programmable Read Only Memory)、ROM(Read Only Memory)、RAM(Random Access Memory)などの記憶装置により実現される。記憶部130には、ファームウェアやアプリケーションプログラムなどの各種プログラムのほかに、分類器情報132や条件付き確率場モデル情報134、教師データ136などが格納される。これらの詳細については後述する。
The
[運用時(ランタイム)の処理フロー]
以下、第1実施形態における情報処理装置100による運用時の一連の処理の流れをフローチャートに即して説明する。運用時とは、既に学習された分類器MDLを利用する状態である。図5は、第1実施形態における情報処理装置100による運用時の一連の処理の流れを示すフローチャートである。本フローチャートの処理は、例えば、所定の周期で繰り返し行われてもよい。
[Processing flow during operation (runtime)]
Hereinafter, a flow of a series of processes during operation by the
まず、取得部112は、通信部102にサービス提供装置20と通信させ、サービス提供装置20から、ウェブページなどを介してコンテンツとして提供される文書を取得する(S100)。サービス提供装置20から取得される文書には、句読点や、終止符、カンマ、疑問符、感嘆符などで区切られた一つの文(センテンス)が少なくとも含まれているものとし、段落などで区切られた節(パラグラフ)や、それ以上大きい単位の文章が含まれていてもよい。また、サービス提供装置20から取得される文書は、トークナイズ(単語分割)されている必要はなく、句点、読点、終止符、カンマ、ピリオド、疑問符、感嘆符、省略符、括弧、記号、スペース、改行などが含まれていてもよい。また、サービス提供装置20から取得される文書の言語は、日本語であってもよいし、英語や中国語、ドイツ語など他の言語であってもよい。
First, the
次に、文字列抽出部114は、分類器情報132を参照して、分類器MDLを構築(生成)し、取得部112によって取得された文書に含まれる複数の文字Cの中から、ある決まった数の文字列を、構築した分類器MDLに入力する(S102)。例えば、抽出したい文字列が5文字である場合、分類器MDLに一度に入力する文字列の数は、5文字あるいはそれ以上であってよい。
Next, the character
分類器情報132は、分類器MDLを定義した情報(プログラムまたはデータ構造)である。分類器MDLは、文字にタグを順次付与する系列ラベリングと呼ばれる問題を解くための学習モデルであり、例えば、リカレントニューラルネットワーク(Reccurent Neural Network:RNN)などの種々のニューラルネットワークによって実現される。
The
分類器情報132には、例えば、各ニューラルネットワークを構成する入力層、一以上の隠れ層(中間層)、出力層の其々に含まれるニューロン(ユニット)が互いにどのように結合されるのかという結合情報や、結合されたニューロン間で入出力されるデータに付与される結合係数がいくつであるのかという重み情報などが含まれる。結合情報は、例えば、各層に含まれるニューロン数や、各ニューロンの結合先のニューロンの種類を指定する情報、各ニューロンを実現する活性化関数、隠れ層のニューロン間に設けられたゲートなどの情報を含む。ニューロンを実現する活性化関数は、例えば、入力符号に応じて動作を切り替える関数(ReLU関数やELU関数)であってもよいし、シグモイド関数や、ステップ関数、ハイパボリックタンジェント関数であってもよいし、恒等関数であってもよい。ゲートは、例えば、活性化関数によって返される値(例えば1または0)に応じて、ニューロン間で伝達されるデータを選択的に通過させたり、重み付けたりする。結合係数は、活性化関数のパラメータであり、例えば、ニューラルネットワークの隠れ層において、ある層のニューロンから、より深い層のニューロンにデータが出力される際に、出力データに対して付与される重みを含む。また、結合係数は、各層の固有のバイアス成分などを含んでもよい。
The
図6は、第1実施形態における分類器MDLの一例を示す図である。第1実施形態における分類器MDLは、例えば、埋め込みレイヤ200と、特徴抽出レイヤ300と、CRF(Conditional random field)レイヤ400とによって実現される。CRFレイヤ400と文字列抽出部114とを合わせたものは、「抽出部」の一例である。
FIG. 6 is a diagram illustrating an example of the classifier MDL according to the first embodiment. The classifier MDL in the first embodiment is realized by, for example, an embedding
埋め込みレイヤ200は、入力された各文字Cから、ある次元数のベクトル(以下、文字ベクトルxと称する)を生成する。例えば、埋め込みレイヤ200は、対象とする文字に対応した要素を1とし、それ以外の文字に対応した要素を0とするワンホット表現と呼ばれる手法によって、入力された文字Ckから文字ベクトルxkを生成する。また、埋め込みレイヤ200は、対象とする文字と、その文字の前後に出現する文字との共起性に基づいて文字をベクトル化する分散表現と呼ばれる手法によって、入力された文字Ckから文字ベクトルxkを生成してもよい。
The embedding
以下の説明では、一例として、C1を先頭にしてC2、C3、C4の順に並んだ4文字が埋め込みレイヤ200に入力される場合について説明する。4つの文字C1からC4が埋め込みレイヤ200に入力されると、x1からx4の4つの文字ベクトルが生成される。埋め込みレイヤ200によって生成された文字ベクトルxは、特徴抽出レイヤ300に出力される。
In the following description, as an example, a case where four characters arranged in the order of C 2 , C 3 , and C 4 starting from C 1 are input to the embedding
特徴抽出レイヤ300は、埋め込みレイヤ200により出力された文字ベクトルxから特徴量を抽出する。例えば、特徴抽出レイヤ300は、BiLSTM(Bidirectional Long short-term memory)レイヤ310と、アテンション機構(注意機構)330とによって実現される。
The
BiLSTMレイヤ310は、入力された文字の後に出現する文字を予測するとともに、入力された文字の前に出現する文字を予測する双方向型のLSTMを含むRNNである。言い換えれば、BiLSTMレイヤ310は、現在までの入力から未来の出力を予測するとともに、未来の入力から過去の出力を予測する。BiLSTMレイヤ310には、LSTM320(1)〜(8)が含まれる。なお、LSTM320(1)〜(8)は、互いに異なるLSTM320ではなく、処理周期tの異なる同一のLSTM320である。括弧内の数字は、処理周期tに対応している。
The
各LSTM320は、数式(1)に基づいて、各文字ベクトルxから抽出される特徴量を表す特徴ベクトルhを出力する。数式(1)は、各LSTM320における計算式の一例を表している。
Each
tは、BiLSTMレイヤ310によって繰り返し行われる再帰処理の処理周期(処理時刻)を表しており、xtは、処理周期tにおいて埋め込みレイヤ200から入力される文字ベクトルを表している。例えば、最初の周期t1では、先頭の文字C1に対応した文字ベクトルx1が、LSTM320(1)とLSTM320(8)とに入力され、次の周期t2では、文字C1の後に続く文字C2に対応した文字ベクトルx2が、LSTM320(2)とLSTM320(7)とに入力され、次の周期t3では、文字C2の後に続く文字C3に対応した文字ベクトルx3が、LSTM320(3)とLSTM320(6)とに入力され、次の周期t4では、文字C3の後に続く文字C4に対応した文字ベクトルx4が、LSTM320(4)とLSTM320(5)とに入力される。
t represents the processing cycle of the recursive process is repeated by BiLSTM layer 310 (processing time), x t represents a character vector inputted from the
htは、処理周期tにおいてLSTM320により出力される特徴ベクトルを表している。再帰処理とは、過去の処理周期で求めた特徴ベクトルを、今回の処理周期での特徴ベクトルの導出に利用することである。特徴ベクトルhtは、インプットゲートによって出力されるベクトルztに基づく重み(1−zt)と特徴ベクトルht−1との畳み込み値と、ベクトルztと特徴ベクトルht(〜)との畳み込み値との和として導出される。 h t represents the feature vector output by LSTM320 in the processing cycle t. The recursive processing is to use a feature vector obtained in a past processing cycle for deriving a feature vector in a current processing cycle. Feature vector h t is the convolution value of the weight based on the vector z t output by the input gates and (1-z t) between the feature vector h t-1, the vector z t and the feature vector h t (~) It is derived as the sum with the convolution value.
LSTM320(1)の特徴ベクトルh1は、LSTM320(2)に出力され、LSTM320(2)の特徴ベクトルh2は、LSTM320(3)に出力され、LSTM320(3)の特徴ベクトルh3は、LSTM320(4)に出力される。一方、LSTM320(5)の特徴ベクトルh5は、LSTM320(6)に出力され、LSTM320(6)の特徴ベクトルh6は、LSTM320(7)に出力され、LSTM320(7)の特徴ベクトルh7は、LSTM320(8)に出力される。 Feature vector h 1 of LSTM320 (1) is output to LSTM320 (2), feature vector h 2 of LSTM320 (2) is output to LSTM320 (3), the feature vector h 3 of LSTM320 (3), LSTM320 Output to (4). Meanwhile, the feature vector h 5 of LSTM320 (5), is output to LSTM320 (6), the feature vector h 6 of LSTM320 (6), is output to LSTM320 (7), feature vector h 7 of LSTM320 (7) is , LSTM320 (8).
ztは、LSTMに含まれるインプットゲートによって出力されるベクトルを表しており、σは、ゲートの活性化関数がシグモイド関数であることを表しており、Wzは、前段のLSTM320の特徴ベクトルht−1と、文字ベクトルxtとを線形変換するための重みを表している。
z t represents a vector output by an input gate included in the LSTM, σ represents that the activation function of the gate is a sigmoid function, and W z is a feature vector h of the preceding
rtは、LSTMに含まれるフォーゲットゲートによって出力されるベクトルを表しており、Wfは、重みWiと同様に、前段のLSTM320の特徴ベクトルht−1と、文字ベクトルxtとを線形変換するための重みを表している。 r t represents the vector output by FORGET gates included in LSTM, W f, like weight W i, a feature vector h t-1 of the preceding LSTM320, a character vector x t This represents the weight for linear conversion.
ht(〜)は、内部演算のために一時的に導出される特徴ベクトルを表している。特徴ベクトルht(〜)は、フォーゲットゲートによって出力されるベクトルrtと、特徴ベクトルht−1との畳み込み値と、文字ベクトルxtとに対して、ある重みWを乗算した積を変数としたハイパボリックタンジェント関数tanhを解くことで導出される。 h t (〜) represents a feature vector temporarily derived for internal operation. Feature vector h t (~) is a vector r t output by Forget gate, a convolution value for the feature vector h t-1, with respect to a character vector x t, a product obtained by multiplying a certain weight W It is derived by solving a hyperbolic tangent function tanh as a variable.
BiLSTMレイヤ310は、同じ文字ベクトルxが入力された2つのLSTM320のそれぞれによって出力された2つの特徴ベクトルhを結合して、1つの特徴ベクトルhを生成し、これを出力する。特徴ベクトルhに含まれる要素は、各文字Cに付されるタグの尤もらしさ(尤度)を数値(スコア)によって表している。以下、2つの特徴ベクトルhを結合して生成した特徴ベクトルhを、「タグスコアベクトルh」と称して説明する。タグスコアベクトルhは、「特徴量」の一例である。
The
例えば、BiLSTMレイヤ310は、文字ベクトルx1が入力された前段のLSTM320(1)および後段のLSTM320(8)のそれぞれによって出力された特徴ベクトルhtを結合して、タグスコアベクトルh1を出力する。
For example,
また、BiLSTMレイヤ310は、文字ベクトルx2が入力された前段のLSTM320(2)および後段のLSTM320(7)のそれぞれによって出力された特徴ベクトルhtを結合して、タグスコアベクトルh2を出力する。
Further,
また、BiLSTMレイヤ310は、文字ベクトルx3が入力された前段のLSTM320(3)および後段のLSTM320(6)のそれぞれによって出力された特徴ベクトルhtを結合して、タグスコアベクトルh3を出力する。
Further,
また、BiLSTMレイヤ310は、文字ベクトルx4が入力された前段のLSTM320(4)および後段のLSTM320(5)のそれぞれによって出力された特徴ベクトルhtを結合して、タグスコアベクトルh4を出力する。
Further,
アテンション機構330は、ある文字列において、各文字が文字列内のどの位置に出現したのかということに応じて、その文字に対する注意のかけ方を変更するニューラルネットワークである。例えば、アテンション機構330は、BiLSTMレイヤ310によって出力されたタグスコアベクトルh1からh4のそれぞれに対して、互いに異なる重みαを乗算することで、各文字Cに対する注意の度合い(アテンション)を、文字Cごとに変更する。数式(2)は、アテンション機構330における計算式の一例を表している。
The
Mは、タグスコアベクトルhtを変数としたハイパボリックタンジェント関数tanhを解くことで導出されるベクトルであり、タグスコアベクトルhtを非線形化したベクトルである。重みαは、ソフトマックス関数によって導出される。wTは、ベクトルMに乗算される重みベクトルの転置である。 M is a vector derived by solving the hyperbolic tangent function tanh with a tag score vector h t as a variable, a tag score vector h t is nonlinearized the vector. The weight α is derived by a softmax function. w T is the transpose of the weight vector by which the vector M is multiplied.
例えば、ある文字Ckを入力したときにBiLSTMレイヤ310によって出力されるタグスコアベクトルをhkとした場合、そのタグスコアベクトルhkに対応した重みαkは、数式(3)に示すソフトマックス関数によって導出される。
For example, when a tag score vector output by the
BiLSTMレイヤ310によって出力されるタグスコアベクトルhの総数がnである場合、数式(3)に示すように、重みαkは、対象とするタグスコアベクトルhkの指数関数の出力値exp(wTMk)を、タグスコアベクトルh1の指数関数の出力値exp(wTM1)から、タグスコアベクトルhnの指数関数の出力値exp(wTMn)までを足し合わせた合計値で除算した値(すなわち割合)となる。そのため、重みαkは、0から1までの範囲の値をとる。数式(3)の分子は「文字ごとに出力された各特徴量」の一例であり、分母は「全ての文字の特徴量」の一例である。
When the total number of tag score vectors h output by the
アテンション機構330は、対象とする文字Ckのタグスコアベクトルhkを非線形化したベクトルMkに対して、対象とする文字Ckのタグスコアベクトルhkに応じた重みαkの転置を乗算することで、対象とする文字Ckのタグスコアベクトルhkが他の文字との相対的な注意の度合いに応じて重み付けられたタグスコアベクトルHkを生成する。以下、タグスコアベクトルhkに重みαkが乗算されたタグスコアベクトルHkを、「重み付きタグスコアベクトルHk」と称して説明する。重みαkはベクトルであるため、重み付きタグスコアベクトルHkは、ベクトルMkと重みαkとのアダマール積となる。
上述したように、本実施形態では一例としてC1からC4の4文字を処理対象としているため、アテンション機構330は、文字C1のタグスコアベクトルh1を非線形化したベクトルM1に対して、文字C1のタグスコアベクトルh1に応じた重みα1を乗算して、文字C1に対応した重み付きタグスコアベクトルH1を生成する。
As described above, since the C 1 to processed four characters of C 4 as an example in the present embodiment,
また、アテンション機構330は、文字C2のタグスコアベクトルh2を非線形化したベクトルM2に対して、文字C2のタグスコアベクトルh2に応じた重みα2を乗算して、文字C2に対応した重み付きタグスコアベクトルH2を生成する。
Further,
また、アテンション機構330は、文字C3のタグスコアベクトルh3を非線形化したベクトルM3に対して、文字C3のタグスコアベクトルh3に応じた重みα3を乗算して、文字C3に対応した重み付きタグスコアベクトルH3を生成する。
Further,
また、アテンション機構330は、文字C4のタグスコアベクトルh4を非線形化したベクトルM4に対して、文字C4のタグスコアベクトルh4に応じた重みα2を乗算して、文字C4に対応した重み付きタグスコアベクトルH4を生成する。
Further,
これらの重み付きタグスコアベクトルHは、ベクトルMに対して、ソフトマックス関数によって求められる重みαを乗算することで生成されるため、重み付きタグスコアベクトルHに含まれる各要素の値は、確率のように振る舞う。重み付きタグスコアベクトルHに含まれる各要素は、各文字Cに付されるタグの尤もらしさ(尤度)を、0から1までの範囲の数値によって表している。例えば、重み付きタグスコアベクトルHがe1からe4の4つの要素を含む場合、要素e1が「B」タグの尤度を表し、要素e2が「I」タグの尤度を表し、要素e3が「L」タグの尤度を表し、要素e4が「O」タグの尤度を表していてよい。なお、重み付きタグスコアベクトルHの要素数と、各要素に対応するタグの種類は、ハイパーパラメータとして任意に決定されてよい。要素e1からe3は、「第1指標値」の一例であり、要素e4は、「第2指標値」の一例である。 Since these weighted tag score vectors H are generated by multiplying the vector M by the weight α obtained by the softmax function, the value of each element included in the weighted tag score vector H is a probability Behave like. Each element included in the weighted tag score vector H represents the likelihood (likelihood) of the tag attached to each character C by a numerical value in the range of 0 to 1. For example, when the weighted tag score vector H includes four elements e1 to e4, the element e1 indicates the likelihood of the “B” tag, the element e2 indicates the likelihood of the “I” tag, and the element e3 indicates “ The likelihood of the “L” tag may be represented, and the element e4 may represent the likelihood of the “O” tag. Note that the number of elements of the weighted tag score vector H and the type of tag corresponding to each element may be arbitrarily determined as a hyperparameter. Elements e1 to e3 are examples of a "first index value", and element e4 is an example of a "second index value".
アテンション機構330によって生成された重み付きタグスコアベクトルHは、CRFレイヤ400に出力される。
The weighted tag score vector H generated by the
CRFレイヤ400は、条件付き確率場モデル情報134が示す条件付き確率場モデル(マルコフ確率場)と、アテンション機構330によって出力された複数の重み付きタグスコアベクトルHとに基づいて、入力された複数の文字Cに対して付けられるタグの組み合わせとして、最も尤度が高いタグ付けの組み合わせを決定する。条件付き確率場モデル情報134が示す条件付き確率場モデルは、「B」「I」「L」「O」などの各種タグのいずれかが付与される文字同士が、文書(文字列)の中で互いに隣り合うときの確率を条件付けた条件付き確率場である。
Based on the conditional random field model (Markov random field) indicated by the conditional random
図7は、条件付き確率場モデルの一例を示す図である。例えば、ある文字列に含まれる複数の文字に対して、「B」「I」「L」「O」などの各種タグのいずれかが付与されている場合、タグ付けの順序として、ある決まったパターンが存在し得る。例えば、「B」「I」「L」という順序でタグが付される文字列は存在し得るが、「O」「L」「O」という順序でタグが付される文字列は、誤記や特殊な文体以外では存在する蓋然性が低い。このようなことを考慮して、条件付き確率場モデルでは、一つのタグを状態と見做したときに、あるタグから他のタグに移り変わる際の確率(ある二つのタグが隣り合う確率)を状態遷移確率として定義している。 FIG. 7 is a diagram illustrating an example of a conditional random field model. For example, when one of various tags such as “B”, “I”, “L”, and “O” is attached to a plurality of characters included in a certain character string, the order of tagging is determined. There can be patterns. For example, a character string that is tagged in the order of “B”, “I”, and “L” may exist, but a character string that is tagged in the order of “O”, “L”, and “O” may be erroneously written. Except for a special style, the probability of existence is low. In consideration of this, in the conditional random field model, when one tag is regarded as a state, the probability of transition from one tag to another tag (probability that two tags are adjacent) is determined. It is defined as the state transition probability.
一般的な文書では、例えば、「B」タグが付与される文字の後に「I」タグが付与される文字が続く頻度が大きいため、「B」タグから「I」タグへの状態遷移確率は大きく設定される。また、「L」タグが付与される文字の後に「O」タグが付与される文字が続く頻度も大きいため、「L」タグから「O」タグへの状態遷移確率も大きく設定される。また、「I」タグが付与される文字の後に「L」タグが付与される文字が続く頻度も大きいため、「I」タグから「L」タグへの状態遷移確率も大きく設定される。また、「I」タグが付与される文字の後に「I」タグが付与される文字が続く頻度も大きいため、「I」タグから「I」タグへの状態遷移確率も大きく設定される。一方、一般的な文書では、「L」タグが付与される文字の後に「B」タグが付与される文字が続く頻度が小さいため、「L」タグから「B」タグへの状態遷移確率は小さく設定される。また、「O」タグが付与される文字の後に「L」タグが付与される文字が続く頻度も小さいため、「O」タグから「L」タグへの状態遷移確率も小さく設定される。また、「B」タグが付与される文字の後に「B」タグが付与される文字が続く頻度も小さいため、「B」タグから「B」タグへの状態遷移確率も小さく設定される。これらの状態遷移確率は、ハイパーパラメータとして予め決められているものとする。 In a general document, for example, a character to which an “I” tag is added after a character to which a “B” tag is added has a high frequency. Therefore, the state transition probability from the “B” tag to the “I” tag is Set to a large value. In addition, since a character to which an “O” tag is added frequently follows a character to which an “L” tag is added, the state transition probability from the “L” tag to the “O” tag is also set to be large. Further, since the frequency at which the character to which the “L” tag is added follows the character to which the “I” tag is added, the state transition probability from the “I” tag to the “L” tag is also set high. In addition, since the character to which the “I” tag is added is frequently followed by the character to which the “I” tag is added, the state transition probability from the “I” tag to the “I” tag is also set to be large. On the other hand, in a general document, since the frequency of the character to which the “B” tag is added after the character to which the “L” tag is added is small, the state transition probability from the “L” tag to the “B” tag is Set smaller. In addition, since the frequency at which the character to which the "L" tag is added after the character to which the "O" tag is added is low, the state transition probability from the "O" tag to the "L" tag is also set low. In addition, since the frequency at which the character with the “B” tag is added after the character with the “B” tag is low, the state transition probability from the “B” tag to the “B” tag is also set low. It is assumed that these state transition probabilities are predetermined as hyperparameters.
CRFレイヤ400では、上記のような考えに基づいて全てのタグ間の状態遷移確率が定義された条件付き確率場モデルに従って、全てのタグの組み合わせの尤度を導出する。
The
例えば、先頭の文字C1が「B」タグ、次の文字C2が「I」タグ、次の文字C3が「L」タグ、最後の文字C4が「O」タグとなる、ある一つの組み合わせを考えた場合、CRFレイヤ400は、まず、文字C1に対応した重み付きタグスコアベクトルH1に含まれる複数の要素のうち、「B」タグの尤度を表す要素e1に対して、「B」タグ(=要素e1)から「I」タグ(=要素e2)へと状態遷移する状態遷移確率0.5を乗算する。次に、CRFレイヤ400は、文字C2に対応した重み付きタグスコアベクトルH2に含まれる複数の要素のうち、「I」タグの尤度を表す要素e2に対して、「I」タグ(=要素e2)から「L」タグ(=要素e3)へと状態遷移する状態遷移確率0.4を乗算する。次に、CRFレイヤ400は、文字C3に対応した重み付きタグスコアベクトルH3に含まれる複数の要素のうち、「L」タグの尤度を表す要素e3に対して、「L」タグ(=要素e3)から「O」タグ(=要素e4)へと状態遷移する状態遷移確率0.3を乗算する。そして、CRFレイヤ400は、これらの積を足し合わせた線形和(0.5×e1+0.4×e2+0.3×e3)を、「B」「I」「L」「O」の組み合わせの尤度として導出する。なお、各タグの組み合わせの尤度は、全組み合わせの尤度で除算され、0から1の範囲の数値をとるものとする。
For example, the head of the character C 1 is "B" tag, the next character C 2 is "I" tag, the next character C 3 "L" tag, the last character C 4 becomes "O" tag is one when considering one combination,
CRFレイヤ400は、全てのタグの組み合わせについて尤度を導出すると、その組み合わせの中から最も尤度が大きくなるタグの組み合わせを選択し、その組み合わせをベクトル(以下、最尤タグベクトルと称する)として出力する。例えば、分類すべきタグの種類が4種類である場合、CRFレイヤ400によって出力される最尤タグベクトルには、例えば、最初の文字C1に付されるタグの尤度を表す要素e1と、次の文字C2に付されるタグの尤度を表す要素e2と、次の文字C3に付されるタグの尤度を表す要素e3と、最後の文字C4に付されるタグの尤度を表す要素e4とが含まれることになる。
When the
図5の説明に戻り、次に、文字列抽出部114は、分類器MDLのCRFレイヤ400から出力結果、すなわち、最尤のタグの組み合わせを示す最尤タグベクトルを取得する(S104)。
Returning to the description of FIG. 5, next, the character
次に、文字列抽出部114は、S100の処理で取得された文書に含まれる全ての文字を分類器MDLに入力したか否かを判定し(S106)、未だ全ての文字について分類器MDLに入力していない場合、S102の処理に戻り、前回分類器MDLに入力された文字列と重複しない他の文字列を分類器MDLに入力する。
Next, the character
一方、文字列抽出部114は、全ての文字について分類器MDLに入力している場合、分類器MDLから取得した最尤タグベクトルに基づいて、文書に含まれる各文字にタグを付与し、その文書の中から、アンカーテキストのようにハイパーリンクに対応付けることが可能な文字列を抽出する(S108)。例えば、文字C1からC4が分類器MDLに入力され、その分類器MDLから取得された最尤タグベクトルに「B」「I」「L」「O」のタグの尤度を表す要素が含まれている場合、文字列抽出部114は、文字C1に「B」タグを付与し、文字C2に「I」タグを付与し、文字C3に「L」タグを付与し、文字C4に「O」タグを付与する。そして、文字列抽出部114は、文書の中から、「B」タグが付与された文字Cからはじまり、「L」タグが付与された文字Cで終わる文字列を、ハイパーリンクに対応付けることが可能な文字列として抽出する。この際、「B」タグが付与された文字Cと、「L」タグが付与された文字Cとの間には、「I」タグが付与された文字Cが存在してもよい。
On the other hand, when all the characters have been input to the classifier MDL, the character
次に、通信制御部116は、通信部102を制御して、文字列抽出部114によって抽出された文字列を含む情報(以下、文字列情報と称する)を、サービス提供装置20に送信する(S110)。これによって本フローチャートの処理が終了する。
Next, the
文字列情報を受信したサービス提供装置20は、図2に例示するように、文字列抽出部114によって抽出された文字列にハイパーリンクを対応付けたコンテンツを、ウェブページを媒体にしてユーザの端末装置10に提供してよい。なお、サービス提供装置20は、文字列抽出部114によって抽出された文字列をハイパーリンクに対応付けるのに代えて、あるいは加えて、文字列抽出部114によって抽出された文字列を、情報検索のためのクエリとしてサジェストしてもよい。
As illustrated in FIG. 2, the
図8は、サービス提供装置20により提供されるウェブページの他の例を示す図である。図示の例のように、文字列抽出部114によって抽出された文字列が「台風10号」である場合に、ユーザがその文字列にマウスオン(マウスオーバー)した場合、サービス提供装置20は、その文字列で検索することを促すための検索ボタンB1を表示させる。
FIG. 8 is a diagram illustrating another example of a web page provided by the
[学習時(トレーニング)の処理フロー]
以下、第1実施形態における情報処理装置100の学習時の一連の処理の流れをフローチャートに即して説明する。学習時とは、運用時に利用される分類器MDLを学習させる状態である。図9は、第1実施形態における情報処理装置100による学習時の一連の処理の流れを示すフローチャートである。
[Processing flow during learning (training)]
Hereinafter, a flow of a series of processes at the time of learning of the
まず、学習部118は、記憶部130に格納された教師データ136から、ある決まった数の文字列を選択する(S200)。教師データ136は、予め「B」タグや「O」タグなどの各種タグが教師ラベルとして対応付けられた文字列(タグが自明な文字列)を含む文書データである。教師データ136が示す文書は、トークナイズ(単語分割)されている必要はなく、句点、読点、終止符、カンマ、ピリオド、疑問符、感嘆符、省略符、括弧、記号、スペース、改行などが含まれているものとする。また、その文書の言語は、日本語であってもよいし、英語や中国語、ドイツ語など他の言語であってもよい。
First, the
次に、学習部118は、教師データ136から文字列を選択すると、その文字列を分類器MDLに入力する(S202)。
Next, when selecting a character string from the
次に、学習部118は、文字列を入力した分類器MDLから出力結果、すなわち最尤タグベクトルを取得する(S204)。
Next, the
次に、学習部118は、最尤タグベクトルによって示されるタグの組み合わせと、分類器MDLに入力した文字列の各文字に教師ラベルとした対応付けられたタグとを比較し、双方のタグの組み合わせが一致するか否かを判定する(S206)。
Next, the
学習部118は、タグの組み合わせが一致しないと判定した場合、誤差逆伝番などの勾配法に基づいて、分類器MDLのパラメータを学習する(S208)。例えば、学習部118は、教師ラベルとした対応付けられたタグの組み合わせの尤度を最大値とし、その最大値から、最尤タグベクトルによって示されるタグの組み合わせの尤度を減算した差分が小さくなるように、分類器MDLのパラメータを学習する。学習対象とする分類器MDLのパラメータは、少なくとも特徴抽出レイヤ300の重みやバイアス成分を含む。これによって、本フローチャートの処理が終了する。
If the
以上説明した第1実施形態によれば、複数の文字Cが含まれる文書を取得し、入力された文字を、ハイパーリンクを対応付けることが可能な文字列(固有表現)を識別する「B」「I」「L」タグや、それ以外の文字であることを識別する「O」タグなどのいずれかに分類するように学習された分類器MDLに対して、取得した文書に含まれる文字Cを入力して得られた最尤タグベクトルに基づいて、文書から、ハイパーリンクを対応付けることが可能な文字列を抽出するため、関連するコンテンツにハイパーリンクを介して対応付けることが可能な文字列を文書から精度よく抽出することができる。 According to the first embodiment described above, a document including a plurality of characters C is acquired, and the input characters are identified by “B” and “B” for identifying a character string (unique expression) that can be associated with a hyperlink. The classifier MDL that has been trained to classify it into any one of an I, an “L” tag, and an “O” tag for identifying other characters is used to determine the character C included in the acquired document. Based on the maximum likelihood tag vector obtained by inputting, a character string that can be associated with a hyperlink is extracted from a document. Can be extracted with high accuracy.
一般的に、文書に含まれる文字を「B」「I」「L」「O」「U」などのタグに分類する場合、予め設計者が定めた条件式(辞書)に従って、一文字一文字を厳密にタグ付けしている。このような場合、設計者が当初想定していなかった新しい言葉などが普及しても、その言葉が既存の条件式を満たさなければ、タグ付けが実施できないことがあった。 Generally, when characters included in a document are classified into tags such as “B”, “I”, “L”, “O”, and “U”, each character is strictly determined according to a conditional expression (dictionary) predetermined by a designer. Tagged. In such a case, even if a new word or the like that was not originally assumed by the designer becomes popular, tagging may not be performed unless the word satisfies the existing conditional expression.
これに対して、本実施形態では、予め設計者が定めた条件式など基にしてタグ付けがなされた文字を教師データ136として、ニューラルネットワークをベースとした分類器MDLを学習させるため、予め決められた条件を汎化させることができる。この結果、予め決められた条件を満たさない文字についても、「B」「I」「L」「O」「U」などのタグに分類することができる。
On the other hand, in the present embodiment, a character that has been tagged based on a conditional expression or the like determined in advance by the designer is used as the
また、上述した第1実施形態によれば、トークナイズされておらず、句点、読点、終止符、カンマ、疑問符、感嘆符、省略符、括弧、記号、スペース、改行などが含まれる文書を教師データ136とするため、例えば、通常、文章の終わりを表す句点が含まれる文字列(例えば、「○○アイドル。」のような文字列)や、「頑張ろう、○○。」のようなスローガンやキャッチフレーズなどの単語ではない文字列が、新語や造語として新たに流行した場合であっても、この文字列を、ハイパーリンクを対応付けることが可能な文字列として文書から抽出することができる。 Further, according to the first embodiment described above, a document that is not tokenized and includes a period, a reading point, a terminator, a comma, a question mark, an exclamation point, an abbreviation, parentheses, a symbol, a space, a line feed, and the like is converted to a teacher data. For example, a character string including a period indicating the end of a sentence (for example, a character string such as "Idol."), A slogan such as "Let's do our best, OO." Even if a character string that is not a word, such as a catchphrase, is newly popular as a new word or coined word, this character string can be extracted from the document as a character string that can be associated with a hyperlink.
また、上述した第1実施形態によれば、分類器MDLにBiLSTMレイヤ310が含まれるため、入力された文字の並び順を考慮した上で、最も尤度が大きいタグの組み合わせを決定することができる。
According to the first embodiment described above, since the
また、上述した第1実施形態によれば、分類器MDLにアテンション機構330が含まれるため、前段のBiLSTMレイヤ310によって出力された特徴ベクトル(タグスコアベクトル)hを、入力された文字列における各文字の位置(順番)に応じて重み付けることができ、その結果、その特徴ベクトルに含まれる各要素の値を、タグの尤度に変換することができる。
Also, according to the first embodiment described above, since the
また、上述した第1実施形態によれば、分類器MDLにCRFレイヤ400が含まれるため、尤度が大きいタグの組み合わせが存在しても、その組み合わせが「O」「L」「O」のような組み合わせで、存在し得る蓋然性が低いタグの組み合わせである場合には、その組み合わせの尤度を低下させる。この結果、関連するコンテンツに対応付けることが可能な文字列を文書から、更に精度よく抽出することができる。
According to the first embodiment described above, since the
<第2実施形態>
以下、第2実施形態について説明する。第2実施形態では、分類器MDLに含まれる埋め込みレイヤ200が、ある言語モデルMDL2を利用して事前学習されている点で上述した第1実施形態と相違する。以下、第1実施形態との相違点を中心に説明し、第1実施形態と共通する点については説明を省略する。なお、第2実施形態の説明において、第1実施形態と同じ部分については同一符号を付して説明する。
<Second embodiment>
Hereinafter, the second embodiment will be described. The second embodiment differs from the first embodiment in that the embedding
図10は、言語モデルMDL2の一例を示す図である。言語モデルMDL2は、例えば、エンコーダ500と、デコーダ600とを含む。エンコーダ500は、入力された文字を、文字ベクトルに変換するニューラルネットワークであり、デコーダ600は、エンコーダ500によって文字から変換された文字ベクトルを、元の文字に逆変換するニューラルネットワークである。エンコーダ500は、例えば、埋め込みレイヤ200と、第1LSTM510と、第2LSTM520とを含む。
FIG. 10 is a diagram illustrating an example of the language model MDL2. The language model MDL2 includes, for example, an
言語モデルMDL2は、ある文字Ckが入力されたときに、その入力された文字Ckの次にくる文字Ck+1を予測するように学習される。例えば、図示のように、文字C1から文字C6までのある文字列が言語モデルMDL2に入力された場合、学習部118は、文字C1を入力として、その文字C1に隣り合う次の文字CXを言語モデルMDL2に予測させる。学習部118は、言語モデルMDL2によって予測された文字CXが、文字C1の次にくる文字C2でない場合、少なくともエンコーダ500の重みやバイアス成分などのパラメータを再決定する。次に、学習部118は、文字C3を入力として、その文字C3に隣り合う次の文字CXを言語モデルMDL2に予測させる。学習部118は、言語モデルMDL2によって予測された文字CXが、文字C3の次にくる文字C4でない場合、少なくともエンコーダ500の重みやバイアス成分などのパラメータを再決定する。このように、学習部118は、入力データだけで言語モデルMDL2のパラメータを学習する教師なし学習を行う。
Language model MDL2, when a character C k is input, is trained to predict the letter C k + 1 that follows the letter C k which is the input. For example, as shown, if a character string from the character C 1 to letter C 6 is input to the language model MDL2, learning
言語モデルMDL2を学習させた結果、言語モデルMDL2が入力された文字Ckの次に来る文字Ck+1を一定の精度で予測できるようになった場合、言語モデルMDL2のエンコーダ500に含まれる埋め込みレイヤ200を取り出して、分類器MDLの埋め込みレイヤ200とする。
Result of the learned language model MDL2, when enabled to predict the letter C k + 1 that follows the letter C k language model MDL2 is input at a constant accuracy, the embedded layer included in the
以上説明した第2実施形態によれば、分類器MDLに含まれる埋め込みレイヤ200を、言語モデルMDL2を利用して事前学習することで、分類器MDLがより適切な文字ベクトルを生成することができる。
According to the second embodiment described above, the pre-learning of the embedding
<第3実施形態>
以下、第3実施形態について説明する。第3実施形態では、文字列抽出部114によって抽出された一以上の文字列から、特定の文字列を除去する点で上述した第1または第2実施形態と相違する。以下、第1または第2実施形態との相違点を中心に説明し、第1または第2実施形態と共通する点については説明を省略する。なお、第3実施形態の説明において、第1または第2実施形態と同じ部分については同一符号を付して説明する。
<Third embodiment>
Hereinafter, a third embodiment will be described. The third embodiment differs from the first or second embodiment in that a specific character string is removed from one or more character strings extracted by the character
図11は、第3実施形態における情報処理装置100Aの構成の一例を示す図である。図示のように、第3実施形態における情報処理装置100Aの制御部110Aは、上述した取得部112、文字列抽出部114、通信制御部116、および学習部118に加えて、更に、特定文字列除去部120を備える。
FIG. 11 is a diagram illustrating an example of a configuration of an
特定文字列除去部120は、文字列抽出部114によって抽出された一以上の文字列から、特定の文字列を除去する。特定の文字列とは、例えば、公序良俗に反するような不適切な文字列や、ネガティブな意味をもつ文字列、放送禁止用語に相当する文字列などを含む。
The specific character
通信制御部116は、文字列抽出部114によって抽出され、その後、特定文字列除去部120によって除去されずに残った文字列を含む文字列情報を、サービス提供装置20に送信する。
The
以上説明した第3実施形態によれば、「B」タグが付与された文字Cからはじまり、「L」タグが付与された文字Cで終わる一以上の文字列の中から特定の文字列を除去するため、より適切なコンテンツへのハイパーリンクを文字列に対応付けることができる。 According to the third embodiment described above, a specific character string is removed from one or more character strings beginning with the character C with the “B” tag and ending with the character C with the “L” tag. Therefore, a hyperlink to more appropriate content can be associated with a character string.
<ハードウェア構成>
上述した実施形態の情報処理装置100は、例えば、図12に示すようなハードウェア構成により実現される。図12は、実施形態の情報処理装置100および100Aのハードウェア構成の一例を示す図である。
<Hardware configuration>
The
情報処理装置100および100Aは、NIC100−1、CPU100−2、RAM100−3、ROM100−4、フラッシュメモリやHDDなどの二次記憶装置100−5、およびドライブ装置100−6が、内部バスあるいは専用通信線によって相互に接続された構成となっている。ドライブ装置100−6には、光ディスクなどの可搬型記憶媒体が装着される。二次記憶装置100−5、またはドライブ装置100−6に装着された可搬型記憶媒体に格納されたプログラムがDMAコントローラ(不図示)などによってRAM100−3に展開され、CPU100−2によって実行されることで、制御部110および110Aが実現される。制御部110および110Aが参照するプログラムは、ネットワークNWを介して他の装置からダウンロードされてもよい。
The
以上、本発明を実施するための形態について実施形態を用いて説明したが、本発明はこうした実施形態に何ら限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々の変形及び置換を加えることができる。 As described above, the embodiments for carrying out the present invention have been described using the embodiments. However, the present invention is not limited to such embodiments, and various modifications and substitutions may be made without departing from the spirit of the present invention. Can be added.
1…情報処理システム、10…端末装置、20…サービス提供装置、100、100A…情報処理装置、102…通信部、110、110A…制御部、112…取得部、114…文字列抽出部、116…通信制御部、118…学習部、120…特定文字列除去部、130…記憶部
Claims (9)
入力された文字を、予め決められた条件を満たす文字列に含まれる第1文字か、前記文字列に含まれない第2文字かに分類するように学習された分類器に対して、前記文書に含まれる文字を入力して得られた前記分類器の出力結果に基づいて、前記文書から前記文字列を抽出する抽出部と、
を備える情報処理装置。 An acquisition unit for acquiring a document including a plurality of characters;
A classifier that has been trained to classify the input character into a first character included in a character string satisfying a predetermined condition or a second character not included in the character string is sent to the classifier. An extraction unit that extracts the character string from the document based on an output result of the classifier obtained by inputting a character included in,
An information processing apparatus comprising:
前記抽出部は、前記分類器により出力された前記第1指標値および前記第2指標値に基づいて、前記文書から前記文字列を抽出する、
請求項1に記載の情報処理装置。 The classifier outputs a first index value representing the likelihood that the input character is the first character, and a second index value representing the likelihood of being the second character,
The extraction unit extracts the character string from the document based on the first index value and the second index value output by the classifier.
The information processing device according to claim 1.
前記分類器は、前記第3文字、前記第4文字、および第5文字のそれぞれの前記第1指標値を出力し、
前記抽出部は、前記分類器により出力された前記第3文字、前記第4文字、および第5文字のそれぞれの前記第1指標値と、前記第2文字の前記第2指標値とに基づいて、前記文書から前記文字列を抽出する、
請求項2に記載の情報処理装置。 The first character includes a third character that appears first, a fourth character that appears last, and a fifth character that appears between the third character and the fourth character in the character string. And
The classifier outputs the first index value of each of the third character, the fourth character, and the fifth character,
The extraction unit is configured to output the first index value of each of the third character, the fourth character, and the fifth character output by the classifier, and the second index value of the second character. Extracting the character string from the document;
The information processing device according to claim 2.
請求項1に記載の情報処理装置。 The classifier includes a bidirectional recursive neural network that predicts a character that appears after an input character and predicts a character that appears before an input character.
The information processing device according to claim 1.
前記分類器には、更に、前記再帰型ニューラルネットワークによって文字ごとに出力された各特徴量に重みを乗算するアテンション機構が含まれる、
請求項4に記載の情報処理装置。 The recursive neural network outputs a feature amount for each of the input characters,
The classifier further includes an attention mechanism for multiplying each feature amount output for each character by the recursive neural network by a weight,
The information processing device according to claim 4.
請求項5に記載の情報処理装置。 The attention mechanism multiplies, as the weight, a characteristic amount of the target character by a ratio obtained by dividing the characteristic amount of the target character by the characteristic amount of all characters.
The information processing device according to claim 5.
請求項1から6のうちいずれか一項に記載の情報処理装置。 The extracting unit extracts the character string from the document based on an output result of the classifier and a conditional random field conditioned on a probability that at least the first character and the second character are adjacent to each other in the document. Extract,
The information processing apparatus according to claim 1.
複数の文字が含まれる文書を取得し、
入力された文字を、予め決められた条件を満たす文字列に含まれる第1文字か、前記文字列に含まれない第2文字かに分類するように学習された分類器に対して、前記文書に含まれる文字を入力して得られた前記分類器の出力結果に基づいて、前記文書から前記文字列を抽出する、
情報処理方法。 Computer
Retrieve a document that contains multiple characters,
A classifier that has been trained to classify the input character into a first character included in a character string satisfying a predetermined condition or a second character not included in the character string is sent to the classifier. Extracting the character string from the document based on an output result of the classifier obtained by inputting a character included in,
Information processing method.
複数の文字が含まれる文書を取得する処理と、
入力された文字を、予め決められた条件を満たす文字列に含まれる第1文字か、前記文字列に含まれない第2文字かに分類するように学習された分類器に対して、前記文書に含まれる文字を入力して得られた前記分類器の出力結果に基づいて、前記文書から前記文字列を抽出する処理と、
を実行させるためのプログラム。 On the computer,
Processing to retrieve a document containing multiple characters;
A classifier that has been trained to classify the input character into a first character included in a character string satisfying a predetermined condition or a second character not included in the character string is sent to the classifier. A process of extracting the character string from the document based on an output result of the classifier obtained by inputting a character included in,
A program for executing
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018173193A JP7043373B2 (en) | 2018-09-18 | 2018-09-18 | Information processing equipment, information processing methods, and programs |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018173193A JP7043373B2 (en) | 2018-09-18 | 2018-09-18 | Information processing equipment, information processing methods, and programs |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2020046792A true JP2020046792A (en) | 2020-03-26 |
JP7043373B2 JP7043373B2 (en) | 2022-03-29 |
Family
ID=69901332
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018173193A Active JP7043373B2 (en) | 2018-09-18 | 2018-09-18 | Information processing equipment, information processing methods, and programs |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7043373B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113377884A (en) * | 2021-07-08 | 2021-09-10 | 中央财经大学 | Event corpus purification method based on multi-agent reinforcement learning |
JP2022019422A (en) * | 2020-07-17 | 2022-01-27 | 日本電信電話株式会社 | Learning device, inference device, learning method, inference method and program |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009026195A (en) * | 2007-07-23 | 2009-02-05 | Yokohama National Univ | Article classification apparatus, article classification method and program |
JP2018513399A (en) * | 2015-11-25 | 2018-05-24 | バイドゥ ユーエスエー エルエルシーBaidu USA LLC | Deployed end-to-end speech recognition |
-
2018
- 2018-09-18 JP JP2018173193A patent/JP7043373B2/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009026195A (en) * | 2007-07-23 | 2009-02-05 | Yokohama National Univ | Article classification apparatus, article classification method and program |
JP2018513399A (en) * | 2015-11-25 | 2018-05-24 | バイドゥ ユーエスエー エルエルシーBaidu USA LLC | Deployed end-to-end speech recognition |
Non-Patent Citations (1)
Title |
---|
浅原 正幸 その他: "学習器の組み合わせによる中国語わかち書きシステム", 言語処理学会第12回年次大会(NLP2006) 発表論文集, vol. D3-2, JPN6021034338, 13 March 2006 (2006-03-13), JP, pages 532 - 535, ISSN: 0004587597 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2022019422A (en) * | 2020-07-17 | 2022-01-27 | 日本電信電話株式会社 | Learning device, inference device, learning method, inference method and program |
JP7340199B2 (en) | 2020-07-17 | 2023-09-07 | 日本電信電話株式会社 | Learning device, reasoning device, learning method, reasoning method and program |
CN113377884A (en) * | 2021-07-08 | 2021-09-10 | 中央财经大学 | Event corpus purification method based on multi-agent reinforcement learning |
Also Published As
Publication number | Publication date |
---|---|
JP7043373B2 (en) | 2022-03-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10685050B2 (en) | Generating a topic-based summary of textual content | |
US11501182B2 (en) | Method and apparatus for generating model | |
CN110852087B (en) | Chinese error correction method and device, storage medium and electronic device | |
WO2019153737A1 (en) | Comment assessing method, device, equipment and storage medium | |
Kumar et al. | Automating reading comprehension by generating question and answer pairs | |
CN113591483A (en) | Document-level event argument extraction method based on sequence labeling | |
JP2019504413A (en) | System and method for proposing emoji | |
CN109086265B (en) | Semantic training method and multi-semantic word disambiguation method in short text | |
CN113128227A (en) | Entity extraction method and device | |
Arumugam et al. | Hands-On Natural Language Processing with Python: A practical guide to applying deep learning architectures to your NLP applications | |
CN112188312B (en) | Method and device for determining video material of news | |
CN110390110B (en) | Method and apparatus for pre-training generation of sentence vectors for semantic matching | |
Son et al. | Causal explanation analysis on social media | |
CN112667782A (en) | Text classification method, device, equipment and storage medium | |
CN111414561A (en) | Method and apparatus for presenting information | |
CN113704416A (en) | Word sense disambiguation method and device, electronic equipment and computer-readable storage medium | |
Jain et al. | “UTTAM” An Efficient Spelling Correction System for Hindi Language Based on Supervised Learning | |
CN114218945A (en) | Entity identification method, device, server and storage medium | |
JP7043373B2 (en) | Information processing equipment, information processing methods, and programs | |
CN110852071A (en) | Knowledge point detection method, device, equipment and readable storage medium | |
KR102552811B1 (en) | System for providing cloud based grammar checker service | |
CN110377753A (en) | Relation extraction method and device based on relationship trigger word Yu GRU model | |
CN114722832A (en) | Abstract extraction method, device, equipment and storage medium | |
Kamath et al. | Sarcasm detection approaches survey | |
CN112580365A (en) | Chapter analysis method, electronic device and storage device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20191101 |
|
RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20191108 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200915 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20210810 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20210907 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20211108 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20220222 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220316 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7043373 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |