JP2023064283A - Machine learning device, natural language processing device, and program - Google Patents

Machine learning device, natural language processing device, and program Download PDF

Info

Publication number
JP2023064283A
JP2023064283A JP2021174466A JP2021174466A JP2023064283A JP 2023064283 A JP2023064283 A JP 2023064283A JP 2021174466 A JP2021174466 A JP 2021174466A JP 2021174466 A JP2021174466 A JP 2021174466A JP 2023064283 A JP2023064283 A JP 2023064283A
Authority
JP
Japan
Prior art keywords
unit
word
word embedding
sequence
string
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2021174466A
Other languages
Japanese (ja)
Inventor
健 小早川
Takeshi Kobayakawa
礼子 齋藤
Reiko Saito
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Japan Broadcasting Corp
Original Assignee
Nippon Hoso Kyokai NHK
Japan Broadcasting Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Hoso Kyokai NHK, Japan Broadcasting Corp filed Critical Nippon Hoso Kyokai NHK
Priority to JP2021174466A priority Critical patent/JP2023064283A/en
Publication of JP2023064283A publication Critical patent/JP2023064283A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Machine Translation (AREA)

Abstract

To provide a machine learning device, a natural language processing device and a program that more accurately extracts the position of a subsequence to be analyzed that is included in a word string.SOLUTION: In an opinion analysis device (natural language processing device) 1, a word embedding unit 11 accepts input of a word string and outputs a word embedded expression string that corresponds to the word string. A series labeling unit 12 accepts the word embedded expression string outputted from the word embedding unit 11 as input and outputs a label series that corresponds to the word embedded expression string. A pause position prediction unit 22 accepts the word embedded expression string outputted from the word embedding unit 11 as input and outputs pause position information that corresponds to the word embedded expression string, and performs back propagation based on an error between the pause position information and correct-answer pause position information so as to adjust the parameters of an internal model. The word embedding unit 11 adjusts the parameters of the internal model by back propagation of an error from the series labeling unit 12 and back propagation of an error from the pause position prediction unit 22.SELECTED DRAWING: Figure 1

Description

本発明は、機械学習装置、自然言語処理装置、およびプログラムに関する。 The present invention relates to a machine learning device, a natural language processing device, and a program.

例えば、SNS(ソーシャル・ネットワーキング・サービス)等に投稿される多数の文章を自動的に分析することによって人々あるいは社会全体の意見の傾向を自動的に分析することは有効である。例えば数千万件から数億件またはそれ以上の文章を人手で分析することは、非現実的であり、精度よく自動的な分析を行えるようにすることは強く求められる。 For example, it is effective to automatically analyze the tendency of opinions of people or society as a whole by automatically analyzing a large number of sentences posted on SNS (Social Networking Service) or the like. For example, it is unrealistic to manually analyze tens of millions to hundreds of millions of sentences or more, and there is a strong demand for automatic analysis with high accuracy.

従来の技術では、文章に含まれる句あるいは単語に対してそれぞれラベル付けを自動的に行うようにしている。例えば、深層学習モデルを用いて、文章の中から、意見対象と意見部分との区間をそれぞれ抽出することが試みられている。 Conventional techniques automatically label each phrase or word contained in a sentence. For example, using a deep learning model, attempts have been made to extract sections between an opinion target and an opinion part from a sentence.

非特許文献1には、深層学習モデルを用いて自然言語で記述された文章を分析するためのしくみであるBERT(Bidirectional Encoder Representations from Transformers)が記載されている。 Non-Patent Document 1 describes BERT (Bidirectional Encoder Representations from Transformers), which is a mechanism for analyzing sentences written in natural language using a deep learning model.

非特許文献2では、機械学習を用いて文章の構成要素の系列に対してラベル付けを行う「系列ラベリング」の技術について説明されている。 Non-Patent Document 2 describes a technique of “sequence labeling” that uses machine learning to label a sequence of constituent elements of a sentence.

Jacob Devlin,Ming-Wei Chang,Kenton Lee,Kristina Toutanova,BERT : Pre-training of Deep Bidirectional Transformers for Language Understanding,Proceedings of NAACL-HLT 2019,pages 4171-4186,Association for Computational Linguistics,2019年.Jacob Devlin, Ming-Wei Chang, Kenton Lee, Kristina Toutanova, BERT : Pre-training of Deep Bidirectional Transformers for Language Understanding, Proceedings of NAACL-HLT 2019, pages 4171-4186, Association for Computational Linguistics, 2019. Takatomo Ishikawa,言語処理のための機械学習「5.系列ラベリング」,[online],インターネット<URL:https://www.slideshare.net/Takatymo/ss-64274683,2016年7月22日>.Takatomo Ishikawa, Machine Learning for Language Processing “5. Sequence Labeling”, [online], Internet <URL: https://www.slideshare.net/Takatymo/ss-64274683, July 22, 2016>.

しかしながら、従来技術において、深層学習分析モデルを用いて文章の構成要素のラベリングを行う場合には、ラベル付与の対象とする句への分割を必ずしも正しく行うことができないという問題があった。つまり、ラベル付与の処理の前段の処理である句への分割において間違いが生じ得るという問題があった。これは、文章の中の意見対象区間や意見区間を抽出するというタスクでは、意見対象区間や意見区間の句切れにおいて誤りが生じ得るという問題である。このような区間抽出の誤りが発生すると、ラベル付与も誤る結果となり得る。つまり、意見対象区間や意見区間を抽出するというタスクにおいては、それらの区間に含まれるべき表現の一部が欠落したり、本来は区間外であるべき誤った表現が区間に含まれる形で抽出されてしまったりする。また、ラベル付けにおいて上記のような誤りが生じると、その後段の処理における分析の精度も悪くなるという問題が発生し得る。例えば、SNS上の意見の動向を統計的に集計する場合にも、精度が悪くなる要因となる。 However, in the prior art, when labeling constituent elements of a sentence using a deep learning analysis model, there is a problem that division into phrases to be labeled cannot always be correctly performed. In other words, there is a problem that an error may occur in the division into phrases, which is the process preceding the labeling process. This is a problem that, in the task of extracting an opinion target segment or an opinion segment in a sentence, an error may occur in the punctuation of the opinion target segment or the opinion segment. Such segment extraction errors can also result in incorrect labeling. In other words, in the task of extracting an opinion section or an opinion section, some expressions that should be included in those sections are missing, or incorrect expressions that should be outside the section are extracted. I get laid off. In addition, if an error such as the one described above occurs in labeling, a problem may arise in that the accuracy of analysis in subsequent processing also deteriorates. For example, when the trends of opinions on SNS are statistically aggregated, it becomes a factor of degraded accuracy.

本発明は、上記のような課題認識に基づいて行なわれたものであり、単語列に含まれる分析対象の部分列(この部分列の具体例は、上記の意見対象区間や意見区間)の位置をより精度よく抽出することを可能とするための機械学習装置、自然言語処理装置、およびプログラムを提供しようとするものである。 The present invention is based on the recognition of the problem as described above. It is intended to provide a machine learning device, a natural language processing device, and a program for making it possible to extract more accurately.

[1]上記の課題を解決するため、本発明の一態様による機械学習装置は、単語列を入力し前記単語列に対応する単語埋め込み表現列を出力する単語埋め込み部と、前記単語埋め込み部から出力される単語埋め込み表現列を入力し前記単語埋め込み表現列に対応するラベル系列を出力する系列ラベリング部と、前記単語埋め込み部から出力される単語埋め込み表現列を入力し前記単語埋め込み表現列に対応する句切れ位置情報を出力する句切れ位置予測部と、前記単語埋め込み部に入力するための単語列を供給するとともに、前記系列ラベリング部が出力する前記ラベル系列に対応する正解ラベル系列を供給し、さらに前記句切れ位置予測部が出力する前記句切れ位置情報に対応する正解句切れ位置情報を供給する学習用データ供給部と、を備え、前記系列ラベリング部は、前記ラベル系列と前記正解ラベル系列との誤差に基づく逆伝播を行うことによって内部のモデルのパラメーターを調整し、前記句切れ位置予測部は、前記句切れ位置情報と前記正解句切れ位置情報との誤差に基づく逆伝播を行うことによって内部のモデルのパラメーターを調整し、前記単語埋め込み部は、前記系列ラベリング部からの誤差の逆伝播と前記句切れ位置予測部からの誤差の逆伝播とによって内部のモデルのパラメーターを調整する、というものである。 [1] In order to solve the above problems, a machine learning device according to an aspect of the present invention includes a word embedding unit that inputs a word string and outputs a word embedding expression string corresponding to the word string, and from the word embedding unit: A sequence labeling unit that inputs a string of word embedding expressions to be output and outputs a label sequence corresponding to the string of word embedding expressions, and a sequence labeling unit that inputs a string of word embedding expressions output from the word embedding unit and corresponds to the string of word embedding expressions. and a word string to be input to the word embedding unit, and a correct label sequence corresponding to the label sequence output by the sequence labeling unit. and a learning data supply unit for supplying correct phrase break position information corresponding to the phrase break position information output by the phrase break position prediction unit, wherein the sequence labeling unit includes the label sequence and the correct label The parameter of the internal model is adjusted by performing backpropagation based on the error with the series, and the phrase break position prediction unit performs back propagation based on the error between the phrase break position information and the correct phrase break position information. and the word embedding unit adjusts the parameters of the internal model by backpropagating errors from the sequence labeling unit and backpropagating errors from the phrase break position prediction unit. ,

[2]また、本発明の一態様は、上記の機械学習装置において、前記句切れ位置予測部は、入力される前記単語埋め込み表現列に含まれるすべての単語埋め込み表現を基とする全結合回帰モデルを用いることによって、前記単語埋め込み表現列に対応する句切れ位置情報を出力する、ものである。 [2] Further, according to one aspect of the present invention, in the above machine learning device, the phrase break position prediction unit is configured to perform a full-joint regression based on all word-embedding expressions included in the input word-embedding expression string. By using the model, the information on the position of punctuation corresponding to the word embedding expression string is output.

[3]また、本発明の一態様は、上記の機械学習装置において、前記系列ラベリング部は、入力される元の前記単語列に含まれる所定の部分列が意見対象であることを表すラベルと、前記所定の部分列が意見であることを表すラベルと、を少なくとも出力する、というものである。 [3] In one aspect of the present invention, in the machine learning device described above, the sequence labeling unit labels a predetermined substring included in the input original word string as an opinion target. , and a label indicating that the predetermined subsequence is an opinion.

[4]また、本発明の一態様は、上記の機械学習装置において、前記句切れ位置予測部は、前記句切れ位置情報として、前記部分列の開始位置および終了位置を表す数値を出力するものであり、前記学習用データ供給部が供給する前記正解句切れ位置情報は、前記部分列の開始位置および終了位置の正解を表す数値の情報であるというものである。 [4] Further, according to one aspect of the present invention, in the machine learning device described above, the phrase break position prediction unit outputs numerical values representing the start position and end position of the substring as the phrase break position information. , and the correct phrase cutoff position information supplied by the learning data supply unit is numerical information representing the correct start position and end position of the subsequence.

[5]また、本発明の一態様は、単語列を入力し前記単語列に対応する単語埋め込み表現列を出力する単語埋め込み部と、前記単語埋め込み部から出力される単語埋め込み表現列を入力し前記単語埋め込み表現列に対応するラベル系列を出力する系列ラベリング部と、を備え、少なくとも、前記単語埋め込み部が内部に持つモデルは、請求項1から4までのいずれか一項に記載の機械学習装置によって学習済みである、という自然言語処理装置である。 [5] In one aspect of the present invention, a word embedding unit for inputting a word string and outputting a word embedding expression string corresponding to the word string, and a word embedding expression string output from the word embedding unit are input. 5. The machine learning according to any one of claims 1 to 4, further comprising a sequence labeling unit that outputs a label sequence corresponding to the word embedding expression sequence, wherein at least the model that the word embedding unit has therein is the machine learning. It is a natural language processing device that has been learned by the device.

[6]また、本発明の一態様は、単語列を入力し前記単語列に対応する単語埋め込み表現列を出力する単語埋め込み部と、前記単語埋め込み部から出力される単語埋め込み表現列を入力し前記単語埋め込み表現列に対応するラベル系列を出力する系列ラベリング部と、前記単語埋め込み部から出力される単語埋め込み表現列を入力し前記単語埋め込み表現列に対応する句切れ位置情報を出力する句切れ位置予測部と、前記単語埋め込み部に入力するための単語列を供給するとともに、前記系列ラベリング部が出力する前記ラベル系列に対応する正解ラベル系列を供給し、さらに前記句切れ位置予測部が出力する前記句切れ位置情報に対応する正解句切れ位置情報を供給する学習用データ供給部と、を備え、前記系列ラベリング部は、前記ラベル系列と前記正解ラベル系列との誤差に基づく逆伝播を行うことによって内部のモデルのパラメーターを調整し、前記句切れ位置予測部は、前記句切れ位置情報と前記正解句切れ位置情報との誤差に基づく逆伝播を行うことによって内部のモデルのパラメーターを調整し、前記単語埋め込み部は、前記系列ラベリング部からの誤差の逆伝播と前記句切れ位置予測部からの誤差の逆伝播とによって内部のモデルのパラメーターを調整する、機械学習装置、としてコンピューターを機能させるためのプログラムである。 [6] In one aspect of the present invention, a word embedding section for inputting a word string and outputting a word embedding expression string corresponding to the word string, and a word embedding expression string output from the word embedding section are input. a sequence labeling unit for outputting a label sequence corresponding to the word embedding expression string; and a phrase break for inputting the word embedding expression string output from the word embedding unit and outputting phrase break position information corresponding to the word embedding expression string. a position prediction unit, supplying a word string to be input to the word embedding unit, supplying a correct label sequence corresponding to the label sequence output by the sequence labeling unit, and further output by the phrase break position prediction unit; and a learning data supply unit that supplies correct phrase break position information corresponding to the correct phrase break position information, wherein the sequence labeling unit performs backpropagation based on an error between the label sequence and the correct label sequence. The parameters of the internal model are adjusted by this, and the phrase break position prediction unit adjusts the parameters of the internal model by performing backpropagation based on the error between the correct phrase break position information and the correct phrase break position information. , the word embedding unit adjusts parameters of an internal model by backpropagation of errors from the sequence labeling unit and backpropagation of errors from the phrase break position prediction unit, causing the computer to function as a machine learning device. It is a program for

本発明によれば、単語系列に対してラベル系列(タグ系列)を付与する際に、その精度を向上させることができる。 According to the present invention, it is possible to improve the accuracy when assigning a label sequence (tag sequence) to a word sequence.

本発明の実施形態による意見分析装置の概略機能構成を示すブロック図である。1 is a block diagram showing a schematic functional configuration of an opinion analysis device according to an embodiment of the present invention; FIG. 同実施形態において句切れ位置を予測するためのモデルの構成をより詳細に示す構成図である。FIG. 4 is a configuration diagram showing in more detail the configuration of a model for predicting a punctuation position in the same embodiment; 同実施形態による意見分析装置に入力されるテキストの実例と、その入力テキストに対して行われるラベル付けの例とを示す概略図である。FIG. 4 is a schematic diagram showing an example of text input to the opinion analysis device according to the same embodiment, and an example of labeling performed on the input text; 同実施形態における入力テキスト例(図3)に対応する単語系列と、その系列に対応するタグ系列の正解の例を示す概略図である。FIG. 4 is a schematic diagram showing an example of a correct answer of a word sequence corresponding to the input text example (FIG. 3) and a tag sequence corresponding to the sequence in the same embodiment; 同実施形態における入力テキスト例(図3)に対応する単語系列と、その系列に対応するタグ系列の正解の別の例を示す概略図である。FIG. 4 is a schematic diagram showing another example of a correct answer of a word sequence corresponding to the input text example (FIG. 3) and a tag sequence corresponding to the sequence in the same embodiment; 同実施形態における句切れ位置予測モデルの学習を行うための正解データの例を示す概略図である。FIG. 4 is a schematic diagram showing an example of correct data for learning a phrase break position prediction model in the same embodiment; 同実施形態による意見分析装置がモデルの学習を行う際の処理の手順を示すフローチャートである。6 is a flow chart showing the procedure of processing when the opinion analysis device according to the same embodiment performs model learning. 同実施形態による意見分析装置が、学習済みのモデルを用いて、系列ラベリングの処理を行う際の手順を示すフローチャートである。4 is a flow chart showing a sequence labeling process performed by the opinion analysis device according to the same embodiment using a trained model. 同実施形態による意見分析装置の内部構成の一例を示すブロック図である。It is a block diagram which shows an example of an internal configuration of the opinion analysis apparatus by the same embodiment.

次に、本発明の一実施形態について、図面を参照しながら説明する。本実施形態による装置は、入力されるテキストに含まれる意見を分析するための意見分析装置である。具体的には、本実施形態の意見分析装置は、入力されるテキストを構成する要素(句)に対して、意見対象区間であるか、意見区間であるか、そのどちらでもない区間であるかを区別するためのタグ(ラベル)を付与する。 An embodiment of the present invention will now be described with reference to the drawings. The apparatus according to this embodiment is an opinion analysis apparatus for analyzing opinions included in input text. Specifically, the opinion analysis apparatus of the present embodiment determines whether an element (phrase) constituting an input text is an opinion target section, an opinion section, or a section neither of these. tags (labels) for distinguishing between

本実施形態の意見分析装置の特徴は、抽出する区間の分割箇所(句切れ)を予測するための回帰モデルを備える点である。この本実施形態に特有の回帰モデルを、以下で「句切れ位置予測モデル」と呼ぶ場合がある。句切れ位置予測モデルは、系列ラベリングを行うためのモデル(系列ラベリングモデル)とともに、下位層における分散表現を共有する。本実施形態の意見分析装置は、内部に備えるモデルの機械学習を行うものであり、「機械学習装置」とも呼ばれる。また、本実施形態の意見分析装置は、学習済みのモデルを用いて、与えられる未知の単語列に対応するラベル系列を与えるものであり、「自然言語処理装置」とも呼ばれる。 A feature of the opinion analysis apparatus of this embodiment is that it includes a regression model for predicting the division point (punctuation) of the section to be extracted. The regression model unique to this embodiment may be referred to as a "phrase break position prediction model" below. The phrase break position prediction model shares the distributed representation in the lower layer with the model for performing sequence labeling (the sequence labeling model). The opinion analysis device of this embodiment performs machine learning on a model provided therein, and is also called a “machine learning device”. Also, the opinion analysis device of this embodiment uses a trained model to give a label sequence corresponding to a given unknown word string, and is also called a "natural language processing device".

本実施形態では、句切れ位置予測モデルの機械学習を行うために、句切れ位置予測モデルによって予測される句切れ位置と句切れ位置の正解との誤差をクロスエントロピーで与えるような損失関数を用いる。 In this embodiment, in order to carry out machine learning of the phrase break position prediction model, a loss function is used that gives the error between the correct phrase break position predicted by the phrase break position prediction model and the correct phrase break position in terms of cross entropy. .

図1は、本実施形態による意見分析装置の概略機能構成を示すブロック図である。図示するように、意見分析装置1は、単語埋め込み部11と、系列ラベリング部12と、系列ラベリングの損失関数算出部17と、句切れ位置予測部22と、句切れ位置の損失関数算出部27と、学習用データ供給部30と、を含んで構成される。これらの各機能部は、例えば、コンピューターと、プログラムとで実現することが可能である。また、各機能部は、必要に応じて、記憶手段を有する。記憶手段は、例えば、プログラム上の変数や、プログラムの実行によりアロケーションされるメモリーである。また、必要に応じて、磁気ハードディスク装置やソリッドステートドライブ(SSD)といった不揮発性の記憶手段を用いるようにしてもよい。また、各機能部の少なくとも一部の機能を、プログラムではなく専用の電子回路として実現してもよい。各部の機能は、次に説明する通りである。 FIG. 1 is a block diagram showing a schematic functional configuration of an opinion analysis device according to this embodiment. As shown, the opinion analysis device 1 includes a word embedding unit 11, a sequence labeling unit 12, a sequence labeling loss function calculation unit 17, a phrase break position prediction unit 22, and a phrase break position loss function calculation unit 27. , and a learning data supply unit 30 . Each of these functional units can be realized by, for example, a computer and a program. In addition, each functional unit has storage means as required. The storage means are, for example, program variables and memory allocated by execution of the program. Also, if necessary, non-volatile storage means such as a magnetic hard disk drive or a solid state drive (SSD) may be used. Also, at least part of the function of each functional unit may be realized as a dedicated electronic circuit instead of a program. The function of each part is as described below.

単語埋め込み部11は、単語列を入力し前記単語列に対応する単語埋め込み表現列を出力するものである。単語埋め込み部11は、内部に、機械学習可能なモデルを備える。単語埋め込み部11が備えるモデルは、「単語埋め込み層」とも呼ばれる。単語埋め込み部11が備えるモデルは、例えば、ニューラルネットワークを用いて実現される。本実施形態では、意見対象抽出装置の深層学習モデルとしてBERTを用いる。BERT自体は、既存技術であり、前記の非特許文献1等に記載されている。単語埋め込み部11が用いるBERTは、日本語で事前学習された一般的なモデルを用いてもよい。本実施形態では、単語埋め込み部11が持つBERTは、さらに学習することができるものである。入力文は、標準的な形態素解析処理によって単語単位で分割される。つまり、入力文は、単語列と等価である。入力文に対応する単語列は、単語埋め込み部11に入力され、単語埋め込み表現の列に変換される。 The word embedding unit 11 receives a word string and outputs a word embedding expression string corresponding to the word string. The word embedding unit 11 internally has a machine-learnable model. A model included in the word embedding unit 11 is also called a "word embedding layer". A model provided in the word embedding unit 11 is realized using, for example, a neural network. In this embodiment, BERT is used as a deep learning model of the opinion object extraction device. BERT itself is an existing technology and is described in Non-Patent Document 1 and the like. The BERT used by the word embedding unit 11 may use a general model pre-learned in Japanese. In this embodiment, the BERT possessed by the word embedding unit 11 can be further learned. The input sentence is segmented into words by a standard morphological analysis process. That is, an input sentence is equivalent to a word string. A word string corresponding to the input sentence is input to the word embedding section 11 and converted into a string of word embedding expressions.

系列ラベリング部12は、単語埋め込み部11から出力される単語埋め込み表現列を入力し、その単語埋め込み表現列に対応するラベル系列を出力する。つまり、系列ラベリング部12は、単語ごとにラベルを付与する。ラベルの具体例については後で説明する。系列ラベリング部12は、内部に、機械学習可能なモデルを備える。系列ラベリング部12が備えるモデルは、「系列ラベリングモデル」と呼ばれる。 The sequence labeling unit 12 receives the word embedding expression string output from the word embedding unit 11 and outputs a label sequence corresponding to the word embedding expression string. That is, the series labeling unit 12 assigns a label to each word. A specific example of the label will be described later. The sequence labeling unit 12 internally has a machine-learnable model. A model provided by the sequence labeling unit 12 is called a “sequence labeling model”.

本実施形態では、系列ラベリング部12は、入力される元の単語列に含まれる所定の部分列が意見対象であることを表すラベルと、その所定の部分列が意見であることを表すラベルと、を少なくとも出力する。系列ラベリング部12が付与するラベルについては、後でさらに具体的な例を説明する。 In this embodiment, the sequence labeling unit 12 creates a label indicating that a predetermined subsequence included in an input original word string is an opinion target, and a label indicating that the predetermined subsequence is an opinion. , at least. More specific examples of labels given by the series labeling unit 12 will be described later.

系列ラベリングの損失関数算出部17は、系列ラベリング部12が出力したラベル系列と、その正解である正解ラベル系列との誤差を算出する。系列ラベリングの損失関数算出部17が算出する誤差は、系列ラベリング部12がパラメーターを調整するために行う誤差逆伝播の基となる誤差である。 The sequence labeling loss function calculation unit 17 calculates the error between the label sequence output by the sequence labeling unit 12 and the correct label sequence. The error calculated by the sequence labeling loss function calculator 17 is the error that is the basis of error backpropagation performed by the sequence labeler 12 to adjust the parameters.

句切れ位置予測部22は、単語埋め込み部11から出力される単語埋め込み表現列を入力し、その単語埋め込み表現列に対応する句切れ位置情報を出力する。句切れ位置予測部22は、内部に、機械学習可能なモデルを備える。句切れ位置予測部22が備えるモデルは、「句切れ位置予測モデル」と呼ばれる。 The phrase break position prediction unit 22 receives the word embedding expression string output from the word embedding unit 11, and outputs phrase break position information corresponding to the word embedding expression string. The punctuation position prediction unit 22 has a machine-learnable model inside. A model included in the phrase break position prediction unit 22 is called a "phrase break position prediction model".

句切れ位置予測部22は、入力される単語埋め込み表現列に含まれるすべての単語埋め込み表現を基とする全結合回帰モデルを用いることによって、その単語埋め込み表現列に対応する句切れ位置情報を出力するようにしてよい。 The phrase break position prediction unit 22 outputs the phrase break position information corresponding to the input word embedding expression string by using a fully connected regression model based on all the word embedding expressions contained in the input word embedding expression string. You can do it.

句切れ位置の損失関数算出部27は、句切れ位置予測部22が出力した句切れ位置情報と、その正解である正解句切れ位置情報との誤差を算出する。句切れ位置の損失関数算出部27が算出する誤差は、句切れ位置予測部22がパラメーターを調整するために行う誤差逆伝播の基となる誤差である。 The phrase break position loss function calculator 27 calculates the error between the phrase break position information output by the phrase break position prediction unit 22 and the correct phrase break position information. The error calculated by the phrase break position loss function calculator 27 is the basis for error backpropagation performed by the phrase break position predictor 22 to adjust parameters.

なお、前記の単語埋め込み部11は、そのモデルの機械学習を行う際には、系列ラベリング部12からの誤差の逆伝播と句切れ位置予測部22からの誤差の逆伝播との両方に基づいて内部のモデルのパラメーターを調整する。 Note that the word embedding unit 11 performs the machine learning of the model based on both the error backpropagation from the sequence labeling unit 12 and the error backpropagation from the phrase break position prediction unit 22. Tune the parameters of the inner model.

学習用データ供給部30は、意見分析装置1が内部に備えるモデルの学習を行うための学習用データを供給する。具体的には、学習用データ供給部30は、単語埋め込み部11に入力するための単語列を供給する。また、学習用データ供給部30は、上記の単語列に対応して、系列ラベリング部12が出力するラベル系列に対応する正解である正解ラベル系列を供給する。さらに、学習用データ供給部30は、上記の単語列に対応して、句切れ位置予測部22が出力する句切れ位置情報に対応する正解である正解句切れ位置情報を供給する。 The learning data supply unit 30 supplies learning data for learning a model provided inside the opinion analysis device 1 . Specifically, the learning data supply unit 30 supplies a word string to be input to the word embedding unit 11 . In addition, the learning data supply unit 30 supplies a correct label sequence corresponding to the label sequence output by the sequence labeling unit 12, corresponding to the word sequence. Furthermore, the learning data supply unit 30 supplies correct phrase break position information, which is the correct answer corresponding to the phrase break position information output by the phrase break position prediction unit 22, corresponding to the word string.

句切れ位置予測部22は、句切れ位置情報として、入力文に対応する単語列の部分列の開始位置および終了位置を表す数値を出力するものである。なお、部分列の数は、1つでも複数でもよい。学習用データ供給部30が供給する正解句切れ位置情報は、上記の部分列の開始位置および終了位置の正解を表す数値の情報である。開始位置および終了位置は、第何番目の単語であるかを表す数値の情報である。部分列の開始位置および終了位置の正解は、それぞれ、基本的に整数である。句切れ位置予測部22が予測して出力する開始位置および終了位置のそれぞれは、整数であるとは限らない。通常は、句切れ位置予測部22が予測して出力する開始位置および終了位置のそれぞれは、非整数である。それらの非整数は、開始位置および終了位置のそれぞれの近似値として予測されたものであると捉えられる。 The phrase break position prediction unit 22 outputs numerical values representing the start position and end position of the subsequence of the word string corresponding to the input sentence as the phrase break position information. Note that the number of subsequences may be one or more. The correct phrase break position information supplied by the learning data supply unit 30 is numerical information representing the correct start position and end position of the above subsequence. The start position and end position are numerical information indicating the order of the word. The correct starting and ending positions of a subsequence are each essentially integers. Each of the start position and the end position predicted and output by the punctuation position prediction unit 22 is not necessarily an integer. Normally, each of the start position and the end position predicted and output by the phrase break position prediction unit 22 is a non-integer. Those non-integers are taken to be expected approximations of the start and end positions, respectively.

図2は、句切れ位置を予測するためのモデルの構成をより詳細に示す構成図である。図示するように、句切れ位置を予測するためのモデルは、全結合回帰層220を含んで構成される。全結合回帰層220は、図1に示した句切れ位置予測部22に含まれるモデルである。全結合回帰層220は、単語埋め込み層110(BERTエンベディング層)からのすべての出力に接続される2つのノード(図中のyおよびy)を含む。単語埋め込み層110は、図1に示した単語埋め込み部11に含まれるモデルである。単語埋め込み層110に含まれるノード(図中のx,x,・・・,x)は、入力されるテキストに含まれる単語の分散表現に相当する。yおよびyは、それぞれ、区間の句切れの開始位置(start_position)および終了位置(end_position)を表す数値である。これらの数値は、それぞれ、テキスト中の何番目の単語であるかを表す値である。つまり、句切れ位置を予測するためのモデルは、1つまたは複数の区間のそれぞれの開始位置および終了位置を予測する。言い換えれば、全結合回帰層220は、これら2つの数値を予測するための2次元回帰モデルである。 FIG. 2 is a configuration diagram showing in more detail the configuration of the model for predicting the position of punctuation. As shown, the model for predicting phrase break locations comprises a fully connected regression layer 220 . The fully connected regression layer 220 is a model included in the punctuation position prediction unit 22 shown in FIG. Fully connected regression layer 220 includes two nodes (y 1 and y 2 in the figure) that are connected to all outputs from word embedding layer 110 (BERT embedding layer). The word embedding layer 110 is a model included in the word embedding section 11 shown in FIG. Nodes included in the word embedding layer 110 (x 1 , x 2 , . y 1 and y 2 are numerical values representing the start position (start_position) and end position (end_position) of the segment break, respectively. Each of these numerical values represents the order of the word in the text. In other words, a model for predicting punctuation positions predicts the start and end positions of each of one or more intervals. In other words, the fully connected regression layer 220 is a two-dimensional regression model for predicting these two numbers.

つまり、単語埋め込み層110は、D次元の連続値x,x,・・・,xを出力する。全結合回帰層220は、上記のx,x,・・・,xを基に算出するyおよびyを出力する。yが開始位置、yが終了位置であり、yおよびyは下の式(1)の通りである。 That is, the word embedding layer 110 outputs D-dimensional continuous values x 1 , x 2 , . . . , x D . The fully connected regression layer 220 outputs y 1 and y 2 calculated based on the above x 1 , x 2 , . . . , x D . y1 is the start position, y2 is the end position, and y1 and y2 are as in equation (1) below.

Figure 2023064283000002
Figure 2023064283000002

式(1)におけるfは活性化関数である。また、aijおよびbは、全結合回帰層220のモデルの内部パラメーターである。これらの内部パラメーターの値は学習によって調整される。なお、jは、1または2のいずれかである。 f in equation (1) is an activation function. Also, a ij and b j are the intrinsic parameters of the fully connected regression layer 220 model. The values of these internal parameters are adjusted by learning. Note that j is either 1 or 2.

つまり、開始位置yおよび終了位置yは、それぞれ、単語埋め込み層110は、単語埋め込み層110からの出力値x,x,・・・,xの重み付きの和(に所定のパラメーター値bを加算したもの)に活性化関数を適用して算出される。 That is, the start position y 1 and the end position y 2 are obtained by the word embedding layer 110 by adding the weighted sum of the output values x 1 , x 2 , . It is calculated by applying an activation function to the parameter value b j added).

全結合回帰層220からの出力yおよびyは、学習用データに含まれる区間(正解)と照合される。具体的には、意見分析装置1は、全結合回帰層220からの出力と学習用データに出現するラベル区間とのクロスエントロピーを最小化する規範を用いて、モデルの内部パラメーターの学習を行う。ラベル区間の規範を計算する際には、学習データに出現するラベル区間をどれか1つに絞り込むことなく、計算効率のための枝刈りを行う場合を除いては、すべてのラベル区間を規範に含める。 The outputs y 1 and y 2 from the fully connected regression layer 220 are checked against the intervals (correct answers) included in the training data. Specifically, the opinion analysis device 1 learns the internal parameters of the model using a criterion that minimizes the cross-entropy between the output from the fully-connected regression layer 220 and the label section appearing in the learning data. When calculating the norms of label intervals, all label intervals are used as norms, except when pruning is performed for computational efficiency without narrowing down the label intervals appearing in the training data. include.

モデルの学習の際には、下の式(2)で表わされる損失関数Lspan(S)を用いる。 A loss function L span (S) represented by the following equation (2) is used during model learning.

Figure 2023064283000003
Figure 2023064283000003

式(2)において、SpanSet(S)は、意見分析装置1への入力テキストである文Sに出現するアノテーション区間の集合である。集合SpanSet(S)に属するひとつの区間lの、開始位置が式(2)におけるBegin(l)であり、終了位置がEnd(l)である。言い換えれば、1つの区間(スパン)は、開始位置の値と終了位置の値とで規定される。式(2)におけるCrossEntropy(y,x)は、全結合回帰層220からの出力のひとつであるy(つまり、yまたはy)と、学習用データによって与えられる開始位置または終了位置の正解とのクロスエントロピーである。 In Expression (2), SpanSet(S) is a set of annotation intervals appearing in sentence S, which is the input text to opinion analysis device 1 . The start position of one interval l belonging to the set SpanSet(S) is Begin(l) in Equation (2), and the end position is End(l). In other words, one section (span) is defined by the value of the start position and the value of the end position. CrossEntropy(y, x) in equation (2) is y (that is, y 1 or y 2 ), which is one of the outputs from the fully connected regression layer 220, and the correct starting or ending position given by the training data. is the cross entropy with

つまり、Lspan(S)は、各アノテーション区間についてのyと開始位置の正解とのクロスエントロピーと、yと終了位置の正解とのクロスエントロピーとの和の、全アノテーション区間についての総和に基づくものである。 In other words, L span (S) is the sum of the cross entropy between y 1 and the correct start position for each annotation interval and the cross entropy between y 2 and the correct end position for all annotation intervals. It is based on

クロスエントロピーCrossEntropy(y,x)は、下の式(3)によって計算されるものである。 The cross entropy CrossEntropy(y,x) is calculated by equation (3) below.

Figure 2023064283000004
Figure 2023064283000004

式(3)において、kは、文S内の位置を表すための指標である。また、max_seq_lengthは、文Sの系列長に対応する値である。また、expは、指数関数である。 In equation (3), k is an index for representing the position within sentence S. Also, max_seq_length is a value corresponding to the sequence length of the sentence S. Also, exp is an exponential function.

意見分析装置1は、上記の句切れ位置予測モデルのための損失関数Lspan(S)とは別に、系列ラベリング部12(図1)が持つモデルのための損失関数Lseq(S)を用いる。損失関数Lseq(S)は、従来技術による系列ラベリング問題における損失関数である。意見分析装置1に1文(S)が入力された場合のモデルの総合的な損失関数Ltotal(S)は、下の式(4)の通り計算される。 The opinion analysis device 1 uses the loss function L seq (S) for the model held by the series labeling unit 12 (FIG. 1), in addition to the loss function L span (S) for the above-described phrase break position prediction model. . The loss function L seq (S) is the loss function in the sequence labeling problem according to the prior art. A total loss function L total (S) of the model when one sentence (S) is input to the opinion analysis device 1 is calculated as shown in Equation (4) below.

Figure 2023064283000005
Figure 2023064283000005

つまり、総合的な損失関数Ltotal(S)は、句切れ位置予測モデルのための損失関数Lspan(S)と、系列ラベリング部12が持つモデルのための従来技術による損失関数Lseq(S)との和として計算される。 That is, the overall loss function L total (S) is the loss function L span (S) for the phrase break position prediction model and the conventional loss function L seq (S ).

系列ラベリング部12が持つモデルと、句切れ位置予測部22が持つモデルとのうち、句切れ位置予測部22が持つモデルは、学習時にのみ用いられ、推論時には用いられない。つまり、総合的な損失関数の値(上記の式(4))が減少するように学習が進む過程において、下位層(単語埋め込み部11の単語埋め込み層110)の分散表現の学習精度が向上する。これによって、系列ラベリング部12が持つモデルによるラベル付け(意見対象区間や意見区間を特定するタスク)の精度が向上する。 Of the models held by the sequence labeling section 12 and the models held by the phrase break position prediction section 22, the model held by the phrase break position prediction section 22 is used only during learning and not used during inference. In other words, in the process of learning progressing so that the value of the overall loss function (equation (4) above) decreases, the learning accuracy of the distributed representation of the lower layer (the word embedding layer 110 of the word embedding unit 11) improves. . This improves the accuracy of labeling (a task of identifying an opinion target section or an opinion section) by the model of the series labeling unit 12 .

図3は、意見分析装置1に入力されるテキストの実例と、その入力テキストに対して行われるラベル付けの例とを示す概略図である。言い換えれば、図3は、入力されるテキスト中から意見対象区間や意見区間を抽出する処理の実例を示す概略図である。 FIG. 3 is a schematic diagram showing an example of text input to the opinion analysis device 1 and an example of labeling performed on the input text. In other words, FIG. 3 is a schematic diagram showing an example of processing for extracting an opinion target section or an opinion section from an input text.

図示する入力テキスト例は、あるSNSに投稿された単文である。このテキストは、「暴力はいけない、いけないよ #アニメ」というものである。なお、このテキスト中の「#アニメ」は、特定の話題を検索しやすくするためのタグ(「#」を用いるため、ハッシュタグと呼ばれる)の記法にしたがった表現である。この入力テキストは、「暴力/は/いけない/、/いけない/よ/#/アニメ」という8個の単語に分割される(スラッシュで単語の区切りを表している)。ここでは、句読点や、「#」などという記号も、便宜的に単語の一つとして扱う。このような入力テキストから抽出される意見対象区間は、「暴力」(開始位置が1で、終了位置が1)と、「#アニメ」(開始位置が7で、終了位置が8)である。また、抽出される意見区間は、「いけない」(開始位置が3で、終了位置が3)と、「いけない」(開始位置が5で、終了位置が5)である。 The illustrated input text example is a simple sentence posted on a certain SNS. This text is "No violence, no #anime". It should be noted that "#anime" in this text is an expression according to the notation of tags (called hashtags because "#" is used) for facilitating searches for specific topics. This input text is divided into eight words "violence/ha/donai/,/donai/yo/#/anime" (the slashes denote word delimiters). Here, punctuation marks and symbols such as "#" are treated as one of words for the sake of convenience. Opinion target sections extracted from such an input text are "violence" (start position 1, end position 1) and "#animation" (start position 7, end position 8). Also, the extracted opinion sections are "not good" (start position is 3, end position is 3) and "not good" (start position is 5, end position is 5).

図4は、図3に示した入力テキスト例に対応する単語系列と、その系列に対応するタグ系列(ラベル系列)の正解の例を示す概略図である。例示する単語系列は、「暴力/は/いけない/、/いけない/よ/#/アニメ」というものである。この図では、単語の順序にしたがって番号(位置の番号)を付与している。このような単語系列に対応する正解のタグ系列は、「TARGET/O/OPINION/O/OPINION/O/TARGET/TARGET」である。「TARGET」というタグは、対応する単語が意見対象区間に属するものであることを表すタグである。「OPINION」というタグは、対応する単語が意見区間に属するものであることを表すタグである。「O」というタグは、対応する単語が意見対象区間にも意見区間にも属さないものであることを表すタグである。 FIG. 4 is a schematic diagram showing an example of a correct word sequence corresponding to the input text example shown in FIG. 3 and a tag sequence (label sequence) corresponding to the sequence. An example word sequence is "violence/ha/don't/,/don't/yo/#/anime." In this figure, numbers (position numbers) are given according to the order of the words. A correct tag sequence corresponding to such a word sequence is "TARGET/O/OPINION/O/OPINION/O/TARGET/TARGET". The tag "TARGET" is a tag indicating that the corresponding word belongs to the opinion target section. The tag "OPINION" is a tag indicating that the corresponding word belongs to the opinion section. The tag "O" is a tag that indicates that the corresponding word belongs to neither the opinion target section nor the opinion section.

つまり、この正解のタグ系列は、単語系列内の「暴力」という表現(区間の開始位置が1で終了位置が1)と、「#アニメ」という表現(区間の開始位置が7で終了位置が8)のそれぞれが意見対象区間であることを表す。また、単語系列内の「いけない」(区間の開始位置が3で終了位置が3)と、「いけない」(区間の開始位置が5で終了位置が5)のそれぞれが意見区間であることを表す。 In other words, the correct tag series is the expression "violence" (the section start position is 1 and the end position is 1) and the expression "#anime" (the section start position is 7 and the end position is 1). Each of 8) is an opinion target section. In addition, each of "Ikenai" (section start position is 3 and end position is 3) and "Ikenai" (section start position is 5 and end position is 5) in the word sequence is an opinion section. .

図5は、図3に示した入力テキスト例に対応する単語系列と、その系列に対応するタグ系列の正解の別の例を示す概略図である。図4におけるタグとの違いとして、図5における例では、「TARGET」および「OPINION」のそれぞれのタグには、「B-」あるいは「I-」という接頭辞が付加される。このようなタグは、BIO形式タグと呼ばれる。「B-」は、区間の始まりであることを表す。また、「I-」は、区間の途中であることを表す。なお、区間の終わりの単語に与えられるタグも「I-」で始まるものである。図5に示す例では、「暴力/は/いけない/、/いけない/よ/#/アニメ」という単語系列に対応する正解のタグ系列は、「B-TARGET/O/B-OPINION/O/B-OPINION/O/B-TARGET/I-TARGET」である。 FIG. 5 is a schematic diagram showing another example of a correct word sequence corresponding to the example input text shown in FIG. 3 and a tag sequence corresponding to the sequence. As a difference from the tags in FIG. 4, in the example in FIG. 5, each tag of "TARGET" and "OPINION" is prefixed with "B-" or "I-". Such tags are called BIO format tags. "B-" indicates the beginning of the interval. Also, "I-" indicates that it is in the middle of the section. The tag given to the word at the end of the section also starts with "I-". In the example shown in FIG. 5, the correct tag sequence corresponding to the word sequence "violence/wa/don't/,/don't/yo/#/anime" is "B-TARGET/O/B-OPINION/O/B -OPINION/O/B-TARGET/I-TARGET".

つまり、この正解のタグ系列は、単語系列内の「暴力」という表現(区間の開始位置が1で終了位置が1)と、「#アニメ」という表現(区間の開始位置が7で終了位置が8)のそれぞれが意見対象区間であることを表す。また、単語系列内の「いけない」(区間の開始位置が3で終了位置が3)と、「いけない」(区間の開始位置が5で終了位置が5)のそれぞれが意見区間であることを表す。BIO形式のタグでは、「B-」あるいは「I-」を付けることによって、例えば図5の第7番目の単語と第8番目の単語とが同一の区間に属するものであることを明示的に表している。 In other words, the correct tag series is the expression "violence" (the section start position is 1 and the end position is 1) and the expression "#anime" (the section start position is 7 and the end position is 1). Each of 8) is an opinion target section. In addition, each of "Ikenai" (section start position is 3 and end position is 3) and "Ikenai" (section start position is 5 and end position is 5) in the word sequence is an opinion section. . In the BIO format tag, by adding "B-" or "I-", for example, the seventh word and the eighth word in FIG. 5 explicitly indicate that they belong to the same section. represent.

図6は、句切れ位置予測モデルの学習を行うための正解データの例を示す概略図である。図示するように、この正解データは、区間の開始位置と終了位置のペアの集合として与えられる。図示する例では、正解データは、4つの区間に関するデータを含む。それらの区間は、開始位置が1で終了位置が1、開始位置が3で終了位置が3、開始位置が5で終了位置が5、開始位置が7で終了位置が8、の4つである。この正解データは、図4や図5で示した例に対応している。図6で示すデータは、図2にも示した開始位置と終了位置についての正解を表す。 FIG. 6 is a schematic diagram showing an example of correct data for learning a phrase break position prediction model. As illustrated, this correct answer data is given as a set of pairs of section start and end positions. In the illustrated example, the correct answer data includes data regarding four sections. There are four intervals: start position 1, end position 1, start position 3, end position 3, start position 5, end position 5, start position 7, end position 8. . This correct answer data corresponds to the examples shown in FIGS. The data shown in FIG. 6 represent the correct answers for the start and end positions also shown in FIG.

図7は、意見分析装置1がモデルの学習を行う際の処理の手順を示すフローチャートである。以下、このフローチャートに沿って、モデルの学習の手順を説明する。 FIG. 7 is a flowchart showing the procedure of processing when the opinion analysis device 1 performs model learning. The procedure for model learning will be described below along this flow chart.

ステップS11において、学習用データ供給部30は、学習用データを供給する。学習用データは、入力テキスト(単語系列)と、その入力データに対応する正解データとのペアである。正解データは、タグ系列の正解と、区間の位置(開始位置および終了位置)とを含む。単語埋め込み部11は、入力テキスト(単語系列)を読み込む。また、系列ラベリングの損失関数算出部17は、正解のタグ系列を読み込む。そして、句切れ位置の損失関数算出部27は、区間の開始位置および終了位置の正解データ(例えば、図6)を読み込む。 In step S11, the learning data supply unit 30 supplies learning data. The learning data is a pair of input text (word sequence) and correct data corresponding to the input data. The correct answer data includes the correct answer of the tag sequence and the position of the section (start position and end position). The word embedding unit 11 reads input text (word sequence). Also, the series labeling loss function calculation unit 17 reads the correct tag series. Then, the loss function calculation unit 27 for the punctuation position reads the correct data (for example, FIG. 6) of the start position and end position of the section.

ステップS12において、意見分析装置1は、算出される損失関数値に基づいて、各モデルの内部パラメーターの調整を行う。具体的には、次の通りである。 In step S12, the opinion analysis device 1 adjusts the internal parameters of each model based on the calculated loss function value. Specifically, it is as follows.

単語埋め込み部11は、入力される単語系列に対応する分散表現の系列を、系列ラベリング部12と句切れ位置予測部22とに渡す。系列ラベリング部12は、その時点での内部パラメーター値を持つ系列ラベリングモデルを用いて、系列ラベルを求める。
また、句切れ位置予測部22は、その時点での内部パラメーター値に基づく句切れ位置予測モデルを用いて、句切れ位置を求める。系列ラベリングの損失関数算出部17は、系列ラベリング部12が出力する系列ラベルと、正解の系列ラベルとに基づいて、損失関数値を算出する。句切れ位置の損失関数算出部27は、句切れ位置予測部22が出力する句切れ位置と、正解の句切れ位置(開始位置および終了位置)とに基づいて、損失関数値を算出する。これら算出された損失関数値に基づいて、誤差逆伝播法により、各モデルの内部パラメーターの調整を行う。このようなモデルの内部パラメーターの調整を繰り返すことは、損失関数値が減少する方向に作用する。言い換えれば、パラメーターの調整を繰り返すことにより、各モデルは、より正解に近い出力値を算出できるようになる。なお、誤差逆伝播法によるモデルのパラメーターの調整の手法自体は、既存技術に属するものである。
The word embedding unit 11 passes the series of distributed expressions corresponding to the input word series to the series labeling unit 12 and the phrase break position prediction unit 22 . The sequence labeling unit 12 obtains a sequence label using a sequence labeling model having internal parameter values at that time.
Also, the phrase break position prediction unit 22 obtains the phrase break position using a phrase break position prediction model based on the internal parameter value at that time. The series labeling loss function calculation unit 17 calculates a loss function value based on the series label output by the series labeling unit 12 and the correct series label. The phrase break position loss function calculator 27 calculates a loss function value based on the phrase break positions output by the phrase break position prediction unit 22 and the correct phrase break positions (start position and end position). Based on these calculated loss function values, the internal parameters of each model are adjusted by the error backpropagation method. Repeated adjustment of the internal parameters of such a model acts in the direction of decreasing the loss function value. In other words, by repeating parameter adjustment, each model can calculate an output value that is closer to the correct answer. The method of adjusting parameters of the model by the error backpropagation method itself belongs to the existing technology.

ステップS13において、意見分析装置1は、パラメーターを調整した後の各モデルの状態を保存する。具体的には、意見分析装置1は、調整後のパラメーターの値を不揮発性のメモリー等に書き込む。 In step S13, the opinion analysis device 1 saves the state of each model after adjusting the parameters. Specifically, the opinion analysis device 1 writes the adjusted parameter values into a non-volatile memory or the like.

図8は、意見分析装置1が、学習済みのモデルを用いて、系列ラベリングの処理を行う際の手順を示すフローチャートである。図7に示した処理手順のステップS13においてモデルの状態が保存されているため、意見分析装置1は、各モデルの状態を読み出すことができる。以下、このフローチャートに沿って、系列ラベルを推定する処理の手順を説明する。 FIG. 8 is a flow chart showing a sequence labeling process performed by the opinion analysis device 1 using a trained model. Since the state of the model is saved in step S13 of the processing procedure shown in FIG. 7, the opinion analysis device 1 can read the state of each model. The procedure for estimating the sequence label will be described below along this flowchart.

ステップS21において、単語埋め込み部11は、入力テキスト(単語系列)を読み込む。 In step S21, the word embedding section 11 reads the input text (word sequence).

ステップS22において、意見分析装置1は、モデルを用いて、入力テキストに対応するタグ系列を推論する。具体的には、単語埋め込みモデルを有する単語埋め込み部11は、単語埋め込みモデルによって算出したベクトルの系列を出力する。系列ラベリングモデルを有する系列ラベリング部12は、単語埋め込み部11から渡されるベクトルの系列に基づいて、タグ系列を求める。 At step S22, the opinion analysis device 1 uses the model to infer a tag sequence corresponding to the input text. Specifically, the word embedding unit 11 having the word embedding model outputs a series of vectors calculated by the word embedding model. A sequence labeling unit 12 having a sequence labeling model obtains a tag sequence based on the vector sequence passed from the word embedding unit 11 .

ステップS23において、系列ラベリング部12は、ステップS22において求めたタグ系列を出力する。入力テキスト(単語列)に対応するタグ系列の例は、図4や図5に示した通りである。 In step S23, the series labeling unit 12 outputs the tag series obtained in step S22. Examples of tag sequences corresponding to input texts (word strings) are as shown in FIGS. 4 and 5. FIG.

以上説明したように本実施形態の意見分析装置を用いることにより、入力される単語系列に対応してタグ系列を自動的に付与する処理において、付与するタグの精度を向上させることができる。具体例としては、入力される単語系列の各単語について、意見対象を表す単語であることを示すタグや、意見を表す単語であることを示すタグを、精度よく付与することができるようになる。つまり、入力される単語列中の、特定の性質を有する部分(例えば、意見対象や、意見など)を、精度よく抽出することが可能となる。 As described above, by using the opinion analysis apparatus of this embodiment, it is possible to improve the accuracy of tags to be added in the process of automatically adding tag sequences corresponding to input word sequences. As a specific example, for each word in an input word sequence, a tag indicating that it is a word that expresses an opinion object or a tag that indicates that it is a word that expresses an opinion can be added with high accuracy. . In other words, it becomes possible to accurately extract a part having a specific property (for example, an object of opinion, an opinion, etc.) in an input word string.

本実施形態のこのような装置を、SNSで投稿されるテキストの中から特定の性質の部分(例えば、意見対象の部分や、意見の部分など)を抽出するために利用することができる。例えば、SNSでの投稿内容に基づいて特定のコンテンツ(放送番組等)の視聴に対する反響を自動的に分析する場合に、投稿内容のテキスト自体にはどの部分が意見対象でどの部分が意見であるかが明示されていなくても、これらの部分を自動的に精度よく抽出することができるようになる。あるいは投稿内容のテキストにはどのコンテンツに対する反響であるかを表すハッシュタグ等が含まれていない場合にも、意見対象の部分や意見の部分等を自動的に抽出することが可能となる。つまり、本実施形態の装置によると、キーワード検索等の手法よりも強力かつ精度の高い分析が可能となる。つまり、本実施形態により、大規模な市場調査等を容易に且つ精度よく実施することが可能となる。 Such a device of the present embodiment can be used to extract a portion of a specific nature (for example, an opinion target portion, an opinion portion, etc.) from text posted on an SNS. For example, when automatically analyzing the reaction to viewing of specific content (broadcast program, etc.) based on the content posted on SNS, which part is the object of opinion and which part is the opinion in the text of the posted content itself. These parts can be automatically extracted with high accuracy even if they are not specified. Alternatively, even if the text of the posted content does not include a hash tag or the like indicating which content is being resonated with, it is possible to automatically extract the opinion target portion, the opinion portion, or the like. In other words, according to the apparatus of the present embodiment, it is possible to perform more powerful and accurate analysis than methods such as keyword searches. That is, according to this embodiment, it is possible to easily and accurately conduct large-scale market research.

SNS等に投稿された大量のテキスト(例えば、数千件から数十万件の程度)について、意見対象や意見を自動的に抽出することができると、どのような意見対象に対してどのような意見がどの程度発言されたかを自動的に集計できるようになる。この集計の際には、同一の意見対象についての集計を行ったり、似通った意見対象をまとめ上げるようなクラスタリング処理を行ったりすることもできる。集計の手法やクラスタリングの手法としては、従来技術による手法を用いることができる。例えば、放送番組に対する視聴者らの意見を自動的に集計することが可能となる。 If it is possible to automatically extract opinion targets and opinions from a large amount of texts (for example, thousands to hundreds of thousands) posted on SNS, etc., it will be possible to It will be possible to automatically tally how many opinions were expressed. At the time of this tabulation, it is also possible to perform tabulation on the same object of opinion, or to perform a clustering process to collect similar object of opinion. Techniques according to conventional techniques can be used as aggregation techniques and clustering techniques. For example, it is possible to automatically aggregate viewers' opinions on broadcast programs.

図9は、上記実施形態の意見分析装置1の内部構成の例を示すブロック図である。意見分析装置1は、コンピューターを用いて実現され得る。図示するように、そのコンピューターは、中央処理装置901と、RAM902と、入出力ポート903と、入出力デバイス904や905等と、バス906と、を含んで構成される。コンピューター自体は、既存技術を用いて実現可能である。中央処理装置901は、RAM902等から読み込んだプログラムに含まれる命令を実行する。中央処理装置901は、各命令にしたがって、RAM902にデータを書き込んだり、RAM902からデータを読み出したり、算術演算や論理演算を行ったりする。RAM902は、データやプログラムを記憶する。RAM902に含まれる各要素は、アドレスを持ち、アドレスを用いてアクセスされ得るものである。なお、RAMは、「ランダムアクセスメモリー」の略である。入出力ポート903は、中央処理装置901が外部の入出力デバイス等とデータのやり取りを行うためのポートである。入出力デバイス904や905は、入出力デバイスである。入出力デバイス904や905は、入出力ポート903を介して中央処理装置901との間でデータをやりとりする。バス906は、コンピューター内部で使用される共通の通信路である。例えば、中央処理装置901は、バス906を介してRAM902のデータを読んだり書いたりする。また、例えば、中央処理装置901は、バス906を介して入出力ポートにアクセスする。 FIG. 9 is a block diagram showing an example of the internal configuration of the opinion analysis device 1 of the above embodiment. The opinion analysis device 1 can be implemented using a computer. As shown, the computer includes a central processing unit 901 , RAM 902 , input/output ports 903 , input/output devices 904 and 905 and the like, and bus 906 . The computer itself can be implemented using existing technology. The central processing unit 901 executes instructions included in programs read from the RAM 902 or the like. The central processing unit 901 writes data to the RAM 902, reads data from the RAM 902, and performs arithmetic operations and logical operations according to each instruction. A RAM 902 stores data and programs. Each element contained in RAM 902 has an address and can be accessed using the address. Note that RAM is an abbreviation for "random access memory". The input/output port 903 is a port for the central processing unit 901 to exchange data with an external input/output device or the like. Input/output devices 904 and 905 are input/output devices. The input/output devices 904 and 905 exchange data with the central processing unit 901 via the input/output port 903 . Bus 906 is a common communication path used inside the computer. For example, central processing unit 901 reads and writes data in RAM 902 via bus 906 . Also, for example, central processing unit 901 accesses input/output ports via bus 906 .

なお、上述した意見分析装置1の少なくとも一部の機能をコンピューターで実現することができる。その場合、この機能を実現するためのプログラムをコンピューター読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピューターシステムに読み込ませ、実行することによって実現しても良い。なお、ここでいう「コンピューターシステム」とは、OSや周辺機器等のハードウェアを含むものとする。また、「コンピューター読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD-ROM、DVD-ROM、USBメモリー等の可搬媒体、コンピューターシステムに内蔵されるハードディスク等の記憶装置のことをいう。つまり、「コンピューター読み取り可能な記録媒体」とは、非一過性の(non-transitory)コンピューター読み取り可能な記録媒体であってよい。さらに「コンピューター読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、一時的に、動的にプログラムを保持するもの、その場合のサーバーやクライアントとなるコンピューターシステム内部の揮発性メモリーのように、一定時間プログラムを保持しているものも含んでも良い。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピューターシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。 At least part of the functions of the opinion analysis device 1 described above can be realized by a computer. In that case, a program for realizing this function may be recorded in a computer-readable recording medium, and the program recorded in this recording medium may be read into a computer system and executed. It should be noted that the "computer system" referred to here includes hardware such as an OS and peripheral devices. In addition, “computer-readable recording media” refers to portable media such as flexible discs, magneto-optical discs, ROMs, CD-ROMs, DVD-ROMs, USB memories, and storage devices such as hard disks built into computer systems. Say things. In other words, the "computer-readable recording medium" may be a non-transitory computer-readable recording medium. In addition, "computer-readable recording medium" means a medium that temporarily and dynamically retains a program, such as a communication line for transmitting a program via a network such as the Internet or a communication line such as a telephone line. , it may also include something that holds the program for a certain period of time, such as a volatile memory inside a computer system that serves as a server or client in that case. Further, the program may be for realizing part of the functions described above, or may be a program capable of realizing the functions described above in combination with a program already recorded in the computer system.

以上、複数の実施形態を説明したが、本発明はさらに次のような変形例でも実施することが可能である。 Although a plurality of embodiments have been described above, the present invention can also be implemented in the following modifications.

[第1変形例]
以上の説明では、処理対象とするテキストは日本語で記述されたテキストであったが、本実施形態を日本語以外のデータに適用してもよい。後で説明する実証実験においては、日本語の他に英語のテキストのデータを処理対象としている。また、さらに、その他の言語によるテキストを処理対象としてもよい。
[First modification]
In the above description, the text to be processed was written in Japanese, but the present embodiment may be applied to data other than Japanese. In the demonstration experiment described later, in addition to Japanese text data, English text data was also processed. Furthermore, texts in other languages may also be processed.

[第2変形例]
上記実施形態では、1台の意見分析装置1が、モデルの学習も行い、学習済みのモデルを用いてラベル系列を付与する(推定する)処理も行うものであった。変形例として、意見分析装置1が、モデルの学習と、学習済みのモデルを用いたラベル系列の推定との、いずれかのみをおこなうものであってもよい。意見分析装置1が機械学習装置として機能する場合には、学習済みのモデルのパラメーターを他の装置に移植して、移植先の装置においてラベル系列を付与する(推定する)処理を行わせることができる。また、意見分析装置1が、自らは機械学習を行わず、学習済みのモデルのパラメーターを取得して、ラベル系列を付与する(推定する)処理を行うものであってもよい。
[Second modification]
In the above-described embodiment, one opinion analysis device 1 also performs model learning, and uses the learned model to assign (estimate) a label sequence. As a modification, the opinion analysis device 1 may perform either model learning or label sequence estimation using a trained model. When the opinion analysis device 1 functions as a machine learning device, it is possible to transplant the parameters of the learned model to another device and cause the transplanted device to assign (estimate) a label sequence. can. Alternatively, the opinion analysis device 1 may not perform machine learning by itself, but may acquire parameters of a model that has been learned and assign (estimate) a label sequence.

後者の場合には、意見分析装置1は、単語列を入力し前記単語列に対応する単語埋め込み表現列を出力する単語埋め込み部と、前記単語埋め込み部から出力される単語埋め込み表現列を入力し前記単語埋め込み表現列に対応するラベル系列を出力する系列ラベリング部と、を備える自然言語処理装置として機能する。このとき、少なくとも単語埋め込み部11が内部に持つモデルとしては、上記実施形態で説明した機械学習の仕組み(機械学習装置)を用いて学習済みのものを利用する。 In the latter case, the opinion analysis device 1 receives a word embedding unit that inputs a word string and outputs a word embedding expression string corresponding to the word string, and a word embedding expression string that is output from the word embedding unit. and a sequence labeling unit that outputs a label sequence corresponding to the word embedding expression sequence. At this time, at least as a model that the word embedding unit 11 has inside, one that has been learned using the mechanism of machine learning (machine learning device) described in the above embodiment is used.

以上、この発明の実施形態およびその変形例について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。 Although the embodiment of the present invention and its modifications have been described in detail with reference to the drawings, the specific configuration is not limited to this embodiment, and designs and the like are possible without departing from the gist of the present invention. included.

[実装および評価]
意見分析装置1を実装し、SNS(ツイッター)における実際の投稿文や、映画に関するレビュー文を用いた実験により評価した。その実験での評価結果について説明する。
[Implementation and Evaluation]
The opinion analysis device 1 was implemented and evaluated by experiments using actual posted sentences on SNS (Twitter) and review sentences about movies. Evaluation results of the experiment will be described.

評価に用いたデータは、テレビ番組に関する日本語のツイートと、映画に関する英語のレビューとである。具体的には、日本語テキストとして、ツイッターにおける、テレビ番組(NHK朝ドラ)「なつぞら」についての、9日間の日本語でのツイート(ツイート数は24,610、単語数は984,861)を用いた。また、英語テキストとして、評論サイトIMDbのレビュー(レビュー数は986、文数は10,360、単語数は321,807)を用いた。なお、学習用データには、人手で正解を付与した。 The data used for evaluation are Japanese tweets about TV programs and English reviews about movies. Specifically, as Japanese text, tweets in Japanese about the TV program (NHK morning drama) "Natsuzora" on Twitter for 9 days (the number of tweets is 24,610, the number of words is 984,861) was used. Also, as the English text, a review of the review site IMDb (986 reviews, 10,360 sentences, 321,807 words) was used. Correct answers were given manually to the learning data.

評価尺度としては、precision(プレシジョン)、recall(リコール)、f1を用いた。これらは、それぞれ、式(5)、式(6)、式(7)で定義される。なお、ここで、TPは真陽性、FPは偽陽性、FNは偽陰性である。 As evaluation scales, precision, recall, and f1 were used. These are defined by equations (5), (6) and (7), respectively. Here, TP is true positive, FP is false positive, and FN is false negative.

Figure 2023064283000006
Figure 2023064283000006

Figure 2023064283000007
Figure 2023064283000007

Figure 2023064283000008
Figure 2023064283000008

放送番組に関する日本語によるテキスト(ツイート)の分析タスクに対して、ラベルを最上位の第1階層に制限した場合の実験結果は、表1に示す通りである。 Table 1 shows the experimental results when the label was restricted to the first layer, the highest level, for the task of analyzing texts (tweets) in Japanese about broadcast programs.

なお、この実験において、ラベルは3階層に体系化され、第1階層で大きく2種類に分けられている。その2種類とは、放送番組の内容に言及した部分に付与されるREFERENCE 系のラベルと、発信者の主観を述べた部分に付与されるOPINION系のラベルである。REFERENCE系のラベルは、第2階層におけるTITLE、MUSIC、PERSON、PROGRAM、SCENE、STORY、QUOTEという各ラベルを持つ。一方、OPINION系のラベルは、第2階層におけるEVALUATION、ACTION、INDEXという各ラベルを持つ。このうち、第2階層におけるECALUATIONは、第3階層におけるPOSITIVE、NEGATIVE、NEUTRAL、REQUESTという各ラベルを持つ。 In this experiment, the labels are systematized into three layers, and the first layer is roughly divided into two types. The two types are a REFERENCE label assigned to a part referring to the contents of a broadcast program and an OPINION label assigned to a part describing the sender's subjectivity. REFERENCE-type labels have respective labels of TITLE, MUSIC, PERSON, PROGRAM, SCENE, STORY, and QUOTE in the second hierarchy. On the other hand, OPINION-based labels have labels of EVALUATION, ACTION, and INDEX in the second hierarchy. Among them, ECALUATION in the second hierarchy has respective labels of POSITIVE, NEGATIVE, NEUTRAL, and REQUEST in the third hierarchy.

実験では、評価対象として、第1階層のREFERENCEラベルおよびOPINIONラベルを個別に評価し、そして、全体での評価も行った。比較対象である従来技術は、学習時にも句切れ位置予測部22(図1を参照)を用いない場合である。 In the experiment, the REFERENCE label and the OPINION label of the first layer were individually evaluated as evaluation targets, and an overall evaluation was also performed. The conventional technology to be compared is a case in which the punctuation position predictor 22 (see FIG. 1) is not used even during learning.

Figure 2023064283000009
Figure 2023064283000009

評価尺度recallのREFERENCEラベルに関して本実施形態の結果の値が従来技術の結果をわずかに下回ったのを除いて、他のすべての場合については、本実施形態の結果は従来技術の結果を上回ることが確認できた。 For all other cases, the results of the present embodiment exceed the results of the prior art, except for the REFERENCE label of the recall scale, where the values of the results of the present embodiment were slightly below those of the prior art. was confirmed.

なお、本実施形態を用いることの効果は、モデルを学習する際のエポック(epoch)数によって異なる。学習のはじめの段階(10エポック以下程度の段階)では、従来技術と本実施形態との間で、f1値で評価する性能には大きな違いは見られない。しかしながら、10エポックを超えるあたりから本実施形態の効果が見られはじめ、20エポック程度になると本実施形態の優位性(従来技術に対するf1値での性能差)が顕著となる。 Note that the effect of using this embodiment varies depending on the number of epochs when learning the model. At the initial stage of learning (stage of about 10 epochs or less), there is no significant difference in the f1 value evaluation performance between the conventional technique and the present embodiment. However, the effect of the present embodiment begins to be seen after about 10 epochs, and the superiority of the present embodiment (the performance difference in the f1 value with respect to the conventional technology) becomes noticeable at about 20 epochs.

英語で記述された映画レビューのテキストの分析タスクに対して、ラベルを最上位の第1階層に制限した場合の実験結果は、表2に示す通りである。表1の場合と同様に、表2においても第1階層のREFERENCEラベルおよびOPINIONラベルの個別に評価と、全体での評価とを行った。 Table 2 shows the experimental results for the task of analyzing movie review texts written in English when the labels are restricted to the first layer, which is the highest level. As in the case of Table 1, also in Table 2, the REFERENCE label and the OPINION label of the first layer were evaluated individually and evaluated as a whole.

Figure 2023064283000010
Figure 2023064283000010

この英語のテキストの分析においても、ほとんどの場合に本実施形態が従来技術の結果を上回ることが確認できた。本実施形態の評価結果が従来技術の評価結果を下回るのは、評価尺度recallのREFERENCEラベルに関してのみである。その他の場合には、本実施形態の評価結果が従来技術の評価を上回っている。 Analysis of this English text also confirms that the present embodiment outperforms the results of the prior art in most cases. The evaluation result of the present embodiment is lower than the evaluation result of the prior art only with respect to the REFERENCE label of the evaluation scale recall. In other cases, the evaluation result of this embodiment exceeds the evaluation of the prior art.

本実施形態における改善が従来技術と比較して有意なものであるか否かを表す有意水準(p値)を、下の表3に示す。ここで示すのは、McNemar検定を行った場合の有意水準である。 Table 3 below shows significance levels (p-values) that indicate whether or not the improvement in this embodiment is significant compared to the prior art. Shown here are the significance levels when the McNemar test is performed.

Figure 2023064283000011
Figure 2023064283000011

放送番組に関する日本語によるテキスト(ツイート)の分析タスクに対して、ラベルの階層を制限しない場合の実験結果は、下の表4に示す通りである。表4に示す数値は、全ラベルの総合的な評価結果(マイクロ平均)である。 Table 4 below shows the experimental results for the task of analyzing Japanese texts (tweets) about broadcast programs when the label hierarchy is not restricted. The numerical values shown in Table 4 are the overall evaluation results (micro-average) of all labels.

Figure 2023064283000012
Figure 2023064283000012

以上の、表1、表2、表4で示したように、本実施形態によるテキスト内の特定の位置づけの表現を抽出(意見対象の抽出)の精度が従来技術の場合よりもよいことが、実験によって確認できた。また、表3で示したように、精度の向上が有意なものであることを、検定によって確かめることができた。 As shown in Tables 1, 2, and 4 above, the accuracy of extracting an expression of a specific position in a text (extracting an opinion target) according to the present embodiment is better than that of the prior art. It was confirmed by experiments. Moreover, as shown in Table 3, it was confirmed by the test that the improvement in accuracy was significant.

本発明は、例えば、自然言語で記述された文から特定の位置づけの要素を抽出するために利用することができる。一例として、SNSに投稿されるテキストから特定の位置づけの要素を抽出するために利用することができる。但し、本発明の利用範囲はここに例示したものには限られない。 INDUSTRIAL APPLICABILITY The present invention can be used, for example, to extract an element with a specific position from a sentence written in natural language. As an example, it can be used to extract a specific positioning element from a text posted on SNS. However, the scope of application of the present invention is not limited to those exemplified here.

1 意見分析装置(機械学習装置、自然言語処理装置)
11 単語埋め込み部
12 系列ラベリング部
17 系列ラベリングの損失関数算出部
22 句切れ位置予測部
27 句切れ位置の損失関数算出部
30 学習用データ供給部
220 全結合回帰層
110 単語埋め込み層(BERTエンベディング層)
901 中央処理装置
902 RAM
903 入出力ポート
904,905 入出力デバイス
906 バス
1 Opinion analysis device (machine learning device, natural language processing device)
11 Word embedding unit 12 Sequence labeling unit 17 Sequence labeling loss function calculation unit 22 Phrase break position prediction unit 27 Phrase break position loss function calculation unit 30 Learning data supply unit 220 Fully connected regression layer 110 Word embedding layer (BERT embedding layer )
901 central processing unit 902 RAM
903 input/output ports 904, 905 input/output device 906 bus

Claims (6)

単語列を入力し前記単語列に対応する単語埋め込み表現列を出力する単語埋め込み部と、
前記単語埋め込み部から出力される単語埋め込み表現列を入力し前記単語埋め込み表現列に対応するラベル系列を出力する系列ラベリング部と、
前記単語埋め込み部から出力される単語埋め込み表現列を入力し前記単語埋め込み表現列に対応する句切れ位置情報を出力する句切れ位置予測部と、
前記単語埋め込み部に入力するための単語列を供給するとともに、前記系列ラベリング部が出力する前記ラベル系列に対応する正解ラベル系列を供給し、さらに前記句切れ位置予測部が出力する前記句切れ位置情報に対応する正解句切れ位置情報を供給する学習用データ供給部と、
を備え、
前記系列ラベリング部は、前記ラベル系列と前記正解ラベル系列との誤差に基づく逆伝播を行うことによって内部のモデルのパラメーターを調整し、
前記句切れ位置予測部は、前記句切れ位置情報と前記正解句切れ位置情報との誤差に基づく逆伝播を行うことによって内部のモデルのパラメーターを調整し、
前記単語埋め込み部は、前記系列ラベリング部からの誤差の逆伝播と前記句切れ位置予測部からの誤差の逆伝播とによって内部のモデルのパラメーターを調整する、
機械学習装置。
a word embedding unit that inputs a word string and outputs a word embedding expression string corresponding to the word string;
a sequence labeling unit that inputs the word embedding expression sequence output from the word embedding unit and outputs a label sequence corresponding to the word embedding expression sequence;
a phrase break position prediction unit that inputs the word embedding expression string output from the word embedding unit and outputs phrase break position information corresponding to the word embedding expression string;
A word string to be input to the word embedding unit is supplied, a correct label sequence corresponding to the label sequence output by the sequence labeling unit is supplied, and the phrase break position output by the phrase break position prediction unit is supplied. a learning data supply unit that supplies information on correct phrase break positions corresponding to information;
with
The sequence labeling unit adjusts the parameters of the internal model by performing backpropagation based on the error between the label sequence and the correct label sequence,
The phrase break position prediction unit adjusts the parameters of the internal model by performing backpropagation based on the error between the phrase break position information and the correct phrase break position information,
The word embedding unit adjusts the parameters of the internal model by backpropagating errors from the sequence labeling unit and backpropagating errors from the phrase break position prediction unit.
Machine learning device.
前記句切れ位置予測部は、入力される前記単語埋め込み表現列に含まれるすべての単語埋め込み表現を基とする全結合回帰モデルを用いることによって、前記単語埋め込み表現列に対応する句切れ位置情報を出力する、
請求項1に記載の機械学習装置。
The phrase break position prediction unit predicts the phrase break position information corresponding to the word embedding expression string by using a fully connected regression model based on all word embedding expressions contained in the input word embedding expression string. Output,
The machine learning device according to claim 1.
前記系列ラベリング部は、入力される元の前記単語列に含まれる所定の部分列が意見対象であることを表すラベルと、前記所定の部分列が意見であることを表すラベルと、を少なくとも出力する、
請求項1または2に記載の機械学習装置。
The sequence labeling unit outputs at least a label indicating that a predetermined subsequence included in the input original word string is an opinion object and a label indicating that the predetermined subsequence is an opinion. do,
The machine learning device according to claim 1 or 2.
前記句切れ位置予測部は、前記句切れ位置情報として、前記部分列の開始位置および終了位置を表す数値を出力するものであり、
前記学習用データ供給部が供給する前記正解句切れ位置情報は、前記部分列の開始位置および終了位置の正解を表す数値の情報である、
請求項3に記載の機械学習装置。
The phrase break position prediction unit outputs numerical values representing the start position and end position of the subsequence as the phrase break position information,
The correct phrase break position information supplied by the learning data supply unit is numerical information representing the correct start position and end position of the subsequence.
The machine learning device according to claim 3.
単語列を入力し前記単語列に対応する単語埋め込み表現列を出力する単語埋め込み部と、
前記単語埋め込み部から出力される単語埋め込み表現列を入力し前記単語埋め込み表現列に対応するラベル系列を出力する系列ラベリング部と、
を備え、
少なくとも、前記単語埋め込み部が内部に持つモデルは、請求項1から4までのいずれか一項に記載の機械学習装置によって学習済みである、
自然言語処理装置。
a word embedding unit that inputs a word string and outputs a word embedding expression string corresponding to the word string;
a sequence labeling unit that inputs the word embedding expression sequence output from the word embedding unit and outputs a label sequence corresponding to the word embedding expression sequence;
with
At least the model that the word embedding unit has inside has been learned by the machine learning device according to any one of claims 1 to 4,
Natural language processor.
単語列を入力し前記単語列に対応する単語埋め込み表現列を出力する単語埋め込み部と、
前記単語埋め込み部から出力される単語埋め込み表現列を入力し前記単語埋め込み表現列に対応するラベル系列を出力する系列ラベリング部と、
前記単語埋め込み部から出力される単語埋め込み表現列を入力し前記単語埋め込み表現列に対応する句切れ位置情報を出力する句切れ位置予測部と、
前記単語埋め込み部に入力するための単語列を供給するとともに、前記系列ラベリング部が出力する前記ラベル系列に対応する正解ラベル系列を供給し、さらに前記句切れ位置予測部が出力する前記句切れ位置情報に対応する正解句切れ位置情報を供給する学習用データ供給部と、
を備え、
前記系列ラベリング部は、前記ラベル系列と前記正解ラベル系列との誤差に基づく逆伝播を行うことによって内部のモデルのパラメーターを調整し、
前記句切れ位置予測部は、前記句切れ位置情報と前記正解句切れ位置情報との誤差に基づく逆伝播を行うことによって内部のモデルのパラメーターを調整し、
前記単語埋め込み部は、前記系列ラベリング部からの誤差の逆伝播と前記句切れ位置予測部からの誤差の逆伝播とによって内部のモデルのパラメーターを調整する、
機械学習装置、としてコンピューターを機能させるためのプログラム。
a word embedding unit that inputs a word string and outputs a word embedding expression string corresponding to the word string;
a sequence labeling unit that inputs the word embedding expression sequence output from the word embedding unit and outputs a label sequence corresponding to the word embedding expression sequence;
a phrase break position prediction unit that inputs the word embedding expression string output from the word embedding unit and outputs phrase break position information corresponding to the word embedding expression string;
A word string to be input to the word embedding unit is supplied, a correct label sequence corresponding to the label sequence output by the sequence labeling unit is supplied, and the phrase break position output by the phrase break position prediction unit is supplied. a learning data supply unit that supplies information on correct phrase break positions corresponding to information;
with
The sequence labeling unit adjusts the parameters of the internal model by performing backpropagation based on the error between the label sequence and the correct label sequence,
The phrase break position prediction unit adjusts the parameters of the internal model by performing backpropagation based on the error between the phrase break position information and the correct phrase break position information,
The word embedding unit adjusts the parameters of the internal model by backpropagating errors from the sequence labeling unit and backpropagating errors from the phrase break position prediction unit.
A program that makes a computer act as a machine learning device.
JP2021174466A 2021-10-26 2021-10-26 Machine learning device, natural language processing device, and program Pending JP2023064283A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021174466A JP2023064283A (en) 2021-10-26 2021-10-26 Machine learning device, natural language processing device, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021174466A JP2023064283A (en) 2021-10-26 2021-10-26 Machine learning device, natural language processing device, and program

Publications (1)

Publication Number Publication Date
JP2023064283A true JP2023064283A (en) 2023-05-11

Family

ID=86271507

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021174466A Pending JP2023064283A (en) 2021-10-26 2021-10-26 Machine learning device, natural language processing device, and program

Country Status (1)

Country Link
JP (1) JP2023064283A (en)

Similar Documents

Publication Publication Date Title
Tan et al. Neural machine translation: A review of methods, resources, and tools
US11288593B2 (en) Method, apparatus and device for extracting information
AU2020299608B2 (en) Pinning artifacts for expansion of search keys and search spaces in a natural language understanding (NLU) framework
CN112131366B (en) Method, device and storage medium for training text classification model and text classification
US11468239B2 (en) Joint intent and entity recognition using transformer models
WO2021072852A1 (en) Sequence labeling method and system, and computer device
CN111639163A (en) Problem generation model training method, problem generation method and related equipment
JP2021152963A (en) Word meaning feature generating method, model training method, apparatus, device, medium, and program
CN109241286B (en) Method and device for generating text
WO2020244065A1 (en) Character vector definition method, apparatus and device based on artificial intelligence, and storage medium
US10067935B2 (en) Prediction and optimized prevention of bullying and other counterproductive interactions in live and virtual meeting contexts
CN110795938A (en) Text sequence word segmentation method, device and storage medium
CN110874536B (en) Corpus quality evaluation model generation method and double-sentence pair inter-translation quality evaluation method
JP2021033995A (en) Text processing apparatus, method, device, and computer-readable storage medium
CN113987169A (en) Text abstract generation method, device and equipment based on semantic block and storage medium
CN114096960A (en) Natural language response for machine-assisted agents
WO2021001517A1 (en) Question answering systems
US20210150270A1 (en) Mathematical function defined natural language annotation
CN111460224B (en) Comment data quality labeling method, comment data quality labeling device, comment data quality labeling equipment and storage medium
CN112307738A (en) Method and device for processing text
JP7211103B2 (en) Sequence labeling device, sequence labeling method, and program
CN116561298A (en) Title generation method, device, equipment and storage medium based on artificial intelligence
JP2023064283A (en) Machine learning device, natural language processing device, and program
KR20240008930A (en) Improving datasets by predicting machine translation quality
Charpentier et al. BRENT: Bidirectional Retrieval Enhanced Norwegian Transformer