JP2020071668A - Summary generation method and summary generation program - Google Patents
Summary generation method and summary generation program Download PDFInfo
- Publication number
- JP2020071668A JP2020071668A JP2018205125A JP2018205125A JP2020071668A JP 2020071668 A JP2020071668 A JP 2020071668A JP 2018205125 A JP2018205125 A JP 2018205125A JP 2018205125 A JP2018205125 A JP 2018205125A JP 2020071668 A JP2020071668 A JP 2020071668A
- Authority
- JP
- Japan
- Prior art keywords
- sentence
- input
- character string
- expression
- word
- 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
- 238000000034 method Methods 0.000 title claims abstract description 76
- 230000014509 gene expression Effects 0.000 claims abstract description 221
- 238000012545 processing Methods 0.000 claims abstract description 34
- 230000008569 process Effects 0.000 claims description 50
- 238000001514 detection method Methods 0.000 description 29
- XZORQADPEUSNQJ-UHFFFAOYSA-N 2-(3-piperidin-4-yloxy-1-benzothiophen-2-yl)-5-[(1,3,5-trimethylpyrazol-4-yl)methyl]-1,3,4-oxadiazole Chemical compound CC1=NN(C)C(C)=C1CC1=NN=C(C2=C(C3=CC=CC=C3S2)OC2CCNCC2)O1 XZORQADPEUSNQJ-UHFFFAOYSA-N 0.000 description 20
- 238000010586 diagram Methods 0.000 description 20
- 230000006870 function Effects 0.000 description 19
- 238000000605 extraction Methods 0.000 description 15
- 238000010801 machine learning Methods 0.000 description 13
- 238000004364 calculation method Methods 0.000 description 10
- 230000002265 prevention Effects 0.000 description 8
- 238000013500 data storage Methods 0.000 description 6
- 238000013528 artificial neural network Methods 0.000 description 5
- 239000000284 extract Substances 0.000 description 3
- 230000007704 transition Effects 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000002372 labelling Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000000877 morphologic effect Effects 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 238000007781 pre-processing Methods 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000008450 motivation Effects 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 238000012946 outsourcing Methods 0.000 description 1
- 230000000306 recurrent effect Effects 0.000 description 1
- 238000012552 review Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001502 supplementing effect Effects 0.000 description 1
- 210000000225 synapse Anatomy 0.000 description 1
Images
Landscapes
- Machine Translation (AREA)
- Document Processing Apparatus (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本発明は、要約生成方法及び要約生成プログラムに関する。 The present invention relates to a summary generation method and a summary generation program.
新聞やWebサイト、電光掲示板などの文書から要約文を生成する自動要約にニューラルネットワークなどの機械学習が利用されることがある。例えば、入力文をベクトル化するRNN(Recurrent Neural Networks)エンコーダと、入力文のベクトルを参照して要約文の単語の生成を繰り返すRNNデコーダとが接続されたモデルが要約文の生成に用いられる。 Machine learning such as a neural network may be used for automatic summarization for generating a summary from a document such as a newspaper, a website, or an electronic bulletin board. For example, a model in which an RNN (Recurrent Neural Networks) encoder that vectorizes an input sentence and an RNN decoder that repeats the generation of the words of the abstract sentence by referring to the vector of the input sentence is connected is used for generating the abstract sentence.
しかしながら、上記の技術では、モデルの辞書の語彙が学習データに出現する単語に限定されるので、モデルの辞書にない未知語は要約文の単語として生成できないという限界がある。 However, in the above technique, the vocabulary of the model dictionary is limited to the words that appear in the learning data, so there is a limit that unknown words that are not in the model dictionary cannot be generated as the words of the summary sentence.
1つの側面では、本発明は、モデルの辞書にない未知語を含めて要約文を生成できる要約生成方法及び要約生成プログラムを提供することを目的とする。 In one aspect, it is an object of the present invention to provide a summary generation method and a summary generation program that can generate a summary sentence including unknown words that are not in the model dictionary.
一態様の要約生成方法では、入力文および前記入力文が入力されたモデルが出力する要約文の間で共通の単語を含む固有表現が存在する場合、前記要約文のうち前記共通の単語を含む第1の固有表現の文字列を、前記入力文のうち前記共通の単語を含む第2の固有表現の文字列に置換する、処理をコンピュータが実行する。 In the summary generation method according to one aspect, when a specific expression including a common word exists between an input sentence and a summary sentence output by a model to which the input sentence is input, the common word is included in the summary sentence. The computer executes a process of replacing the character string of the first proper expression with the character string of the second proper expression including the common word in the input sentence.
モデルの辞書にない未知語を含めて要約文を生成できる。 It is possible to generate summary sentences including unknown words that are not in the model dictionary.
以下に添付図面を参照して本願に係る要約生成方法及び要約生成プログラムについて説明する。なお、この実施例は開示の技術を限定するものではない。そして、各実施例は、処理内容を矛盾させない範囲で適宜組み合わせることが可能である。 A summary generation method and a summary generation program according to the present application will be described below with reference to the accompanying drawings. Note that this embodiment does not limit the disclosed technology. Then, the respective embodiments can be appropriately combined within the range in which the processing contents do not contradict each other.
[システム構成]
図1は、実施例1に係るシステムに含まれる各装置の機能的構成を示すブロック図である。図1に示すシステム1では、学習用入力文および正解要約文を含む学習データを用いてモデルの機械学習を行う機械学習サービス、並びに、学習済みモデルを用いて入力文から要約文を生成する要約生成サービスが提供される。
[System configuration]
FIG. 1 is a block diagram illustrating the functional configuration of each device included in the system according to the first embodiment. In the
図1に示すように、システム1には、学習装置10と、生成装置30とが含まれる。学習装置10で学習したモデルを受け取って、生成装置30は、与えられたデータに対して、結果を生成する。
As shown in FIG. 1, the
学習装置10は、上記の機械学習サービスを提供するコンピュータの一例に対応する。別の計算機に学習装置10と生成装置30を配置する際は、ネットワーク通信を介して、モデルを渡す。
The
一実施形態として、学習装置10は、パッケージソフトウェアやオンラインソフトウェアとして上記の機械学習サービスを実現する学習プログラムを任意のコンピュータにインストールさせることによって実装できる。このようにインストールされた学習プログラムをコンピュータに実行させることにより、コンピュータを学習装置10として機能させることができる。
As an embodiment, the
あくまで一例として、学習装置10は、生成装置30をクライアントとして収容し、当該クライアントに上記の機械学習サービスを提供するサーバ装置として実装することができる。この場合、学習装置10は、上記の機械学習サービスを提供するサーバとしてオンプレミスに実装することとしてもよいし、上記の機械学習サービスをアウトソーシングで提供するクラウドとして実装することとしてもかまわない。
By way of example only, the
例えば、学習装置10は、複数の学習サンプルを含む学習データ、または、学習データをネットワークもしくは記憶メディアを介して呼び出すことができる識別情報を入力とし、モデルの学習結果を生成装置30へ出力する。このとき、学習装置10は、一例として、RNNエンコーダ及びRNNデコーダが接続されたニューラルネットワークのモデルのパラメータを提供することができる。この他、学習装置10は、学習済みモデルを用いて実現される要約文の生成が機能として組み込まれたアプリケーションプログラムを提供することもできる。例えば、新聞や電光掲示板、Webサイトなどの各種の記事の原文から記事の見出しを要約文として生成したり、あるいは記事の原文から速報の記事を要約文として生成したりするアプリケーションプログラムを提供することができる。
For example, the
この他、上記の機械学習サービスの提供形態は、あくまで一例に過ぎず、上記に挙げる例以外の提供形態で機械学習サービスが提供されることを妨げない。例えば、上記の機械学習サービスを実現する学習プログラムそのものをパッケージソフトウェアやオンラインソフトウェアとして提供することとしてもよいし、上記の学習プログラムが導入されたコンピュータを提供することとしてもかまわない。 In addition, the above-described machine learning service providing form is merely an example, and the machine learning service may be provided in a form other than the above-described examples. For example, the learning program itself for realizing the above machine learning service may be provided as package software or online software, or a computer in which the above learning program is introduced may be provided.
生成装置30は、上記の要約生成サービスを提供するコンピュータの一例に対応する。 The generation device 30 corresponds to an example of a computer that provides the above summary generation service.
一実施形態として、生成装置30は、パッケージソフトウェアやオンラインソフトウェアとして上記の要約生成サービスを実現する要約生成プログラムを任意のコンピュータにインストールさせることによって実装できる。このようにインストールされた要約生成プログラムをコンピュータに実行させることにより、コンピュータを生成装置30として機能させることができる。 As one embodiment, the generation device 30 can be implemented by installing a digest generation program that realizes the digest generation service described above as package software or online software in an arbitrary computer. The computer can be caused to function as the generation device 30 by causing the computer to execute the installed abstract generation program.
あくまで一例として、上記の要約生成サービスは、新聞や電光掲示板、Webサイトなどの各種のメディアを運営するメディア事業者向けに提供されるWebサービスのツールの1つ、例えば「記事要約ツール」として提供することができる。この場合、上記のWebサービスとして提供される機能のうち、原文の入力や要約文の表示等のフロントエンドの機能が記者や編集者等の端末装置に実装されると共に、要約文の生成などのバックエンドの機能が生成装置30に実装されることとしてもかまわない。 As just one example, the above-described summary generation service is provided as one of the web service tools provided to media companies operating various media such as newspapers, electronic bulletin boards, and websites, for example, as an "article summary tool". can do. In this case, among the functions provided as the Web service, front-end functions such as inputting an original sentence and displaying a summary sentence are installed in a terminal device such as a reporter or an editor, and generate a summary sentence. The back-end function may be installed in the generation device 30.
[記事要約ツールのユースケースの一例]
図2は、記事要約ツールのユースケースの一例を示す図である。図2には、メディア事業者の関係者により使用される端末装置に表示される記事要約画面20の遷移の一例が示されている。
[Example of use case of article summarization tool]
FIG. 2 is a diagram showing an example of a use case of the article summarizing tool. FIG. 2 shows an example of transition of the
図2の上段には、各種の項目に対する入力が設定されていない初期状態の記事要約画面20が示されている。例えば、記事要約画面20には、原文入力エリア21、要約表示エリア22、プルダウンメニュー23、要約ボタン24、クリアボタン25などのGUI(Graphical User Interface)コンポーネントが含まれる。このうち、原文入力エリア21は、記事等の原文を入力するエリアに対応する。また、要約表示エリア22は、原文入力エリア21に入力された原文に対応する要約文を表示するエリアに対応する。また、プルダウンメニュー23は、要約文の上限文字数を指定するGUIコンポーネントの一例に対応する。また、要約ボタン24は、原文入力エリア21に入力された原文に対応する要約文を生成するコマンドの実行を受け付けるGUIコンポーネントの一例に対応する。また、クリアボタン25は、原文入力エリア21に入力された原文のテキストをクリアするGUIコンポーネントの一例に対応する。
In the upper part of FIG. 2, an
図2に示すように、記事要約画面20の原文入力エリア21では、図示しないキーボード等の入力デバイスを介してテキストの入力を受け付けることができる。このように入力デバイスを介してテキストの入力を受け付ける他、原文入力エリア21では、ワープロソフトなどのアプリケーションにより作成された文書のファイルからテキストをインポートすることができる。
As shown in FIG. 2, in the original
このように原文入力エリア21に原文のテキストが入力されることにより、記事要約画面20は、図2の上段に示された状態から図2の中段に示された状態へ遷移する(ステップS1)。例えば、原文入力エリア21に原文のテキストが入力された場合、要約ボタン24に対する操作を介して要約文を生成するコマンドの実行を受け付けることができる。また、クリアボタン25に対する操作を介して原文入力エリア21に入力されたテキストをクリアすることもできる。この他、プルダウンメニュー23を介して、複数の上限文字数の中からメディア事業者の関係者が希望する上限文字数の指定を受け付けることもできる。ここでは、新聞やニュースの記事の原文から電光掲示板の速報を要約文として生成する場面の一例として、電光掲示板に表示可能な上限文字数の一例に対応する80文字が指定された例が示されている。これはあくまで一例であり、新聞やWebサイトの記事から見出しを生成する場合、見出しに対応する上限文字数を選択することができる。
By inputting the original text in the original
そして、原文入力エリア21に原文のテキストが入力された状態で要約ボタン24に対する操作が行われた場合、記事要約画面20は、図2の中段に示された状態から図2の下段に示された状態へ遷移する(ステップS2)。この場合、原文入力エリア21に入力された原文のテキストが入力文として学習済みモデルに入力されることによりその要約文が生成される。この要約文の生成は、メディア事業者の関係者の端末装置上で実行されることとしてもよいし、あるいはバックエンドのサーバ装置で実行されることとしてもかまわない。この結果、図2の下段に示すように、記事要約画面20の要約表示エリア22には、学習済みモデルにより生成された要約文が表示される。
Then, when the
このように記事要約画面20の要約表示エリア22に表示された要約文のテキストには、図示しない入力デバイス等を介して編集を行うことができる。
As described above, the text of the summary sentence displayed in the
以上のような記事要約ツールが提供されることで、記者や編集者等により行われる記事要約の作業を軽減することが可能になる。例えば、記事要約の作業は、メディアにニュースを配信するプロセス、例えば「配信記事の選定」や「メディア編集システムへの送信」、「記事要約」、「見出し作成」、「校閲」などの中でも相対的に労力が大きいという側面がある。例えば、記事要約が人手により行われる場合、記事の全体から重要な情報を選別し、文章を再構成するといった作業が必要となる。このことから、記事要約の作業が自動化または半自動化される技術的意義は高い。 By providing the article summarization tool as described above, it becomes possible to reduce the work of article summarization performed by a reporter, an editor, or the like. For example, the work of summarizing articles is a relative process in the process of distributing news to the media, such as "selecting distribution articles", "sending to media editing system", "summary of articles", "creation of headlines", and "review". There is an aspect that the labor is large. For example, when the article summarization is performed manually, it is necessary to select important information from the entire article and reconstruct the sentence. From this, the technical significance that the work of article summarization is automated or semi-automated is high.
なお、ここでは、あくまで一例として、メディア事業者の関係者により記事要約ツールが利用されるユースケースを例に挙げたが、メディア事業者から記事の配信を受ける視聴者により記事要約ツールが利用されることとしてもかまわない。例えば、スマートスピーカ等で記事の全文を読み上げる代わりに要約文を読み上げる機能として記事要約ツールを利用することができる。 In addition, here, as an example, the use case in which the article summarization tool is used by a person involved in the media business is taken as an example, but the article summarization tool is used by the viewer who receives the article distribution from the media business. It doesn't matter. For example, an article summarization tool can be used as a function of reading out the summary text instead of reading out the entire text of the article using a smart speaker or the like.
また、ここでは、あくまで一例として、生成装置30が上記の要約生成サービスを提供するコンピュータとして実装される例を挙げたが、これに限定されない。例えば、上記の学習済みモデルが組み込まれた要約生成プログラムが任意のコンピュータ、例えば記者や編集者等の端末装置で実行されるスタンドアローンのアプリケーションプログラムとして実装されることとしてもよい。 Further, here, as an example, the generation device 30 is implemented as a computer that provides the above-described summary generation service, but the present invention is not limited to this. For example, the above-described learned model-embedded abstract generation program may be implemented as a stand-alone application program that is executed by an arbitrary computer, for example, a terminal device such as a reporter or an editor.
さらに、ここでは、上記の機械学習サービス及び上記の要約生成サービスが異なる事業主体で実行される例を挙げたが、これら2つのサービスが同一の事業者により提供されることとしてもかまわない。この場合、上記の学習プログラム及び上記の要約生成プログラムが同一のコンピュータもしくはコンピュータシステムにより実行されることとしてもかまわない。 Furthermore, here, the example in which the machine learning service and the summary generation service are executed by different business entities has been described, but these two services may be provided by the same business operator. In this case, the learning program and the abstract generating program may be executed by the same computer or computer system.
[課題の一側面]
上記の背景技術の欄でも説明した通り、モデルの辞書の語彙が学習データに出現する単語に限定されるので、モデルの辞書にない未知語は要約文の単語として生成できないという限界がある。
[One aspect of the issue]
As described in the background art section above, the vocabulary of the model dictionary is limited to the words that appear in the learning data, so there is a limit that unknown words that are not in the model dictionary cannot be generated as words of the summary sentence.
[課題解決のアプローチの一側面]
そこで、本実施例に係る生成装置30は、モデルの辞書にない未知語を入力文に出現する固有表現で補うアプローチを採用する。すなわち、モデルの機械学習には、コーパスが学習データとして利用される場合があるが、語彙数が膨大なコーパスであっても固有名詞を始め、時間表現や数量、パーセンテージなどの数値表現を含む固有表現(Named Entity)を網羅するのは困難である。このように、モデルの未知語を低減する側面から学習サンプルを増やすのは困難である一方で、視点を変えれば、未知語の大半は、固有表現である可能性が高いとみなすことができる。
[One aspect of approach to problem solving]
Therefore, the generation device 30 according to the present embodiment adopts an approach of compensating an unknown word that is not in the model dictionary with a proper expression that appears in the input sentence. In other words, a corpus is sometimes used as learning data for machine learning of a model, but even a corpus with a large number of vocabularies includes proper nouns and unique expressions that include numerical expressions such as time expressions, numbers, and percentages. It is difficult to cover expressions (Named Entity). As described above, while it is difficult to increase the number of learning samples from the aspect of reducing unknown words in the model, it can be considered that most of the unknown words are likely to be proper expressions if the viewpoint is changed.
このことから、モデルの辞書にない未知語を入力文に出現する固有表現で補うという動機付けの下、入力文および要約文の間で共通の単語を含む固有表現が存在する場合、要約文の固有表現の文字列を入力文の固有表現の文字列に置換する。以下、要約文のうち共通の単語を含む固有表現のことを「第1の固有表現」と記載すると共に、入力文のうち共通の単語を含む固有表現のことを「第2の固有表現」と記載する場合がある。 From this, under the motivation of supplementing unknown words that are not in the model dictionary with the proper expressions that appear in the input sentence, if there is a proper expression that includes a common word between the input sentence and the summary sentence, Replace the unique expression string with the unique string of the input sentence. Hereinafter, a proper expression including a common word in the summary sentence will be referred to as a “first proper expression”, and a proper expression including a common word in the input sentence will be referred to as a “second proper expression”. May be listed.
図3は、固有表現の置換方法の一例を示す図である。図3には、入力文40Gが学習済みモデルに入力されることにより要約文40Yが生成された例が示されている。図3に示すように、入力文40Gおよび要約文40Yから固有表現が抽出される。
FIG. 3 is a diagram showing an example of a method of replacing a unique expression. FIG. 3 shows an example in which the
このように固有表現が抽出された後、固有表現の置換対象が入力文および要約文の間で共通の単語を含む固有表現に絞り込まれる。例えば、要約文40Yの該当部分を太字で示す通り、要約文40Yからは、共通の単語「吉田」を含む固有表現「吉田ゴム」が第1の固有表現として絞り込まれる。一方、入力文40Gの該当部分を太字で示す通り、共通の単語「吉田」を含む固有表現「吉田○○」が第2の固有表現として絞り込まれる。
After the unique expressions are extracted in this way, the replacement target of the unique expressions is narrowed down to the unique expressions that include common words between the input sentence and the summary sentence. For example, as shown in bold in the relevant portion of the
この段階で両者が対応すると見做し、第1の固有表現「吉田ゴム」を第2の固有表現「吉田○○」に置換することもできるが、固有表現の置換には次のような条件を付加することもできる。 At this stage, it can be considered that the two correspond to each other, and the first proper expression "Yoshida Gomu" can be replaced with the second proper expression "Yoshida ○○". Can also be added.
あくまで一例として、人名を例に挙げれば、親子や親戚などの親類が複数名にわたって記事の文中に出現する場合がある。このような場合、共通の単語を含む固有表現であるからといって必ずしも入力文および要約文の間で対応関係にあると限らない。 For example, if a person's name is taken as an example, relatives such as parents, children, and relatives may appear in the text of the article over a plurality of names. In such a case, an input sentence and a summary sentence do not necessarily have a corresponding relationship because they are unique expressions including common words.
このため、要約文40Yおよび入力文40Gの間で固有表現に隣接する文字列が類似することを条件として付加することができる。例えば、修飾部と被修飾部の係り受けは先行する文節から後続する文節へ行われる側面から、固有表現の前に隣接する所定長の文字列の類似度が所定の閾値であることを条件に採用できる。
Therefore, it is possible to add a condition that the character strings adjacent to the specific expression are similar between the
ここで、数値の一例として、固有表現の前に隣接する14文字の類似度が8割以上であるか否かが判定されることとする。図3の要約文41Yおよび入力文40Gに下線が付された通り、「吉田ゴム」および「吉田○○」の固有表現の前に隣接する14文字は、いずれも「同校で防災教室の講師を務めた」である。このように、14文字の中で14文字が一致するので、類似度は10割であり、閾値の8割を超える。
Here, as an example of the numerical value, it is assumed that it is determined whether or not the similarity of 14 characters adjacent to each other before the unique expression is 80% or more. As underlined in the
このことから、要約文40Yの固有表現「吉田ゴム」は、入力文40Gの固有表現「吉田○○」に対応する可能性が高いと推定できる。この場合、要約文40Yの固有表現「吉田ゴム」を含む文字列が、入力文40Gの固有表現「吉田○○」を含む文字列に置換される。すなわち、図3に白黒の反転表示で示された文字列42Y「同校で防災教室の講師を務めた吉田○○」が、図3に斜体字で示された文字列42G「同校で防災教室の講師を務めた吉田○○」に置換される。
From this, it can be estimated that the proper expression "Yoshida Gomu" of the
この結果、学習済みモデルの未知語「○○」の固有表現が入力文40Gを用いて修正された修正要約文43Y「15年11月に同校で防災教室の講師を務めた吉田○○が指摘」が生成される。
As a result, the proper expression of the unknown word "○○" in the learned model was corrected using the
以上のように、本実施例に係る生成装置30によれば、モデルの辞書にない未知語を含めて要約文を生成することが可能になる。 As described above, according to the generation device 30 according to the present embodiment, it becomes possible to generate a summary sentence including an unknown word that is not in the model dictionary.
[学習装置10の構成]
図1に示すように、学習装置10は、学習データ記憶部11と、モデル記憶部12と、入力制御部13と、エンコーダ実行部14と、デコーダ実行部15と、生成部16と、算出部17と、更新部18とを有する。なお、学習装置10は、図1に示す機能部以外にも既知のコンピュータが有する各種の機能部、例えば各種の入力デバイスや音声出力デバイスなどの機能部を有することとしてもかまわない。
[Configuration of learning device 10]
As shown in FIG. 1, the
図1に示す入力制御部13、エンコーダ実行部14、デコーダ実行部15、生成部16、算出部17および更新部18などの機能部は、あくまで例示として、下記のハードウェアプロセッサにより仮想的に実現される。このようなプロセッサの例として、DLU(Deep Learning Unit)を始め、GPGPU(General-Purpose computing on Graphics Processing Units)やGPUクラスタなどが挙げられる。この他、CPU(Central Processing Unit)、MPU(Micro Processing Unit)などが挙げられる。すなわち、プロセッサがRAM(Random Access Memory)等のメモリ上に上記学習プログラムをプロセスとして展開することにより、上記の機能部が仮想的に実現される。ここでは、プロセッサの一例として、DLUやGPGPU、GPUクラスタ、CPU、MPUを例示したが、汎用型および特化型を問わず、任意のプロセッサにより上記の機能部が実現されることとしてもかまわない。この他、上記の機能部は、ASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)などのハードワイヤードロジックによって実現されることを妨げない。
The functional units such as the
また、図1に示す学習データ記憶部11およびモデル記憶部12などの機能部には、HDD(Hard Disk Drive)、光ディスクやSSD(Solid State Drive)などの記憶装置を採用できる。なお、記憶装置は、必ずしも補助記憶装置でなくともよく、各種の半導体メモリ素子、例えばRAM、EPPROMやフラッシュメモリなども採用できる。 A storage device such as an HDD (Hard Disk Drive), an optical disk, or an SSD (Solid State Drive) can be adopted as the functional units such as the learning data storage unit 11 and the model storage unit 12 shown in FIG. The storage device does not necessarily have to be the auxiliary storage device, and various semiconductor memory elements such as RAM, EPPROM, and flash memory can be adopted.
学習データ記憶部11は、学習データを記憶する記憶部である。ここで、学習データには、一例として、D個の学習サンプル、いわゆる学習事例が含まれる。さらに、学習サンプルには、モデル学習に用いる入力文および正解の要約文のペアが含まれる。以下、モデルの学習時および要約文の生成時に入力される入力文のラベルを識別する側面から前者のことを「学習用入力文」と記載する場合がある。さらに、モデルの学習時に正解として参照される要約文および入力文から生成される要約文のラベルを識別する側面から前者のことを「正解要約文」と記載する場合がある。 The learning data storage unit 11 is a storage unit that stores learning data. Here, the learning data includes, for example, D learning samples, so-called learning cases. Further, the learning sample includes a pair of an input sentence used for model learning and a correct summary sentence. Hereinafter, the former may be referred to as a “learning input sentence” from the aspect of identifying the label of the input sentence input at the time of learning the model and generating the summary sentence. Further, the former may be referred to as a “correct answer summary” from the aspect of identifying a label of a summary sentence referred to as a correct answer and a summary sentence generated from an input sentence when learning a model.
モデル記憶部12は、モデルに関する情報を記憶する記憶部である。 The model storage unit 12 is a storage unit that stores information about the model.
一実施形態として、モデル記憶部12には、RNNエンコーダ及びRNNデコーダが接続されたニューラルネットワークのモデルを形成する入力層、隠れ層及び出力層の各層のニューロンやシナプスなどのモデルの層構造を始め、各層の重みやバイアスなどのモデルのパラメータを含むモデル情報が記憶される。ここで、モデル学習が実行される前の段階では、モデル記憶部12には、モデルのパラメータとして、乱数により初期設定されたパラメータが記憶される。また、モデル学習が実行された後の段階では、モデル記憶部12には、学習済みモデルのパラメータが保存される。 As an embodiment, the model storage unit 12 includes a layer structure of models such as neurons and synapses in each layer of an input layer, a hidden layer, and an output layer that form a model of a neural network to which an RNN encoder and an RNN decoder are connected. , Model information including model parameters such as weight and bias of each layer is stored. Here, in the stage before the model learning is executed, the model storage unit 12 stores the parameters initialized by random numbers as the model parameters. Further, at the stage after the model learning is executed, the model storage unit 12 stores the parameters of the learned model.
入力制御部13は、モデルに対する入力を制御する処理部である。
The
一実施形態として、入力制御部13は、モデル学習のリクエストを受け付けた場合に処理を起動する。このように処理が起動されると、入力制御部13は、モデル学習の初期設定を行う。例えば、入力制御部13は、正解要約文の文字数を始め、ユーザに指定された文字数などをモデルが生成する要約文の上限文字数として設定する。
As one embodiment, the
このようにRNNデコーダへ入力する初期値が設定された後、入力制御部13は、学習データに含まれる学習サンプルごとに、RNNエンコーダおよびRNNデコーダが接続されたニューラルネットワークのモデルに対する入力を開始する。
After the initial value to be input to the RNN decoder is set in this way, the
具体的には、入力制御部13は、学習サンプルをカウントするループカウンタdの値を初期化する。続いて、入力制御部13は、学習データ記憶部11に記憶されたD個の学習サンプルのうちループカウンタdに対応する学習サンプルを取得する。その後、入力制御部13は、ループカウンタdをインクリメントし、ループカウンタdの値が学習サンプルの総数Dと等しくなるまで、学習データ記憶部11から学習サンプルを取得する処理を繰り返し実行する。なお、ここでは、学習装置10内部のストレージに保存された学習データを取得する例を挙げたが、ネットワークを介して接続される外部のコンピュータ、例えばファイルサーバの他、リムーバブルメディア等から学習データが取得されることとしてもかまわない。
Specifically, the
このように学習サンプルが取得される度に、入力制御部13は、当該学習サンプルに含まれる学習用入力文をRNNエンコーダへ入力する。これによって、学習用入力文の単語列がベクトル化されたベクトル、いわゆる中間表現がRNNエンコーダからRNNデコーダへ出力される。これと同時または前後して、入力制御部13は、RNNデコーダに文末記号と呼ばれるEOS(End Of Sentence)を出力させるまでの残り文字数を保持するレジスタの値を入力制御部13が設定した上限文字数に初期化する。これ以降のRNNデコーダへの入力、RNNデータからの出力、それを用いたモデルのパラメータの更新についてはその詳細を後述する。
Each time a learning sample is acquired in this way, the
エンコーダ実行部14は、RNNエンコーダを実行する処理部である。
The
一実施形態として、エンコーダ実行部14は、モデル記憶部12に記憶されたモデル情報にしたがって、入力制御部13により入力された学習用入力文の単語数Mに対応するM個のLSTM(Long Short-Term Memory)をワークエリア上に展開する。これによって、M個のLSTMをRNNエンコーダとして機能させる。このRNNエンコーダでは、入力制御部13による入力制御にしたがって、学習用入力文の先頭の単語から順に、学習用入力文の先頭からm番目の単語が当該m番目の単語に対応するLSTMへ入力されると共に、m−1番目の単語に対応するLSTMの出力がm番目の単語に対応するLSTMへ入力される。このような入力を先頭の単語に対応するLSTMから末尾であるM番目の単語に対応するLSTMまで繰り返すことにより、学習用入力文のベクトル、いわゆる中間表現が得られる。このようにRNNエンコーダにより生成された学習用入力文の中間表現がRNNデコーダへ入力される。
As an embodiment, the
デコーダ実行部15は、RNNデコーダを実行する処理部である。
The
一実施形態として、デコーダ実行部15は、モデル記憶部12に記憶されたモデル情報にしたがって、入力制御部13により入力された正解要約文の単語数Nに対応するN個のLSTMをワークエリア上に展開する。これによって、N個のLSTMをRNNデコーダとして機能させる。これらRNNデコーダには、入力制御部13の制御にしたがって、RNNエンコーダから学習用入力文の中間表現が入力されると共に、N個のLSTMごとに入力制御部13からEOSのタグを出力させるまでの残り文字数が入力される。これらの入力にしたがってN個のLSTMを動作させることにより、RNNデコーダは、N個のLSMTごとに単語の確率分布を生成部16へ出力する。ここで言う「単語の確率分布」とは、学習サンプル全体で学習用入力文に出現する単語ごとに算出された確率の分布を指す。
As one embodiment, the
生成部16は、要約文の単語を生成する処理部である。
The
一実施形態として、生成部16は、RNNデコーダのn番目のLSTMから単語の確率分布が出力された場合、当該確率分布で確率が最大である単語を要約文の先頭からn番目の単語として生成する。
As one embodiment, when the probability distribution of words is output from the n-th LSTM of the RNN decoder, the
算出部17は、モデルが生成する単語ごとの損失を算出する処理部である。
The
一実施形態として、算出部17は、生成部16により要約文のn番目の単語が生成された場合、正解要約文に含まれる単語のうちn番目の単語と、生成部16により生成されたn番目の単語とから損失を算出する。
As one embodiment, when the
更新部18は、モデルのパラメータを更新する処理部である。
The
一実施形態として、更新部18は、RNNデコーダのN個のLSTMごとに損失が算出された場合、各LSTMの損失に基づいて対数尤度の最適化を実行することにより、RNNデコーダのモデルを更新するパラメータを算出する。その上で、更新部18は、モデル記憶部12に記憶されたモデルのパラメータを対数尤度の最適化により求められたパラメータに更新する。このパラメータの更新は、全ての学習サンプルにわたって繰り返し実行すると共に、学習データDについても所定のエポック数にわたって繰り返し実行することができる。
As an embodiment, when the loss is calculated for each of the N LSTMs of the RNN decoder, the updating
[モデル学習の具体例]
以下、図4〜図6を用いて、モデル学習の具体例を説明しながらモデル学習で構築される辞書の具体例を説明する。
[Specific example of model learning]
Hereinafter, with reference to FIGS. 4 to 6, a specific example of a dictionary constructed by model learning will be described while explaining a specific example of model learning.
図4Aおよび図4Bにモデルに入力する学習サンプルの一例を例示する。図4Aは、学習用入力文の一例を示す図である。図4Bは、正解要約文の一例を示す図である。図5は、モデル学習の一例を示す図である。これらのうち、図5には、図4Aに示す学習用入力文60Aおよび図4Bに示す正解要約文60Bの学習サンプルd1がモデルに入力される状況下におけるモデル学習が示されている。
4A and 4B exemplify an example of a learning sample input to the model. FIG. 4A is a diagram showing an example of a learning input sentence. FIG. 4B is a diagram showing an example of the correct answer summary sentence. FIG. 5 is a diagram illustrating an example of model learning. Of these, FIG. 5 shows model learning in a situation where the learning
図5に示すように、図4Bに示す正解要約文60Bが入力される場合、正解要約文60Bの単語数「14」に対応する14個のLSTMがワークエリア上に展開される。以下、正解要約文60Bの先頭の単語から順番に各単語に対応してワークエリア上に展開されたLSTMの各々を「LSTM15A〜LSTM15N」と識別する。 As shown in FIG. 5, when the correct answer summary sentence 60B shown in FIG. 4B is input, 14 LSTMs corresponding to the word number “14” of the correct answer summary sentence 60B are developed in the work area. Hereinafter, each of the LSTMs developed in the work area corresponding to each word in order from the first word of the correct answer summary sentence 60B is identified as “LSTM15A to LSTM15N”.
例えば、正解要約文60Bの先頭の単語と照合する単語の確率分布を計算する1時刻目には、入力制御部13の制御にしたがって、RNNエンコーダの末尾のLSTMから図4Aに示す学習用入力文60Aの中間表現が先頭のLSTM15Aへ入力される。これと共に、先頭のLSTM15Aには、入力制御部13からBOS(Begin Of Sentence)と呼ばれる文頭記号と共に、RNNデコーダにEOSを出力させるまでの残り文字数の初期値として正解要約文の文字数「23」が入力される。これによって、LSTM15Aは、学習サンプル全体で学習用入力文に出現する単語ごとに確率を計算することにより1時刻目(t=1)における単語の確率分布を算出すると共に、学習用入力文60Aの中間表現を更新する。その上で、LSTM15Aは、1時刻目における単語の確率分布を生成部16へ出力すると共に、1時刻目に更新された中間表現を次段のLSTM15Bへ出力する。
For example, at the first time when the probability distribution of the word to be matched with the first word of the correct answer summary sentence 60B is calculated, according to the control of the
このように1時刻目における単語の確率分布が出力された場合、生成部16は、当該確率分布で確率が最大である単語、本例では「吉田」を要約文の先頭の単語として生成し、1時刻目に生成された要約文の先頭の単語を算出部17へ出力する。そして、算出部17は、正解要約文60Bに含まれる単語のうち1時刻目に対応する先頭の単語「吉田」と、1時刻目に生成された単語「吉田」とから1時刻目における損失を算出する。この場合、1時刻目の正解の単語「吉田」の確率が1に近く、かつその他の単語の確率が0に近いほど小さい損失が算出される。その後、入力制御部13は、レジスタに保持された残り文字数の初期値「23」から1時刻目に生成された単語「吉田」の文字数「2」を減算することにより、残り文字数の値を「21」へ更新する。
When the probability distribution of words at the first time is output in this way, the
次に、正解要約文60Bの先頭から2番目の単語と照合する単語の確率分布を計算する2時刻目には、1時刻目に更新された中間表現がLSTM15AからLSTM15Bへ入力される。これと共に、LSTM15Bには、入力制御部13の制御にしたがって、2時刻目の1時刻前、すなわち1時刻目の正解の単語「吉田」が入力されると共に、レジスタに保持された残り文字数「21」が入力される。これによって、LSTM15Bは、学習サンプル全体で学習用入力文に出現する単語ごとに確率を計算することにより2時刻目(t=2)における単語の確率分布を算出すると共に、学習用入力文60Aの中間表現を更新する。その上で、LSTM15Bは、2時刻目における単語の確率分布を生成部16へ出力すると共に、2時刻目に更新された中間表現を次段のLSTM15Cへ出力する。
Next, at the second time when the probability distribution of the word that matches the second word from the beginning of the correct answer summary sentence 60B is calculated, the intermediate expression updated at the first time is input from the
このように2時刻目における単語の確率分布が出力された場合、生成部16は、当該確率分布で確率が最大である単語、本例では「ゴム」を要約文の先頭から2番目の単語として生成し、2時刻目に生成された要約文の先頭から2番目の単語を算出部17へ出力する。そして、算出部17は、正解要約文60Bに含まれる単語のうち2時刻目に対応する先頭から2番目の単語「ゴム」と、2時刻目に生成された単語「ゴム」とから2時刻目における損失を算出する。この場合、2時刻目の正解の単語「ゴム」の確率が1に近く、かつその他の単語の確率が0に近いほど小さい損失が算出される。その後、入力制御部13は、レジスタに保持された残り文字数の値「21」から2時刻目に生成された単語「ゴム」の文字数「2」を減算することにより、残り文字数の値を「19」へ更新する。
When the probability distribution of words at the second time is output in this way, the
以上の処理がLSTM15Nから文末記号「EOS」が出力される14時刻目まで繰り返し実行される。その後、更新部18は、1時刻目〜14時刻目の損失に基づいて対数尤度の最適化を実行することにより、RNNデコーダのモデルを更新するパラメータを算出した上で、モデル記憶部12に記憶されたモデルのパラメータを対数尤度の最適化により求められたパラメータに更新する。
The above process is repeatedly executed until the 14th time when the end-of-sentence symbol “EOS” is output from the
このように、図4Aに示す学習用入力文60Aおよび図4Bに示す正解要約文60Bの学習サンプルd1を含む学習データDがモデル学習に用いられた場合、あくまで一例として、学習済みモデルには、図6に示す辞書が構築される。図6は、モデルの辞書の一例を示す図である。図6には、1つの側面として、学習サンプルd1に含まれる学習用入力文60Aの単語の一部が抜粋して示されているが、学習データD全体に出現する単語が要約文の単語として生成する確率を算出する対象として辞書化される。例えば、図6に示すように、学習済みモデルの辞書には、「記者」、「会見」、「新製品」、「は」、「そのまま」、「既製品」、「コスト」、「注目」、「吉田」、「ゴム」、「パフォーマンス」などが含まれる。このような単語の辞書を搭載する学習済みモデルでは、図5に示された通り、固有表現「吉田」を含む入力文が入力される場合、単語「吉田」の次に単語「ゴム」が生成される生成確率が高くなるようなモデル学習が学習サンプルd1により実現されている。
Thus, when the learning data D including the learning sample d1 of the learning
[生成装置30の構成]
図1に示すように、生成装置30は、入力制御部31と、エンコーダ実行部32と、デコーダ実行部33と、生成部34と、抽出部35と、検出部36と、置換部37とを有する。なお、生成装置30は、図1に示す機能部以外にも既知のコンピュータが有する各種の機能部、例えば各種の入力デバイスや音声出力デバイスなどの機能部を有することとしてもかまわない。
[Configuration of Generator 30]
As illustrated in FIG. 1, the generation device 30 includes an input control unit 31, an encoder execution unit 32, a
図1に示す入力制御部31、エンコーダ実行部32、デコーダ実行部33、生成部34、抽出部35、検出部36及び置換部37などの機能部は、あくまで例示として、下記のハードウェアプロセッサにより仮想的に実現される。このようなプロセッサの例として、DLUを始め、GPGPUやGPUクラスタなどが挙げられる。この他、CPU、MPUなどが挙げられる。すなわち、プロセッサがRAM等のメモリ上に上記の要約生成プログラムをプロセスとして展開することにより、上記の機能部が仮想的に実現される。ここでは、プロセッサの一例として、DLUやGPGPU、GPUクラスタ、CPU、MPUを例示したが、汎用型および特化型を問わず、任意のプロセッサにより上記の機能部が実現されることとしてもかまわない。この他、上記の機能部は、ASICやFPGAなどのハードワイヤードロジックによって実現されることを妨げない。
The functional units such as the input control unit 31, the encoder execution unit 32, the
なお、ここでは、あくまで一例として、上記の要約生成サービスに対応する機能がパッケージ化された要約生成プログラムが実行される例を挙げたが、上記の固有表現の置換機能などの単位でプログラムモジュールが実行されたり、ライブラリが参照されたりすることとしてもかまわない。 Note that, here, as an example, an example in which a summary generation program in which the functions corresponding to the above summary generation service are packaged is executed is described. However, a program module is used in units such as the above-mentioned unique expression replacement function. It can be executed or referenced by a library.
入力制御部31は、モデルに対する入力を制御する処理部である。 The input control unit 31 is a processing unit that controls input to the model.
一実施形態として、入力制御部31は、要約文生成のリクエストを受け付けた場合に処理を起動する。このように処理が起動されると、入力制御部31は、要約文生成の対象とする入力文と共に、学習済みモデルに生成させる要約文の上限文字数の指定を受け付ける。その後、入力制御部31は、入力文をRNNエンコーダへ入力する。これによって、入力文の単語列がベクトル化されたベクトル、いわゆる中間表現がRNNエンコーダからRNNデコーダへ出力される。これと同時または前後して、入力制御部31は、RNNデコーダに文末記号と呼ばれるEOSを出力させるまでの残り文字数を保持するレジスタの値を上記の指定の上限文字数に初期化する。これ以降のRNNデコーダへの入力、RNNデータからの出力、それを用いた要約文の生成についてはその詳細を後述する。 As one embodiment, the input control unit 31 activates a process when receiving a request to generate a summary sentence. When the process is activated in this way, the input control unit 31 accepts the input sentence to be the target of the abstract sentence generation and the designation of the upper limit number of characters of the abstract sentence to be generated in the learned model. After that, the input control unit 31 inputs the input sentence to the RNN encoder. As a result, a vector obtained by vectorizing the word string of the input sentence, that is, a so-called intermediate representation is output from the RNN encoder to the RNN decoder. Simultaneously with or before or after this, the input control unit 31 initializes the value of the register that holds the number of remaining characters until the RNN decoder outputs EOS called a sentence end symbol to the specified upper limit number of characters. The details of the subsequent input to the RNN decoder, the output from the RNN data, and the generation of the summary sentence using the same will be described later.
エンコーダ実行部32は、RNNエンコーダを実行する処理部である。 The encoder execution unit 32 is a processing unit that executes an RNN encoder.
一実施形態として、エンコーダ実行部32は、モデル記憶部12に記憶された学習済みモデルのモデル情報にしたがって、入力制御部31により入力された入力文の単語数kに対応するK個のLSTMをワークエリア上に展開することにより、これらK個のLSTMをRNNエンコーダとして機能させる。このRNNエンコーダでは、入力制御部31による入力制御にしたがって、入力文の先頭の単語から順に、入力文の先頭からk番目の単語が当該k番目の単語に対応するLSTMへ入力されると共に、k−1番目の単語に対応するLSTMの出力がk番目の単語に対応するLSTMへ入力される。このような入力を先頭の単語に対応するLSTMから末尾であるK番目の単語に対応するLSTMまで繰り返すことにより、入力文のベクトル、いわゆる中間表現が得られる。このようにRNNエンコーダにより生成された入力文の中間表現がRNNデコーダへ入力される。 As one embodiment, the encoder execution unit 32 outputs K LSTMs corresponding to the number k of words of the input sentence input by the input control unit 31 according to the model information of the learned model stored in the model storage unit 12. By expanding on the work area, these K LSTMs function as an RNN encoder. In this RNN encoder, under the input control of the input control unit 31, the kth word from the beginning of the input sentence is input to the LSTM corresponding to the kth word in order from the beginning word of the input sentence, and k The output of the LSTM corresponding to the -1st word is input to the LSTM corresponding to the kth word. By repeating such input from the LSTM corresponding to the head word to the LSTM corresponding to the Kth word at the end, a vector of the input sentence, that is, a so-called intermediate representation is obtained. The intermediate representation of the input sentence thus generated by the RNN encoder is input to the RNN decoder.
デコーダ実行部33は、RNNデコーダを実行する処理部である。
The
一実施形態として、デコーダ実行部33は、モデル記憶部12に記憶された学習済みモデルのモデル情報にしたがって、EOSのタグが出力されるまでLSTMをワークエリア上に展開することにより、EOSのタグが出力されるまで展開されたL個のLSTMをRNNデコーダとして機能させる。これらRNNデコーダには、入力制御部31の制御にしたがって、RNNエンコーダから入力文の中間表現が入力されると共に、L個のLSTMごとに入力制御部31からEOSのタグを出力させるまでの残り文字数が入力される。これらの入力にしたがってL個のLSTMを動作させることにより、RNNデコーダは、L個のLSMTごとに単語の確率分布を生成部34へ出力する。
As an embodiment, the
生成部34は、要約文を生成する処理部である。 The generation unit 34 is a processing unit that generates a summary sentence.
一実施形態として、生成部34は、RNNデコーダのl番目のLSTMから単語の確率分布が出力された場合、当該確率分布で確率が最大である単語を要約文の先頭からl番目の単語として生成する。その後、生成部34は、RNNデコーダのL番目のLSTMからEOSのタグが出力された場合、先頭のLSTMからL番目のLSTMから順に生成された単語を結合することにより要約文を生成し、生成された要約文を抽出部35へ出力する。
As one embodiment, when the probability distribution of words is output from the l-th LSTM of the RNN decoder, the generation unit 34 generates the word having the highest probability in the probability distribution as the l-th word from the beginning of the summary sentence. To do. After that, when the EOS tag is output from the Lth LSTM of the RNN decoder, the generation unit 34 generates a summary sentence by combining words generated in order from the first LSTM to the Lth LSTM, and generates the summary sentence. The extracted summary sentence is output to the
[要約文生成の具体例]
以下、図7を用いて、学習済みモデルを用いた要約文生成の具体例を説明する。
[Specific example of summary generation]
Hereinafter, a specific example of the summary sentence generation using the learned model will be described with reference to FIG. 7.
図7は、入力文および要約文の一例を示す図である。図7には、図6に示された単語の辞書を搭載する学習済みモデルに入力文40G1が入力される例が示されている。この入力文40G1は、図3に示された入力文40Gの記事全文に対応する。図7に示すように、入力文40G1が学習済みモデルに入力された場合、学習済みモデルは、要約文40Yを出力する。ここで、入力文40G1および要約文40Yの間で共通する単語「吉田」を含む固有表現に着目する。すると、入力文40G1に含まれる固有表現「吉田○○」に対応する要約文40Yの部分が「吉田ゴム」と出力されており、入力文40G1の本来の趣旨から乖離していることがわかる。これは、図6に示された単語の辞書に固有表現「○○」がない未知語であることが一因である。そして、図5に示された通り、学習済みモデルでは、固有表現「吉田」を含む入力文が入力される場合、単語「吉田」の次に単語「ゴム」が生成される生成確率が高くなるようなモデル学習が学習サンプルd1により実現されている。この結果、要約文40Yにおいて「吉田○○」と出力すべき箇所が誤って「吉田ゴム」と出力されている。
FIG. 7 is a diagram illustrating an example of the input sentence and the summary sentence. FIG. 7 shows an example in which the input sentence 40G1 is input to the learned model equipped with the word dictionary shown in FIG. The input sentence 40G1 corresponds to the entire sentence of the
以下、あくまで1つの側面として、未知語の箇所が誤った要約文40Yが学習済みモデルから出力される場合でも、未知語の「○○」を含めて要約文を生成できる固有表現の置換機能に対応する各機能部について説明を続ける。
In the following, as one aspect, even if the
抽出部35は、固有表現を抽出する処理部である。
The
一実施形態として、抽出部35は、入力文および要約文のテキストごとに当該テキストの形態素解析を実行する。この形態素解析の結果を用いて、抽出部35は、テキストに含まれる文字ごとに当該文字の位置に対応する固有表現NEに関するラベル、例えば固有表現に該当するラベル「Y」または固有表現に該当しないラベル「N」を付与するラベリング処理を実行する。以下、固有表現NEに関するラベルのことを「NEラベル」と記載する場合がある。このラベリング処理には、任意の固有表現抽出のエンジンを用いることができ、オープンソースのソフトウェアであってかまわない。これによって、入力文および要約文の文字ごとに固有表現が抽出される。
As one embodiment, the
検出部36は、要約文および入力文の間で対応する第1の固有表現および第2の固有表現を検出する処理部である。
The
一実施形態として、検出部36は、要約文および入力文の間で固有表現の全体集合の類似度が所定の閾値以上であるか否かにより、第1の固有表現および第2の固有表現を検出する。あくまで一例として、検出部36は、要約文および入力文ごとに、要約文または入力文のうちNEラベルが「N」から「Y」へ変わってから「N」に戻るまでの区間の文字列を固有表現の全体集合として抽出する。その上で、検出部36は、要約文の固有表現の全体集合を1つ選択する。続いて、検出部36は、入力文の固有表現の全体集合ごとに当該入力文の固有表現の全体集合および選択中である要約文の固有表現の全体集合の間で類似度が所定の閾値L以上であるか否かを判定する。この結果、類似度が閾値L以上である要約文の固有表現の全体集合および入力文の固有表現の全体集合を第1の固有表現および第2の固有表現として検出する。
As one embodiment, the
このような固有表現間の類似度には、一例として、ジャカード係数を用いることができる。例えば、ジャカード係数は、下記の式(1)により算出することができる。また、類似度は、コサインメジャーを用いることもできる。例えば、コサインメジャーは、下記の式(2)により算出することができる。ここで、下記の2つの式における「|YNE[y]∧GNE[h]|」は、2つの固有表現の全体集合における共通の文字数を指す。また、「|YNE[y]|」および「|GNE[h]|」は、要約文または入力文の固有表現の全体集合の文字数を指す。また、下記の式(1)における「max(A,B)」は、AとBのうち最大の値を戻り値として返す関数を指す。また、下記の式(2)における「sqrt(A)」は、Aの平方根を指す。 As an example, the Jacquard coefficient can be used for the similarity between the unique expressions. For example, the Jacquard coefficient can be calculated by the following equation (1). A cosine measure can also be used for the similarity. For example, the cosine measure can be calculated by the following formula (2). Here, “| YNE [y] ∧GNE [h] |” in the following two expressions indicates the common number of characters in the general set of the two unique expressions. Further, “| YNE [y] |” and “| GNE [h] |” indicate the number of characters in the entire set of unique expressions of the summary sentence or the input sentence. Further, “max (A, B)” in the following expression (1) indicates a function that returns the maximum value of A and B as a return value. Further, “sqrt (A)” in the following formula (2) indicates the square root of A.
|YNE[y]∧GNE[h]|/max(|YNE[y]|,|GNE[h]|)・・・(1)
|YNE[y]∧GNE[h]|/(sqrt(|YNE[y]|)sqrt|GNE[h]|))・・・(2)
| YNE [y] ∧ GNE [h] | / max (| YNE [y] |, | GNE [h] |) (1)
| YNE [y] ∧ GNE [h] | / (sqrt (| YNE [y] |) sqrt | GNE [h] |)) (2)
例えば、YNEを「吉田ゴム」とし、GNEを「吉田○○」としたとき、|YNE[y]∧GNE[h]|は、「吉田」の2文字となる。このため、ジャカード係数は、2/max(4,4)の計算により、「1/2」と算出できる。また、コサインメジャーは、2/(√2×√2)の計算により、「1」と算出できる。例えば、閾値Lを「0.3」や「0.5」などの値に設定しておくことにより、「吉田ゴム」を第1の固有表現として検出し、「吉田○○」を第2の固有表現として検出できる。 For example, when YNE is “Yoshida rubber” and GNE is “Yoshida ○○”, | YNE [y] ∧GNE [h] | is two characters of “Yoshida”. Therefore, the jacquard coefficient can be calculated as "1/2" by calculating 2 / max (4,4). Further, the cosine measure can be calculated as “1” by calculating 2 / (√2 × √2). For example, by setting the threshold value L to a value such as "0.3" or "0.5", "Yoshida Gomu" is detected as the first proper expression, and "Yoshida ○○" is detected as the second. It can be detected as a proper expression.
なお、2つの固有表現の全体集合の間で文字数に差がある場合、文字数が多い方の全体集合から文字数が少ない方と同数の文字数の部分集合を抽出し、抽出された固有表現の部分集合ごとに文字数が少ない方の固有表現の全体集合との類似度を算出することとしてもかまわない。この場合、閾値Lを超える類似度のうち最高の類似度を持つ組合せを第1の固有表現および第2の固有表現として検出することとすればよい。また、ここでは、類似度の計算が文字を最小単位として行う場合を例示したが、単語を最小単位として行うこととしてもかまわない。 If there is a difference in the number of characters between the two sets of unique expressions, a subset with the same number of characters as the one with the smaller number of characters is extracted from the set with the larger number of characters, and the extracted subset of the unique expressions is extracted. It is also possible to calculate the degree of similarity with the entire set of unique expressions having a smaller number of characters for each. In this case, the combination having the highest similarity among the degrees of similarity exceeding the threshold L may be detected as the first proper expression and the second proper expression. Further, here, the case where the calculation of the degree of similarity is performed by using the character as the minimum unit is illustrated, but the calculation may be performed by using the word as the minimum unit.
置換部37は、第1の固有表現の文字列を第2の固有表現の文字列に置換する処理部である。
The
一実施形態として、置換部37は、検出部36により第1の固有表現および第2の固有表現が抽出された場合、要約文および入力文の間で各固有表現に隣接する文字列が類似するか否かを判定する。例えば、修飾部と被修飾部の係り受けは先行する文節から後続する文節へ行われる側面から、置換部37は、第1の固有表現および第2の固有表現の前に隣接する所定長Nの文字列の類似度が所定の閾値Cであるか否かを判定する。このとき、各固有表現の前に隣接する所定長Nの文字列の類似度が閾値C以上である場合、要約文の第1の固有表現および入力文の第2の固有表現が対応関係にある可能性が推定できる。この場合、置換部37は、要約文のうち第1の固有表現を含む文字列を、入力文のうち第2の固有表現を含む文字列に置換する。
As one embodiment, when the
これら抽出部35、検出部36及び置換部37の処理により、図7を用いて説明した事例、すなわち未知語「○○」の箇所に誤り「ゴム」がある要約文40Yが学習済みモデルから出力される場合でも、未知語の「○○」を含めて要約文を生成できる。
By the processing of the
すなわち、図3を用いて説明した通り、まず、入力文40Gおよび要約文40Yから固有表現が抽出される。その上で、要約文40Yからは、共通の単語「吉田」を含む固有表現「吉田ゴム」が第1の固有表現として絞り込まれる。一方、入力文40Gの該当部分を太字で示す通り、共通の単語「吉田」を含む固有表現「吉田○○」が第2の固有表現として絞り込まれる。さらに、「吉田ゴム」および「吉田○○」の2つの固有表現の前に隣接する所定長Nの文字列「同校で防災教室の講師を務めた」が一致することから、類似度がジャカード係数およびコサインメジャーとも閾値C以上である1と確認できる。このため、要約文40Yの固有表現「吉田ゴム」は、入力文40Gの固有表現「吉田○○」に対応する可能性が高いと推定できる。このような確認が行われた後、図3に白黒の反転表示で示された文字列42Y「同校で防災教室の講師を務めた吉田○○」が、図3に斜体字で示された文字列42G「同校で防災教室の講師を務めた吉田○○」に置換される。
That is, as described with reference to FIG. 3, first, the specific expression is extracted from the
したがって、学習済みモデルの未知語「○○」の固有表現が入力文40Gを用いて修正された修正要約文43Y「15年11月に同校で防災教室の講師を務めた吉田○○が指摘」を生成して所定の出力先、例えば生成装置30に接続された端末装置等へ出力できる。
Therefore, the modified
[処理の流れ]
図8は、実施例1に係る要約生成処理の手順を示すフローチャートである。この処理は、要約文および入力文から固有表現を抽出する前処理が実行された後に実行される。ここで、図8に示す要約生成処理で用いられるパラメータの説明を行う。例えば、「g」は、入力文Gの固有表現GNEの位置を指示する変数を指し、例えば、「0」が初期値に設定される。また、「y」は、要約文Yの固有表現YNEの位置を指示する変数を指す。これらの変数のカウンタは図示しないレジスタ等に保持される。
[Process flow]
FIG. 8 is a flowchart illustrating the procedure of the summary generation process according to the first embodiment. This processing is executed after the preprocessing for extracting the unique expression from the summary sentence and the input sentence is executed. Here, the parameters used in the summary generation process shown in FIG. 8 will be described. For example, “g” indicates a variable that indicates the position of the proper expression GNE of the input sentence G, and “0” is set as the initial value, for example. Further, “y” indicates a variable that indicates the position of the proper expression YNE of the summary sentence Y. The counters for these variables are held in registers or the like (not shown).
図8に示すように、検出部36は、要約文Yの固有表現YNEの位置yを「1」に初期化すると共に入力文Gの固有表現GNEの位置gをインクリメントする(ステップS101)。続いて、検出部36は、入力文Gのg番目の固有表現GNE[g]と、要約文Yのy番目の固有表現YNE[y]との類似度が閾値L以上であるか否かを判定する。
As shown in FIG. 8, the
このとき、GNE[g]およびYNE[y]の類似度が閾値L以上である場合(ステップS102Yes)、YNE[y]が第1の固有表現として検出されると共にGNE[g]が第2の固有表現として検出される。この場合、置換部37は、GNE[g]およびYNE[y]の前に隣接する所定長Nの文字列の類似度が閾値C以上であるか否かを判定する(ステップS103)。
At this time, when the similarity between GNE [g] and YNE [y] is equal to or greater than the threshold L (Yes in step S102), YNE [y] is detected as the first proper expression and GNE [g] is the second. It is detected as a proper expression. In this case, the
ここで、GNE[g]およびYNE[y]の前に隣接する所定長Nの文字列の類似度が閾値C以上である場合(ステップS103Yes)、GNE[g]およびYNE[y]が対応関係にあると推定できる。この場合、置換部37は、要約文Y中のy番目の固有表現YNE[y]を入力文G中のg番目の固有表現GNE[g]に置換し(ステップS104)、ステップS105の処理へ移行する。
Here, when the similarity of the character string of the predetermined length N adjacent before GNE [g] and YNE [y] is more than threshold value C (step S103 Yes), GNE [g] and YNE [y] have a corresponding relationship. It can be estimated that In this case, the
一方、GNE[g]およびYNE[y]の類似度が閾値L以上でない場合、あるいはGNE[g]およびYNE[y]の前に隣接する所定長Nの文字列の類似度が閾値C以上でない場合(ステップS102NoまたはステップS103No)、ステップS104の処理をスキップしてステップS105の処理へ移行する。 On the other hand, when the degree of similarity between GNE [g] and YNE [y] is not greater than or equal to the threshold value L, or the degree of similarity between character strings of a predetermined length N that are adjacent before GNE [g] and YNE [y] is not greater than or equal to the threshold value C. In that case (No in step S102 or step S103), the process in step S104 is skipped and the process proceeds to step S105.
そして、検出部36は、要約文Yの固有表現YNEの位置yをインクリメントする(ステップS105)。その後、要約文Yの固有表現YNEの位置yが要約文Yの固有表現の数|YNE|と等しくなるまで(ステップS106Yes)、上記のステップS102〜上記のステップS105までの処理を繰り返して実行する。
Then, the
また、要約文Yの固有表現YNEの位置yが要約文Yの固有表現の数|YNE|になると(ステップS106No)、入力文Gの固有表現GNEの位置gが入力文Gの固有表現の数|GNE|と等しくなるまで(ステップS107Yes)、上記のステップS101〜上記のステップS106までの処理を繰り返して実行する。 When the position y of the unique expression YNE of the summary sentence Y becomes the number of unique expressions | YNE | of the summary sentence Y (No in step S106), the position g of the unique expression GNE of the input sentence G is the number of unique expressions of the input sentence G. Until it becomes equal to | GNE | (step S107 Yes), the processes from step S101 to step S106 are repeatedly executed.
その後、入力文Gの固有表現GNEの位置gが入力文Gの固有表現の数|GNE|と等しくなると(ステップS107No)、処理を終了する。 After that, when the position g of the unique expression GNE of the input sentence G becomes equal to the number | GNE | of unique expressions of the input sentence G (No at step S107), the process ends.
[効果の一側面]
上述してきたように、本実施例に係る生成装置30は、入力文および要約文の間で共通の単語を含む固有表現が存在する場合、要約文の固有表現の文字列を入力文の固有表現の文字列に置換する。したがって、本実施例に係る生成装置30によれば、モデルの辞書にない未知語を含めて要約文を生成することが可能である。
[One side of effect]
As described above, the generation device 30 according to the present embodiment, when there is a specific expression including a common word between the input sentence and the summary sentence, converts the character string of the unique expression of the summary sentence into the unique expression of the input sentence. Replace with the string. Therefore, according to the generation device 30 according to the present embodiment, it is possible to generate an abstract sentence including an unknown word that is not in the model dictionary.
さて、これまで開示の装置に関する実施例について説明したが、本発明は上述した実施例以外にも、種々の異なる形態にて実施されてよいものである。そこで、以下では、本発明に含まれる他の実施例を説明する。 Although the embodiments of the disclosed device have been described so far, the present invention may be implemented in various different forms other than the embodiments described above. Therefore, other embodiments included in the present invention will be described below.
[固有表現の検出方法の応用例]
上記の実施例1では、要約文および入力文に含まれる固有表現を検索キーとし、第1の固有表現および第2の固有表現を検出する例を説明したが、他の方法によって第1の固有表現および第2の固有表現を検出することもできる。例えば、生成装置30は、入力文および要約文の先頭または末尾から順に検索された一致文字列の末尾または先頭の単語と、一致文字列の末尾または先頭に隣接する単語とが固有表現であるか否かにより、第1の固有表現及び第2の固有表現を検出することもできる。
[Application example of unique expression detection method]
In the above-described first embodiment, an example of detecting the first proper expression and the second proper expression by using the proper expressions included in the summary sentence and the input sentence as a search key has been described, but the first proper characteristic is detected by another method. The expression and the second proper expression can also be detected. For example, the generation device 30 determines whether the word at the end or the beginning of the matching character string and the word adjacent to the end or the beginning of the matching character string that are sequentially searched from the beginning or the end of the input sentence and the summary sentence are unique expressions. It is also possible to detect the first proper expression and the second proper expression depending on whether or not.
図9は、固有表現の検出方法の応用例を示す図である。図9の上段には、図3に示された入力文40Gに含まれる文字ごとに入力文40G中の位置gおよびNEタグが示されている。一方、図9の下段には、図3に示された要約文40Yに含まれる文字ごとに要約文40Y中の位置yおよびNEタグが示されている。
FIG. 9 is a diagram illustrating an application example of the unique expression detection method. The upper part of FIG. 9 shows the position g and the NE tag in the
例えば、入力文40Gおよび要約文40Yの先頭から順に検索が行われる場合、次の通りとなる。すなわち、図9に示すように、入力文40Gにおける位置g=38から位置g=45までの文字列と、要約文40Yにおける位置y=15から位置y=23までの文字列とが一致する。その一方で、入力文40Gにおける位置g=46の文字「○」と、要約文40Yの位置y=24の文字「ゴ」とが一致しない。これによって、図9に示す枠81で囲われた一致文字列「講師を務めた吉田」が検索結果として得られる。
For example, when the search is sequentially performed from the beginning of the
そして、一致文字列が得られた場合、一致文字列の末尾の単語「吉田」と、一致文字列の末尾に隣接する単語、すなわち枠82で囲われた入力文40Gの単語「○○」及び要約文40Yの単語「ゴム」とが固有表現であるか否かが判定される。これら単語「吉田」、単語「○○」及び単語「ゴム」のNEタグは、いずれも「Y」であるので、固有表現であることが確認できる。この場合、要約文40Yのうち一致文字列の末尾の単語「吉田」および一致文字列の末尾に隣接する単語「ゴム」を含む文字列「吉田ゴム」が、入力文40Gのうち一致文字列の末尾の単語「吉田」および一致文字列の末尾に隣接する単語「○○」を含む文字列「吉田○○」に置換される。つまり、図9に示された破線の枠83Yで囲われた文字列「吉田ゴム」が、図9に実線の枠83Gで囲われた文字列「吉田○○」に置換される。
When the matching character string is obtained, the word "Yoshida" at the end of the matching character string and the word adjacent to the end of the matching character string, that is, the word "○○" of the
このような固有表現の置換方法のアルゴリズムの一例を図10に示す。図10は、実施例2に係る要約生成処理の手順を示すフローチャートである。この処理も、要約文および入力文から固有表現を抽出する前処理が実行された後に実行される。ここで、図10に示す要約生成処理で用いられるパラメータの説明を行う。例えば、「g」は、入力文Gの固有表現GNEの位置を指示する変数を指し、例えば、「1」が初期値に設定される。また、「y」は、要約文Yの固有表現YNEの位置を指示する変数を指す。さらに、「c」は、一致文字列の文字数を指す。また、「h」は、一致文字列の検索用のインデックスを指す。これらの変数のカウンタは図示しないレジスタ等に保持される。 FIG. 10 shows an example of an algorithm of such a method of replacing a proper expression. 10. FIG. 10 is a flowchart illustrating the procedure of the summary generation process according to the second embodiment. This processing is also executed after the preprocessing for extracting the unique expression from the summary sentence and the input sentence is executed. Here, the parameters used in the summary generation process shown in FIG. 10 will be described. For example, “g” refers to a variable that indicates the position of the proper expression GNE of the input sentence G, and for example, “1” is set as the initial value. Further, “y” indicates a variable indicating the position of the proper expression YNE of the summary sentence Y. Further, “c” indicates the number of characters in the matching character string. Further, “h” indicates an index for searching the matching character string. Counters for these variables are held in a register or the like (not shown).
図10に示すように、検出部36は、要約文Yの固有表現YNEの位置yを「1」に初期化し、一致文字列の文字数cを「0」に初期化すると共に一致文字列の検索用のインデックスhを「g」に初期化する(ステップS301)。
As shown in FIG. 10, the
続いて、検出部36は、入力文Gにおけるh番目の文字と、要約文Yにおけるy番目の文字とが同じ文字であるか否か、すなわちG[h]==Y[y]であるか否かを判定する(ステップS302)。なお、G[h]==Y[y]でない場合(ステップS302No)、ステップS308の処理へ移行する。
Subsequently, the
このとき、G[h]==Y[y]である場合(ステップS302Yes)、検出部36は、要約文Yの固有表現YNEの位置y、一致文字列の文字数cおよび一致文字列の検索用のインデックスhをインクリメントする(ステップS303)。
At this time, if G [h] == Y [y] (Yes in step S302), the
そして、検出部36は、一致文字列の文字数cが一致文字列と比較する閾値Lよりも小さいか否か、すなわち一致文字列の文字数c<閾値Lであるか否かを判定する(ステップS304)。なお、一致文字列の文字数c<閾値Lである場合(ステップS304Yes)、上記のステップS302の処理に戻る。
Then, the
一方、一致文字列の文字数c<閾値Lでない場合(ステップS304No)、検出部36は、入力文Gにおけるh番目の文字と、要約文Yにおけるy番目の文字とが異なる文字であるか否か、すなわちG[h]!=Y[y]であるか否かを判定する(ステップS305)。なお、G[h]!=Y[y]でない場合(ステップS305No)、上記のステップS303の処理に戻る。
On the other hand, when the number of characters c of the matching character string is not smaller than the threshold L (No in step S304), the
このとき、G[h]!=Y[y]である場合(ステップS305Yes)、検出部36は、入力文Gにおけるh−1番目の文字と、入力文Gにおけるh番目の文字と、要約文Yにおけるy番目の文字とのNEラベルが固有表現に該当するラベル「Y」であるか否かを判定する(ステップS306)。なお、3つの文字のNEラベルが「Y」でない場合(ステップS306No)、ステップS308の処理へ移行する。
At this time, G [h]! = Y [y] (step S305 Yes), the
ここで、入力文Gにおけるh−1番目の文字と、入力文Gにおけるh番目の文字と、要約文Yにおけるy番目の文字とのNEラベルがラベル「Y」である場合(ステップS306Yes)、次のような処理を実行する。すなわち、置換部37は、要約文Y中の位置yの文字Y[y]を含む固有表現の文字列を入力文G中の位置h−1の文字G[h−1]を含む固有表現の文字列に置換する(ステップS307)。
Here, when the NE label of the h−1th character in the input sentence G, the hth character in the input sentence G, and the yth character in the summary sentence Y is the label “Y” (step S306 Yes), Perform the following processing. That is, the
その後、検出部36は、入力文Gの位置gをインクリメントする(ステップS308)。そして、入力文Gの位置gが入力文Gの文字数|G|に達するまで(ステップS309Yes)、上記のステップS301から上記のステップS308までの処理が繰り返し実行される。最後に、入力文Gの位置gが入力文Gの文字数|G|に達すると(ステップS309No)、処理を終了する。
Then, the
このような処理によって、図8に示す要約生成処理と同様、モデルの辞書にない未知語を含めて要約文を生成することが可能である。 With such processing, it is possible to generate a summary sentence including unknown words that are not in the model dictionary, as in the summary generation processing shown in FIG.
[適用条件の応用例]
実施例1および実施例2では、要約文40Yおよび入力文40Gの間で固有表現に隣接する文字列が類似することを第1の固有表現および第2の固有表現の置換に関する適用条件として設定する例を挙げたが、他の加重条件を設定することとしてもかまわない。例えば、固有表現抽出では、文字や形態素ごとに上記のNEラベルの他にも、人名や地名、組織名、数値表現などのクラスも得られるので、これを適用条件の設定に用いることができる。例えば、第1の固有表現および第2の固有表現の間でクラスが共通であること、さらには、第1の固有表現および第2の固有表現に含まれる文字または形態素が分類されたクラスが全て同一であることを適用条件として設定することもできる。
[Application example of applicable conditions]
In the first and second embodiments, the similarity of the character strings adjacent to the proper expression between the
[分散および統合]
また、図示した各装置の各構成要素は、必ずしも物理的に図示の如く構成されておらずともよい。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部または一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的または物理的に分散・統合して構成することができる。例えば、入力制御部31、エンコーダ実行部32、デコーダ実行部33、生成部34、抽出部35、検出部36または置換部37を生成装置30の外部装置としてネットワーク経由で接続するようにしてもよい。あくまで一例として、入力制御部31、エンコーダ実行部32、デコーダ実行部33及び生成部34が生成装置30の外部装置に備わることとしてもかまわない。また、入力制御部31、エンコーダ実行部32、デコーダ実行部33、生成部34、抽出部35、検出部36または置換部37を別の装置がそれぞれ有し、ネットワーク接続されて協働することで、上記の生成装置30の機能を実現するようにしてもよい。あくまで一例として、入力制御部31、エンコーダ実行部32、デコーダ実行部33及び生成部34を有する装置と、抽出部35、検出部36及び置換部37を有する装置とがネットワーク経由で協働することとしてもよい。
Distributed and integrated
In addition, each component of each illustrated device may not necessarily be physically configured as illustrated. That is, the specific form of distribution / integration of each device is not limited to that shown in the figure, and all or a part of the device may be functionally or physically distributed / arranged in arbitrary units according to various loads or usage conditions. It can be integrated and configured. For example, the input control unit 31, the encoder execution unit 32, the
[要約生成プログラム]
また、上記の実施例で説明した各種の処理は、予め用意されたプログラムをパーソナルコンピュータやワークステーションなどのコンピュータで実行することによって実現することができる。そこで、以下では、図11を用いて、上記の実施例と同様の機能を有する要約生成プログラムを実行するコンピュータの一例について説明する。
[Summary generator]
The various processes described in the above embodiments can be realized by executing a prepared program on a computer such as a personal computer or a workstation. Therefore, in the following, an example of a computer that executes a summary generation program having the same functions as those in the above embodiments will be described with reference to FIG. 11.
図11は、実施例1及び実施例2に係る要約生成プログラムを実行するコンピュータのハードウェア構成例を示す図である。図11に示すように、コンピュータ100は、操作部110aと、スピーカ110bと、カメラ110cと、ディスプレイ120と、通信部130とを有する。さらに、このコンピュータ100は、CPU150と、ROM160と、HDD170と、RAM180とを有する。これら110〜180の各部はバス140を介して接続される。
FIG. 11 is a diagram illustrating a hardware configuration example of a computer that executes the abstract generation program according to the first and second embodiments. As shown in FIG. 11, the
HDD170には、図11に示すように、上記の実施例1で示した入力制御部31、エンコーダ実行部32、デコーダ実行部33、生成部34、抽出部35、検出部36及び置換部37と同様の機能を発揮する要約生成プログラム170aが記憶される。この要約生成プログラム170aは、図1に示した入力制御部31、エンコーダ実行部32、デコーダ実行部33、生成部34、抽出部35、検出部36及び置換部37の各構成要素と同様、統合又は分離してもかまわない。すなわち、HDD170には、必ずしも上記の実施例1で示した全てのデータが格納されずともよく、処理に用いるデータがHDD170に格納されればよい。
As shown in FIG. 11, the
このような環境の下、CPU150は、HDD170から要約生成プログラム170aを読み出した上でRAM180へ展開する。この結果、要約生成プログラム170aは、図11に示すように、要約生成プロセス180aとして機能する。この要約生成プロセス180aは、RAM180が有する記憶領域のうち要約生成プロセス180aに割り当てられた領域にHDD170から読み出した各種データを展開し、この展開した各種データを用いて各種の処理を実行する。例えば、要約生成プロセス180aが実行する処理の一例として、図8や図10に示す処理などが含まれる。なお、CPU150では、必ずしも上記の実施例1で示した全ての処理部が動作せずともよく、実行対象とする処理に対応する処理部が仮想的に実現されればよい。
Under such an environment, the
なお、上記の要約生成プログラム170aは、必ずしも最初からHDD170やROM160に記憶されておらずともかまわない。例えば、コンピュータ100に挿入されるフレキシブルディスク、いわゆるFD、CD−ROM、DVDディスク、光磁気ディスク、ICカードなどの「可搬用の物理媒体」に要約生成プログラム170aを記憶させる。そして、コンピュータ100がこれらの可搬用の物理媒体から要約生成プログラム170aを取得して実行するようにしてもよい。また、公衆回線、インターネット、LAN(Local Area Network)、WANなどを介してコンピュータ100に接続される他のコンピュータまたはサーバ装置などに要約生成プログラム170aを記憶させておき、コンピュータ100がこれらから要約生成プログラム170aを取得して実行するようにしてもよい。
It should be noted that the above-mentioned
以上の実施例を含む実施形態に関し、さらに以下の付記を開示する。 The following supplementary notes will be further disclosed regarding the embodiments including the above-described examples.
(付記1)入力文および前記入力文が入力されたモデルが出力する要約文の間で共通の単語を含む固有表現が存在する場合、前記要約文のうち前記共通の単語を含む第1の固有表現の文字列を、前記入力文のうち前記共通の単語を含む第2の固有表現の文字列に置換する、
処理をコンピュータが実行することを特徴とする要約生成方法。
(Supplementary Note 1) When there is a proper expression including a common word between an input sentence and a summary sentence output by the model into which the input sentence is input, a first proper characteristic including the common word in the summary sentence. Replacing the character string of the expression with a character string of the second proper expression including the common word in the input sentence,
A method for generating an abstract, characterized in that a computer executes the processing.
(付記2)前記入力文および前記要約文の間で固有表現の全体集合の類似度が所定の閾値以上であるか否かにより、前記第1の固有表現および前記第2の固有表現を検出する処理を前記コンピュータがさらに実行することを特徴とする付記1に記載の要約生成方法。
(Supplementary Note 2) The first proper expression and the second proper expression are detected depending on whether or not the similarity of the entire set of proper expressions between the input sentence and the summary sentence is equal to or more than a predetermined threshold value. 2. The abstract generating method according to
(付記3)前記置換する処理は、前記第1の固有表現の前又は後に隣接する第1の隣接文字列と、前記第2の固有表現の前又は後に隣接する第2の隣接文字列との類似度が所定の閾値以上であることを条件に前記第1の固有表現の文字列を前記第2の固有表現の文字列に置換することを特徴とする付記2に記載の要約生成方法。
(Supplementary Note 3) The replacing process is performed by combining a first adjacent character string that is adjacent before or after the first proper expression and a second adjacent character string that is adjacent before or after the second proper expression. 3. The abstract generating method according to
(付記4)前記入力文および前記要約文の先頭または末尾から順に検索された一致文字列の末尾または先頭の単語と、前記一致文字列の末尾または先頭に隣接する単語とが固有表現であるか否かにより、前記第1の固有表現および前記第2の固有表現を検出する処理を前記コンピュータがさらに実行することを特徴とする付記1に記載の要約生成方法。
(Supplementary Note 4) Whether the word at the end or the beginning of the matching character string searched from the beginning or the end of the input sentence and the summary sentence and the word adjacent to the ending or the beginning of the matching character string are unique expressions. The method according to
(付記5)前記置換する処理は、前記一致文字列の長さが所定の閾値以上であることを条件に前記第1の固有表現の文字列を前記第2の固有表現の文字列に置換することを特徴とする付記4に記載の要約生成方法。 (Supplementary Note 5) In the replacing process, the character string of the first unique expression is replaced with the character string of the second unique expression on the condition that the length of the matching character string is equal to or greater than a predetermined threshold value. The abstract generation method according to appendix 4, characterized in that
(付記6)入力文および前記入力文が入力されたモデルが出力する要約文の間で共通の単語を含む固有表現が存在する場合、前記要約文のうち前記共通の単語を含む第1の固有表現の文字列を、前記入力文のうち前記共通の単語を含む第2の固有表現の文字列に置換する、
処理をコンピュータに実行させることを特徴とする要約生成プログラム。
(Supplementary Note 6) When there is a proper expression including a common word between the input sentence and the summary sentence output by the model into which the input sentence is input, the first proper characteristic including the common word in the summary sentence. Replacing the character string of the expression with a character string of the second proper expression including the common word in the input sentence,
A summary generation program characterized by causing a computer to execute a process.
(付記7)前記入力文および前記要約文の間で固有表現の全体集合の類似度が所定の閾値以上であるか否かにより、前記第1の固有表現および前記第2の固有表現を検出する処理を前記コンピュータにさらに実行させることを特徴とする付記6に記載の要約生成プログラム。
(Supplementary Note 7) The first specific expression and the second specific expression are detected depending on whether or not the similarity of the entire set of specific expressions between the input sentence and the summary sentence is equal to or more than a predetermined threshold value. 7. The abstract generating program according to
(付記8)前記置換する処理は、前記第1の固有表現の前又は後に隣接する第1の隣接文字列と、前記第2の固有表現の前又は後に隣接する第2の隣接文字列との類似度が所定の閾値以上であることを条件に前記第1の固有表現の文字列を前記第2の固有表現の文字列に置換することを特徴とする付記7に記載の要約生成プログラム。 (Supplementary Note 8) The replacing process is performed by combining a first adjacent character string that is adjacent before or after the first proper expression and a second adjacent character string that is adjacent before or after the second proper expression. 8. The abstract generation program according to appendix 7, wherein the character string of the first proper expression is replaced with the character string of the second proper expression on condition that the similarity is equal to or higher than a predetermined threshold value.
(付記9)前記入力文および前記要約文の先頭または末尾から順に検索された一致文字列の末尾または先頭の単語と、前記一致文字列の末尾または先頭に隣接する単語とが固有表現であるか否かにより、前記第1の固有表現および前記第2の固有表現を検出する処理を前記コンピュータにさらに実行させることを特徴とする付記6に記載の要約生成プログラム。
(Supplementary Note 9) Whether the word at the end or the beginning of the matching character string searched from the beginning or the end of the input sentence and the summary sentence, and the word adjacent to the ending or the beginning of the matching character string are unique expressions. 7. The abstract generation program according to
(付記10)前記置換する処理は、前記一致文字列の長さが所定の閾値以上であることを条件に前記第1の固有表現の文字列を前記第2の固有表現の文字列に置換することを特徴とする付記9に記載の要約生成プログラム。 (Supplementary Note 10) In the replacing process, the character string of the first unique expression is replaced with the character string of the second unique expression on the condition that the length of the matching character string is equal to or larger than a predetermined threshold value. The summary generation program according to appendix 9, characterized in that.
(付記11)入力文および前記入力文が入力されたモデルが出力する要約文の間で共通の単語を含む固有表現が存在する場合、前記要約文のうち前記共通の単語を含む第1の固有表現の文字列を、前記入力文のうち前記共通の単語を含む第2の固有表現の文字列に置換する置換部、
を有することを特徴とする要約生成装置。
(Supplementary Note 11) When there is a proper expression including a common word between the input sentence and the summary sentence output by the model to which the input sentence is input, the first proper characteristic including the common word in the summary sentence. A replacement unit that replaces the character string of the expression with the character string of the second proper expression including the common word in the input sentence,
An abstract generating device comprising:
(付記12)前記入力文および前記要約文の間で固有表現の全体集合の類似度が所定の閾値以上であるか否かにより、前記第1の固有表現および前記第2の固有表現を検出する検出部をさらに有することを特徴とする付記11に記載の要約生成装置。 (Supplementary Note 12) The first proper expression and the second proper expression are detected depending on whether or not the similarity of the entire set of proper expressions between the input sentence and the summary sentence is equal to or more than a predetermined threshold value. The abstract generating device according to appendix 11, further comprising a detecting unit.
(付記13)前記置換部は、前記第1の固有表現の前又は後に隣接する第1の隣接文字列と、前記第2の固有表現の前又は後に隣接する第2の隣接文字列との類似度が所定の閾値以上であることを条件に前記第1の固有表現の文字列を前記第2の固有表現の文字列に置換することを特徴とする付記12に記載の要約生成装置。 (Supplementary note 13) The replacement unit resembles a first adjacent character string that is adjacent before or after the first proper expression and a second adjacent character string that is adjacent before or after the second proper expression. 13. The abstract generating apparatus according to appendix 12, wherein the character string of the first proper expression is replaced with the character string of the second proper expression on condition that the degree is equal to or higher than a predetermined threshold.
(付記14)前記入力文および前記要約文の先頭または末尾から順に検索された一致文字列の末尾または先頭の単語と、前記一致文字列の末尾または先頭に隣接する単語とが固有表現であるか否かにより、前記第1の固有表現および前記第2の固有表現を検出する検出部をさらに有することを特徴とする付記11に記載の要約生成装置。 (Supplementary Note 14) Whether the word at the end or the beginning of the matching character string retrieved from the beginning or the end of the input sentence and the summary sentence, and the word adjacent to the ending or the beginning of the matching character string are unique expressions. 12. The abstract generating apparatus according to appendix 11, further comprising a detection unit that detects the first proper expression and the second proper expression depending on whether or not the first proper expression is present.
(付記15)前記置換部は、前記一致文字列の長さが所定の閾値以上であることを条件に前記第1の固有表現の文字列を前記第2の固有表現の文字列に置換することを特徴とする付記14に記載の要約生成装置。
(Supplementary Note 15) The replacement unit replaces the character string of the first unique expression with the character string of the second unique expression on the condition that the length of the matching character string is equal to or greater than a predetermined threshold. 15. The abstract generating apparatus according to
10 学習装置
11 学習データ記憶部
12 モデル記憶部
13 入力制御部
14 エンコーダ実行部
15 デコーダ実行部
16 生成部
17 算出部
18 更新部
30 生成装置
31 入力制御部
32 エンコーダ実行部
33 デコーダ実行部
34 生成部
35 抽出部
36 検出部
37 置換部
10 learning device 11 learning data storage unit 12
Claims (6)
処理をコンピュータが実行することを特徴とする要約生成方法。 When there is a proper expression including a common word between the input sentence and the summary sentence output by the model to which the input sentence is input, a character string of a first proper expression including the common word in the summary sentence. Is replaced with a character string of a second proper expression including the common word in the input sentence,
A method for generating an abstract, characterized in that a computer executes the processing.
処理をコンピュータに実行させることを特徴とする要約生成プログラム。 When there is a proper expression including a common word between the input sentence and the summary sentence output by the model to which the input sentence is input, a character string of a first proper expression including the common word in the summary sentence. Is replaced with a character string of a second proper expression including the common word in the input sentence,
A summary generation program characterized by causing a computer to execute a process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018205125A JP7135730B2 (en) | 2018-10-31 | 2018-10-31 | Summary generation method and summary generation program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018205125A JP7135730B2 (en) | 2018-10-31 | 2018-10-31 | Summary generation method and summary generation program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2020071668A true JP2020071668A (en) | 2020-05-07 |
JP7135730B2 JP7135730B2 (en) | 2022-09-13 |
Family
ID=70549532
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018205125A Active JP7135730B2 (en) | 2018-10-31 | 2018-10-31 | Summary generation method and summary generation program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7135730B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7433201B2 (en) | 2020-12-07 | 2024-02-19 | 三菱電機株式会社 | Excitation device of synchronous machine |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005326952A (en) * | 2004-05-12 | 2005-11-24 | Nippon Telegr & Teleph Corp <Ntt> | Method and device for word registration in concept dictionary, and program |
US7398196B1 (en) * | 2000-09-07 | 2008-07-08 | Intel Corporation | Method and apparatus for summarizing multiple documents using a subsumption model |
JP2013120547A (en) * | 2011-12-08 | 2013-06-17 | Nomura Research Institute Ltd | Discourse summary template creation system and discourse summary template creation program |
JPWO2018123139A1 (en) * | 2016-12-27 | 2019-10-31 | シャープ株式会社 | Response device, response device control method, and control program |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104884079B (en) | 2012-11-14 | 2021-02-12 | 史密夫和内修公司 | Stable thermolysin hydrogel |
-
2018
- 2018-10-31 JP JP2018205125A patent/JP7135730B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7398196B1 (en) * | 2000-09-07 | 2008-07-08 | Intel Corporation | Method and apparatus for summarizing multiple documents using a subsumption model |
JP2005326952A (en) * | 2004-05-12 | 2005-11-24 | Nippon Telegr & Teleph Corp <Ntt> | Method and device for word registration in concept dictionary, and program |
JP2013120547A (en) * | 2011-12-08 | 2013-06-17 | Nomura Research Institute Ltd | Discourse summary template creation system and discourse summary template creation program |
JPWO2018123139A1 (en) * | 2016-12-27 | 2019-10-31 | シャープ株式会社 | Response device, response device control method, and control program |
Also Published As
Publication number | Publication date |
---|---|
JP7135730B2 (en) | 2022-09-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111897970B (en) | Text comparison method, device, equipment and storage medium based on knowledge graph | |
US10176804B2 (en) | Analyzing textual data | |
US11144729B2 (en) | Summary generation method and summary generation apparatus | |
US7269544B2 (en) | System and method for identifying special word usage in a document | |
JP5257071B2 (en) | Similarity calculation device and information retrieval device | |
CN109299228B (en) | Computer-implemented text risk prediction method and device | |
Eskander et al. | Foreign words and the automatic processing of Arabic social media text written in Roman script | |
JP5071373B2 (en) | Language processing apparatus, language processing method, and language processing program | |
JP6828335B2 (en) | Search program, search device and search method | |
US11669687B1 (en) | Systems and methods for natural language processing (NLP) model robustness determination | |
CN111368130A (en) | Quality inspection method, device and equipment for customer service recording and storage medium | |
US20200311350A1 (en) | Generating method, learning method, generating apparatus, and non-transitory computer-readable storage medium for storing generating program | |
CN109614481A (en) | Object identifying method, device, electronic equipment and computer readable storage medium | |
JP2019212115A (en) | Inspection device, inspection method, program, and learning device | |
JP2004318510A (en) | Original and translation information creating device, its program and its method, original and translation information retrieval device, its program and its method | |
US11809804B2 (en) | Text formatter | |
JP7211011B2 (en) | LEARNING METHOD, LEARNING PROGRAM AND GENERATION METHOD | |
JP2020071668A (en) | Summary generation method and summary generation program | |
KR101983477B1 (en) | Method and System for zero subject resolution in Korean using a paragraph-based pivotal entity identification | |
JP7216627B2 (en) | INPUT SUPPORT METHOD, INPUT SUPPORT SYSTEM, AND PROGRAM | |
JP7099254B2 (en) | Learning methods, learning programs and learning devices | |
CN113268571A (en) | Method, device, equipment and medium for determining correct answer position in paragraph | |
CN112949287B (en) | Hot word mining method, system, computer equipment and storage medium | |
JP7494935B2 (en) | Estimation device, estimation method, and estimation program | |
KR102649948B1 (en) | Text augmentation apparatus and method using hierarchy-based word replacement |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210709 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20220722 |
|
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: 20220802 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220815 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7135730 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |