JP6899367B2 - Learning device, validation device, learning method, validation method, learning program, and validation program - Google Patents

Learning device, validation device, learning method, validation method, learning program, and validation program Download PDF

Info

Publication number
JP6899367B2
JP6899367B2 JP2018245365A JP2018245365A JP6899367B2 JP 6899367 B2 JP6899367 B2 JP 6899367B2 JP 2018245365 A JP2018245365 A JP 2018245365A JP 2018245365 A JP2018245365 A JP 2018245365A JP 6899367 B2 JP6899367 B2 JP 6899367B2
Authority
JP
Japan
Prior art keywords
information
word
speech
text
validity
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.)
Active
Application number
JP2018245365A
Other languages
Japanese (ja)
Other versions
JP2020107085A (en
Inventor
拓也 村上
拓也 村上
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.)
Rakuten Group Inc
Original Assignee
Rakuten Group Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Rakuten Group Inc filed Critical Rakuten Group Inc
Priority to JP2018245365A priority Critical patent/JP6899367B2/en
Publication of JP2020107085A publication Critical patent/JP2020107085A/en
Application granted granted Critical
Publication of JP6899367B2 publication Critical patent/JP6899367B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、機械学習の技術分野に関し、特に、テキストを分類するための方法の技術分野に関する。 The present invention relates to the technical field of machine learning, and in particular to the technical field of methods for classifying texts.

近年、多数のテキストを分類するための機械学習の研究開発が盛んに行われている。例えば、非特許文献1には、ニューラルネットワークを用いた分類方法が開示されている。具体的に、文章を構成する語の特徴ベクトルが連結されて、その文章が表現される。連結された特徴ベクトルに対して畳み込み層においてフィルタが適用されて、新しい特徴が生成される。新しい特徴に対してマックスプーリングが適用されて、全結合ソフトマックス層から確率分布が出力される。 In recent years, research and development of machine learning for classifying a large number of texts has been actively carried out. For example, Non-Patent Document 1 discloses a classification method using a neural network. Specifically, the feature vectors of the words that make up the sentence are concatenated to express the sentence. A filter is applied in the convolution layer to the concatenated feature vectors to generate new features. Max pooling is applied to the new features and the probability distribution is output from the fully coupled softmax layer.

ユン・キム(Yoon Kim)、「文書分類のための畳み込みニューラルネットワーク(Convolutional Neural Networks for Sentence Classification)」、実践的自然言語処理方法に関する2014年会議報告(Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing)、計算言語学協会(Association for Computational Linguistics)、2014年、p.1746-1751Yoon Kim, Convolutional Neural Networks for Sentence Classification, Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing), Association for Computational Linguistics, 2014, p.1746-1751

例えば、人々により作成又は入力等されたテキストが妥当なものであるかを判定することを想定する。テキストとして決まった正解が存在しない状況である場合においては、例えばルールベースで妥当性を判定するにも限界がある。そのため、人間がテキストを確認して判定を行うことになる。この場合、判定すべきテキストが多数に昇ると、作業負担が膨大になる。 For example, assume that the text created or entered by people is valid. In a situation where there is no fixed correct answer as a text, there is a limit to determining validity on a rule basis, for example. Therefore, a human confirms the text and makes a judgment. In this case, if the number of texts to be judged rises to a large number, the work load becomes enormous.

例えば、自由回答式のアンケートが実施される場合に、これに対して様々な回答を記入可能である。例えば見当違いの回答や、でたらめな回答等、質問に対して妥当ではない回答は、情報としての価値が低い。そのため、回答の妥当性を適切に判定することが望ましい。 For example, when a free-answer questionnaire is conducted, various answers can be entered. Answers that are not valid for a question, such as misguided answers or random answers, are of low value as information. Therefore, it is desirable to appropriately judge the validity of the answer.

人間に代わって妥当性の判定を柔軟に行うために、機械学習を利用することが考えられる。しかしながら、従来の技術では、テキストの妥当性の観点で学習及び分類が行われていなかった。 It is conceivable to use machine learning to flexibly judge validity on behalf of humans. However, in the conventional technique, learning and classification have not been performed from the viewpoint of the validity of the text.

本発明は、以上の点に鑑みてなされたものであり、テキストの妥当性の判定精度を向上させることを可能とする学習装置、妥当性判定装置、学習方法、妥当性判定方法、学習プログラム、及び妥当性判定プログラムを提供することを目的とする。 The present invention has been made in view of the above points, and is a learning device, a validity judgment device, a learning method, a validity judgment method, a learning program, which makes it possible to improve the validity judgment accuracy of a text. And to provide a validation program.

上記課題を解決するために、請求項1に記載の発明は、第1テキストを構成する1以上の単語を示す1以上の単語情報と、前記1以上の単語の品詞を示す1以上の品詞情報と、アンケートにおける質問に対する回答としての前記第1テキストの妥当性を示すラベルと、をそれぞれ含む複数の訓練データを記憶する記憶手段から、前記複数の訓練データを取得する訓練データ取得手段と、前記取得された複数の訓練データそれぞれについて、前記1以上の単語情報から、前記1以上の単語それぞれの特徴を示す1以上の単語特徴ベクトルを含む二次元配列単語情報を生成する特徴情報生成手段と、前記取得された複数の訓練データからの機械学習により、アンケートにおける質問に対する回答を示すものとしての所与の第2テキストの妥当性を示す第2妥当性情報を出力し且つ畳み込み層を含むモデルを生成するモデル生成手段であって、前記取得された複数の訓練データそれぞれに含まれる前記1以上の単語それぞれについて、該単語に対応する前記単語特徴ベクトルと前記品詞情報とが並ぶ状態で、前記二次元配列単語情報及び前記1以上の品詞情報を畳み込み層に入力して、前記第1テキストの特徴を示す特徴情報を取得し、該取得された特徴情報に基づいて、前記第1テキストの妥当性を示す第1妥当性情報を前記モデルから出力させ、前記第1妥当性情報と前記ラベルとを比較することに基づく誤差逆伝播により、前記モデルを訓練するモデル生成手段と、を備え、互いに同一の単語に対応する前記単語特徴ベクトルと前記品詞情報とが並ぶ方向における前記畳み込み層のフィルタのサイズは、前記単語特徴ベクトルのサイズと前記品詞情報のサイズとの合計に一致することを特徴とする。 In order to solve the above problems, the invention according to claim 1 has one or more word information indicating one or more words constituting the first text, and one or more part lyrics information indicating the part of the one or more words. A training data acquisition means for acquiring the plurality of training data from a storage means for storing a plurality of training data including a label indicating the validity of the first text as an answer to a question in a questionnaire, and the above. For each of the acquired plurality of training data, a feature information generation means for generating two-dimensional array word information including one or more word feature vectors indicating the features of each of the one or more words from the one or more word information. By machine learning from the plurality of acquired training data, a model that outputs second validity information indicating the validity of a given second text as an answer to a question in a questionnaire and includes a convolution layer is obtained. The model generation means for generating, for each of the one or more words included in each of the acquired plurality of training data, the word feature vector corresponding to the word and the part code information are arranged side by side. The dimension array word information and the one or more part word information are input to the convolution layer to acquire the feature information indicating the feature of the first text, and the validity of the first text is obtained based on the acquired feature information. The first validity information indicating the above is output from the model, and the model generation means for training the model by error back propagation based on comparing the first validity information with the label is provided and is the same as each other. The size of the filter of the convolution layer in the direction in which the word feature vector corresponding to the word and the part word information are arranged is characterized in that the size of the filter of the convolution layer matches the sum of the size of the word feature vector and the size of the part word information. ..

この発明によれば、単語情報に加え、品詞情報をも用いた機械学習により、モデルが生成される。品詞情報により、テキストに含まれる単語についてのヒントや、テキストに用いられている文法をモデルに与えることができる。従って、生成されたモデルを用いることにより、テキストの妥当性の判定精度を向上させることができる。
また、この発明によれば、単語の特徴ベクトルと、その単語の品詞の情報とが関連付けられた状態で畳み込まれて、テキストの特徴が出力される。このテキストの特徴を用いた妥当性の判定結果に基づいてモデルが最適化される。従って、テキストの妥当性の判定精度を向上させることができる。
また、この発明によれば、アンケートにおける質問に対する回答の妥当性を判定することができる。
According to the present invention, a model is generated by machine learning using part-speech information in addition to word information. Part-of-speech information can give the model hints about the words contained in the text and the grammar used in the text. Therefore, by using the generated model, the accuracy of determining the validity of the text can be improved.
Further, according to the present invention, the feature vector of the word and the information of the part of speech of the word are convoluted in a state of being associated with each other, and the feature of the text is output. The model is optimized based on the validation results using the characteristics of this text. Therefore, the accuracy of determining the validity of the text can be improved.
Further, according to the present invention, the validity of the answer to the question in the questionnaire can be determined.

請求項2に記載の発明は、前記モデル生成手段は、前記第1テキスト内における前記1以上の単語の並び順に従って前記1以上の単語特徴ベクトルが並べられた前記二次元配列単語情報及び前記並び順に従って並べられた前記1以上の品詞情報を前記畳み込み層に入力し、
前記1以上の単語情報が並ぶ方向における前記フィルタのサイズは、複数の単語に対応するサイズであることを特徴とする
In the invention according to claim 2, the model generating means has the two-dimensional array word information in which the one or more word feature vectors are arranged according to the order of the one or more words in the first text, and the arrangement. The one or more part-of-speech information arranged in order is input to the convolution layer, and the convolution layer is input.
The size of the filter in the direction in which one or more word information is arranged is characterized in that it is a size corresponding to a plurality of words .

請求項3に記載の発明は、前記特徴情報生成手段は、更に、前記1以上の品詞情報から、前記1以上の品詞それぞれの特徴を示す1以上の品詞特徴ベクトルを含む二次元配列品詞情報を生成し、前記モデル生成手段は、前記二次元配列単語情報と前記二次元配列品詞情報とを重ねてなる三次元配列情報を前記畳み込み層に入力することを特徴とする。 In the invention according to claim 3, the feature information generating means further obtains two-dimensional array part of speech information including one or more part of speech feature vectors indicating the characteristics of each of the one or more part of speech from the one or more part of speech information. The model generation means is characterized in that the three-dimensional arrangement information obtained by superimposing the two-dimensional arrangement word information and the two-dimensional arrangement part of speech information is input to the convolution layer.

この発明によれば、単語特徴ベクトルで構成される二次元配列と、品詞特徴ベクトルで構成される二次元配列とで構成される三次元配列に対して、畳み込み層において三次元のフィルタが適用されて、テキストの特徴が出力される。従って、テキストの妥当性の判定精度を向上させることができる。 According to the present invention, a three-dimensional filter is applied in the convolution layer to a three-dimensional array composed of a two-dimensional array composed of word feature vectors and a two-dimensional array composed of part-word feature vectors. The text features are output. Therefore, the accuracy of determining the validity of the text can be improved.

請求項4に記載の発明は、前記特徴情報生成手段は、更に、前記1以上の品詞情報から、前記1以上の品詞それぞれの特徴を示す1以上の品詞特徴ベクトルを含む二次元配列品詞情報を生成し、前記モデル生成手段は、前記二次元配列単語情報と前記二次元配列品詞情報とを連結してなる二次元配列情報を前記畳み込み層に入力することを特徴とする。 In the invention according to claim 4, the feature information generating means further obtains two-dimensional array part code information including one or more part code feature vectors indicating the characteristics of each of the one or more part words from the one or more part code information. The model generation means is characterized in that the two-dimensional array information formed by connecting the two-dimensional array word information and the two-dimensional array part part information is input to the convolution layer.

この発明によれば、単語特徴ベクトルで構成される二次元配列と、品詞特徴ベクトルで構成される二次元配列とで構成される二次元配列に対して、畳み込み層において二次元のフィルタが適用されて、テキストの特徴が出力される。従って、テキストの妥当性の判定精度を向上させることができる。 According to the present invention, a two-dimensional filter is applied in the convolution layer to a two-dimensional array composed of a word feature vector and a two-dimensional array composed of a part-word feature vector. The text features are output. Therefore, the accuracy of determining the validity of the text can be improved.

請求項5に記載の発明は、前記モデル生成手段は、前記1以上の品詞それぞれを示す数値を、前記1以上の単語特徴ベクトルのうち該品詞に対応する単語の単語特徴ベクトルに付加して、前記二次元配列単語情報を前記畳み込み層に入力することを特徴とする。 In the invention according to claim 5, the model generating means adds a numerical value indicating each of the one or more part of speech to the word feature vector of the word corresponding to the part of speech among the one or more word feature vectors. It is characterized in that the two-dimensional array word information is input to the convolution layer.

この発明によれば、各単語特徴ベクトルに、品詞を示す数値が付加された状態で畳み込まれる。従って、テキストの妥当性の判定精度を向上させることができる。 According to the present invention, each word feature vector is convoluted with a numerical value indicating a part of speech added. Therefore, the accuracy of determining the validity of the text can be improved.

請求項6に記載の発明は、前記複数の訓練データそれぞれは、前記1以上の単語それぞれについて、所定の品詞体系により階層化された複数の品詞を示す複数の前記品詞情報を含むことを特徴とする。 The invention according to claim 6 is characterized in that each of the plurality of training data includes a plurality of the part of speech information indicating a plurality of part of speech layered by a predetermined part of speech system for each of the one or more words. To do.

この発明によれば、複数の品詞情報により、テキストに含まれる単語についてのヒントや、テキストに用いられている文法を、階層的にモデルを与えることができる。従って、テキストの妥当性の判定精度を向上させることができる。 According to the present invention, it is possible to give a hint about a word contained in a text and a grammar used in the text hierarchically by using a plurality of part-speech information. Therefore, the accuracy of determining the validity of the text can be improved.

請求項7に記載の発明は、前記複数の訓練データそれぞれは、如何なる種類の内容が前記第1テキストに示されることが要求されているかを示す種類情報を更に含むことを特徴とする。 The invention according to claim 7 is characterized in that each of the plurality of training data further includes type information indicating what kind of content is required to be shown in the first text.

この発明によれば、要求される内容の種類に応じて、テキストに含まれる単語の品詞や、テキストに用いられている文法が異なる場合において、テキストの妥当性の判定精度を向上させることができる。 According to the present invention, it is possible to improve the accuracy of determining the validity of a text when the part of speech of the word contained in the text and the grammar used in the text are different depending on the type of content required. ..

請求項8に記載の発明は、前記複数の訓練データそれぞれは、前記質問を示す第3テキストを構成する1以上の第2単語を示す1以上の第2単語情報と、前記1以上の第2単語の品詞を示す1以上の第2品詞情報と、を更に含むことを特徴とする。 In the invention according to claim 8, each of the plurality of training data includes one or more second word information indicating one or more second words constituting the third text indicating the question, and the first or more second word information. It is characterized by further including one or more second part of speech information indicating the part of speech of a word.

この発明によれば、テキストにより示される内容として、要求内容を示すテキストの単語情報及び品詞情報をも用いた機械学習により、モデルが生成される。従って、要求内容を示すテキストと、この要求に対して作成されたテキストとが対で学習されるので、テキストの妥当性の判定精度を向上させることができる。 According to the present invention, a model is generated by machine learning using word information and part-speech information of the text indicating the required content as the content indicated by the text. Therefore, since the text indicating the request content and the text created for this request are learned in pairs, the accuracy of determining the validity of the text can be improved.

請求項9に記載の発明は、前記複数の訓練データそれぞれは、前記1以上の単語それぞれの文字数を示す1以上の文字数情報を更に含むことを特徴とする。 The invention according to claim 9 is characterized in that each of the plurality of training data further includes one or more character number information indicating the number of characters of each of the one or more words.

この発明によれば、文字数情報により、テキストに含まれる単語についての更なるヒントをモデルを与えることができる。従って、テキストの妥当性の判定精度を向上させることができる。 According to the present invention, the number of characters information can provide a model with further hints about the words contained in the text. Therefore, the accuracy of determining the validity of the text can be improved.

請求項10に記載の発明は、前記複数の訓練データそれぞれは、前記1以上の単語それぞれに含まれる文字の種類を示す1以上の文字種情報を更に含むことを特徴とする。 The invention according to claim 10 is characterized in that each of the plurality of training data further includes one or more character type information indicating the type of characters included in each of the one or more words.

この発明によれば、文字種情報により、テキストに含まれる単語についての更なるヒントをモデルを与えることができる。従って、テキストの妥当性の判定精度を向上させることができる。 According to the present invention, the character type information can provide a model with further hints about the words contained in the text. Therefore, the accuracy of determining the validity of the text can be improved.

請求項11に記載の発明は、前記ラベルは、第1質問に対する回答としての前記第1テキストの妥当性を示し、前記モデル生成手段は、前記第1質問により要求される回答の種類と同じ種類の回答を要求する第2質問に対する回答を示すものとしての前記第2テキストの妥当性を示す前記第2妥当性情報を出力する前記モデルを生成することを特徴とする。 In the invention according to claim 11, the label indicates the validity of the first text as an answer to the first question, and the model generating means is of the same type as the type of answer required by the first question. It is characterized by generating the model that outputs the second validity information indicating the validity of the second text as indicating the answer to the second question requesting the answer of.

請求項12に記載の発明は、請求項1乃至11の何れか一項に記載の学習装置により生成されたモデルを記憶するモデル記憶手段から、前記モデルを読み出す読み出し手段と、所与のテキストを構成する1以上の単語を示す1以上の判定単語情報と、前記1以上の単語の品詞を示す1以上の判定品詞情報と、を取得するテキスト情報取得手段と、前記取得された1以上の判定単語情報及び1以上の判定品詞情報を、前記読み出されたモデルに入力することにより、前記所与のテキストの妥当性を示す妥当性情報を出力する出力手段と、を備えることを特徴とする。 The invention according to claim 12 uses a reading means for reading the model from a model storage means for storing the model generated by the learning device according to any one of claims 1 to 11 and a given text. A text information acquisition means for acquiring one or more determination word information indicating one or more words constituting one or more, and one or more determination part of speech information indicating the part of speech of the one or more words, and the acquired one or more determinations. It is characterized by including an output means for outputting validity information indicating the validity of the given text by inputting word information and one or more determination part of speech information into the read model. ..

この発明によれば、単語情報に加え、品詞情報をも用いた機械学習により生成されたモデルを用いて、テキストの妥当性が判定される。従って、テキストの妥当性の判定精度を向上させることができる。 According to the present invention, the validity of a text is determined by using a model generated by machine learning using not only word information but also part of speech information. Therefore, the accuracy of determining the validity of the text can be improved.

請求項13に記載の発明は、コンピュータにより実行される学習方法において、第1テキストを構成する1以上の単語を示す1以上の単語情報と、前記1以上の単語の品詞を示す1以上の品詞情報と、アンケートにおける質問に対する回答としての前記第1テキストの妥当性を示すラベルと、をそれぞれ含む複数の訓練データを記憶する記憶手段から、前記複数の訓練データを取得する訓練データ取得ステップと、前記取得された複数の訓練データそれぞれについて、前記1以上の単語情報から、前記1以上の単語それぞれの特徴を示す1以上の単語特徴ベクトルを含む二次元配列単語情報を生成する特徴情報生成ステップと、前記取得された複数の訓練データからの機械学習により、アンケートにおける質問に対する回答を示すものとしての所与の第2テキストの妥当性を示す第2妥当性情報を出力し且つ畳み込み層を含むモデルを生成するモデル生成ステップであって、前記取得された複数の訓練データそれぞれに含まれる前記1以上の単語それぞれについて、該単語に対応する前記単語特徴ベクトルと前記品詞情報とが並ぶ状態で、前記二次元配列単語情報及び前記1以上の品詞情報を畳み込み層に入力して、前記第1テキストの特徴を示す特徴情報を取得し、該取得された特徴情報に基づいて、前記第1テキストの妥当性を示す第1妥当性情報を前記モデルから出力させ、前記第1妥当性情報と前記ラベルとを比較することに基づく誤差逆伝播により、前記モデルを訓練するモデル生成ステップと、を含み、前記単語特徴ベクトルと前記品詞情報とが並ぶ方向における前記畳み込み層のフィルタのサイズは、前記単語特徴ベクトルのサイズと前記品詞情報のサイズとの合計に一致することを特徴とする。 The invention according to claim 13 is, in a learning method executed by a computer, one or more word information indicating one or more words constituting the first text and one or more part words indicating the part of the one or more words. A training data acquisition step of acquiring the plurality of training data from a storage means for storing a plurality of training data including information and a label indicating the validity of the first text as an answer to a question in a questionnaire. With respect to each of the acquired plurality of training data, a feature information generation step of generating two-dimensional array word information including one or more word feature vectors indicating the features of each of the one or more words from the one or more word information. , A model that outputs second validity information indicating the validity of a given second text as an answer to a question in a questionnaire by machine learning from the acquired plurality of training data and includes a convolution layer. In the model generation step for generating the above, for each of the one or more words included in each of the acquired plurality of training data, the word feature vector corresponding to the word and the part code information are arranged side by side. Two-dimensional array word information and one or more part word information are input to the convolution layer to acquire feature information indicating the characteristics of the first text, and based on the acquired feature information, the validity of the first text is obtained. A model generation step of training the model by error backpropagation based on outputting the first validity information indicating the property from the model and comparing the first validity information with the label is included. The size of the filter of the convolution layer in the direction in which the word feature vector and the part word information are arranged is characterized in that the size of the filter of the convolution layer matches the sum of the size of the word feature vector and the size of the part word information .

請求項14に記載の発明は、コンピュータにより実行される妥当性判定方法において、請求項1乃至11の何れか一項に記載の学習装置により生成されたモデルを記憶するモデル記憶手段から、前記モデルを読み出す読み出しステップと、所与のテキストを構成する1以上の単語を示す1以上の判定単語情報と、前記1以上の単語の品詞を示す1以上の判定品詞情報と、を取得するテキスト情報取得ステップと、前記取得された1以上の判定単語情報及び1以上の判定品詞情報を、前記読み出されたモデルに入力することにより、前記所与のテキストの妥当性を示す妥当性情報を出力する出力ステップと、を含むことを特徴とする。 The invention according to claim 14 is a model storage means for storing a model generated by the learning device according to any one of claims 1 to 11 in a validity determination method executed by a computer. Text information acquisition to acquire a reading step of reading, one or more judgment word information indicating one or more words constituting a given text, and one or more judgment part information indicating the part of the one or more words. By inputting the step, the acquired one or more judgment word information and one or more judgment part word information into the read model, the validity information indicating the validity of the given text is output. It is characterized by including an output step.

請求項15に記載の発明は、コンピュータを、第1テキストを構成する1以上の単語を示す1以上の単語情報と、前記1以上の単語の品詞を示す1以上の品詞情報と、アンケートにおける質問に対する回答としての前記第1テキストの妥当性を示すラベルと、をそれぞれ含む複数の訓練データを記憶する記憶手段から、前記複数の訓練データを取得する訓練データ取得手段と、前記取得された複数の訓練データそれぞれについて、前記1以上の単語情報から、前記1以上の単語それぞれの特徴を示す1以上の単語特徴ベクトルを含む二次元配列単語情報を生成する特徴情報生成手段と、前記取得された複数の訓練データからの機械学習により、アンケートにおける質問に対する回答を示すものとしての所与の第2テキストの妥当性を示す第2妥当性情報を出力し且つ畳み込み層を含むモデルを生成するモデル生成手段であって、前記取得された複数の訓練データそれぞれに含まれる前記1以上の単語それぞれについて、該単語に対応する前記単語特徴ベクトルと前記品詞情報とが並ぶ状態で、前記二次元配列単語情報及び前記1以上の品詞情報を畳み込み層に入力して、前記第1テキストの特徴を示す特徴情報を取得し、該取得された特徴情報に基づいて、前記第1テキストの妥当性を示す第1妥当性情報を前記モデルから出力させ、前記第1妥当性情報と前記ラベルとを比較することに基づく誤差逆伝播により、前記モデルを訓練するモデル生成手段と、として機能させ、前記単語特徴ベクトルと前記品詞情報とが並ぶ方向における前記畳み込み層のフィルタのサイズは、前記単語特徴ベクトルのサイズと前記品詞情報のサイズとの合計に一致することを特徴とする。 The invention according to claim 15 uses a computer to obtain one or more word information indicating one or more words constituting the first text, one or more part lyrics information indicating the part of the one or more words, and a question in a questionnaire. A training data acquisition means for acquiring the plurality of training data from a storage means for storing a plurality of training data including a label indicating the validity of the first text as an answer to the above , and a plurality of acquired training data. For each of the training data, a feature information generating means for generating two-dimensional array word information including one or more word feature vectors indicating the features of each of the one or more words from the one or more word information, and the acquired plurality of A model generation means that outputs a second validity information indicating the validity of a given second text as an answer to a question in a questionnaire and generates a model including a convolution layer by machine learning from the training data of. For each of the one or more words included in each of the acquired plurality of training data, the two-dimensional array word information and the two-dimensional array word information and the word information in a state where the word feature vector corresponding to the word and the part-word information are arranged side by side. The one or more part word information is input to the convolution layer to acquire the feature information indicating the feature of the first text, and the first validity indicating the validity of the first text is based on the acquired feature information. The sexual information is output from the model and functions as a model generation means for training the model by error back propagation based on comparing the first validity information with the label, and the word feature vector and the label are described. The size of the filter of the convolution layer in the direction in which the part-of-speech information is arranged is characterized by matching the sum of the size of the word feature vector and the size of the part-of-speech information .

請求項16に記載の発明は、コンピュータを、請求項1乃至11の何れか一項に記載の学習装置により生成されたモデルを記憶するモデル記憶手段から、前記モデルを読み出す読み出し手段と、所与のテキストを構成する1以上の単語を示す1以上の判定単語情報と、前記1以上の単語の品詞を示す1以上の判定品詞情報と、を取得するテキスト情報取得手段と、前記取得された1以上の判定単語情報及び1以上の判定品詞情報を、前記読み出されたモデルに入力することにより、前記所与のテキストの妥当性を示す妥当性情報を出力する出力手段と、として機能させることを特徴とする。 The invention according to claim 16 is given a reading means for reading a computer from a model storage means for storing a model generated by the learning device according to any one of claims 1 to 11. A text information acquisition means for acquiring one or more determination word information indicating one or more words constituting the text, and one or more determination part of speech information indicating the part of speech of the one or more words, and the acquired 1 By inputting the above determination word information and one or more determination part of speech information into the read model, it functions as an output means for outputting validity information indicating the validity of the given text. It is characterized by.

本発明によれば、テキストの妥当性の判定精度を向上させることができる。 According to the present invention, the accuracy of determining the validity of a text can be improved.

一実施形態に係る妥当性判定装置1の概要構成の一例を示すブロック図である。It is a block diagram which shows an example of the outline structure of the validity determination apparatus 1 which concerns on one Embodiment. 一実施形態に係る妥当性判定装置1のシステム制御部11及びGPU18の機能ブロックの一例を示す図である。It is a figure which shows an example of the functional block of the system control unit 11 and GPU 18 of the validity determination apparatus 1 which concerns on one Embodiment. モデル2の構成例を示す図である。It is a figure which shows the structural example of the model 2. 変換部21で生成される情報の一例を示す図である。It is a figure which shows an example of the information generated by the conversion unit 21. フィルタの構成例を示す図である。It is a figure which shows the configuration example of a filter. 妥当性判定装置1のシステム制御部11及びGPU18による学習処理の一例を示すフローチャートである。It is a flowchart which shows an example of the learning process by the system control unit 11 and GPU 18 of the validity determination apparatus 1. 妥当性判定装置1のシステム制御部11及びGPU18による妥当性判定処理の一例を示すフローチャートである。It is a flowchart which shows an example of the validity determination processing by the system control unit 11 and GPU 18 of the validity determination apparatus 1. モデル2の構成例を示す図である。It is a figure which shows the structural example of the model 2. 変換部21−2で生成される情報尾ニチレイを示す図である。It is a figure which shows the information tail Nichirei generated by the conversion part 21-2. モデル2の構成例を示す図であるIt is a figure which shows the structural example of the model 2. 変換部21−3で生成される情報の一例を示す図である。It is a figure which shows an example of the information generated by the conversion unit 21-3. モデル2の構成例を示す図である。It is a figure which shows the structural example of the model 2. 変換部21−4で生成される情報の一例を示す図である。It is a figure which shows an example of the information generated by the conversion part 21-4. 変換部21−4で生成される情報の一例を示す図である。It is a figure which shows an example of the information generated by the conversion part 21-4. モデル2の構成例を示す図である。It is a figure which shows the structural example of the model 2. 判定部23−5で生成される情報の一例を示す図である。It is a figure which shows an example of the information generated by the determination unit 23-5. モデル2の構成例を示す図である。It is a figure which shows the structural example of the model 2. 変換部21−6において生成される情報の一例を示す図である。It is a figure which shows an example of the information generated in the conversion part 21-6. モデル2の構成例を示す図である。It is a figure which shows the structural example of the model 2. 変換部21−7において生成される情報の一例を示す図である。It is a figure which shows an example of the information generated in the conversion part 21-7. モデル2の構成例を示す図である。It is a figure which shows the structural example of the model 2. 変換部21−8において生成される情報の一例を示す図である。It is a figure which shows an example of the information generated by the conversion unit 21-8.

以下、図面を参照して本発明の実施形態について詳細に説明する。以下に説明する実施形態においては、テキストを用いた学習及びこの学習により生成されたモデルを用いてテキストの妥当性を判定する妥当性判定装置に対して本発明を適用した場合の実施形態である。妥当性が判定されるテキストは、例えば文章、文、句又は名詞等である。これらのテキストは、通常、何らかの状況の下で作成、入力等される。状況の例として、アンケートの質問に回答する場合、商品又はサービスの広告の文章を作成する場合、ビジネスメールを作成する場合、与えられたテーマ、課題等に対して文章を作成する場合等が上げられる。例えばアンケートの場合であっても、質問の内容によって状況は様々である。妥当性判定装置は、例えば所与の状況に対してのテキストの妥当性を判定する。妥当性の判定は、例えば、回答が質問に合っているか否か、広告の文章に不適切な文言が含まれているか否か、メールに不適切な表現が含まれているか否か、文章がテーマ等に合っているか否か等である。なお、学習を実行する装置と、妥当性の判定を実行する装置とは別々の装置であってもよい。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The embodiment described below is an embodiment in which the present invention is applied to learning using text and a validity determination device for determining the validity of text using a model generated by this learning. .. The text to be validated is, for example, a sentence, a sentence, a phrase, a noun, or the like. These texts are usually created, entered, etc. under some circumstances. Examples of situations include answering questionnaire questions, creating texts for product or service advertisements, writing business emails, writing texts for given themes, issues, etc. Be done. For example, even in the case of a questionnaire, the situation varies depending on the content of the question. The validation device determines the validity of the text for a given situation, for example. The validity is judged, for example, whether the answer matches the question, whether the text of the advertisement contains inappropriate wording, whether the email contains inappropriate wording, and whether the text contains inappropriate wording. Whether or not it matches the theme, etc. The device that executes learning and the device that executes validity determination may be separate devices.

[1.第1実施形態]
[1−1.妥当性判定装置の構成]
先ず、妥当性判定装置1の構成について、図1を用いて説明する。図1は、本実施形態に係る妥当性判定装置1の概要構成の一例を示すブロック図である。図1に示すように、妥当性判定装置1は、システム制御部11と、システムバス12と、入出力インターフェース13と、記憶部14と、通信部15と、入力部16と、表示部17と、GPU(Graphics Processing Unit)18を備えている。システム制御部11と入出力インターフェース13とは、システムバス12を介して接続されている。妥当性判定装置1は、例えばサーバ装置であってもよいし、パーソナルコンピュータであってもよい。
[1. First Embodiment]
[1-1. Configuration of validation device]
First, the configuration of the validity determination device 1 will be described with reference to FIG. FIG. 1 is a block diagram showing an example of an outline configuration of the validity determination device 1 according to the present embodiment. As shown in FIG. 1, the validity determination device 1 includes a system control unit 11, a system bus 12, an input / output interface 13, a storage unit 14, a communication unit 15, an input unit 16, and a display unit 17. , GPU (Graphics Processing Unit) 18 is provided. The system control unit 11 and the input / output interface 13 are connected via the system bus 12. The validity determination device 1 may be, for example, a server device or a personal computer.

システム制御部11は、CPU(Central Processing Unit)11a、ROM(Read Only Memory)11b、RAM(Random Access Memory)11c等により構成されている。 The system control unit 11 is composed of a CPU (Central Processing Unit) 11a, a ROM (Read Only Memory) 11b, a RAM (Random Access Memory) 11c, and the like.

入出力インターフェース13は、記憶部14〜GPU18とシステム制御部11との間のインターフェース処理を行う。 The input / output interface 13 performs interface processing between the storage units 14 to GPU 18 and the system control unit 11.

記憶部14は、例えば、ハードディスクドライブ又はソリッドステートドライブ等により構成されている。この記憶部14には、生成されたモデル2、及びモデル2の生成に用いられる複数の訓練データ等が記憶される。記憶部14には、更にオペレーティングシステム、モデル生成用のプログラム、妥当性判定用のプログラム等が記憶されている。訓練データ及び各種プログラムは、例えば、所定のコンピュータからネットワークを介して取得されるようにしてもよいし、光ディスク、メモリカード、磁気テープ等の記録媒体に記録されてドライブ装置を介して読み込まれるようにしてもよい。モデル2を生成する装置と妥当性を判定する装置とが別々の装置である場合、生成されたモデル2の受け渡しは、ネットワークを介して行われてもよいし、記録媒体を介して行われてもよい。 The storage unit 14 is composed of, for example, a hard disk drive, a solid state drive, or the like. The generated model 2 and a plurality of training data used for generating the model 2 are stored in the storage unit 14. The storage unit 14 further stores an operating system, a program for generating a model, a program for determining validity, and the like. The training data and various programs may be acquired from a predetermined computer via a network, or may be recorded on a recording medium such as an optical disk, a memory card, or a magnetic tape and read via a drive device. It may be. When the device for generating the model 2 and the device for determining the validity are separate devices, the generated model 2 may be delivered via the network or via a recording medium. May be good.

通信部15は、例えばネットワークインターフェースコントローラ等により構成されている。通信部15は、インターネット、LAN(Local Area Network)等のネットワークを介して他のコンピュータと接続し、そのコンピュータとの通信状態を制御する。 The communication unit 15 is composed of, for example, a network interface controller or the like. The communication unit 15 connects to another computer via a network such as the Internet or a LAN (Local Area Network), and controls the communication state with the computer.

入力部16は、オペレータによる操作を受け付け、操作内容に対応する信号をシステム制御部11に出力する。入力部16の例として、キーボード、マウス、タッチパネル等が挙げられる。 The input unit 16 receives an operation by the operator and outputs a signal corresponding to the operation content to the system control unit 11. Examples of the input unit 16 include a keyboard, a mouse, a touch panel, and the like.

表示部17は、例えば、グラフィックコントローラ及びディスプレイ等により構成されている。表示部17は、システム制御部11の制御により、画像、文字等の情報を表示する。ディスプレイのパネルの例として、液晶パネル、有機EL(Light Emitting)パネル等が挙げられる。 The display unit 17 is composed of, for example, a graphic controller, a display, and the like. The display unit 17 displays information such as images and characters under the control of the system control unit 11. Examples of display panels include liquid crystal panels, organic EL (Light Emitting) panels, and the like.

GPU18は、システム制御部11からの制御により、機械学習における行列演算等を実行する。GPU18は、複数の演算を並列にパイプライン処理する。GPU18には、VRAM(Video RAM)が接続されている。なお、CPU11aが、この行列演算等を行ってもよい。 The GPU 18 executes matrix operations and the like in machine learning under the control of the system control unit 11. The GPU 18 pipelines a plurality of operations in parallel. A VRAM (Video RAM) is connected to the GPU 18. The CPU 11a may perform this matrix operation and the like.

[1−2.妥当性判定装置のシステム制御部の機能概要]
次に、図2乃至図5を用いて、システム制御部11及びGPU18の機能概要について説明する。図2は、本実施形態に係る妥当性判定装置1のシステム制御部11及びGPU18の機能ブロックの一例を示す図である。システム制御部11及びGPU18は、CPU11aが、記憶部14に記憶されているプログラムに含まれる各種コード等を読み出し実行することにより、図2に示すように、訓練データ取得部111、モデル生成部112、モデル読み出し部113、判定対象データ取得部114、妥当性情報出力部115等として機能する。
[1-2. Functional overview of the system control unit of the validation device]
Next, the functional outline of the system control unit 11 and the GPU 18 will be described with reference to FIGS. 2 to 5. FIG. 2 is a diagram showing an example of functional blocks of the system control unit 11 and the GPU 18 of the validity determination device 1 according to the present embodiment. As shown in FIG. 2, the system control unit 11 and the GPU 18 read and execute various codes and the like included in the program stored in the storage unit 14 by the CPU 11a, so that the training data acquisition unit 111 and the model generation unit 112 , The model reading unit 113, the determination target data acquisition unit 114, the validity information output unit 115, and the like.

[1−2−1.モデルの生成]
訓練データ取得部111は、複数の訓練データを記憶部14から取得する。各訓練データは、1以上の単語情報、及び1以上の品詞情報を含む。1以上の単語情報は、テキストを構成する1以上の単語をそれぞれ示す。例えば、アンケート、テーマ、課題等に対して作成されたテキストについて訓練データが準備される場合、アンケートの一の質問、一のテーマ、一の課題等のみについて作成された複数のテキストから、複数の訓練データが作成されてもよい。或いは、複数の質問、複数のテーマ、複数の課題等について作成された複数のテキストから、複数の訓練データが作成されてもよい。1以上の品詞情報は、テキストを構成する1以上の単語それぞれの品詞を示す。形態素解析によりテキストから単語が抽出されるとともに、各単語の品詞が特定される。単語情報及び品詞情報は、例えばone-hotベクトルである。単語情報の並び順及び品詞情報の並び順は、テキスト内の単語の並び順に一致する。全訓練データ間で単語情報及び品詞情報の数が一致するように、必要に応じてパディングが行われる。従って、テキストが一の単語のみで構成される場合であっても、実際には複数の単語情報及び複数の品詞情報が生成される。形態素解析、one-hotベクトル化及びパディングは、訓練データ取得部111により行われてもよいし、他のコンピュータにより行われて予め記憶部14に記憶されてもよい。
[1-2-1. Model generation]
The training data acquisition unit 111 acquires a plurality of training data from the storage unit 14. Each training data contains one or more word information and one or more part of speech information. The word information of one or more indicates one or more words constituting the text. For example, when training data is prepared for texts created for questionnaires, themes, tasks, etc., a plurality of texts created for only one question, one theme, one task, etc. of the questionnaire are used. Training data may be created. Alternatively, a plurality of training data may be created from a plurality of texts created for a plurality of questions, a plurality of themes, a plurality of tasks, and the like. The part-speech information of one or more indicates the part-speech of each one or more words constituting the text. The morphological analysis extracts words from the text and identifies the part of speech of each word. The word information and part of speech information are, for example, one-hot vectors. The order of the word information and the order of the part of speech information match the order of the words in the text. Padding is performed as necessary so that the numbers of word information and part of speech information match among all the training data. Therefore, even when the text is composed of only one word, a plurality of word information and a plurality of part-speech information are actually generated. The morphological analysis, one-hot vectorization, and padding may be performed by the training data acquisition unit 111, or may be performed by another computer and stored in the storage unit 14 in advance.

各訓練データは、更に妥当性ラベルを含んでもよい。妥当性ラベルは、テキストの妥当性を示すラベルである。例えば、テキストが妥当である場合、妥当性ラベルは1を示し、テキストが妥当はない場合、妥当性ラベルは0を示す。例えば、アンケートの質問、テーマ、課題等、作成されるテキストに対して、そのテキストが如何なる内容を示すべきであるかが要求されている場合、テキストにより示される内容が、要求される内容に合致しているか否かの観点で、妥当性ラベルが作成されてもよい。例えば、アンケートの回答が質問に合っている場合、妥当性ラベルは1を示し、回答が質問に合っていない場合、妥当性ラベルは0を示す。また例えば、広告、ビジネスメール等、テキストが用いられる状況に応じて、そのテキストが不適切な語句を含むか否かの観点で、妥当性ラベルが作成されてもよい。妥当性ラベルは、例えば手作業により作成される。 Each training data may further include a validity label. The validity label is a label that indicates the validity of the text. For example, if the text is valid, the validity label indicates 1, and if the text is not valid, the validity label indicates 0. For example, when the text to be created, such as a questionnaire question, theme, or assignment, is required to indicate what the text should indicate, the content indicated by the text matches the required content. A validity label may be created in terms of whether or not it is done. For example, if the answer to the questionnaire matches the question, the validity label indicates 1, and if the answer does not match the question, the validity label indicates 0. Also, depending on the situation in which the text is used, such as an advertisement or a business email, a validity label may be created from the viewpoint of whether or not the text contains an inappropriate phrase. Validity labels are created, for example, manually.

モデル生成部112は、所与のテキストの妥当性を示す妥当性情報を出力するモデル2を、訓練データ取得部111により取得された複数の訓練データからの機械学習により生成する。 The model generation unit 112 generates a model 2 that outputs validity information indicating the validity of a given text by machine learning from a plurality of training data acquired by the training data acquisition unit 111.

モデル2は、例えば畳み込みニューラルネットワーク等のニューラルネットワークであってもよい。モデル生成部112は、モデル2内の各層として、その層に対応する演算処理を実行してテキストの妥当性を計算して、妥当性情報を出力する。モデル生成部112は、妥当性情報と妥当性ラベルとを比較して学習を実行する。モデル生成部112は、複数の訓練データそれぞれについて、1以上の単語情報から、テキストを構成する1以上の単語それぞれの特徴を示す1以上の単語特徴ベクトルを含む単語特徴二次元配列を生成する。単語特徴ベクトルは、例えば一次元配列であり、複数の数値を含む。モデル生成部112は、1以上の品詞情報それぞれを、1以上の単語特徴ベクトルのうち、その品詞情報により示される品詞に対応する単語の単語特徴ベクトルに関連付けた状態で、単語特徴二次元配列及び1以上の品詞情報を畳み込み層に入力して、その畳み込み層による学習を行わせる。これにより、モデル生成部112は、モデル2を生成する。 Model 2 may be a neural network such as a convolutional neural network. As each layer in the model 2, the model generation unit 112 executes arithmetic processing corresponding to the layer, calculates the validity of the text, and outputs the validity information. The model generation unit 112 compares the validity information with the validity label and executes learning. The model generation unit 112 generates a word feature two-dimensional array including one or more word feature vectors showing the features of each of the one or more words constituting the text from one or more word information for each of the plurality of training data. The word feature vector is, for example, a one-dimensional array and includes a plurality of numerical values. The model generation unit 112 has a two-dimensional array of word features and a state in which each of the one or more part-speech information is associated with the word feature vector of the word corresponding to the part of speech indicated by the part-speech information among the one or more word feature vectors. Input one or more part-speech information into the convolution layer, and let the convolution layer perform learning. As a result, the model generation unit 112 generates the model 2.

モデル生成部112は、更に、1以上の品詞情報から、テキストを構成する単語それぞれに対応する1以上の品詞それぞれの特徴を示す1以上の品詞特徴ベクトルを含む品詞特徴二次元配列を生成してもよい。品詞特徴ベクトルも、例えば一次元配列であり、複数の数値を含む。そして、モデル生成部112は、単語特徴ベクトルに対する品詞情報の関連付けの一例として、単語特徴二次元配列と品詞特徴二次元配列とを重ねてなる特徴三次元配列を畳み込み層に入力してもよい。 The model generation unit 112 further generates a two-dimensional array of part of speech features including one or more part of speech feature vectors indicating the features of each of the one or more part of speech corresponding to each of the words constituting the text from one or more part of speech information. May be good. The part-speech feature vector is also, for example, a one-dimensional array and includes a plurality of numerical values. Then, as an example of associating the part-speech information with the word feature vector, the model generation unit 112 may input the feature three-dimensional array obtained by superimposing the word feature two-dimensional array and the part-speech feature two-dimensional array into the convolution layer.

図3は、モデル2の構成例を示す図である。図3に示すように、モデル2は、変換部21と、特徴抽出部22と、判定部23とを含む。変換部21は、テキストから得られた単語情報及び品詞情報を、テキストの特徴抽出に適した形態の情報に変換するためのレイヤーグループである。特徴抽出部22は、テキストの特徴情報を出力するためのレイヤーグループである。判定部23は、テキストの特徴情報に基づいて、このテキストの妥当性を示す妥当性情報を出力するためのレイヤーグループである。 FIG. 3 is a diagram showing a configuration example of the model 2. As shown in FIG. 3, the model 2 includes a conversion unit 21, a feature extraction unit 22, and a determination unit 23. The conversion unit 21 is a layer group for converting word information and part of speech information obtained from the text into information in a form suitable for feature extraction of the text. The feature extraction unit 22 is a layer group for outputting feature information of text. The determination unit 23 is a layer group for outputting validity information indicating the validity of the text based on the feature information of the text.

変換部21は、入力層201−1及び201−2と、埋め込み層202−1及び202−2と、連結層203と、リシェイプ層204とを含む。入力層201−1には、複数の単語情報が入力される。埋め込み層202−1は、入力層201−1から出力された複数の単語情報それぞれに対応する複数の単語特徴ベクトルで構成される単語特徴二次元配列を生成する。特徴ベクトルの生成には、例えばWord2vecモデルが用いられてもよし、他のモデルが用いられてもよい。図4は、変換部21で生成される情報の一例を示す図である。図4に示す単語特徴二次元配列301において、一の単語の特徴ベクトルを構成する数値が並ぶ方向をx軸とし、x軸方向における単語特徴二次元配列301のサイズを、幅という。単語特徴二次元配列301の幅は、特徴ベクトルの次元数と一致する。単語特徴二次元配列301において、複数の単語特徴ベクトルが単語順に従って並ぶ方向をy軸とし、y軸方向における単語特徴二次元配列301のサイズを、高さという。テキストを構成する単語の順序と、単語特徴二次元配列301において、それらの単語の単語特徴ベクトルの順序は一致する。入力層201−2には、複数の品詞情報が入力される。埋め込み層202−2は、入力層201−2から出力された複数の品詞情報それぞれに対応する複数の品詞特徴ベクトルで構成される品詞特徴二次元配列を出力する。例えば、各品詞を示す単語の特徴ベクトルが、品詞特徴ベクトルとして出力されてもよい。この場合、埋め込み層202−1に適用されたモデルを、埋め込み層202−2にそのまま適用することができる。図4に示す品詞特徴二次元配列302において、一の品詞の特徴ベクトルを構成する数値が並ぶ方向をx軸とし、複数の品詞特徴ベクトルが単語順に従って並ぶ方向をy軸とする。 The conversion unit 21 includes input layers 201-1 and 201-2, embedded layers 202-1 and 202-2, a connecting layer 203, and a reshape layer 204. A plurality of word information is input to the input layer 2011-1. The embedded layer 202-1 generates a word feature two-dimensional array composed of a plurality of word feature vectors corresponding to each of the plurality of word information output from the input layer 211-1. For example, the Word2vec model may be used to generate the feature vector, or another model may be used. FIG. 4 is a diagram showing an example of information generated by the conversion unit 21. In the word feature two-dimensional array 301 shown in FIG. 4, the direction in which the numerical values constituting the feature vector of one word are arranged is defined as the x-axis, and the size of the word feature two-dimensional array 301 in the x-axis direction is referred to as width. The width of the word feature two-dimensional array 301 matches the number of dimensions of the feature vector. In the word feature two-dimensional array 301, the direction in which a plurality of word feature vectors are arranged according to the word order is defined as the y-axis, and the size of the word feature two-dimensional array 301 in the y-axis direction is referred to as height. The order of the words constituting the text and the order of the word feature vectors of those words in the word feature two-dimensional array 301 match. A plurality of part of speech information is input to the input layer 201-2. The embedded layer 202-2 outputs a two-dimensional array of part-speech features composed of a plurality of part-speech feature vectors corresponding to each of the plurality of part-speech information output from the input layer 201-2. For example, the feature vector of the word indicating each part of speech may be output as the part of speech feature vector. In this case, the model applied to the embedded layer 202-1 can be applied to the embedded layer 202-2 as it is. In the part-speech feature two-dimensional array 302 shown in FIG. 4, the direction in which the numerical values constituting the feature vector of one part of speech are arranged is defined as the x-axis, and the direction in which a plurality of part-speech feature vectors are arranged in word order is defined as the y-axis.

連結層203は、埋め込み層202−1及び202−2から出力された単語特徴二次元配列301と品詞特徴二次元配列302とを高さ方向に連結する。リシェイプ層204は、連結された配列のx軸方向の要素数を元の要素数の半分にし、z軸方向の要素数を2にして、連結された配列の形状を三次元形状に変換することにより、図4に示す特徴三次元配列310を出力する。なお、単語特徴二次元配列301及び品詞特徴二次元配列302がそれぞれ先ずリシェイプ層により三次元配列に変換されてもよい。この変換によって出力される単語特徴の三次元配列及び品詞特徴の三次元配列それぞれのz軸方向における要素数は1である。そして、単語特徴の三次元配列及び品詞特徴の三次元配列が連結層によりz軸方向に連結されて、特徴三次元配列310が出力されてもよい。特徴三次元配列310において、単語特徴二次元配列301と品詞特徴二次元配列302とがz軸方向に積層されている。すなわち、リシェイプ層204は、単語特徴二次元配列301と品詞特徴二次元配列302とを別々のチャネルに分離する。z軸方向における特徴三次元配列310のサイズを、奥行きという。特徴三次元配列310の奥行きはチャネル数に一致する。テキストを構成する単語それぞれについて、特徴三次元配列310における単語の特徴ベクトルのy座標と、その単語の品詞の特徴ベクトルのy座標とが一致する。例えば、テキストの最初の単語「高級感」の特徴ベクトルと、その「高級感」の品詞「名詞」の特徴ベクトルは、z軸方向に重なる。 The connecting layer 203 connects the word feature two-dimensional array 301 and the part-speech feature two-dimensional array 302 output from the embedded layers 202-1 and 202-2 in the height direction. The reshape layer 204 converts the shape of the concatenated array into a three-dimensional shape by halving the number of elements in the x-axis direction of the concatenated array and setting the number of elements in the z-axis direction to 2. Therefore, the feature three-dimensional array 310 shown in FIG. 4 is output. The word feature two-dimensional array 301 and the part-speech feature two-dimensional array 302 may be first converted into a three-dimensional array by the reshape layer. The number of elements in the z-axis direction of each of the three-dimensional array of word features and the three-dimensional array of part-speech features output by this conversion is 1. Then, the three-dimensional array of word features and the three-dimensional array of part-speech features may be connected in the z-axis direction by a connecting layer, and the feature three-dimensional array 310 may be output. In the feature three-dimensional array 310, the word feature two-dimensional array 301 and the part-speech feature two-dimensional array 302 are stacked in the z-axis direction. That is, the reshape layer 204 separates the word feature two-dimensional array 301 and the part-speech feature two-dimensional array 302 into separate channels. Features in the z-axis direction The size of the three-dimensional array 310 is called the depth. Features The depth of the three-dimensional array 310 matches the number of channels. For each word constituting the text, the y-coordinate of the feature vector of the word in the feature three-dimensional array 310 and the y-coordinate of the feature vector of the part of speech of the word match. For example, the feature vector of the first word "luxury" in the text and the feature vector of the part of speech "noun" of the "luxury" overlap in the z-axis direction.

特徴抽出部22は、複数の畳み込み層205と、複数のMAXプーリング層206と、連結層207とを含む。各畳み込み層205は、各テキストについて特徴三次元配列310を受け入れ可能な畳み込み層である。例えば、畳み込み層205は、マルチチャネルの2D畳み込み層又はシングルチャネルの3D畳み込み層であってもよい。各畳み込み層205は、変換部21から出力された特徴三次元配列310に対する畳み込みを行い、テキストの特徴マップを出力する。各畳み込み層205において、特徴三次元配列310に三次元のフィルタが適用される。フィルタのサイズは畳み込み層205間で異なる。図5は、フィルタの構成例を示す図である。図5に示すフィルタ410〜430それぞれの幅及び奥行きは、特徴三次元配列310の幅及び奥行きと一致する。フィルタ410〜430の高さは互いに異なる。フィルタ410〜430それぞれは、特徴三次元配列310に対して高さ方向にスライドする。図4においては、3個の畳み込み層205が示されている。しかしながら、畳み込み層205は2個であってもよいし、4個以上であってもよい。MAXプーリング層206の数は、畳み込み層205の数と一致する。各MAXプーリング層206は、そのMAXプーリング層206に対応する畳み込み層205から出力された特徴マップ内の数値のうち最大値を出力する。連結層207は、複数のMAXプーリング層206から出力された最大値を連結して、テキストの特徴情報を出力する。この特徴情報は、一次元配列であり、テキストを構成する単語及びそれらの順序、並びに品詞及びそれらの順序を反映している。 The feature extraction unit 22 includes a plurality of convolution layers 205, a plurality of MAX pooling layers 206, and a connecting layer 207. Each convolution layer 205 is a convolution layer capable of accepting the feature three-dimensional array 310 for each text. For example, the convolution layer 205 may be a multi-channel 2D convolution layer or a single-channel 3D convolution layer. Each convolution layer 205 convolves the feature three-dimensional array 310 output from the conversion unit 21 and outputs a text feature map. In each convolution layer 205, a three-dimensional filter is applied to the feature three-dimensional array 310. The size of the filter varies between the convolution layers 205. FIG. 5 is a diagram showing a configuration example of the filter. The width and depth of each of the filters 410 to 430 shown in FIG. 5 coincide with the width and depth of the feature three-dimensional array 310. The heights of the filters 410-430 are different from each other. Each of the filters 410 to 430 slides in the height direction with respect to the feature three-dimensional array 310. In FIG. 4, three convolution layers 205 are shown. However, the number of convolution layers 205 may be two or four or more. The number of MAX pooling layers 206 matches the number of convolution layers 205. Each MAX pooling layer 206 outputs the maximum value among the numerical values in the feature map output from the convolution layer 205 corresponding to the MAX pooling layer 206. The connecting layer 207 concatenates the maximum values output from the plurality of MAX pooling layers 206 and outputs text feature information. This feature information is a one-dimensional array and reflects the words that make up the text and their order, as well as the part of speech and their order.

判定部23は、1又は複数の全結合層208と、出力層209とを含む。全結合層208は、特徴抽出部22から出力されたテキストの特徴情報をアフィン変換して、妥当性情報を出力する。全結合層208が複数ある場合、全結合層208は直列に連結されて、アフィン変換が順次実行される。各全結合層208において、ドロップアウト等の正則化が行われてもよい。また、バッチ正規化が行われてもよい。出力層209は、全結合層208により生成された妥当性情報を出力する。出力層209においては、例えばシグモイド関数により、全結合層208からの妥当性情報が0から1までの範囲内の数値に変換されてもよい。 The determination unit 23 includes one or more fully connected layers 208 and an output layer 209. The fully connected layer 208 performs affine transformation of the feature information of the text output from the feature extraction unit 22 and outputs the validity information. When there are a plurality of fully connected layers 208, the fully connected layers 208 are connected in series and the affine transformation is sequentially executed. Regularization such as dropout may be performed in each fully connected layer 208. In addition, batch normalization may be performed. The output layer 209 outputs the validity information generated by the fully connected layer 208. In the output layer 209, for example, the validity information from the fully connected layer 208 may be converted into a numerical value in the range of 0 to 1 by a sigmoid function.

[1−2−2.テキストの妥当性の判定]
モデル読み出し部113は、記憶部14に記憶されたモデル2を読み出して、RAM14c又はGPU18に接続されたVRAMにロードする。
[1-2-2. Judgment of text validity]
The model reading unit 113 reads the model 2 stored in the storage unit 14 and loads it into the RAM 14c or the VRAM connected to the GPU 18.

判定対象データ取得部114は、判定対象となる所与のテキストを構成する1以上の単語を示す1以上の単語情報と、その1以上の単語の品詞を示す1以上の品詞情報とを取得する。例えば、アンケート、テーマ、課題等について作成されたテキストの妥当性を判定する場合、判定対象となるテキストに対応するアンケートの質問、テーマ又は課題と、訓練データの作成のために収集されたテキストに対応するアンケートの質問、テーマ又は課題とは、一致してもよいし、一致していなくてもよい。テキストにより示される内容として、決まった正解が必ずしも存在しないので、テキストの妥当性を判定する観点では、質問、テーマ又は課題自体よりも、それによって如何なる種類の内容を示すテキストが要求さているかの方が重要である。従って、判定対象となるテキストについて要求された内容の種類が、訓練データの作成のために収集された全テキストのうち少なくとも幾つかのテキストについて要求された内容の種類に一致していることが望ましい。アンケートの場合、要求される回答の種類の例として、理由、純粋想起、印象、ポジティブなこと、ネガティブなこと、名詞での回答等が挙げられる。判定対象となるテキストは、例えば、ネットワークを介して他のコンピュータから取得されてもよい。或いは、テキストが記録媒体に記録されてドライブ装置を介して記憶部14に読み込まれてもよい。単語情報及び品詞情報の生成方法は、訓練データにおける単語情報及び品詞情報の生成方法と同様である。 The determination target data acquisition unit 114 acquires one or more word information indicating one or more words constituting a given text to be determined, and one or more part of speech information indicating the part of speech of the one or more words. .. For example, when judging the validity of texts created for questionnaires, themes, assignments, etc., the questions, themes or assignments of the questionnaire corresponding to the texts to be judged and the texts collected for creating training data The questions, themes or assignments in the corresponding survey may or may not match. Since there is not always a fixed correct answer as the content indicated by the text, from the viewpoint of judging the validity of the text, what kind of content is required by the text rather than the question, theme or task itself. is important. Therefore, it is desirable that the type of content requested for the text to be determined matches the type of content requested for at least some of the texts collected for the creation of training data. .. In the case of questionnaires, examples of the types of answers required include reasons, pure recollections, impressions, positives, negatives, and noun answers. The text to be determined may be obtained from another computer via a network, for example. Alternatively, the text may be recorded on the recording medium and read into the storage unit 14 via the drive device. The method of generating word information and part of speech information is the same as the method of generating word information and part of speech information in the training data.

妥当性情報出力部115は、判定対象データ取得部114により取得された1以上の単語情報及び1以上の品詞情報を、モデル読み出し部113により読み出されたモデル2に入力することにより、所与のテキストの妥当性を示す妥当性情報を出力する。妥当性情報出力部115は、モデル2内の各層として、その層に対応する演算処理を実行してテキストの妥当性を計算して、妥当性情報を出力する。妥当性情報出力部115は、例えば記憶部14に妥当性情報を記憶させてもよい。或いは、妥当性情報出力部115は、ネットワークを介して他のコンピュータへ妥当性情報を送信してもよい。或いは、妥当性情報出力部115は、表示部17に妥当性情報を表示してもよい。妥当性情報は、本来は0から1までの範囲内の数値である。例えば、妥当性情報が0.5以上である場合、テキストは妥当であると解釈され、妥当性情報が0.5未満である場合、テキストは妥当ではないと解釈されてもよい。妥当性情報出力部115は、妥当性情報を実際に0又は1の数値に変換して出力してもよい。或いは、例えば妥当である、要注意である、妥当ではない、の3段階で妥当性が解釈されてもよい。要注意は、妥当であるか否かを一概に判断すべきではないテキストを示す。 The validity information output unit 115 is given by inputting one or more word information and one or more part of speech information acquired by the determination target data acquisition unit 114 into the model 2 read by the model reading unit 113. Outputs validity information indicating the validity of the text. The validity information output unit 115, as each layer in the model 2, executes arithmetic processing corresponding to the layer, calculates the validity of the text, and outputs the validity information. The validity information output unit 115 may store the validity information in, for example, the storage unit 14. Alternatively, the validity information output unit 115 may transmit the validity information to another computer via the network. Alternatively, the validity information output unit 115 may display the validity information on the display unit 17. The validity information is originally a numerical value in the range of 0 to 1. For example, if the validity information is 0.5 or more, the text may be interpreted as valid, and if the validity information is less than 0.5, the text may be interpreted as invalid. The validity information output unit 115 may actually convert the validity information into a numerical value of 0 or 1 and output it. Alternatively, validity may be interpreted in three stages, for example, valid, cautionary, and invalid. Attention indicates text that should not be unequivocally determined as valid or not.

モデル2による学習及び妥当性の判定に、テキストを構成する単語の品詞を示す情報が用いられることで、テキストの妥当性の判定精度を向上させることができる。判定精度の向上の理由の1つとして、テキストに含まれる単語に対するヒントが与えられることが考えられる。訓練データには全く出現しない又は出現頻度が低い単語を含んだテキストについて、単語情報のみを用いた機械学習では妥当性を適切に判断することが難しい場合がある。これに対して、品詞情報によって、各単語の品詞と、その前後にある単語の品詞との関係、すなわち品詞をベースとした文脈が考慮されることで、そのようなテキストであっても適切に妥当性を判定することが可能となると推察される。別の理由として、テキストに用いられている文法が考慮されることが考えられる。状況又は要求される内容の種類によって、妥当なテキストに用いられる文法が或る程度限定されることが想定される。テキストが文法的に正しいか否かという観点ではなく、テキストに用いられる文法が、状況又は要求される内容の種類に合っているか否かという観点で、テキストの妥当性が判定されるものと推察される。 By using the information indicating the part of speech of the words constituting the text for the learning by the model 2 and the judgment of the validity, the accuracy of the judgment of the validity of the text can be improved. One of the reasons for improving the determination accuracy is that hints for words contained in the text are given. For texts containing words that do not appear at all or appear infrequently in the training data, it may be difficult to properly judge the validity by machine learning using only word information. On the other hand, the part-speech information takes into account the relationship between the part-speech of each word and the part-speech of the words before and after it, that is, the context based on the part-speech. It is presumed that it will be possible to judge the validity. Another reason may be that the grammar used in the text is taken into account. It is expected that the grammar used for valid text will be limited to some extent depending on the situation or the type of content required. It is presumed that the validity of the text is judged not from the viewpoint of whether the text is grammatically correct, but from the viewpoint of whether the grammar used for the text matches the situation or the type of content required. Will be done.

[1−3.妥当性判定装置の動作]
次に、妥当性判定装置1の動作について、図6及び図7を用いて説明する。図6は、妥当性判定装置1のシステム制御部11及びGPU18による学習処理の一例を示すフローチャートである。モデル生成用のプログラムに従って、システム制御部11及びGPU18は学習処理を実行する。図6に示すように、訓練データ取得部111は、訓練データとしての複数のテキストと、各テキストに対応する妥当性ラベルを記憶部14から取得する(ステップS11)。次いで、訓練データ取得部111は、形態素解析により、各テキストを構成する単語を抽出し、抽出された各単語の品詞を特定する。そして、訓練データ取得部111は、各テキストについて1以上の単語情報及び1以上の品詞情報を生成する(ステップS12)。次いで、モデル生成部112は、単語情報、品詞情報及び妥当性ラベルを含む複数の訓練データを用いた学習により、モデル2を生成する(ステップS13)。例えば、モデル生成部112は、モデル2となる畳み込みニューラルネットワークに単語情報及び品詞情報を入力して、このネットワーク内の各層における演算処理を実行する。モデル生成部112は、各テキストの妥当性を計算し、妥当性情報と妥当性ラベルとを比較して、誤差逆伝搬により各層の重み及びバイアスを更新する。モデル生成部112は、例えばエポック数が所定数に達したとき等に学習を終了させて、モデル2を生成する。モデル生成部112は、生成されたモデル2を記憶部14に記憶させて(ステップS14)、学習処理を終了させる。
[1-3. Operation of validation device]
Next, the operation of the validity determination device 1 will be described with reference to FIGS. 6 and 7. FIG. 6 is a flowchart showing an example of learning processing by the system control unit 11 and the GPU 18 of the validity determination device 1. The system control unit 11 and the GPU 18 execute the learning process according to the model generation program. As shown in FIG. 6, the training data acquisition unit 111 acquires a plurality of texts as training data and the validity label corresponding to each text from the storage unit 14 (step S11). Next, the training data acquisition unit 111 extracts words constituting each text by morphological analysis, and identifies the part of speech of each extracted word. Then, the training data acquisition unit 111 generates one or more word information and one or more part of speech information for each text (step S12). Next, the model generation unit 112 generates the model 2 by learning using a plurality of training data including word information, part of speech information, and validity label (step S13). For example, the model generation unit 112 inputs word information and part-of-speech information to the convolutional neural network that serves as the model 2, and executes arithmetic processing in each layer in the network. The model generator 112 calculates the validity of each text, compares the validity information with the validity label, and updates the weights and biases of each layer by error backpropagation. The model generation unit 112 ends learning when, for example, the number of epochs reaches a predetermined number, and generates the model 2. The model generation unit 112 stores the generated model 2 in the storage unit 14 (step S14), and ends the learning process.

図7は、妥当性判定装置1のシステム制御部11及びGPU18による妥当性判定処理の一例を示すフローチャートである。妥当性判定用のプログラムに従って、システム制御部11及びGPU18は妥当性判定処理を実行する。図7に示すように、モデル読み出し部113は、モデル2を記憶部14から読み出す(ステップS21)。次いで、判定対象データ取得部114は、妥当性の判定対処となるテキストを取得する(ステップS22)。次いで、判定対象データ取得部114は、形態素解析により、このテキストを構成する単語を抽出し、抽出された各単語の品詞を特定する。そして、判定対象データ取得部114は、1以上の単語情報及び1以上の品詞情報を生成する(ステップS23)。次いで、妥当性情報出力部115は、モデル2の変換部21において、1以上の単語情報から、1以上の単語特徴ベクトルを含む単語特徴二次元配列301を生成し、1以上の品詞情報から、1以上の品詞特徴ベクトルを含む品詞特徴二次元配列302を生成する。妥当性情報出力部115は、単語特徴二次元配列301と品詞特徴二次元配列302とを重ねてなる特徴三次元配列310を生成する(ステップS24)。次いで、妥当性情報出力部115は、モデル2の特徴抽出部22において、特徴三次元配列310に対して複数のフィルタで畳み込みを行って複数の特徴マップを生成する(ステップS25)。妥当性情報出力部115は、複数の特徴マップそれぞれの最大値を連結して、テキストの特徴情報を生成する(ステップS26)。次いで、妥当性情報出力部115は、モデル2の判定部23において、テキストの特徴情報をアフィン変換する(ステップS27)。妥当性情報出力部115は、この変換によって生成された妥当性情報を出力して(ステップS28)、妥当性判定処理を終了させる。 FIG. 7 is a flowchart showing an example of validation processing by the system control unit 11 and GPU 18 of the validation device 1. The system control unit 11 and the GPU 18 execute the validation process according to the validation program. As shown in FIG. 7, the model reading unit 113 reads the model 2 from the storage unit 14 (step S21). Next, the determination target data acquisition unit 114 acquires a text for determining validity (step S22). Next, the determination target data acquisition unit 114 extracts the words constituting this text by morphological analysis, and identifies the part of speech of each extracted word. Then, the determination target data acquisition unit 114 generates one or more word information and one or more part of speech information (step S23). Next, the validity information output unit 115 generates a word feature two-dimensional array 301 including one or more word feature vectors from one or more word information in the conversion unit 21 of the model 2, and from one or more part of speech information, A part-of-speech feature two-dimensional array 302 including one or more part-speech feature vectors is generated. The validity information output unit 115 generates a feature three-dimensional array 310 in which the word feature two-dimensional array 301 and the part-speech feature two-dimensional array 302 are superimposed (step S24). Next, the validity information output unit 115 convolves the feature three-dimensional array 310 with a plurality of filters in the feature extraction unit 22 of the model 2 to generate a plurality of feature maps (step S25). The validity information output unit 115 concatenates the maximum values of each of the plurality of feature maps to generate text feature information (step S26). Next, the validity information output unit 115 performs affine transformation of the feature information of the text in the determination unit 23 of the model 2 (step S27). The validity information output unit 115 outputs the validity information generated by this conversion (step S28), and ends the validity determination process.

以上説明したように、本実施形態によれば、妥当性判定装置1が、テキストを構成する1以上の単語を示す1以上の単語情報と、その1以上の単語の品詞を示す1以上の品詞情報と、をそれぞれ含む複数の訓練データを記憶する記憶部14から、複数の訓練データを取得する。また、妥当性判定装置1が、取得された複数の訓練データからの機械学習により、所与のテキストの妥当性を示す妥当性情報を出力するモデル2を生成する。従って、生成されたモデル2を用いることにより、テキストの妥当性の判定精度を向上させることができる。 As described above, according to the present embodiment, the validity determination device 1 has one or more word information indicating one or more words constituting the text, and one or more part of speech indicating the part of speech of the one or more words. A plurality of training data are acquired from the storage unit 14 that stores the information and a plurality of training data including the information. Further, the validity determination device 1 generates a model 2 that outputs validity information indicating the validity of a given text by machine learning from a plurality of acquired training data. Therefore, by using the generated model 2, the accuracy of determining the validity of the text can be improved.

また、妥当性判定装置1が、複数の訓練データそれぞれについて、1以上の単語情報から、1以上の単語それぞれの特徴を示す1以上の単語特徴ベクトルを含む単語特徴二次元配列を生成してもよい。また、妥当性判定装置1が、1以上の品詞情報それぞれを、1以上の単語特徴ベクトルのうちその品詞情報により示される品詞に対応する単語の単語特徴ベクトルに関連付けた状態で、単語特徴二次元配列及び1以上の品詞情報を畳み込み層205に入力して機械学習させることにより、モデル2を生成してもよい。この場合、単語の特徴ベクトルと、その単語の品詞の情報とが関連付けられた状態で畳み込まれて、テキストの特徴が出力される。このテキストの特徴を用いた妥当性の判定結果に基づいてモデル2が最適化される。従って、テキストの妥当性の判定精度を向上させることができる。 Further, even if the validity determination device 1 generates a word feature two-dimensional array including one or more word feature vectors indicating the features of each of the one or more words from one or more word information for each of the plurality of training data. Good. Further, the validity determination device 1 associates one or more part of speech information with the word feature vector of the word corresponding to the part of speech indicated by the part of speech information among the one or more word feature vectors, and the word feature is two-dimensional. Model 2 may be generated by inputting an array and one or more part-speech information into the convolution layer 205 for machine learning. In this case, the feature vector of the word and the information of the part of speech of the word are convoluted in an associative state, and the feature of the text is output. Model 2 is optimized based on the validity judgment result using the characteristics of this text. Therefore, the accuracy of determining the validity of the text can be improved.

また、妥当性判定装置1が、更に、1以上の品詞情報から、1以上の品詞それぞれの特徴を示す複数の品詞特徴ベクトルを含む品詞特徴二次元配列を生成してもよい。また、妥当性判定装置1が、単語特徴二次元配列と品詞特徴二次元配列とを重ねてなる特徴三次元配列を畳み込み層205に入力してもよい。この場合、単語特徴ベクトルを含む二次元配列と、品詞特徴ベクトルを含む二次元配列とで構成される三次元配列に対して、畳み込み層205において三次元のフィルタが適用されて、テキストの特徴が出力される。従って、テキストの妥当性の判定精度を向上させることができる。 Further, the validity determination device 1 may further generate a two-dimensional array of part of speech features including a plurality of part of speech feature vectors indicating the features of each of one or more part of speech from one or more part of speech information. Further, the validity determination device 1 may input the feature three-dimensional array formed by superimposing the word feature two-dimensional array and the part-speech feature two-dimensional array into the convolution layer 205. In this case, a three-dimensional filter is applied in the convolution layer 205 to the three-dimensional array composed of the two-dimensional array including the word feature vector and the two-dimensional array including the part-speech feature vector, and the text feature is obtained. It is output. Therefore, the accuracy of determining the validity of the text can be improved.

また、テキストは、アンケートにおける質問に対する回答を示してもよい。妥当性判定装置1が、所与のアンケートにおける質問に対する回答を示すものとしてのテキストの妥当性を示す妥当性情報を出力してもよい。この場合、アンケートにおける質問に対する回答の妥当性を判定することができる。 The text may also indicate the answer to the question in the questionnaire. The validation device 1 may output validity information indicating the validity of the text as an answer to a question in a given questionnaire. In this case, the validity of the answer to the question in the questionnaire can be judged.

また、妥当性判定装置1は、生成されたモデル2を記憶する記憶部14から、モデル2を読み出してもよい。また、妥当性判定装置1は、判定対象のテキストを構成する1以上の単語を示す1以上の単語情報と、その1以上の単語の品詞を示す1以上の品詞情報と、を取得してもよい。また、妥当性判定装置1が、取得された1以上の単語情報及び1以上の品詞情報を、読み出されたモデル2に入力することにより、所与のテキストの妥当性を示す妥当性情報を出力してもよい。この場合、単語情報に加え、品詞情報をも用いた機械学習により生成されたモデル2を用いて、テキストの妥当性が判定される。従って、テキストの妥当性の判定精度を向上させることができる。 Further, the validity determination device 1 may read the model 2 from the storage unit 14 that stores the generated model 2. Further, even if the validity determination device 1 acquires one or more word information indicating one or more words constituting the text to be determined, and one or more part of speech information indicating the part of speech of the one or more words. Good. Further, the validity determination device 1 inputs the acquired one or more word information and one or more part of speech information into the read model 2, thereby providing validity information indicating the validity of a given text. It may be output. In this case, the validity of the text is determined by using the model 2 generated by machine learning using the part of speech information in addition to the word information. Therefore, the accuracy of determining the validity of the text can be improved.

[2.第2実施形態]
次に、図8及び図9を用いて第2実施形態について説明する。学習の際、モデル生成部112は、単語特徴ベクトルに対する品詞情報の関連付けの別の例として、単語特徴二次元配列と品詞特徴二次元配列とを連結してなる特徴二次元配列を畳み込み層に入力してもよい。
[2. Second Embodiment]
Next, the second embodiment will be described with reference to FIGS. 8 and 9. At the time of learning, the model generation unit 112 inputs a feature two-dimensional array formed by connecting the word feature two-dimensional array and the part-speech feature two-dimensional array into the convolution layer as another example of associating the part-speech information with the word feature vector. You may.

図8は、モデル2の構成例を示す図である。図8において、図3と同様の要素については同様の符号が付されている。図8に示すように、本実施形態において生成されるモデル2は、変換部21−2と、特徴抽出部22−2と、判定部23とを含む。 FIG. 8 is a diagram showing a configuration example of the model 2. In FIG. 8, the same elements as those in FIG. 3 are designated by the same reference numerals. As shown in FIG. 8, the model 2 generated in the present embodiment includes a conversion unit 21-2, a feature extraction unit 22-2, and a determination unit 23.

変換部21−2は、入力層201−1及び201−2と、埋め込み層202−1及び202−2と、連結層211とを含む。図9は、変換部21−2で生成される情報の一例を示す図である。図9において、図4と同様の要素については同様の符号が付されている。連結層211は、埋め込み層202−1及び202−2から出力された単語特徴二次元配列301と品詞特徴二次元配列302とを幅方向に連結して、特徴二次元配列320を出力する。すなわち、連結層211からは1チャネルの二次元配列が出力される。テキストを構成する単語それぞれについて、特徴二次元配列320における単語の特徴ベクトルのy座標と、その単語の品詞の特徴ベクトルのy座標とは一致する。例えば、テキストの最初の単語「高級感」の特徴ベクトルと、その「高級感」の品詞「名詞」の特徴ベクトルは、x軸方向に連なる。 The conversion unit 21-2 includes input layers 201-1 and 201-2, embedded layers 202-1 and 202-2, and a connecting layer 211. FIG. 9 is a diagram showing an example of information generated by the conversion unit 21-2. In FIG. 9, the same elements as those in FIG. 4 are designated by the same reference numerals. The connecting layer 211 connects the word feature two-dimensional array 301 and the part-speech feature two-dimensional array 302 output from the embedded layers 202-1 and 202-2 in the width direction, and outputs the feature two-dimensional array 320. That is, a one-channel two-dimensional array is output from the connection layer 211. For each word constituting the text, the y-coordinate of the feature vector of the word in the feature two-dimensional array 320 and the y-coordinate of the feature vector of the part of speech of the word match. For example, the feature vector of the first word "luxury" in the text and the feature vector of the part of speech "noun" of the "luxury" are connected in the x-axis direction.

特徴抽出部22−2は、複数の畳み込み層212と、複数のMAXプーリング層206と、連結層207とを含む。各畳み込み層212は、各テキストについて特徴二次元配列320を受け入れ可能な畳み込み層である。すなわち、各畳み込み層212は、1チャネルの2D畳み込み層である。各畳み込み層212において、特徴二次元配列320に二次元のフィルタが適用される。このフィルタは、特徴二次元配列320に対して高さ方向のみにスライドしてもよいし、高さ方向及び幅方向の両方にスライドしてもよい。畳み込み層212間で、フィルタの高さは異なる。各フィルタの幅は、特徴二次元配列320の幅と同一であってもよいし、これよりも小さくてもよい。畳み込み層212間で、フィルタの幅は同一であってもよいし異なってもよい。各畳み込み層212から出力された特徴マップは、その畳み込み層212に対応するMAXプーリング層206に入力される。 The feature extraction unit 22-2 includes a plurality of convolution layers 212, a plurality of MAX pooling layers 206, and a connecting layer 207. Each convolution layer 212 is a convolution layer capable of accepting the feature two-dimensional array 320 for each text. That is, each convolution layer 212 is a 1-channel 2D convolution layer. In each convolution layer 212, a two-dimensional filter is applied to the feature two-dimensional array 320. The filter may slide only in the height direction with respect to the feature two-dimensional array 320, or may slide in both the height direction and the width direction. The height of the filter differs between the convolution layers 212. The width of each filter may be the same as or smaller than the width of the feature two-dimensional array 320. The width of the filter may be the same or different between the convolution layers 212. The feature map output from each convolution layer 212 is input to the MAX pooling layer 206 corresponding to the convolution layer 212.

テキストの妥当性の判定において、妥当性情報出力部115も同様に、単語特徴二次元配列と品詞特徴二次元配列とを連結してなる特徴二次元配列を畳み込み層に入力する。 Similarly, in the determination of the validity of the text, the validity information output unit 115 also inputs the feature two-dimensional array formed by connecting the word feature two-dimensional array and the part-speech feature two-dimensional array to the convolution layer.

以上説明したように、本実施形態によれば、妥当性判定装置1が、更に、1以上の品詞情報から、1以上の品詞それぞれの特徴を示す1以上の品詞特徴ベクトルを含む品詞特徴二次元配列を生成する。また、妥当性判定装置1が、単語特徴二次元配列と品詞特徴二次元配列とを連結してなる二次元配列を畳み込み層212に入力する。従って、単語特徴ベクトルを含む二次元配列と、品詞特徴ベクトルを含む二次元配列とで構成される二次元配列に対して、畳み込み層において二次元のフィルタが適用されて、テキストの特徴が出力される。そのため、テキストの妥当性の判定精度を向上させることができる。 As described above, according to the present embodiment, the validity determination device 1 further includes one or more part of speech feature vectors indicating the characteristics of each of one or more part of speech from one or more part of speech information. Generate an array. Further, the validity determination device 1 inputs a two-dimensional array formed by connecting the two-dimensional array of word features and the two-dimensional array of part-speech features to the convolution layer 212. Therefore, a two-dimensional filter is applied in the convolution layer to the two-dimensional array composed of the two-dimensional array including the word feature vector and the two-dimensional array including the part-speech feature vector, and the text feature is output. To. Therefore, the accuracy of determining the validity of the text can be improved.

[3.第3実施形態]
次に、図10及び図11を用いて第3実施形態について説明する。学習の際、モデル生成部112は、単語特徴ベクトルに対する品詞情報の関連付けの更に別の例として、テキストを構成する1以上の単語の品詞それぞれを示す一の数値を生成し、各品詞の数値を、1以上の単語特徴ベクトルのうちその品詞に対応する単語の単語特徴ベクトルに付加して、二次元配列を畳み込み層に入力してもよい。
[3. Third Embodiment]
Next, the third embodiment will be described with reference to FIGS. 10 and 11. At the time of learning, the model generation unit 112 generates one numerical value indicating each part of speech of one or more words constituting the text as yet another example of associating the part of speech information with the word feature vector, and generates a numerical value of each part of speech. One or more word feature vectors may be added to the word feature vector of the word corresponding to the part of speech, and a two-dimensional array may be input to the convolution layer.

図10は、モデル2の構成例を示す図である。図10において、図8と同様の要素については同様の符号が付されている。図10に示すように、本実施形態において生成されるモデル2は、変換部21−3と、特徴抽出部22−2と、判定部23とを含む。 FIG. 10 is a diagram showing a configuration example of the model 2. In FIG. 10, the same elements as those in FIG. 8 are designated by the same reference numerals. As shown in FIG. 10, the model 2 generated in the present embodiment includes a conversion unit 21-3, a feature extraction unit 22-2, and a determination unit 23.

変換部21−3は、入力層201−1及び201−2と、埋め込み層202−1と、埋め込み層213と、連結層211とを含む。図11は、変換部21−3で生成される情報の一例を示す図である。図11において、図4と同様の要素については同様の符号が付されている。埋め込み層213は、入力層201−2から出力された複数の品詞情報それぞれに対応する複数の数値で構成される一次元配列303を出力する。例えば、品詞に対応する数値は、品詞のone-hotベクトルにおいて、1が格納されている位置に対応する数値であってもよいし、別の方法で算出された数値であってもよい。連結層211は、埋め込み層202−1から出力された単語特徴二次元配列301と、埋め込み層213から出力された一次元配列303とを幅方向に連結して、特徴二次元配列330を出力する。すなわち、連結層211からは1チャネルの二次元配列が出力される。テキストを構成する単語それぞれについて、特徴二次元配列330における単語の特徴ベクトルのy座標と、その単語の品詞の数値のy座標とは一致する。例えば、テキストの最初の単語「高級感」の特徴ベクトルと、その「高級感」の品詞「名詞」の数値は、x軸方向に連なる。特徴二次元配列320は、特徴抽出部22−2の各畳み込み層212に入力される。 The conversion unit 21-3 includes input layers 201-1 and 201-2, an embedded layer 202-1, an embedded layer 213, and a connecting layer 211. FIG. 11 is a diagram showing an example of information generated by the conversion unit 21-3. In FIG. 11, the same elements as those in FIG. 4 are designated by the same reference numerals. The embedded layer 213 outputs a one-dimensional array 303 composed of a plurality of numerical values corresponding to each of the plurality of part of speech information output from the input layer 201-2. For example, the numerical value corresponding to the part of speech may be a numerical value corresponding to the position where 1 is stored in the one-hot vector of the part of speech, or may be a numerical value calculated by another method. The connecting layer 211 connects the word feature two-dimensional array 301 output from the embedded layer 202-1 and the one-dimensional array 303 output from the embedded layer 213 in the width direction, and outputs the feature two-dimensional array 330. .. That is, a one-channel two-dimensional array is output from the connection layer 211. For each word constituting the text, the y-coordinate of the feature vector of the word in the feature two-dimensional array 330 and the y-coordinate of the numerical value of the part of speech of the word match. For example, the feature vector of the first word "luxury" in the text and the numerical value of the part of speech "noun" of the "luxury" are connected in the x-axis direction. The feature two-dimensional array 320 is input to each convolution layer 212 of the feature extraction unit 22-2.

テキストの妥当性の判定において、妥当性情報出力部115も同様に、1以上の品詞それぞれを示す数値を、1以上の単語特徴ベクトルのうちその品詞に対応する単語の単語特徴ベクトルに付加して、二次元配列を畳み込み層に入力する。 In determining the validity of the text, the validity information output unit 115 also adds a numerical value indicating each of one or more part of speech to the word feature vector of the word corresponding to the part of speech among the one or more word feature vectors. , Input the two-dimensional array into the convolution layer.

以上説明したように、本実施形態によれば、妥当性判定装置1が、1以上の品詞それぞれを示す数値を、1以上の単語特徴ベクトルのうちその品詞に対応する単語の単語特徴ベクトルに付加して生成された二次元配列を畳み込み層212に入力する。従って、各単語特徴ベクトルに、品詞を示す数値が付加された状態で畳み込まれる。そのため、テキストの妥当性の判定精度を向上させることができる。 As described above, according to the present embodiment, the validity determination device 1 adds a numerical value indicating each of one or more part of speech to the word feature vector of the word corresponding to the part of speech among the one or more word feature vectors. The two-dimensional array generated in the above process is input to the convolution layer 212. Therefore, each word feature vector is convoluted with a numerical value indicating a part of speech added. Therefore, the accuracy of determining the validity of the text can be improved.

[4.第4実施形態]
次に、図12乃至図14を用いて第4実施形態について説明する。訓練データ取得部111は、テキストを構成する1以上の単語それぞれについて、所定の品詞体系により階層化された複数の品詞を示す複数の品詞情報を含む訓練データを取得してもよい。階層化された品詞において、下位の品詞は、上位の品詞を分けた複数の品詞分類のうち、対象の単語に対応する品詞分類である。品詞の階層の数は、2以上であればよい。日本語の場合、品詞体系は、例えばIPA(Information-technology Promotion Agency)品詞体系であってもよい。
[4. Fourth Embodiment]
Next, the fourth embodiment will be described with reference to FIGS. 12 to 14. The training data acquisition unit 111 may acquire training data including a plurality of part-speech information indicating a plurality of part-speech layers layered by a predetermined part-speech system for each of one or more words constituting the text. In the layered part of speech, the lower part of speech is the part of speech classification corresponding to the target word among the plurality of part of speech classifications that divide the upper part of speech. The number of layers of part of speech may be 2 or more. In the case of Japanese, the part-of-speech system may be, for example, an IPA (Information-technology Promotion Agency) part-of-speech system.

モデル生成部112は、テキストを構成する1以上の単語それぞれについて、その単語に対応する複数の品詞情報を、その単語の単語特徴ベクトルに関連付けた状態で、単語特徴二次元配列及び複数の品詞情報を畳み込み層に入力する。例えば、モデル生成部112は、単語特徴二次元配列と複数の品詞特徴二次元配列とを重ねてなる特徴三次元配列を畳み込み層に入力してもよい。 The model generation unit 112 has a word feature two-dimensional array and a plurality of part-speech information in a state in which a plurality of part-speech information corresponding to the word is associated with the word feature vector of the word for each of one or more words constituting the text. Is entered in the convolution layer. For example, the model generation unit 112 may input a feature three-dimensional array formed by superimposing a word feature two-dimensional array and a plurality of part-speech feature two-dimensional arrays into the convolution layer.

図12は、モデル2の構成例を示す図である。図12において、図3と同様の要素については同様の符号が付されている。図12に示すように、本実施形態において生成されるモデル2は、変換部21−4と、特徴抽出部22と、判定部23とを含む。変換部21−4は、入力層201−1と、入力層201−2−1〜201−2−Nと、埋め込み層202−1と、埋め込み層202−2−1〜202−2−Nと、連結層203と、リシェイプ層204とを含む。Nは、品詞の階層の数である。入力層201−2−1〜201−2−Nの数、及び埋め込み層202−2−1〜202−2−Nの数は、品詞の階層の数と一致する。 FIG. 12 is a diagram showing a configuration example of the model 2. In FIG. 12, the same elements as those in FIG. 3 are designated by the same reference numerals. As shown in FIG. 12, the model 2 generated in the present embodiment includes a conversion unit 21-4, a feature extraction unit 22, and a determination unit 23. The conversion unit 21-4 includes an input layer 201-1, an input layer 2012-1 to 201-2-N, an embedded layer 202-1 and an embedded layer 2022-1 to 202-2-N. , The connecting layer 203 and the reshape layer 204 are included. N is the number of layers of part of speech. The number of input layers 2012-1 to 201-2-N and the number of embedded layers 2022-1 to 202-2-N correspond to the number of layers of part of speech.

入力層201−2−1〜201−2−Nそれぞれには、階層化された複数の品詞のうち、その入力層に対応する階層の品詞情報が入力される。埋め込み層202−2−1〜202−2−Nは、入力層201−2−1〜201−2−Nのうち、その埋め込み層に対応する入力層から出力された複数の品詞情報それぞれに対応する複数の品詞特徴ベクトルを含む品詞特徴二次元配列を出力する。図13は、変換部21−4で生成される情報の一例を示す図である。図13において、図4と同様の要素については同様の符号が付されている。品詞特徴二次元配列302−1は、埋め込み層202−2−1から出力される二次元配列であり、第1位の階層の品詞に対応する。品詞特徴二次元配列302−2は、埋め込み層202−2−2から出力される二次元配列であり、第2位の階層の品詞に対応する。品詞特徴二次元配列302−Nは、埋め込み層202−2−Nから出力される二次元配列であり、第N位の階層の品詞に対応する。 Of the plurality of layered part of speech, the part of speech information of the layer corresponding to the input layer is input to each of the input layers 201-2-1 to 201-2-N. The embedded layer 2022-1 to 202-2-N corresponds to each of a plurality of part of speech information output from the input layer corresponding to the embedded layer among the input layers 2012-1-2 to 201-2-N. Outputs a two-dimensional array of part-speech features that includes multiple part-speech feature vectors. FIG. 13 is a diagram showing an example of information generated by the conversion unit 21-4. In FIG. 13, the same elements as those in FIG. 4 are designated by the same reference numerals. Part of speech features The two-dimensional array 302-1 is a two-dimensional array output from the embedded layer 2022-1, and corresponds to the part of speech of the first layer. Part of speech features The two-dimensional array 302-2 is a two-dimensional array output from the embedded layer 202-2-2, and corresponds to the part of speech of the second layer. Part of speech features The two-dimensional array 302-N is a two-dimensional array output from the embedded layer 202-2-N, and corresponds to the part of speech of the Nth layer.

図14は、変換部21−4で生成される情報の一例を示す図である。連結層203は、埋め込み層202−1、202−2−1〜202−2−Nから出力された単語特徴二次元配列301と、品詞特徴二次元配列302−1〜302−Nとを高さ方向に連結する。リシェイプ層204は、連結された配列の形状を三次元形状に変換することにより、図14に示す特徴三次元配列340を出力する。すなわち、リシェイプ層204は、単語特徴二次元配列301、202−2−1〜202−2−Nを別々のチャネルに分離する。特徴三次元配列340は、特徴抽出部22の各畳み込み層205に入力される。各畳み込み層205のチャネル数はN+1である。 FIG. 14 is a diagram showing an example of information generated by the conversion unit 21-4. The connecting layer 203 has the heights of the word feature two-dimensional array 301 output from the embedded layers 202-1 and 2022-1 to 202-2-N and the part-speech feature two-dimensional array 302-1 to 302-N. Connect in the direction. The reshape layer 204 outputs the feature three-dimensional array 340 shown in FIG. 14 by converting the shape of the connected array into a three-dimensional shape. That is, the reshape layer 204 separates the word feature two-dimensional sequences 301, 2022-1 to 202-2-N into separate channels. The feature three-dimensional array 340 is input to each convolution layer 205 of the feature extraction unit 22. The number of channels in each convolution layer 205 is N + 1.

テキストの妥当性の判定において、判定対象データ取得部114も同様に、判定対象のテキストを構成する1以上の単語それぞれについて、所定の品詞体系により階層化された複数の品詞を示す複数の品詞情報を取得する。妥当性情報出力部115は、判定対象のテキストを構成する1以上の単語それぞれについて、その単語に対応する複数の品詞情報を、その単語の単語特徴ベクトルに関連付けた状態で、単語特徴二次元配列及び複数の品詞情報を畳み込み層に入力する。 Similarly, in the determination of the validity of the text, the determination target data acquisition unit 114 also has a plurality of part of speech information indicating a plurality of part of speech layered by a predetermined part of speech system for each of one or more words constituting the determination target text. To get. The validity information output unit 115 is a word feature two-dimensional array in a state in which a plurality of part-speech information corresponding to each of one or more words constituting the text to be determined is associated with the word feature vector of the word. And input multiple part of speech information into the convolution layer.

図12乃至図14は、第1実施形態に対して、品詞の階層化が適用された場合の例を示す。しかしながら、第2実施形態又は第3実施形態に対して、品詞の階層化が適用されてもよい。例えば、単語特徴二次元配列と複数の品詞特徴二次元配列とを幅方向に連結してなる特徴二次元配列が畳み込み層に入力されてもよい。また、テキストを構成する1以上の単語それぞれに対応する複数の階層の品詞を示す複数の数値が生成され、複数の品詞の数値が、1以上の単語特徴ベクトルのうちそれらの品詞に対応する単語の単語特徴ベクトルに付加されてなる二次元配列が、畳み込み層に入力されてもよい。 12 to 14 show an example in which the layering of part of speech is applied to the first embodiment. However, the layering of part of speech may be applied to the second or third embodiment. For example, a feature two-dimensional array formed by connecting a word feature two-dimensional array and a plurality of part-speech feature two-dimensional arrays in the width direction may be input to the convolution layer. In addition, a plurality of numerical values indicating a part of speech of a plurality of layers corresponding to each of one or more words constituting the text are generated, and the numerical values of the plurality of part of speech are words corresponding to those part of speech in the word feature vector of one or more. A two-dimensional array added to the word feature vector of may be input to the convolution layer.

以上説明したように、本実施形態によれば、複数の訓練データそれぞれは、1以上の単語それぞれについて、所定の品詞体系により階層化された複数の品詞を示す複数の品詞情報を含む。従って、複数の品詞情報により、テキストに含まれる単語についてのヒントや、テキストに用いられている文法を階層的に、モデル2を与えることができる。そのため、テキストの妥当性の判定精度を向上させることができる。 As described above, according to the present embodiment, each of the plurality of training data includes a plurality of part of speech information indicating a plurality of part of speech layered by a predetermined part of speech system for each of one or more words. Therefore, the model 2 can be given hierarchically the hints about the words included in the text and the grammar used in the text by the plurality of part-speech information. Therefore, the accuracy of determining the validity of the text can be improved.

[5.第5実施形態]
次に、図15及び図16を用いて第5実施形態について説明する。訓練データ取得部111は、テキストに示されることが要求される内容の種類を示す要求内容種別を更に含む訓練データを取得してもよい。アンケートにおける質問、テーマ、課題等の内容に応じて、要求される内容は様々である。例えば、アンケートの場合、要求内容種別は、アンケートにおける質問で要求される回答の種類を示すアンケート種別であってもよい。アンケート種別の例として、理由を答えさせるもの、或る事物に対する純粋想起について答えさせるもの、印象を答えさせるもの、ポジティブなことについて答えさせるもの、ネガティブなことについて答えさせるもの、名詞で答えさせるもの等が挙げられる。各テキストは、一の要求内容種別のみに該当してもよいし、複数の要求内容種別に該当してもよい。
[5. Fifth Embodiment]
Next, the fifth embodiment will be described with reference to FIGS. 15 and 16. The training data acquisition unit 111 may acquire training data further including a request content type indicating the type of content required to be shown in the text. The required content varies depending on the content of the questions, themes, issues, etc. in the questionnaire. For example, in the case of a questionnaire, the request content type may be a questionnaire type indicating the type of answer required for a question in the questionnaire. Examples of questionnaire types include those that ask you to answer reasons, those that ask you to answer pure recollections of something, those that give you impressions, those that ask you to answer positive things, those that ask you to answer negative things, and those that ask you to answer with nouns. And so on. Each text may correspond to only one request content type, or may correspond to a plurality of request content types.

図15は、モデル2の構成例を示す図である。図15において、図3と同様の要素については同様の符号が付されている。図15に示すように、本実施形態において生成されるモデル2は、変換部21と、特徴抽出部22と、判定部23−5とを含む。 FIG. 15 is a diagram showing a configuration example of the model 2. In FIG. 15, the same elements as those in FIG. 3 are designated by the same reference numerals. As shown in FIG. 15, the model 2 generated in the present embodiment includes a conversion unit 21, a feature extraction unit 22, and a determination unit 23-5.

判定部23−5は、入力層221と、連結層222と、1又は複数の全結合層208と、出力層209とを含む。入力層221には、アンケート種別等の要求内容種別が入力される。図16は、判定部23−5で生成される情報の一例を示す図である。図16に示すアンケート種別520は、例えば要素数が6の一次元配列である。アンケート種別520の6個の要素は、前述した種類にそれぞれ対応している。例えば、各要素には、テキストがその種類に該当する場合、1が格納され、テキストがその種類に該当しない場合、0が格納されてもよい。連結層222は、特徴抽出部22から出力されたテキストの特徴情報510と、入力層221から出力されたアンケート種別520とを連結して、一次元配列530を出力する。一次元配列530は、全結合層208に入力される。従って、判定部23−5は、テキストの特徴情報510とアンケート種別520とに基づいて、テキストの妥当性を示す妥当性情報を出力する。 The determination unit 23-5 includes an input layer 221, a connection layer 222, one or more fully connected layers 208, and an output layer 209. Request content types such as questionnaire types are input to the input layer 221. FIG. 16 is a diagram showing an example of information generated by the determination unit 23-5. The questionnaire type 520 shown in FIG. 16 is, for example, a one-dimensional array having 6 elements. The six elements of the questionnaire type 520 correspond to the above-mentioned types, respectively. For example, each element may contain 1 if the text falls under that type, and 0 if the text does not fall under that type. The connection layer 222 connects the feature information 510 of the text output from the feature extraction unit 22 and the questionnaire type 520 output from the input layer 221 to output a one-dimensional array 530. The one-dimensional array 530 is input to the fully connected layer 208. Therefore, the determination unit 23-5 outputs validity information indicating the validity of the text based on the feature information 510 of the text and the questionnaire type 520.

テキストの妥当性の判定において、判定対象データ取得部114も同様に、テキストに示されることが要求される内容の種類を示す要求内容種別を更に取得する。妥当性情報出力部115は、モデル生成部112の場合と同様に、要求内容種別を更に用いて妥当性情報を出力する。 In the determination of the validity of the text, the determination target data acquisition unit 114 also similarly acquires the request content type indicating the type of content required to be shown in the text. The validity information output unit 115 outputs the validity information by further using the request content type, as in the case of the model generation unit 112.

図15及び図16は、第1実施形態に対して、要求内容種別の使用が適用された場合の例を示す。しかしながら、第2実施形態〜第4実施形態に対して、要求内容種別の使用が適用されてもよい。 15 and 16 show an example when the use of the request content type is applied to the first embodiment. However, the use of the request content type may be applied to the second to fourth embodiments.

以上説明したように、本実施形態によれば、複数の訓練データそれぞれは、テキストに示されることが要求される内容の種類を示す要求内容種別を更に含む。従って、要求される内容の種類に応じて、テキストに含まれる単語の品詞や、テキストに用いられている文法が異なる場合において、テキストの妥当性の判定精度を向上させることができる。 As described above, according to the present embodiment, each of the plurality of training data further includes a required content type indicating the type of content required to be shown in the text. Therefore, it is possible to improve the accuracy of determining the validity of the text when the part of speech of the word included in the text and the grammar used in the text are different depending on the type of content required.

[6.第6実施形態]
次に、図17及び図18を用いて第6実施形態について説明する。訓練データ取得部111は、如何なる内容がテキストに示されることが要求されるかを示す要求内容テキストを構成する1以上の単語を示す1以上の要求内容単語情報と、要求内容テキストを構成する1以上の単語の品詞を示す1以上の要求内容品詞情報と、を更に含む訓練データを取得してもよい。要求内容テキストは、例えばアンケートの質問、テーマ、課題等を示すテキストある。
[6. 6th Embodiment]
Next, the sixth embodiment will be described with reference to FIGS. 17 and 18. The training data acquisition unit 111 constitutes one or more request content word information indicating one or more words constituting the request content text indicating what kind of content is required to be shown in the text, and one request content text. Training data including one or more required content part-speech information indicating the part-speech of the above-mentioned words may be acquired. The request content text is, for example, a text indicating a questionnaire question, theme, task, or the like.

図17は、モデル2の構成例を示す図である。図17において、図3と同様の要素については同様の符号が付されている。図17に示すように、本実施形態において生成されるモデル2は、変換部21−6と、特徴抽出部22と、判定部23とを含む。図18は、変換部21−6において生成される情報の一例を示す図である。変換部21−6は、入力層201−1〜201−4と、埋め込み層202−1〜202−4と、連結層231〜233と、リシェイプ層234とを含む。入力層201−3には、要求内容単語情報の一例として、アンケートの質問を示すテキストを構成する1以上の単語を示す質問単語情報が入力される。入力層201−4には、要求内容品詞情報の一例として、アンケートの質問を示すテキストを構成する1以上の単語の品詞を示す質問品詞情報が入力される。埋め込み層202−3は、入力層201−3から出力された複数の質問単語情報それぞれに対応する複数の質問単語特徴ベクトルで構成される質問単語特徴二次元配列304を生成する。埋め込み層202−4は、入力層201−4から出力された複数の質問品詞情報それぞれに対応する複数の質問品詞特徴ベクトルで構成される質問品詞特徴二次元配列305を生成する。連結層231は、埋め込み層202−1及び202−3から出力された単語特徴二次元配列301と質問単語特徴二次元配列304とを幅方向に連結して、第1の二次元配列を出力する。連結層232は、埋め込み層202−2及び202−4から出力された品詞特徴二次元配列302と質問品詞特徴二次元配列305とを幅方向に連結して、第2の二次元配列を出力する。連結層233は、連結層231及び232から出力された第1及び第2の二次元配列を高さ方向に連結することにより、第3の二次元配列を出力する。リシェイプ層234は、連結層233から出力された第3の二次元配列の形状を三次元形状に変換することにより、図18に示す特徴三次元配列360を出力する。特徴三次元配列360において、単語特徴二次元配列301及び質問単語特徴二次元配列304は、同一のチャネルで連結されている。また、品詞特徴二次元配列302及び質問品詞特徴二次元配列305は、同一のチャネルで連結されている。単語と品詞とで別々のチャネルに二次元配列が形成される。特徴三次元配列360は、特徴抽出部22の各畳み込み層205に入力される。 FIG. 17 is a diagram showing a configuration example of the model 2. In FIG. 17, the same elements as those in FIG. 3 are designated by the same reference numerals. As shown in FIG. 17, the model 2 generated in the present embodiment includes a conversion unit 21-6, a feature extraction unit 22, and a determination unit 23. FIG. 18 is a diagram showing an example of information generated by the conversion unit 21-6. The conversion unit 21-6 includes an input layer 201-1 to 201-4, an embedded layer 202-1 to 202-4, a connecting layer 231 to 233, and a reshape layer 234. In the input layer 201-3, as an example of the request content word information, question word information indicating one or more words constituting the text indicating the question of the questionnaire is input. In the input layer 201-4, as an example of the request content part of speech information, question part of speech information indicating the part of speech of one or more words constituting the text indicating the question of the questionnaire is input. The embedded layer 202-3 generates a question word feature two-dimensional array 304 composed of a plurality of question word feature vectors corresponding to each of the plurality of question word information output from the input layer 201-3. The embedded layer 202-4 generates a question part speech feature two-dimensional array 305 composed of a plurality of question part speech feature vectors corresponding to each of the plurality of question part speech information output from the input layer 201-4. The connecting layer 231 connects the word feature two-dimensional array 301 output from the embedded layers 202-1 and 202-3 and the question word feature two-dimensional array 304 in the width direction, and outputs the first two-dimensional array. .. The connecting layer 232 connects the part-speech feature two-dimensional array 302 and the question part-speech feature two-dimensional array 305 output from the embedded layers 202-2 and 202-4 in the width direction, and outputs a second two-dimensional array. .. The connecting layer 233 outputs a third two-dimensional array by connecting the first and second two-dimensional arrays output from the connecting layers 231 and 232 in the height direction. The reshape layer 234 outputs the feature three-dimensional array 360 shown in FIG. 18 by converting the shape of the third two-dimensional array output from the connecting layer 233 into a three-dimensional shape. In the feature three-dimensional array 360, the word feature two-dimensional array 301 and the question word feature two-dimensional array 304 are connected by the same channel. Further, the part-of-speech feature two-dimensional array 302 and the question part-of-speech feature two-dimensional array 305 are connected by the same channel. A two-dimensional array is formed in separate channels for words and part of speech. The feature three-dimensional array 360 is input to each convolution layer 205 of the feature extraction unit 22.

テキストの妥当性の判定において、判定対象データ取得部114も同様に、要求内容単語情報及び要求内容品詞情報を更に取得する。妥当性情報出力部115は、モデル生成部112の場合と同様に、要求内容単語情報及び要求内容品詞情報を更に用いて妥当性情報を出力する。 In the determination of the validity of the text, the determination target data acquisition unit 114 also acquires the request content word information and the request content part of speech information in the same manner. The validity information output unit 115 outputs the validity information by further using the request content word information and the request content part of speech information, as in the case of the model generation unit 112.

図17及び図18は、第1実施形態に対して、要求内容単語情報及び要求内容品詞情報の追加が適用された場合の例を示す。しかしながら、第2実施形態〜第4実施形態に、要求内容単語情報及び要求内容品詞情報の追加が適用されてもよい。例えば、単語特徴二次元配列301と品詞特徴二次元配列302とを幅方向に連結して、テキスト用の二次元配列が生成されるとともに、質問単語特徴二次元配列304と質問品詞特徴二次元配列305とを幅方向に連結して、質問用のテキスト用の二次元配列が生成され、生成されたこれらの二次元配列が幅方向に連結されてなる二次元配列が、畳み込み層212に入力されてもよい。また、単語特徴二次元配列301に、テキストを構成する単語の品詞を示す数値が付加されるとともに、質問品詞特徴二次元配列305に、質問を示すテキストを構成する単語の品詞を示す数値が付加され、これらの二次元配列が幅方向に連結してなる二次元配列が、畳み込み層212に入力されてもよい。また、テキストを構成する1以上の単語それぞれについて、階層化された複数の品詞を示す複数の品詞情報が取得されるとともに、要求内容テキストを構成する1以上の単語それぞれについて、階層化された複数の品詞を示す複数の要求内容品詞情報が取得されてもよい。 17 and 18 show an example in which the addition of the required content word information and the required content part of speech information is applied to the first embodiment. However, the addition of the required content word information and the required content part of speech information may be applied to the second to fourth embodiments. For example, the word feature two-dimensional array 301 and the part lyrics feature two-dimensional array 302 are connected in the width direction to generate a two-dimensional array for text, and the question word feature two-dimensional array 304 and the question part lyrics feature two-dimensional array are generated. A two-dimensional array for the text for the question is generated by connecting the 305 and the 305 in the width direction, and a two-dimensional array formed by connecting these generated two-dimensional arrays in the width direction is input to the convolution layer 212. You may. Further, a numerical value indicating the part of speech of the word constituting the text is added to the word feature two-dimensional array 301, and a numerical value indicating the part of speech of the word constituting the text indicating the question is added to the question part of speech feature two-dimensional array 305. Then, a two-dimensional array formed by connecting these two-dimensional arrays in the width direction may be input to the convolution layer 212. In addition, a plurality of part-speech information indicating a plurality of layered part of speech is acquired for each of one or more words constituting the text, and a plurality of layered parts of speech are obtained for each of the one or more words constituting the request content text. A plurality of request contents part-speech information indicating the part-speech of the above may be acquired.

以上説明したように、本実施形態によれば、複数の訓練データそれぞれは、テキストに如何なる内容が示されることが要求されるかを示す要求内容テキストを構成する1以上の単語を示す1以上の要求内容単語情報と、その1以上の単語の品詞を示す1以上の要求内容品詞情報と、を更に含む。従って、如何なる内容を示していることが要求されるかを示すテキストの単語情報及び品詞情報をも用いた機械学習により、モデル2が生成される。そのため、如何なる内容を示していることが要求されるかを示すテキストと、この要求に対して作成されたテキストとが対で学習されるので、テキストの妥当性の判定精度を向上させることができる。 As described above, according to the present embodiment, each of the plurality of training data indicates one or more words constituting the request content text indicating what kind of content is required to be shown in the text. It further includes request content word information and one or more request content part of speech information indicating the part of speech of the one or more words. Therefore, the model 2 is generated by machine learning using the word information and the part-speech information of the text indicating what kind of content is required to be shown. Therefore, since the text indicating what kind of content is required to be shown and the text created for this request are learned in pairs, the accuracy of determining the validity of the text can be improved. ..

[7.第7実施形態]
次に、図19及び図20を用いて第7実施形態について説明する。訓練データ取得部111は、テキストを構成する1以上の単語それぞれの文字数を示す1以上の文字数情報を更に含む訓練データを取得してもよい。訓練データ取得部111が、各単語の文字数をカウントして文字数情報を生成してもよいし、予め記憶部14に文字数情報が記憶されていてもよい。
[7. Seventh Embodiment]
Next, the seventh embodiment will be described with reference to FIGS. 19 and 20. The training data acquisition unit 111 may acquire training data further including one or more character number information indicating the number of characters of each one or more words constituting the text. The training data acquisition unit 111 may count the number of characters of each word to generate character number information, or the storage unit 14 may store the character number information in advance.

モデル生成部112は、品詞情報の場合と同様に、1以上の文字数情報それぞれを、1以上の単語特徴ベクトルのうち、その文字数情報により示される文字数に対応する単語の単語特徴ベクトルに関連付けた状態で、単語特徴二次元配列及び1以上の文字数情報を畳み込み層に入力してもよい。 Similar to the case of part of speech information, the model generation unit 112 associates each of one or more character number information with the word feature vector of the word corresponding to the number of characters indicated by the character number information among the one or more word feature vectors. Then, the word feature two-dimensional array and one or more character number information may be input to the convolution layer.

図19は、モデル2の構成例を示す図である。図19において、図3と同様の要素については同様の符号が付されている。図19に示すように、本実施形態において生成されるモデル2は、変換部21−7と、特徴抽出部22と、判定部23とを含む。図20は、変換部21−7において生成される情報の一例を示す図である。変換部21−7は、入力層201−1、201−2、及び201−5と、埋め込み層202−1、202−2、及び202−5と、連結層203と、リシェイプ層204とを含む。入力層201−5には、文字数情報が入力される。埋め込み層202−5は、入力層201−5から出力された複数の文字数情報それぞれに対応する複数の文字数特徴ベクトルで構成される文字数特徴二次元配列306を生成する。例えば、文字数を示す単語の特徴ベクトルが、文字数特徴ベクトルとして出力されてもよい。連結層203は、埋め込み層202−1、202−2、及び202−5から出力された単語特徴二次元配列301と、品詞特徴二次元配列302と、文字数特徴二次元配列306とを高さ方向に連結する。リシェイプ層204は、連結された配列の形状を三次元形状に変換することにより、図20に示す特徴三次元配列370を出力する。特徴三次元配列370において、単語特徴二次元配列301、品詞特徴二次元配列302、及び文字数特徴二次元配列306は、別々のチャネルに分離される。特徴三次元配列370は、特徴抽出部22の各畳み込み層205に入力される。 FIG. 19 is a diagram showing a configuration example of the model 2. In FIG. 19, the same elements as those in FIG. 3 are designated by the same reference numerals. As shown in FIG. 19, the model 2 generated in the present embodiment includes a conversion unit 21-7, a feature extraction unit 22, and a determination unit 23. FIG. 20 is a diagram showing an example of information generated by the conversion unit 21-7. The conversion unit 21-7 includes input layers 201-1, 201-2, and 201-5, embedded layers 202-1, 202-2, and 202-5, a connecting layer 203, and a reshape layer 204. .. Character number information is input to the input layer 201-5. The embedded layer 202-5 generates a character number feature two-dimensional array 306 composed of a plurality of character number feature vectors corresponding to each of the plurality of character number information output from the input layer 201-5. For example, a word feature vector indicating the number of characters may be output as a character count feature vector. The connecting layer 203 has the word feature two-dimensional array 301, the part-speech feature two-dimensional array 302, and the character number feature two-dimensional array 306 output from the embedded layers 202-1, 202-2, and 202-5 in the height direction. Connect to. The reshape layer 204 outputs the feature three-dimensional array 370 shown in FIG. 20 by converting the shape of the connected array into a three-dimensional shape. In the feature three-dimensional array 370, the word feature two-dimensional array 301, the part-speech feature two-dimensional array 302, and the character number feature two-dimensional array 306 are separated into separate channels. The feature three-dimensional array 370 is input to each convolution layer 205 of the feature extraction unit 22.

テキストの妥当性の判定において、判定対象データ取得部114も同様に、文字数情報を更に取得する。妥当性情報出力部115は、モデル生成部112の場合と同様に、文字数情報を更に用いて妥当性情報を出力する。 In the determination of the validity of the text, the determination target data acquisition unit 114 also acquires the character number information further. The validity information output unit 115 outputs the validity information by further using the character number information, as in the case of the model generation unit 112.

図19及び図20は、第1実施形態に対して、文字数情報の追加が適用された場合の例を示す。しかしながら、第2実施形態〜第6実施形態に、文字数情報の追加が適用されてもよい。例えば、単語特徴二次元配列301と、品詞特徴二次元配列302と、文字数特徴二次元配列306とを幅方向に連結してなる二次元配列が、畳み込み層212に入力されてもよい。また、単語特徴二次元配列301に、品詞を示す数値及び文字数を示す数値が付加されてなる二次元配列が、畳み込み層212に入力されてもよい。また、文字数情報とともに、階層化された複数の品詞を示す複数の品詞情報が取得されてもよい。また、文字数情報とともに、要求内容種別が取得されてもよい。また、テキストを構成する単語について、単語情報、品詞情報及び文字数情報が取得されるとともに、要求内容テキストを構成する単語について、要求内容単語情報、要求内容品詞情報、及び要求内容テキストを構成する単語の文字数を示す文字数情報が取得されてもよい。 19 and 20 show an example in which the addition of character number information is applied to the first embodiment. However, the addition of character number information may be applied to the second to sixth embodiments. For example, a two-dimensional array formed by connecting the word feature two-dimensional array 301, the part-speech feature two-dimensional array 302, and the character number feature two-dimensional array 306 in the width direction may be input to the convolution layer 212. Further, a two-dimensional array in which a numerical value indicating a part of speech and a numerical value indicating the number of characters are added to the word feature two-dimensional array 301 may be input to the convolution layer 212. Further, along with the character number information, a plurality of part-speech information indicating a plurality of layered part-speech may be acquired. Further, the request content type may be acquired together with the character number information. In addition, word information, part lyrics information, and number of characters information are acquired for the words that make up the text, and for the words that make up the request content text, the request content word information, the request content part lyrics information, and the words that make up the request content text are obtained. Character number information indicating the number of characters of may be acquired.

以上説明したように、本実施形態によれば、複数の訓練データそれぞれは、1以上の単語それぞれの文字数を示す1以上の文字数情報を更に含む。従って、文字数情報により、テキストに含まれる単語についての更なるヒントをモデル2を与えることができる。そのため、テキストの妥当性の判定精度を向上させることができる。 As described above, according to the present embodiment, each of the plurality of training data further includes one or more character number information indicating the number of characters of each one or more words. Therefore, the number of characters information can provide model 2 with further hints about the words contained in the text. Therefore, the accuracy of determining the validity of the text can be improved.

[8.第8実施形態]
次に、図21及び図22を用いて第8実施形態について説明する。訓練データ取得部111は、テキストを構成する1以上の単語それぞれに含まれる文字の種類を示す1以上の文字種数情報を更に含む訓練データを取得してもよい。訓練データ取得部111が、各単語に含まれる文字の種類を特定して文字種情報を生成してもよいし、予め記憶部14に文字種情報が記憶されていてもよい。例えば、日本語の場合、文字種情報は、漢字を含むか否か、平仮名を含むか否か、片仮名を含むか否か、ローマ字を含むか否か、数字を含むか否か等であってもよい。訓練データ取得部111は、テキストを構成する1以上の単語それぞれについて、複数の文字種情報を取得してもよい。
[8. 8th Embodiment]
Next, the eighth embodiment will be described with reference to FIGS. 21 and 22. The training data acquisition unit 111 may acquire training data further including one or more character type number information indicating the type of characters included in each of one or more words constituting the text. The training data acquisition unit 111 may specify the type of the character included in each word to generate the character type information, or the storage unit 14 may store the character type information in advance. For example, in the case of Japanese, the character type information may include kanji, hiragana, katakana, romaji, numbers, etc. Good. The training data acquisition unit 111 may acquire a plurality of character type information for each of one or more words constituting the text.

モデル生成部112は、品詞情報の場合と同様に、1以上の文字種情報それぞれを、1以上の単語特徴ベクトルのうち、その文字種情報により示される文字種に対応する単語の単語特徴ベクトルに関連付けた状態で、単語特徴二次元配列及び1以上の文字種情報を畳み込み層に入力してもよい。 Similar to the case of part of speech information, the model generation unit 112 associates each of one or more character type information with the word feature vector of the word corresponding to the character type indicated by the character type information among the one or more word feature vectors. Then, the word feature two-dimensional array and one or more character type information may be input to the convolution layer.

図21は、モデル2の構成例を示す図である。図21において、図3と同様の要素については同様の符号が付されている。図21に示すように、本実施形態において生成されるモデル2は、変換部21−8と、特徴抽出部22と、判定部23とを含む。図22は、変換部21−8において生成される情報の一例を示す図である。変換部21−8は、入力層201−1、201−2、及び201−6と、埋め込み層202−1、202−2、及び202−6と、連結層203と、リシェイプ層204とを含む。入力層201−6には、文字種情報が入力される。この文字種情報は、例えば単語が漢字を含むか否かを示す。埋め込み層202−6は、入力層201−6から出力された複数の文字種情報それぞれに対応する複数の文字種特徴ベクトルで構成される文字種特徴二次元配列307を生成する。例えば、文字種を示す単語の特徴ベクトルが、文字種特徴ベクトルとして出力されてもよい。各単語について複数の文字種情報が存在する場合、変換部21−8は、複数の文字種情報に対応する複数の入力層201−6及び複数の埋め込み層202−6を含んでもよい。連結層203は、埋め込み層202−1、202−2、及び202−6から出力された単語特徴二次元配列301と、品詞特徴二次元配列302と、文字種特徴二次元配列307とを高さ方向に連結する。リシェイプ層204は、連結された配列の形状を三次元形状に変換することにより、図22に示す特徴三次元配列380を出力する。特徴三次元配列380において、単語特徴二次元配列301、品詞特徴二次元配列302、及び文字種特徴二次元配列307は、別々のチャネルに分離される。特徴三次元配列380は、特徴抽出部22の各畳み込み層205に入力される。 FIG. 21 is a diagram showing a configuration example of the model 2. In FIG. 21, the same elements as those in FIG. 3 are designated by the same reference numerals. As shown in FIG. 21, the model 2 generated in the present embodiment includes a conversion unit 21-8, a feature extraction unit 22, and a determination unit 23. FIG. 22 is a diagram showing an example of information generated by the conversion unit 21-8. The conversion unit 21-8 includes input layers 201-1, 201-2, and 201-6, embedded layers 202-1, 202-2, and 202-6, a connecting layer 203, and a reshape layer 204. .. Character type information is input to the input layer 201-6. This character type information indicates, for example, whether or not the word contains Chinese characters. The embedded layer 202-6 generates a character type feature two-dimensional array 307 composed of a plurality of character type feature vectors corresponding to each of the plurality of character type information output from the input layer 201-6. For example, the feature vector of the word indicating the character type may be output as the character type feature vector. When a plurality of character type information exists for each word, the conversion unit 21-8 may include a plurality of input layers 201-6 and a plurality of embedded layers 202-6 corresponding to the plurality of character type information. The connecting layer 203 has the word feature two-dimensional array 301, the part-speech feature two-dimensional array 302, and the character type feature two-dimensional array 307 output from the embedded layers 202-1, 202-2, and 202-6 in the height direction. Connect to. The reshape layer 204 outputs the feature three-dimensional array 380 shown in FIG. 22 by converting the shape of the connected array into a three-dimensional shape. In the feature three-dimensional array 380, the word feature two-dimensional array 301, the part-speech feature two-dimensional array 302, and the character type feature two-dimensional array 307 are separated into separate channels. The feature three-dimensional array 380 is input to each convolution layer 205 of the feature extraction unit 22.

テキストの妥当性の判定において、判定対象データ取得部114も同様に、文字種情報を更に取得する。妥当性情報出力部115は、モデル生成部112の場合と同様に、文字種情報を更に用いて妥当性情報を出力する。 In the determination of the validity of the text, the determination target data acquisition unit 114 also acquires the character type information further. The validity information output unit 115 outputs the validity information by further using the character type information, as in the case of the model generation unit 112.

図21及び図22は、第1実施形態に対して、文字種情報の追加が適用された場合の例を示す。しかしながら、第2実施形態〜第7実施形態に、文字種情報の追加が適用されてもよい。第2実施形態〜第6実施形態に対する文字種情報の追加の適用例は、文字数の追加の適用例と同様である。また、文字種情報とともに、文字数情報が取得されてもよい。 21 and 22 show an example in which the addition of character type information is applied to the first embodiment. However, the addition of character type information may be applied to the second to seventh embodiments. The application example of adding the character type information to the second embodiment to the sixth embodiment is the same as the application example of adding the number of characters. Further, the character number information may be acquired together with the character type information.

以上説明したように、本実施形態によれば、複数の訓練データそれぞれは、1以上の単語それぞれに含まれる文字の種類を示す1以上の文字種情報を更に含む。従って、この発明によれば、文字種情報により、テキストに含まれる単語についての更なるヒントをモデル2を与えることができる。そのため、テキストの妥当性の判定精度を向上させることができる。 As described above, according to the present embodiment, each of the plurality of training data further includes one or more character type information indicating the type of character included in each of one or more words. Therefore, according to the present invention, the character type information can provide the model 2 with further hints about the words contained in the text. Therefore, the accuracy of determining the validity of the text can be improved.

上記各実施形態においては、本発明が、テキストの妥当性の判定に用いられていた。しかしながら、本発明は、テキストの分類に適用されてもよい。また、本発明は、妥当性が問題となるテキスト以外の様々なテキストの分類に対しても適用されてもよい。2クラス分類及び多クラス分類の何れが適用されてもよい。テキスト分類の場合、訓練データは、妥当性ラベルに変えて、テキストが属するカテゴリーを示すラベルを含む。モデル2は、分類結果を示す情報を出力する。なお、テキストの妥当性の判定は、テキスト分類の一例である。 In each of the above embodiments, the present invention has been used to determine the validity of the text. However, the present invention may be applied to the classification of texts. The present invention may also be applied to various text classifications other than texts for which validity matters. Either binary classification or multi-class classification may be applied. For text classification, the training data includes a label indicating the category to which the text belongs, instead of a validity label. Model 2 outputs information indicating the classification result. The determination of the validity of the text is an example of text classification.

1 妥当性判定装置
11 システム制御部
12 システムバス
13 入出力インターフェース
14 記憶部
15 通信部
16 入力部
17 表示部
18 GPU
111 訓練データ取得部
112 モデル生成部
113 モデル読み出し部
114 判定対象データ取得部
115 妥当性情報出力部
2 モデル
21、21−1〜4、21−6〜21−8 変換部
22、22−2 特徴抽出部
23、23−5 判定部
205、212 畳み込み層
1 Validity judgment device 11 System control unit 12 System bus 13 Input / output interface 14 Storage unit 15 Communication unit 16 Input unit 17 Display unit 18 GPU
111 Training data acquisition unit 112 Model generation unit 113 Model reading unit 114 Judgment target data acquisition unit 115 Validity information output unit 2 Model 21, 21-1 to 4, 21-6 to 21-8 Conversion unit 22, 22-2 Features Extraction unit 23, 23-5 Judgment unit 205, 212 Convolution layer

Claims (16)

第1テキストを構成する1以上の単語を示す1以上の単語情報と、前記1以上の単語の品詞を示す1以上の品詞情報と、アンケートにおける質問に対する回答としての前記第1テキストの妥当性を示すラベルと、をそれぞれ含む複数の訓練データを記憶する記憶手段から、前記複数の訓練データを取得する訓練データ取得手段と、
前記取得された複数の訓練データそれぞれについて、前記1以上の単語情報から、前記1以上の単語それぞれの特徴を示す1以上の単語特徴ベクトルを含む二次元配列単語情報を生成する特徴情報生成手段と、
前記取得された複数の訓練データからの機械学習により、アンケートにおける質問に対する回答を示すものとしての所与の第2テキストの妥当性を示す第2妥当性情報を出力し且つ畳み込み層を含むモデルを生成するモデル生成手段であって、前記取得された複数の訓練データそれぞれに含まれる前記1以上の単語それぞれについて、該単語に対応する前記単語特徴ベクトルと前記品詞情報とが並ぶ状態で、前記二次元配列単語情報及び前記1以上の品詞情報を畳み込み層に入力して、前記第1テキストの特徴を示す特徴情報を取得し、該取得された特徴情報に基づいて、前記第1テキストの妥当性を示す第1妥当性情報を前記モデルから出力させ、前記第1妥当性情報と前記ラベルとを比較することに基づく誤差逆伝播により、前記モデルを訓練するモデル生成手段と、
を備え、
互いに同一の単語に対応する前記単語特徴ベクトルと前記品詞情報とが並ぶ方向における前記畳み込み層のフィルタのサイズは、前記単語特徴ベクトルのサイズと前記品詞情報のサイズとの合計に一致することを特徴とする学習装置。
One or more word information indicating one or more words constituting the first text, one or more part of speech information indicating the part of speech of the one or more words, and the validity of the first text as an answer to a question in a questionnaire. A training data acquisition means for acquiring the plurality of training data from a storage means for storing a plurality of training data including each of the indicated labels.
With respect to each of the acquired plurality of training data, a feature information generating means for generating two-dimensional array word information including one or more word feature vectors indicating the features of each of the one or more words from the one or more word information. ,
By machine learning from the plurality of acquired training data, a model that outputs second validity information indicating the validity of a given second text as an answer to a question in a questionnaire and includes a convolution layer is obtained. The model generation means for generating, for each of the one or more words included in each of the acquired plurality of training data, the word feature vector corresponding to the word and the part code information are arranged side by side. The dimension array word information and the one or more part word information are input to the convolution layer to acquire the feature information indicating the feature of the first text, and the validity of the first text is obtained based on the acquired feature information. A model generation means for training the model by error backpropagation based on outputting the first validity information indicating the above from the model and comparing the first validity information with the label.
With
The size of the filter of the convolution layer in the direction in which the word feature vector corresponding to the same word and the part of speech information are arranged is characterized in that the size of the filter of the convolution layer matches the sum of the size of the word feature vector and the size of the part of speech information. Learning device.
前記モデル生成手段は、前記第1テキスト内における前記1以上の単語の並び順に従って前記1以上の単語特徴ベクトルが並べられた前記二次元配列単語情報と、前記並び順に従って並べられた前記1以上の品詞情報と、を前記畳み込み層に入力し、 The model generating means includes the two-dimensional array word information in which the one or more word feature vectors are arranged according to the order of the one or more words in the first text, and the one or more arranged according to the order. And the part of speech information of, are input to the convolution layer,
前記1以上の単語情報が並ぶ方向における前記フィルタのサイズは、複数の単語に対応するサイズであることを特徴とする請求項1に記載の学習装置。 The learning device according to claim 1, wherein the size of the filter in the direction in which one or more word information is arranged is a size corresponding to a plurality of words.
前記特徴情報生成手段は、更に、前記1以上の品詞情報から、前記1以上の品詞それぞれの特徴を示す1以上の品詞特徴ベクトルを含む二次元配列品詞情報を生成し、
前記モデル生成手段は、前記二次元配列単語情報と前記二次元配列品詞情報とを重ねてなる三次元配列情報を前記畳み込み層に入力することを特徴とする請求項2に記載の学習装置。
The feature information generation means further generates two-dimensional array part of speech information including one or more part of speech feature vectors indicating the features of each of the one or more part of speech from the one or more part of speech information.
The learning device according to claim 2, wherein the model generation means inputs three-dimensional array information obtained by superimposing the two-dimensional array word information and the two-dimensional array part of speech information into the convolution layer.
前記特徴情報生成手段は、更に、前記1以上の品詞情報から、前記1以上の品詞それぞれの特徴を示す1以上の品詞特徴ベクトルを含む二次元配列品詞情報を生成し、
前記モデル生成手段は、前記二次元配列単語情報と前記二次元配列品詞情報とを連結してなる二次元配列情報を前記畳み込み層に入力することを特徴とする請求項2に記載の学習装置。
The feature information generation means further generates two-dimensional array part of speech information including one or more part of speech feature vectors indicating the features of each of the one or more part of speech from the one or more part of speech information.
The learning device according to claim 2, wherein the model generation means inputs two-dimensional array information formed by connecting the two-dimensional array word information and the two-dimensional array part-speech information to the convolution layer.
前記モデル生成手段は、前記1以上の品詞それぞれを示す数値を、前記1以上の単語特徴ベクトルのうち該品詞に対応する単語の単語特徴ベクトルに付加して、前記二次元配列単語情報を前記畳み込み層に入力することを特徴とする請求項2に記載の学習装置。 The model generation means adds a numerical value indicating each of the one or more part of speech to the word feature vector of the word corresponding to the part of speech in the one or more word feature vector, and convolves the two-dimensional array word information. The learning device according to claim 2, wherein the learning device is input to a layer. 前記複数の訓練データそれぞれは、前記1以上の単語それぞれについて、所定の品詞体系により階層化された複数の品詞を示す複数の前記品詞情報を含むことを特徴とする請求項1乃至5の何れか一項に記載の学習装置。 Any of claims 1 to 5, wherein each of the plurality of training data includes a plurality of said part of speech information indicating a plurality of part of speech layered by a predetermined part of speech system for each of the one or more words. The learning device according to paragraph 1. 前記複数の訓練データそれぞれは、如何なる種類の内容が前記第1テキストに示されることが要求されているかを示す種類情報を更に含むことを特徴とする請求項1乃至6の何れか一項に記載の学習装置。 The invention according to any one of claims 1 to 6, wherein each of the plurality of training data further includes type information indicating what kind of content is required to be shown in the first text. Learning device. 前記複数の訓練データそれぞれは、前記質問を示す第3テキストを構成する1以上の第2単語を示す1以上の第2単語情報と、前記1以上の第2単語の品詞を示す1以上の第2品詞情報と、を更に含むことを特徴とする請求項1乃至7の何れか一項に記載の学習装置。 Each of the plurality of training data includes one or more second word information indicating one or more second words constituting the third text indicating the question, and one or more second words indicating the part of speech of the one or more second words. 2. The learning device according to any one of claims 1 to 7, further comprising part-speech information. 前記複数の訓練データそれぞれは、前記1以上の単語それぞれの文字数を示す1以上の文字数情報を更に含むことを特徴とする請求項1乃至8の何れか一項に記載の学習装置。 The learning device according to any one of claims 1 to 8, wherein each of the plurality of training data further includes one or more character number information indicating the number of characters of each of the one or more words. 前記複数の訓練データそれぞれは、前記1以上の単語それぞれに含まれる文字の種類を示す1以上の文字種情報を更に含むことを特徴とする請求項1乃至9の何れか一項に記載の学習装置。 The learning apparatus according to any one of claims 1 to 9, wherein each of the plurality of training data further includes one or more character type information indicating a character type included in each of the one or more words. .. 前記ラベルは、第1質問に対する回答としての前記第1テキストの妥当性を示し、 The label indicates the validity of the first text as an answer to the first question.
前記モデル生成手段は、前記第1質問により要求される回答の種類と同じ種類の回答を要求する第2質問に対する回答を示すものとしての前記第2テキストの妥当性を示す前記第2妥当性情報を出力する前記モデルを生成することを特徴とする請求項1乃至10の何れか一項に記載の学習装置。 The model generating means indicates the validity of the second text as indicating an answer to a second question requesting an answer of the same type as the answer requested by the first question. The learning device according to any one of claims 1 to 10, wherein the model is generated.
請求項1乃至11の何れか一項に記載の学習装置により生成されたモデルを記憶するモデル記憶手段から、前記モデルを読み出す読み出し手段と、 A reading means for reading the model from a model storage means for storing the model generated by the learning device according to any one of claims 1 to 11.
所与のテキストを構成する1以上の単語を示す1以上の判定単語情報と、前記1以上の単語の品詞を示す1以上の判定品詞情報と、を取得するテキスト情報取得手段と、 A text information acquisition means for acquiring one or more determination word information indicating one or more words constituting a given text, and one or more determination part of speech information indicating the part of speech of the one or more words.
前記取得された1以上の判定単語情報及び1以上の判定品詞情報を、前記読み出されたモデルに入力することにより、前記所与のテキストの妥当性を示す妥当性情報を出力する出力手段と、 An output means for outputting the validity information indicating the validity of the given text by inputting the acquired one or more judgment word information and one or more judgment part of speech information into the read model. ,
を備えることを特徴とする妥当性判定装置。 A validation device comprising.
コンピュータにより実行される学習方法において、 In the learning method performed by the computer
第1テキストを構成する1以上の単語を示す1以上の単語情報と、前記1以上の単語の品詞を示す1以上の品詞情報と、アンケートにおける質問に対する回答としての前記第1テキストの妥当性を示すラベルと、をそれぞれ含む複数の訓練データを記憶する記憶手段から、前記複数の訓練データを取得する訓練データ取得ステップと、 One or more word information indicating one or more words constituting the first text, one or more part of speech information indicating the part of speech of the one or more words, and the validity of the first text as an answer to a question in a questionnaire. A training data acquisition step of acquiring the plurality of training data from a storage means for storing a plurality of training data including the labeled label and
前記取得された複数の訓練データそれぞれについて、前記1以上の単語情報から、前記1以上の単語それぞれの特徴を示す1以上の単語特徴ベクトルを含む二次元配列単語情報を生成する特徴情報生成ステップと、 With respect to each of the acquired plurality of training data, a feature information generation step of generating two-dimensional array word information including one or more word feature vectors indicating the features of each of the one or more words from the one or more word information. ,
前記取得された複数の訓練データからの機械学習により、アンケートにおける質問に対する回答を示すものとしての所与の第2テキストの妥当性を示す第2妥当性情報を出力し且つ畳み込み層を含むモデルを生成するモデル生成ステップであって、前記取得された複数の訓練データそれぞれに含まれる前記1以上の単語それぞれについて、該単語に対応する前記単語特徴ベクトルと前記品詞情報とが並ぶ状態で、前記二次元配列単語情報及び前記1以上の品詞情報を畳み込み層に入力して、前記第1テキストの特徴を示す特徴情報を取得し、該取得された特徴情報に基づいて、前記第1テキストの妥当性を示す第1妥当性情報を前記モデルから出力させ、前記第1妥当性情報と前記ラベルとを比較することに基づく誤差逆伝播により、前記モデルを訓練するモデル生成ステップと、 By machine learning from the plurality of acquired training data, a model that outputs second validity information indicating the validity of a given second text as an answer to a question in a questionnaire and includes a convolution layer is obtained. In the model generation step to be generated, for each of the one or more words included in each of the acquired plurality of training data, the word feature vector corresponding to the word and the part code information are arranged side by side. The dimension array word information and the one or more part word information are input to the convolution layer to acquire the feature information indicating the feature of the first text, and the validity of the first text is obtained based on the acquired feature information. A model generation step of training the model by error backpropagation based on outputting the first validity information indicating the above from the model and comparing the first validity information with the label.
を含み、 Including
前記単語特徴ベクトルと前記品詞情報とが並ぶ方向における前記畳み込み層のフィルタのサイズは、前記単語特徴ベクトルのサイズと前記品詞情報のサイズとの合計に一致することを特徴とする学習方法。 A learning method characterized in that the size of the filter of the convolution layer in the direction in which the word feature vector and the part of speech information are aligned matches the sum of the size of the word feature vector and the size of the part of speech information.
コンピュータにより実行される妥当性判定方法において、 In the validation method performed by the computer
請求項1乃至11の何れか一項に記載の学習装置により生成されたモデルを記憶するモデル記憶手段から、前記モデルを読み出す読み出しステップと、 A read-out step of reading the model from the model storage means for storing the model generated by the learning device according to any one of claims 1 to 11.
所与のテキストを構成する1以上の単語を示す1以上の判定単語情報と、前記1以上の単語の品詞を示す1以上の判定品詞情報と、を取得するテキスト情報取得ステップと、 A text information acquisition step for acquiring one or more determination word information indicating one or more words constituting a given text, and one or more determination part of speech information indicating the part of speech of the one or more words.
前記取得された1以上の判定単語情報及び1以上の判定品詞情報を、前記読み出されたモデルに入力することにより、前記所与のテキストの妥当性を示す妥当性情報を出力する出力ステップと、 With the output step of outputting the validity information indicating the validity of the given text by inputting the acquired one or more judgment word information and one or more judgment part of speech information into the read model. ,
を含むことを特徴とする妥当性判定方法。 A validation method comprising.
コンピュータを、 Computer,
第1テキストを構成する1以上の単語を示す1以上の単語情報と、前記1以上の単語の品詞を示す1以上の品詞情報と、アンケートにおける質問に対する回答としての前記第1テキストの妥当性を示すラベルと、をそれぞれ含む複数の訓練データを記憶する記憶手段から、前記複数の訓練データを取得する訓練データ取得手段と、One or more word information indicating one or more words constituting the first text, one or more part of speech information indicating the part of speech of the one or more words, and the validity of the first text as an answer to a question in a questionnaire. A training data acquisition means for acquiring the plurality of training data from a storage means for storing a plurality of training data including each of the indicated labels, and a training data acquisition means for acquiring the plurality of training data.
前記取得された複数の訓練データそれぞれについて、前記1以上の単語情報から、前記1以上の単語それぞれの特徴を示す1以上の単語特徴ベクトルを含む二次元配列単語情報を生成する特徴情報生成手段と、 With respect to each of the acquired plurality of training data, a feature information generating means for generating two-dimensional array word information including one or more word feature vectors indicating the features of each of the one or more words from the one or more word information. ,
前記取得された複数の訓練データからの機械学習により、アンケートにおける質問に対する回答を示すものとしての所与の第2テキストの妥当性を示す第2妥当性情報を出力し且つ畳み込み層を含むモデルを生成するモデル生成手段であって、前記取得された複数の訓練データそれぞれに含まれる前記1以上の単語それぞれについて、該単語に対応する前記単語特徴ベクトルと前記品詞情報とが並ぶ状態で、前記二次元配列単語情報及び前記1以上の品詞情報を畳み込み層に入力して、前記第1テキストの特徴を示す特徴情報を取得し、該取得された特徴情報に基づいて、前記第1テキストの妥当性を示す第1妥当性情報を前記モデルから出力させ、前記第1妥当性情報と前記ラベルとを比較することに基づく誤差逆伝播により、前記モデルを訓練するモデル生成手段と、 By machine learning from the plurality of acquired training data, a model that outputs second validity information indicating the validity of a given second text as an answer to a question in a questionnaire and includes a convolution layer is obtained. The model generation means for generating, for each of the one or more words included in each of the acquired plurality of training data, the word feature vector corresponding to the word and the part code information are arranged side by side. The dimension array word information and the one or more part word information are input to the convolution layer to acquire the feature information indicating the feature of the first text, and the validity of the first text is obtained based on the acquired feature information. A model generation means for training the model by error backpropagation based on outputting the first validity information indicating the above from the model and comparing the first validity information with the label.
として機能させ、 To function as
前記単語特徴ベクトルと前記品詞情報とが並ぶ方向における前記畳み込み層のフィルタのサイズは、前記単語特徴ベクトルのサイズと前記品詞情報のサイズとの合計に一致することを特徴とする学習プログラム。 A learning program characterized in that the size of the filter of the convolution layer in the direction in which the word feature vector and the part of speech information are aligned matches the sum of the size of the word feature vector and the size of the part of speech information.
コンピュータを、 Computer,
請求項1乃至11の何れか一項に記載の学習装置により生成されたモデルを記憶するモデル記憶手段から、前記モデルを読み出す読み出し手段と、 A reading means for reading the model from a model storage means for storing the model generated by the learning device according to any one of claims 1 to 11.
所与のテキストを構成する1以上の単語を示す1以上の判定単語情報と、前記1以上の単語の品詞を示す1以上の判定品詞情報と、を取得するテキスト情報取得手段と、 A text information acquisition means for acquiring one or more determination word information indicating one or more words constituting a given text, and one or more determination part of speech information indicating the part of speech of the one or more words.
前記取得された1以上の判定単語情報及び1以上の判定品詞情報を、前記読み出されたモデルに入力することにより、前記所与のテキストの妥当性を示す妥当性情報を出力する出力手段と、 An output means for outputting the validity information indicating the validity of the given text by inputting the acquired one or more judgment word information and one or more judgment part of speech information into the read model. ,
として機能させることを特徴とする妥当性判定プログラム。 A validation program characterized by functioning as.
JP2018245365A 2018-12-27 2018-12-27 Learning device, validation device, learning method, validation method, learning program, and validation program Active JP6899367B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018245365A JP6899367B2 (en) 2018-12-27 2018-12-27 Learning device, validation device, learning method, validation method, learning program, and validation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018245365A JP6899367B2 (en) 2018-12-27 2018-12-27 Learning device, validation device, learning method, validation method, learning program, and validation program

Publications (2)

Publication Number Publication Date
JP2020107085A JP2020107085A (en) 2020-07-09
JP6899367B2 true JP6899367B2 (en) 2021-07-07

Family

ID=71449170

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018245365A Active JP6899367B2 (en) 2018-12-27 2018-12-27 Learning device, validation device, learning method, validation method, learning program, and validation program

Country Status (1)

Country Link
JP (1) JP6899367B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112348158B (en) * 2020-11-04 2024-02-13 重庆大学 Industrial equipment state evaluation method based on multi-parameter deep distribution learning

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6633855B1 (en) * 2000-01-06 2003-10-14 International Business Machines Corporation Method, system, and program for filtering content using neural networks
JP2008084064A (en) * 2006-09-28 2008-04-10 National Institute Of Advanced Industrial & Technology Text classification processing method, text classification processing device and text classification processing program
US9720901B2 (en) * 2015-11-19 2017-08-01 King Abdulaziz City For Science And Technology Automated text-evaluation of user generated text
CN106649275A (en) * 2016-12-28 2017-05-10 成都数联铭品科技有限公司 Relation extraction method based on part-of-speech information and convolutional neural network
CN106855853A (en) * 2016-12-28 2017-06-16 成都数联铭品科技有限公司 Entity relation extraction system based on deep neural network
US10162850B1 (en) * 2018-04-10 2018-12-25 Icertis, Inc. Clause discovery for validation of documents

Also Published As

Publication number Publication date
JP2020107085A (en) 2020-07-09

Similar Documents

Publication Publication Date Title
Pouyanfar et al. A survey on deep learning: Algorithms, techniques, and applications
US20190279074A1 (en) Semantic Class Localization Digital Environment
CN109948615B (en) Multi-language text detection and recognition system
US20180268287A1 (en) Probability-Based Guider
CN111930942B (en) Text classification method, language model training method, device and equipment
Dai et al. Glyph-aware embedding of chinese characters
EP3926531B1 (en) Method and system for visio-linguistic understanding using contextual language model reasoners
CN113011186B (en) Named entity recognition method, named entity recognition device, named entity recognition equipment and computer readable storage medium
CN108009148A (en) Text emotion classification method for expressing based on deep learning
CN109753661B (en) Machine reading understanding method, device, equipment and storage medium
CN111985243B (en) Emotion model training method, emotion analysis device and storage medium
CN112988963B (en) User intention prediction method, device, equipment and medium based on multi-flow nodes
CN110717013B (en) Vectorization of documents
CN110633456A (en) Language identification method, language identification device, server and storage medium
JP6899367B2 (en) Learning device, validation device, learning method, validation method, learning program, and validation program
Sitender et al. Effect of GloVe, Word2Vec and FastText Embedding on English and Hindi Neural Machine Translation Systems
Tannert et al. FlowchartQA: the first large-scale benchmark for reasoning over flowcharts
CN112948580B (en) Text classification method and system
Aarthi et al. Performance analysis of telugu characters using deep learning networks
CN114627282A (en) Target detection model establishing method, target detection model application method, target detection model establishing device, target detection model application device and target detection model establishing medium
US11132514B1 (en) Apparatus and method for applying image encoding recognition in natural language processing
CN113869068A (en) Scene service recommendation method, device, equipment and storage medium
Jia et al. Training quantized one-stage object detection neural networks via selective feature imitation
Dehaqi et al. Adversarial image caption generator network
US20230376687A1 (en) Multimodal extraction across multiple granularities

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190701

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20201013

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20201214

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210112

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: 20210525

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210614

R150 Certificate of patent or registration of utility model

Ref document number: 6899367

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150