JP6910061B2 - Text generator, text generator and text generator - Google Patents

Text generator, text generator and text generator Download PDF

Info

Publication number
JP6910061B2
JP6910061B2 JP2017168673A JP2017168673A JP6910061B2 JP 6910061 B2 JP6910061 B2 JP 6910061B2 JP 2017168673 A JP2017168673 A JP 2017168673A JP 2017168673 A JP2017168673 A JP 2017168673A JP 6910061 B2 JP6910061 B2 JP 6910061B2
Authority
JP
Japan
Prior art keywords
time
data
numerical data
series
text
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
JP2017168673A
Other languages
Japanese (ja)
Other versions
JP2019046158A (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.)
National Institute of Advanced Industrial Science and Technology AIST
Original Assignee
National Institute of Advanced Industrial Science and Technology AIST
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 National Institute of Advanced Industrial Science and Technology AIST filed Critical National Institute of Advanced Industrial Science and Technology AIST
Priority to JP2017168673A priority Critical patent/JP6910061B2/en
Publication of JP2019046158A publication Critical patent/JP2019046158A/en
Application granted granted Critical
Publication of JP6910061B2 publication Critical patent/JP6910061B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、テキスト生成装置、テキスト生成方法及びテキスト生成プログラムに関する。 The present invention relates to a text generator, a text generator and a text generator.

近年、自然言語処理の分野において、リカレントニューラルネットワーク等のニューラルネットワークを用いた言語モデルが研究されている。 In recent years, in the field of natural language processing, language models using neural networks such as recurrent neural networks have been studied.

例えば下記特許文献1には、対話形式のテキストから認識された単語と、単語の時系列情報と、単語の発言者を識別する識別情報とを第1のデータベースから取得する認識結果取得部と、単語と単語の時系列情報と識別情報と要約モデルに基づいて単語を訂正し、訂正結果を第1のデータベースに出力するテキスト要約部と、を有する対話テキスト要約装置が記載されている。 For example, in Patent Document 1 below, a recognition result acquisition unit that acquires words recognized from an interactive text, time-series information of words, and identification information for identifying the speaker of a word from a first database, Described is a dialogue text summarizing device having a text summarizing unit that corrects words based on word-to-word time-series information, identification information, and a summarizing model, and outputs the corrected results to a first database.

特開2017−111190号公報JP-A-2017-111190

ニューラルネットワークを用いた言語モデルは、大量のテキストデータを学習用データとして、学習用データに表れる単語の統計的特徴に基づいてテキストを生成するように学習されることがある。 A language model using a neural network may be trained to use a large amount of text data as training data and generate text based on the statistical characteristics of words appearing in the training data.

しかしながら、時間の経過とともに変化する数値の列を含む時系列数値データ(例えば株価等)の変動を説明するテキストを生成する場合、学習用データは時系列数値データの引用や変化量に関する説明(例えば、株価であれば、始値、終値、上げ幅等)を含むことがあり、その説明に関連付けられる数値が様々に変化するため、それぞれの数値が統計的に稀にしか現れない単語となってしまう。そのため、数値に関する記載を正しく再現するように言語モデルを学習させることが難しく、時系列数値データの変動を説明するテキストを生成することが難しかった。 However, when generating a text explaining the fluctuation of time series numerical data (for example, stock price) including a sequence of numerical values that changes with the passage of time, the training data is a citation of the time series numerical data or an explanation about the amount of change (for example). , If it is a stock price, it may include the opening price, closing price, increase range, etc.), and the numerical values associated with the explanation change variously, so each numerical value becomes a word that rarely appears statistically. .. Therefore, it is difficult to train the language model so as to correctly reproduce the description related to the numerical value, and it is difficult to generate a text explaining the fluctuation of the time-series numerical data.

そこで、本発明は、時系列数値データの変動を説明するテキストを生成するテキスト生成装置、テキスト生成方法及びテキスト生成プログラムを提供する。 Therefore, the present invention provides a text generator, a text generation method, and a text generation program that generate text explaining fluctuations in time-series numerical data.

本発明の一態様に係るテキスト生成装置は、時間の経過と対応付けられた数列を含む時系列数値データの変動を説明するテキストデータを生成するテキスト生成装置であって、テキストデータのうち時系列数値データに関係する数値を所定の規則で所定の文字列に置き換えた置換テキストデータと時系列数値データとを学習用データとして、時系列数値データが入力された場合に、置換テキストデータを出力するように言語モデルを学習させる学習部と、学習部により学習された言語モデルに新たな時系列数値データを入力し、言語モデルの出力によって新たな時系列数値データを説明する新たな置換テキストデータを生成する生成部と、新たな置換テキストデータに含まれる所定の文字列を、所定の規則で新たな時系列数値データに関係する数値に置き換える置換部と、を備える。 The text generator according to one aspect of the present invention is a text generator that generates text data for explaining fluctuations in time-series numerical data including a number sequence associated with the passage of time, and is a time-series of text data. When the replacement text data and the time-series numerical data in which the numerical values related to the numerical data are replaced with the predetermined character strings according to a predetermined rule are used as training data, the replacement text data is output when the time-series numerical data is input. New time-series numerical data is input to the learning unit that trains the language model and the language model learned by the learning unit, and new replacement text data that explains the new time-series numerical data is input by the output of the language model. It includes a generation unit to be generated and a replacement unit that replaces a predetermined character string included in the new replacement text data with a numerical value related to the new time-series numerical data according to a predetermined rule.

この態様によれば、言語モデルの出力によって新たな時系列数値データを説明する新たな置換テキストデータを生成し、新たな置換テキストデータに含まれる所定の文字列を、所定の規則で新たな時系列数値データに関係する数値に置き換えることで、時系列数値データに関する数値を言語モデルによって直接出力する必要が無くなり、数値が様々に変化する場合であってもその数値に関する記載を正しく含むように、時系列数値データの変動を説明するテキストを生成することができる。 According to this aspect, the output of the language model generates new replacement text data explaining the new time-series numerical data, and the predetermined character string contained in the new replacement text data is changed to a new time according to a predetermined rule. By replacing with the numerical value related to the series numerical data, it is not necessary to directly output the numerical value related to the time series numerical data by the language model, and even if the numerical value changes variously, the description about the numerical value is correctly included. It is possible to generate text explaining the fluctuation of time series numerical data.

上記態様において、時系列数値データに関係する数値は、時系列数値データに含まれる数列のうち所定の時点に対応付けられた数値と、時系列数値データに含まれる数列のうち異なる時点に対応付けられた数値の差と、時系列数値データに含まれる数列のうち所定の時点に対応付けられた数値を所定の桁で切り捨てた数値と、時系列数値データに含まれる数列のうち異なる時点に対応付けられた数値の差を所定の桁で切り捨てた数値と、時系列数値データに含まれる数列のうち所定の時点に対応付けられた数値を所定の桁で切り上げた数値と、時系列数値データに含まれる数列のうち異なる時点に対応付けられた数値の差を所定の桁で切り上げた数値と、のうち少なくともいずれかを含み、所定の規則は、時系列数値データに関係する数値の種類と所定の文字列とを対応付ける規則であってもよい。 In the above aspect, the numerical value related to the time-series numerical data is associated with a numerical value associated with a predetermined time point among the numerical values included in the time-series numerical data and a different time point among the numerical values included in the time-series numerical data. Corresponds to the difference between the numerical values and the numerical value obtained by rounding down the numerical value associated with a predetermined time point in the number sequence included in the time-series numerical data by a predetermined digit and the different time point in the number sequence included in the time-series numerical data. The difference between the attached numerical values is rounded down to a predetermined digit, the numerical value associated with a predetermined time point in the numerical sequence included in the time series numerical data is rounded up to a predetermined digit, and the time series numerical data. Includes at least one of the included number columns, which is the difference between the numbers associated with different time points, rounded up to a given digit, and the given rule is the type of number and the given number related to time-series numerical data. It may be a rule that associates with the character string of.

この態様によれば、時系列数値データに関係する数値の種類と所定の文字列とを対応付けることで、時系列数値データの引用や時系列数値データを演算した結果得られる数値を含むように、時系列数値データの変動を説明するテキストを生成することができる。 According to this aspect, by associating the type of numerical value related to the time-series numerical data with a predetermined character string, the numerical value obtained as a result of quoting the time-series numerical data or calculating the time-series numerical data is included. It is possible to generate text explaining the fluctuation of time series numerical data.

上記態様において、時系列数値データは、第1間隔で時間の経過と対応付けられた数列を含む第1時系列数値データと、第1間隔より長い第2間隔で時間の経過と対応付けられた数列を含む第2時系列数値データとを含んでもよい。 In the above aspect, the time-series numerical data is associated with the first time-series numerical data including the sequence associated with the passage of time in the first interval and the passage of time in the second interval longer than the first interval. It may include a second time series numerical data including a sequence of numbers.

この態様によれば、異なる時間間隔で時間の経過と対応付けられた数列を含む時系列数値データを用いることで、時系列数値データの履歴に依存する単語を正しく含むように、時系列数値データの変動を説明するテキストを生成することができる。 According to this aspect, by using time-series numerical data including a sequence of numbers associated with the passage of time at different time intervals, the time-series numerical data correctly includes words that depend on the history of the time-series numerical data. Can generate text that describes the fluctuations in.

上記態様において、生成部は、時系列数値データを、1又は複数の方法に一対一に対応する1又は複数の方法で変換して得られる1又は複数の数値データを、言語モデルに入力してもよい。 In the above aspect, the generation unit inputs one or more numerical data obtained by converting the time series numerical data by one or more methods corresponding to one or more methods one-to-one into the language model. May be good.

この態様によれば、時系列数値データを1又は複数の方法で変換して得られる1又は複数の数値データを言語モデルに入力することで、生成されるテキストが時系列数値データの絶対値に依存してぶれることが防止される。 According to this aspect, by inputting one or more numerical data obtained by converting time-series numerical data by one or more methods into a language model, the generated text becomes an absolute value of the time-series numerical data. Dependence on blurring is prevented.

上記態様において、1又は複数の数値データは、時系列数値データに含まれる数列を所定の数値範囲に正規化した数値データと、時系列数値データに含まれる数列の平均値及び標準偏差を用いて時系列数値データを標準化した数値データと、時系列数値データに含まれる数列のうち所定の時点に対応付けられた数値を基準値として、時系列数値データに含まれる数列を基準値に関して相対化した数値データと、のうち少なくともいずれかを含んでもよい。 In the above embodiment, the one or more numerical data uses the numerical data obtained by normalizing the numerical strings included in the time-series numerical data to a predetermined numerical range, and the average value and standard deviation of the numerical strings included in the time-series numerical data. The numerical data that standardizes the time-series numerical data and the numerical value associated with a predetermined time point among the numerical columns included in the time-series numerical data are used as reference values, and the numerical strings included in the time-series numerical data are relativized with respect to the reference value. Numerical data and at least one of them may be included.

この態様によれば、正規化した数値データ又は標準化した数値データを用いることで、生成されるテキストが時系列数値データの絶対値に依存してぶれることが防止され、相対化した数値データを用いることで、時系列数値データの履歴に依存する単語を正しく含むように、時系列数値データの変動を説明するテキストを生成することができる。 According to this aspect, by using the normalized numerical data or the standardized numerical data, it is prevented that the generated text is blurred depending on the absolute value of the time-series numerical data, and the relativized numerical data is used. By doing so, it is possible to generate a text explaining the fluctuation of the time-series numerical data so as to correctly include the words that depend on the history of the time-series numerical data.

上記態様において、言語モデルは、第1間隔で時間の経過と対応付けられた数列を含む第1時系列数値データを1又は複数の方法で変換して得られる、1又は複数の方法に一対一に対応する1又は複数の第1数値データが入力される第1エンコーダと、第1間隔より長い第2間隔で時間の経過と対応付けられた数列を含む第2時系列数値データを1又は複数の方法で変換して得られる、1又は複数の方法に一対一に対応する1又は複数の第2数値データが入力される第2エンコーダと、第1エンコーダの出力及び第2エンコーダの出力を合成する合成部と、合成部により合成されたデータが入力され、置換テキストデータを出力するデコーダと、を含んでもよい。 In the above embodiment, the language model is one-to-one with one or more methods obtained by converting first time-series numerical data including a number sequence associated with the passage of time in the first interval by one or more methods. One or more first encoders into which one or more first numerical data corresponding to the above are input, and one or more second time series numerical data including a number sequence associated with the passage of time in a second interval longer than the first interval. The output of the first encoder and the output of the second encoder are combined with the second encoder in which one or more second numerical data corresponding to one or more methods corresponding to one or more methods are input, which is obtained by conversion by the method of. It may include a compositing unit and a decoder in which the data synthesized by the compositing unit is input and the replacement text data is output.

この態様によれば、異なる時間間隔で時間の経過と対応付けられた数列を含む時系列数値データをそれぞれ異なるエンコーダに入力し、出力を合成してデコーダに入力することで、時系列数値データの履歴に依存する単語を正しく含むように、時系列数値データの変動を説明するテキストを生成することができる。 According to this aspect, time-series numerical data including a number sequence associated with the passage of time at different time intervals is input to different encoders, and the outputs are combined and input to the decoder to obtain time-series numerical data. Text can be generated to explain the variation of time series numerical data so that it correctly contains history-dependent words.

上記態様において、合成部は、第1エンコーダの出力、第2エンコーダの出力、1又は複数の第1数値データ及び1又は複数の第2数値データを合成してもよい。 In the above aspect, the compositing unit may synthesize the output of the first encoder, the output of the second encoder, one or more first numerical data, and one or more second numerical data.

この態様によれば、デコーダに対して、エンコーダの出力のみならず、複数の数値データを入力することで、時系列数値データの履歴に依存する単語を正しく含むように、時系列数値データの変動を説明するテキストを生成することができる。 According to this aspect, by inputting not only the output of the encoder but also a plurality of numerical data to the decoder, the variation of the time-series numerical data so as to correctly include the words depending on the history of the time-series numerical data. Can generate text that describes.

上記態様において、デコーダには、合成部により合成されたデータ及び時系列数値データの時系列に関するデータが入力されてもよい。 In the above aspect, the data synthesized by the compositing unit and the time-series numerical data of the time-series numerical data may be input to the decoder.

この態様によれば、デコーダに対して、合成部により合成されたデータのみならず、時系列数値データの時系列に関するデータを入力することで、時系列数値データの履歴に依存する単語を正しく含むように、時系列数値データの変動を説明するテキストを生成することができる。 According to this aspect, by inputting not only the data synthesized by the synthesizer but also the data related to the time series of the time series numerical data into the decoder, the words depending on the history of the time series numerical data are correctly included. As such, it is possible to generate text that explains the fluctuations in time series numerical data.

本発明の他の態様に係るテキスト生成方法は、ハードウェアプロセッサ及びメモリを備えるコンピュータによって、時間の経過と対応付けられた数列を含む時系列数値データの変動を説明するテキストデータを生成するテキスト生成方法であって、テキストデータのうち時系列数値データに関係する数値を所定の規則で所定の文字列に置き換えた置換テキストデータと時系列数値データとを学習用データとして、時系列数値データが入力された場合に、置換テキストデータを出力するように言語モデルを学習させることと、学習された言語モデルに新たな時系列数値データを入力し、言語モデルの出力によって新たな時系列数値データを説明する新たな置換テキストデータを生成することと、新たな置換テキストデータに含まれる所定の文字列を、所定の規則で新たな時系列数値データに関係する数値に置き換えることと、を実行する。 The text generation method according to another aspect of the present invention is a text generation method in which a computer including a hardware processor and a memory generates text data explaining fluctuations in time-series numerical data including a sequence of numbers associated with the passage of time. This is a method in which time-series numerical data is input using replacement text data in which numerical values related to time-series numerical data are replaced with predetermined character strings in a predetermined rule and time-series numerical data as learning data. When this is done, the language model is trained to output the replacement text data, new time-series numerical data is input to the trained language model, and the new time-series numerical data is explained by the output of the language model. Generate new replacement text data and replace the predetermined character string contained in the new replacement text data with a numerical value related to the new time-series numerical data according to a predetermined rule.

この態様によれば、言語モデルの出力によって新たな時系列数値データを説明する新たな置換テキストデータを生成し、新たな置換テキストデータに含まれる所定の文字列を、所定の規則で新たな時系列数値データに関係する数値に置き換えることで、時系列数値データに関係する数値を言語モデルによって直接出力する必要が無くなり、数値が様々に変化する場合であってもその数値に関する記載を正しく含むように、時系列数値データの変動を説明するテキストを生成することができる。 According to this aspect, the output of the language model generates new replacement text data explaining the new time-series numerical data, and the predetermined character string contained in the new replacement text data is changed to a new time according to a predetermined rule. By replacing with the numerical value related to the series numerical data, it is not necessary to directly output the numerical value related to the time series numerical data by the language model, and even if the numerical value changes variously, the description about the numerical value is correctly included. In addition, it is possible to generate text explaining the fluctuation of time series numerical data.

本発明の他の態様に係るテキスト生成プログラムは、時間の経過と対応付けられた数列を含む時系列数値データの変動を説明するテキストデータを生成するテキスト生成装置に備えられたコンピュータを、テキストデータのうち時系列数値データに関係する数値を所定の規則で所定の文字列に置き換えた置換テキストデータと時系列数値データとを学習用データとして、時系列数値データが入力された場合に、置換テキストデータを出力するように言語モデルを学習させる学習部、学習部により学習された言語モデルに新たな時系列数値データを入力し、言語モデルの出力によって新たな時系列数値データを説明する新たな置換テキストデータを生成する生成部、及び新たな置換テキストデータに含まれる所定の文字列を、所定の規則で新たな時系列数値データに関係する数値に置き換える置換部、として機能させる。 The text generator according to another aspect of the present invention uses a computer provided with a text generator for generating text data to explain fluctuations in time-series numerical data including a sequence of numbers associated with the passage of time. Of these, when the replacement text data in which the numerical values related to the time-series numerical data are replaced with the predetermined character strings according to a predetermined rule and the time-series numerical data as training data, the replacement text is input when the time-series numerical data is input. A learning unit that trains a language model to output data, a new replacement that inputs new time-series numerical data into the language model learned by the learning unit and explains the new time-series numerical data by the output of the language model. It functions as a generation unit that generates text data and a replacement unit that replaces a predetermined character string included in the new replacement text data with a numerical value related to the new time-series numerical data according to a predetermined rule.

この態様によれば、言語モデルの出力によって新たな時系列数値データを説明する新たな置換テキストデータを生成し、新たな置換テキストデータに含まれる所定の文字列を、所定の規則で新たな時系列数値データに関係する数値に置き換えることで、時系列数値データに関係する数値を言語モデルによって直接出力する必要が無くなり、数値が様々に変化する場合であってもその数値に関する記載を正しく含むように、時系列数値データの変動を説明するテキストを生成することができる。 According to this aspect, the output of the language model generates new replacement text data explaining the new time-series numerical data, and the predetermined character string contained in the new replacement text data is changed to a new time according to a predetermined rule. By replacing with the numerical value related to the series numerical data, it is not necessary to directly output the numerical value related to the time series numerical data by the language model, and even if the numerical value changes variously, the description about the numerical value is correctly included. In addition, it is possible to generate text explaining the fluctuation of time series numerical data.

本発明によれば、時系列数値データの変動を説明するテキストを生成するテキスト生成装置、テキスト生成方法及びテキスト生成プログラムを提供することができる。 According to the present invention, it is possible to provide a text generator, a text generation method, and a text generation program that generate text explaining fluctuations in time-series numerical data.

本発明の実施形態に係るテキスト生成装置のネットワーク構成を示す図である。It is a figure which shows the network configuration of the text generator which concerns on embodiment of this invention. 本実施形態に係るテキスト生成装置の物理構成を示す図である。It is a figure which shows the physical structure of the text generator which concerns on this embodiment. 本実施形態に係るテキスト生成装置の機能ブロックを示す図である。It is a figure which shows the functional block of the text generator which concerns on this embodiment. 言語モデルの構成を示す図である。It is a figure which shows the structure of a language model. 時系列数値データに関係する数値の種類と所定の文字列とを対応付ける規則を示す図である。It is a figure which shows the rule which associates a predetermined character string with the type of the numerical value related to time-series numerical data. 本実施形態に係るテキスト生成装置で実行される処理のフローチャートである。It is a flowchart of the process executed by the text generator which concerns on this embodiment. 本実施形態に係るテキスト生成装置で生成されるテキストを示す図である。It is a figure which shows the text generated by the text generator which concerns on this embodiment. 本実施形態に係るテキスト生成装置で生成されるテキストと基準となるテキストとの近さを評価した指標値を示す図である。It is a figure which shows the index value which evaluated the closeness of the text generated by the text generator which concerns on this embodiment, and a reference text.

添付図面を参照して、本発明の実施形態について説明する。なお、各図において、同一の符号を付したものは、同一又は同様の構成を有する。 Embodiments of the present invention will be described with reference to the accompanying drawings. In each figure, those having the same reference numerals have the same or similar configurations.

図1は、本発明の実施形態に係るテキスト生成装置10のネットワーク構成を示す図である。本実施形態において、テキスト生成システム100は、時間の経過と対応付けられた数列を含む時系列数値データと、その時系列数値データの変動を説明するテキストデータとを含む初期データセットを記憶するデータベースDBと、入力された時系列数値データに応じて置換テキストデータを出力する言語モデル20と、データベースDBに記憶された初期データセットを用いて、言語モデル20によって時系列数値データの変動を正しく説明するテキストが生成されるように、言語モデル20を学習させ、新たな時系列数値データを取得した場合にその時系列数値データの変動を説明するテキストデータを生成するテキスト生成装置10と、を含む。本実施形態において、時系列数値データは、株価である。もっとも、時系列数値データは、時間の経過と対応付けられた数列を含むものであって、継続的に取得される数値データであればどのようなものであってもよく、例えば心電データや血圧データ等のバイタルデータであったり、気温や湿度等の天候データであったり、交通量や乗客数等の交通データであったりしてもよい。 FIG. 1 is a diagram showing a network configuration of the text generator 10 according to the embodiment of the present invention. In the present embodiment, the text generation system 100 stores a database DB that stores an initial data set including time-series numerical data including a number sequence associated with the passage of time and text data explaining fluctuations in the time-series numerical data. Using the language model 20 that outputs the replacement text data according to the input time-series numerical data and the initial data set stored in the database DB, the language model 20 correctly explains the fluctuation of the time-series numerical data. It includes a text generation device 10 that trains a language model 20 so that text is generated, and generates text data that explains fluctuations in the time-series numerical data when new time-series numerical data is acquired. In the present embodiment, the time series numerical data is a stock price. However, the time-series numerical data includes a number sequence associated with the passage of time, and may be any numerical data that is continuously acquired, for example, electrocardiographic data or electrocardiographic data. It may be vital data such as blood pressure data, weather data such as temperature and humidity, and traffic data such as traffic volume and number of passengers.

テキスト生成システム100は、通信ネットワークNに接続され、株価配信サーバ40から所定の時間間隔で株価を取得し、データベースDBに記憶したり、テキスト生成装置10に入力したりする。また、テキスト生成システム100は、通信ネットワークNを介して、生成したテキストデータをユーザ端末30に提供する。また、テキスト生成システム100は、ユーザ端末30からの指示に基づいて、データベースDBに記憶された初期データセットの追加や編集を行ったり、言語モデル20の学習を行ったりしてもよい。ここで、通信ネットワークNは、有線又は無線の通信網であり、例えばインターネットやLAN(Local Area Network)であってよい。テキスト生成システム100は、いわゆるクラウドコンピューティングの形で全部又は一部の構成要素がリモートコンピュータによって構成されてよいが、全部又は一部の構成要素がローカルコンピュータによって構成されてもよい。 The text generation system 100 is connected to the communication network N, acquires stock prices from the stock price distribution server 40 at predetermined time intervals, stores them in the database DB, and inputs them to the text generation device 10. Further, the text generation system 100 provides the generated text data to the user terminal 30 via the communication network N. Further, the text generation system 100 may add or edit the initial data set stored in the database DB or learn the language model 20 based on the instruction from the user terminal 30. Here, the communication network N is a wired or wireless communication network, and may be, for example, the Internet or a LAN (Local Area Network). In the text generation system 100, all or part of the components may be configured by a remote computer in the form of so-called cloud computing, but all or some of the components may be configured by a local computer.

言語モデル20は、時系列数値データが入力された場合に、時系列数値データを説明するテキストデータのうち時系列数値データに関係する数値を所定の規則で所定の文字列に置き換えた置換テキストデータを出力するモデルである。ここで、時系列数値データに関係する数値は、時系列数値データに含まれる数値の引用であったり、時系列数値データに含まれる数値を演算した数値であったりする。言語モデル20は、例えばニューラルネットワークを用いたモデルであってよく、いわゆるエンコーダ‐デコーダモデルであってよい。言語モデル20は、エンコーダとして、例えばMLP(Multi-Layer Perceptron)、CNN(Convolutional Neural Network)又はRNN(Recurrent Neural Network)を含んでよく、デコーダとしてRNNを含んでよい。言語モデル20は、入力される時系列数値データの種類によって異なるモデルであってよい。言語モデル20については、後に図4を用いて詳細に説明する。 The language model 20 is a replacement text data in which, when time-series numerical data is input, the numerical values related to the time-series numerical data among the text data explaining the time-series numerical data are replaced with predetermined character strings according to a predetermined rule. It is a model that outputs. Here, the numerical value related to the time-series numerical data may be a citation of a numerical value included in the time-series numerical data, or a numerical value obtained by calculating a numerical value included in the time-series numerical data. The language model 20 may be, for example, a model using a neural network, and may be a so-called encoder-decoder model. The language model 20 may include, for example, an MLP (Multi-Layer Perceptron), a CNN (Convolutional Neural Network) or an RNN (Recurrent Neural Network) as an encoder, and may include an RNN as a decoder. The language model 20 may be a different model depending on the type of time-series numerical data to be input. The language model 20 will be described in detail later with reference to FIG.

図2は、本実施形態に係るテキスト生成装置10の物理構成を示す図である。テキスト生成装置10は、ハードウェアプロセッサに相当するCPU(Central Processing Unit)10aと、メモリに相当するRAM(Random Access Memory)10bと、メモリに相当するROM(Read Only Memory)10cと、通信部10dと、入力部10eと、表示部10fとを有する。これら各構成は、バスを介して相互にデータ送受信可能に接続される。 FIG. 2 is a diagram showing a physical configuration of the text generator 10 according to the present embodiment. The text generator 10 includes a CPU (Central Processing Unit) 10a corresponding to a hardware processor, a RAM (Random Access Memory) 10b corresponding to a memory, a ROM (Read Only Memory) 10c corresponding to a memory, and a communication unit 10d. And an input unit 10e and a display unit 10f. Each of these configurations is connected to each other via a bus so that data can be transmitted and received.

CPU10aは、RAM10b又はROM10cに記憶されたプログラムの実行に関する制御やデータの演算、加工を行う制御部である。CPU10aは、言語モデル20を用いてテキストデータを生成するプログラム(テキスト生成プログラム)を実行する演算装置である。CPU10aは、入力部10eや通信部10dから種々の入力データを受け取り、入力データの演算結果を表示部10fに表示したり、RAM10bやROM10cに格納したりする。 The CPU 10a is a control unit that controls execution of a program stored in the RAM 10b or ROM 10c, calculates data, and processes data. The CPU 10a is an arithmetic unit that executes a program (text generation program) that generates text data using the language model 20. The CPU 10a receives various input data from the input unit 10e and the communication unit 10d, displays the calculation result of the input data on the display unit 10f, and stores it in the RAM 10b or ROM 10c.

RAM10bは、データの書き換えが可能な記憶部であり、例えば半導体記憶素子で構成される。RAM10bは、CPU10aが実行するアプリケーション等のプログラムやデータを記憶する。 The RAM 10b is a storage unit capable of rewriting data, and is composed of, for example, a semiconductor storage element. The RAM 10b stores programs and data such as applications executed by the CPU 10a.

ROM10cは、データの読み出しのみが可能な記憶部であり、例えば半導体記憶素子で構成される。ROM10cは、例えばファームウェア等のプログラムやデータを記憶する。 The ROM 10c is a storage unit capable of only reading data, and is composed of, for example, a semiconductor storage element. The ROM 10c stores programs and data such as firmware.

通信部10dは、テキスト生成装置10を通信ネットワークNに接続する通信インタフェースである。 The communication unit 10d is a communication interface that connects the text generator 10 to the communication network N.

入力部10eは、ユーザからデータの入力を受け付けるものであり、例えば、キーボードやマウス、タッチパネルで構成される。 The input unit 10e receives data input from the user, and is composed of, for example, a keyboard, a mouse, and a touch panel.

表示部10fは、CPU10aによる演算結果を視覚的に表示するものであり、例えばLCD(Liquid Crystal Display)により構成される。 The display unit 10f visually displays the calculation result by the CPU 10a, and is configured by, for example, an LCD (Liquid Crystal Display).

テキスト生成プログラムは、RAM10bやROM10c等のコンピュータによって読み取り可能な記憶媒体に記憶されて提供されてもよいし、通信部10dにより接続される通信ネットワークNを介して提供されてもよい。テキスト生成装置10では、CPU10aがテキスト生成プログラムを実行することにより、次図を用いて説明する様々な機能が実現される。なお、これらの物理的な構成は例示であって、必ずしも独立した構成でなくてもよい。例えば、テキスト生成装置10は、CPU10aとRAM10bやROM10cが一体化したLSI(Large-Scale Integration)を備えていてもよい。また、テキスト生成装置10は、GPU(Graphics Processing Unit)やFPGA(Field-Programmable Gate Array)、ASIC(Application Specific Integrated Circuit)等の演算回路を備えてもよい。 The text generation program may be stored in a storage medium readable by a computer such as a RAM 10b or a ROM 10c and provided, or may be provided via a communication network N connected by a communication unit 10d. In the text generation device 10, the CPU 10a executes the text generation program to realize various functions described with reference to the following figures. It should be noted that these physical configurations are examples and do not necessarily have to be independent configurations. For example, the text generator 10 may include an LSI (Large-Scale Integration) in which the CPU 10a and the RAM 10b or ROM 10c are integrated. Further, the text generator 10 may include arithmetic circuits such as a GPU (Graphics Processing Unit), an FPGA (Field-Programmable Gate Array), and an ASIC (Application Specific Integrated Circuit).

図3は、本実施形態に係るテキスト生成装置10の機能ブロックを示す図である。テキスト生成装置10は、学習部11、取得部12、生成部13、置換部14及び規則記憶部15を備える。 FIG. 3 is a diagram showing a functional block of the text generator 10 according to the present embodiment. The text generation device 10 includes a learning unit 11, an acquisition unit 12, a generation unit 13, a replacement unit 14, and a regular storage unit 15.

学習部11は、時系列数値データの変動を説明するテキストデータのうち時系列数値データに関係する数値を所定の規則で所定の文字列に置き換えた置換テキストデータD1及び時系列数値データD2を学習用データとして、時系列数値データが入力された場合に、置換テキストデータを出力するように言語モデル20を学習させる。学習部11によって言語モデル20の学習に用いられる置換テキストデータD1及び時系列数値データD2は、データベースDBに初期データセットとして記憶されているものであってよい。 The learning unit 11 learns the replacement text data D1 and the time-series numerical data D2 in which the numerical values related to the time-series numerical data are replaced with predetermined character strings by a predetermined rule among the text data explaining the fluctuation of the time-series numerical data. When time-series numerical data is input as the data for use, the language model 20 is trained so as to output the replacement text data. The replacement text data D1 and the time-series numerical data D2 used for learning the language model 20 by the learning unit 11 may be stored in the database DB as initial data sets.

ここで、時系列数値データに関係する数値は、時系列数値データに含まれる数列のうち所定の時点に対応付けられた数値と、時系列数値データに含まれる数列のうち異なる時点に対応付けられた数値の差と、時系列数値データに含まれる数列のうち所定の時点に対応付けられた数値を所定の桁で切り捨てた数値と、時系列数値データに含まれる数列のうち異なる時点に対応付けられた数値の差を所定の桁で切り捨てた数値と、時系列数値データに含まれる数列のうち所定の時点に対応付けられた数値を所定の桁で切り上げた数値と、時系列数値データに含まれる数列のうち異なる時点に対応付けられた数値の差を所定の桁で切り上げた数値と、のうち少なくともいずれかを含んでよい。また、数値の所定の桁での切り捨てや切り上げは、10の位、100の位、1000の位及び10000の位等、任意の位について行ってよい。また、所定の規則は、時系列数値データに関係する数値の種類と所定の文字列とを対応付ける規則であってよい。ここで、所定の文字列は、通常のテキストデータと区別可能な文字列であれば任意のものであってよく、例えば<price1>や<price2>等の所定の記号(本例の場合「<」と「>」)で先頭と末尾が示された文字列であってよい。 Here, the numerical values related to the time-series numerical data are associated with the numerical values associated with a predetermined time point among the numerical values included in the time-series numerical data and the different time points among the numerical values included in the time-series numerical data. Correspondence between the difference between the numerical values and the numerical value associated with the specified time point in the number sequence included in the time-series numerical data, rounded down to a predetermined digit, and the different time point in the number sequence included in the time-series numerical data. Included in the time-series numerical data: the numerical value obtained by rounding down the difference between the given numerical values by a predetermined digit, the numerical value in which the numerical value associated with a predetermined time point in the numerical sequence included in the time-series numerical data is rounded up by a predetermined digit, and the numerical value. It may include at least one of a numerical value obtained by rounding up the difference between the numerical values associated with different time points in the numerical sequence to be obtained by a predetermined digit. Further, the numerical value may be rounded down or rounded up to a predetermined digit at any place such as the tens place, the 100s place, the 1000s place, and the 10000s place. Further, the predetermined rule may be a rule for associating a predetermined character string with a type of numerical value related to time-series numerical data. Here, the predetermined character string may be any character string as long as it is a character string that can be distinguished from ordinary text data, and for example, a predetermined symbol such as <price1> or <price2> (in this example, "<" "And"> ") may be a character string whose beginning and end are indicated.

また、時系列数値データは、第1間隔で時間の経過と対応付けられた数列を含む第1時系列数値データと、第1間隔より長い第2間隔で時間の経過と対応付けられた数列を含む第2時系列数値データとを含んでよい。本実施形態の場合、第1時系列数値データXshortは、1営業日の寄り付きから大引けまでに5分間隔で取得された株価に関係する時系列数値データであり、第2時系列数値データXlongは、7営業日について営業日間隔で取得された株価の終値に関する時系列数値データである。すなわち、第1時系列数値データXshortは、5分間隔で時間の経過と対応付けられた数列を含む時系列数値データであり、第2時系列数値データXlongは、1営業日間隔で時間の経過と対応付けられた数列を含む時系列数値データである。日本の東京証券取引所の場合、1営業日における売買立会い時間は5時間(300分)であり、5分間隔で取得された第1時系列数値データは、62個のデータを含む。これをXshort,i(i=1〜62)と表す。また、第2時系列数値データXlongは、7個のデータを含み、これをXlong,j(j=1〜7)と表す。 Further, the time-series numerical data includes a first time-series numerical data including a sequence of numbers associated with the passage of time in the first interval and a sequence of numbers associated with the passage of time in a second interval longer than the first interval. It may include the second time series numerical data including. In the case of the present embodiment, the first time-series numerical data X short is time-series numerical data related to the stock price acquired at intervals of 5 minutes from the approach to the close of one business day, and the second time-series numerical data X. long is time-series numerical data relating to the closing price of the stock price acquired at business day intervals for 7 business days. That is, the first time-series numerical data X short is time-series numerical data including a number sequence associated with the passage of time at 5-minute intervals, and the second time-series numerical data X long is time at 1 business day intervals. It is time series numerical data including a number sequence associated with the progress of. In the case of the Tokyo Stock Exchange in Japan, the trading witness time in one business day is 5 hours (300 minutes), and the first time-series numerical data acquired at 5-minute intervals includes 62 pieces of data. This is expressed as X short, i (i = 1 to 62). Further, the second time series numerical data X long includes seven data, which are represented as X long, j (j = 1 to 7).

取得部12は、株価配信サーバ40から、新たな時系列数値データを取得する。取得部12は、例えば5分間隔で、株価配信サーバ40から株価に関する新たな時系列数値データを取得してよい。 The acquisition unit 12 acquires new time-series numerical data from the stock price distribution server 40. The acquisition unit 12 may acquire new time-series numerical data regarding the stock price from the stock price distribution server 40, for example, at intervals of 5 minutes.

生成部13は、学習部11により学習された言語モデル20に新たな時系列数値データを入力し、言語モデル20の出力によって新たな時系列数値データを説明する新たな置換テキストデータを生成する。生成部13は、時系列数値データを1又は複数の方法で変換して得られる、1又は複数の方法に一対一に対応する1又は複数の数値データを、言語モデル20に入力してもよい。ここで、1又は複数の数値データは、時系列数値データに含まれる数列を所定の数値範囲に正規化した数値データと、時系列数値データに含まれる数列の平均値及び標準偏差を用いて時系列数値データを標準化した数値データと、時系列数値データに含まれる数列のうち所定の時点に対応付けられた数値を基準値として、時系列数値データに含まれる数列を基準値に関して相対化した数値データと、のうち少なくともいずれかを含んでよい。 The generation unit 13 inputs new time-series numerical data into the language model 20 learned by the learning unit 11, and generates new replacement text data for explaining the new time-series numerical data by the output of the language model 20. The generation unit 13 may input one or a plurality of numerical data having a one-to-one correspondence to the one or a plurality of methods obtained by converting the time series numerical data by one or a plurality of methods into the language model 20. .. Here, for one or more numerical data, the time is obtained by using the numerical data obtained by normalizing the numerical strings included in the time-series numerical data to a predetermined numerical range and the average value and standard deviation of the numerical strings included in the time-series numerical data. A numerical value obtained by standardizing the series numerical data and a numerical value associated with a predetermined time point among the numerical values included in the time-series numerical data as a reference value, and a numerical value obtained by relativizing the numerical string included in the time-series numerical data with respect to the reference value. It may include at least one of the data.

より具体的には、時系列数値データに含まれる数列Xi(i=1〜N)を所定の数値範囲に正規化した数値データXnorm,iは、Xnorm,i=(2Xi−(Xmax+Xmin))/(Xmax−Xmin)によって定義される数値データであってよい。ここで、Xmax=maxi(Xi)、Xmin=mini(Xi)である。この場合、正規化した数値データXnorm,iは、−1から1の数値範囲に正規化された数値データとなる。 More specifically, the numerical data X norm, i obtained by normalizing the sequence X i (i = 1 to N) included in the time-series numerical data to a predetermined numerical range is X norm, i = (2X i − (2X i − (. It may be numerical data defined by X max + X min )) / (X max −X min). Here, X max = max i (X i ) and X min = min i (X i ). In this case, the normalized numerical data X norm, i is the numerical data normalized in the numerical range of -1 to 1.

また、時系列数値データに含まれる数列Xi(i=1〜N)を標準化した数値データXstd,iは、Xstd,i=(Xi−μ)/σによって定義される数値データであってよい。ここで、μ=E[Xi]、σ=(var[Xi])1/2である。 Further, the numerical data X std, i obtained by standardizing the sequence X i (i = 1 to N) included in the time-series numerical data is the numerical data defined by X std, i = (X i −μ) / σ. It may be there. Here, μ = E [X i ] and σ = (var [X i ]) 1/2 .

また、時系列数値データに含まれる数列Xi(i=1〜N)を基準値riに関して相対化した数値データXmove,iは、Xmove,i=Xi−riによって定義される数値データであってよい。時系列数値データが株価である場合、基準値riは、前日の終値であってよい。すなわち、5分間隔で時間の経過と対応付けられた数列を含む第1時系列数値データXshortについては、前日の終値をrとするとき、全てのiに対して(Xshort,i−r)によって相対化した数値データを算出してよい。また。営業日間隔で時間の経過と対応付けられた数列を含む第2時系列数値データXlongについては、(Xlong,j−Xlong,j-1)によって相対化した数値データを算出してよい。 Moreover, when the sequence X i included in the numerical data at (i = 1 to N) numerically and relative with respect to the reference value r i of the data X move, i is defined by X move, i = X i -r i It may be numerical data. When the time-series numerical data is a stock price, the reference value r i may be the closing price of the previous day. That is, for the first time-series numerical data X short including a sequence of numbers associated with the passage of time at 5-minute intervals, when the closing price of the previous day is r, for all i (X short, i −r). ) May calculate the relativized numerical data. also. For the second time-series numerical data X long including a sequence of numbers associated with the passage of time at business day intervals, numerical data relativized by (X long, j −X long, j-1 ) may be calculated. ..

正規化した数値データ又は標準化した数値データを用いることで、生成されるテキストが時系列数値データの絶対値に依存してぶれることが防止され、相対化した数値データを用いることで、時系列数値データの履歴に依存する単語を正しく含むように、時系列数値データの変動を説明するテキストを生成することができる。 By using normalized numerical data or standardized numerical data, it is possible to prevent the generated text from blurring depending on the absolute value of the time-series numerical data, and by using the relativized numerical data, the time-series numerical value is used. Text can be generated to explain the variation in time-series numerical data so that it correctly contains words that depend on the history of the data.

置換部14は、新たな置換テキストデータに含まれる所定の文字列を、所定の規則で新たな時系列数値データに関係する数値に置き換える。置換部14は、規則記憶部15に記憶された所定の規則を参照して、新たな置換テキストデータに含まれる所定の文字列を、新たな時系列数値データに関係する数値に置き換える。置換部14は、例えば、<price1>という所定の文字列を、Xlongの最後の値(Xlong,7、前日の終値)とXshortの最後の値(Xshort,62、当日の終値)の差に置き換えたり、<price2>という所定の文字列を、Xlongの最後の値(Xlong,7、前日の終値)とXshortの最後の値(Xshort,62、当日の終値)の差を10の位で切り捨てた値に置き換えたりする。 The replacement unit 14 replaces a predetermined character string included in the new replacement text data with a numerical value related to the new time-series numerical data according to a predetermined rule. The replacement unit 14 refers to a predetermined rule stored in the rule storage unit 15 and replaces a predetermined character string included in the new replacement text data with a numerical value related to the new time-series numerical data. Replacement unit 14, for example, a predetermined string <price1>, the last value of X long (X long, 7, the day before the closing price) last value of the X short (X short, 62, the day closing price) or replaced with a difference, a predetermined character string of <price2>, the last value of X long (X long, 7, the day before the closing price) last value of the X short of (X short, 62, of the day closing price) Replace the difference with a value truncated to the tens digit.

図4は、言語モデル20の構成を示す図である。言語モデル20は、第1間隔で時間の経過と対応付けられた数列を含む第1時系列数値データXshortを第1前処理部21aによって1又は複数の方法で変換して得られる、1又は複数の方法に一対一に対応する1又は複数の第1数値データlsが入力される第1エンコーダ22aと、第1間隔より長い第2間隔で時間の経過と対応付けられた数列を含む第2時系列数値データXlongを第2前処理部21bによって1又は複数の方法で変換して得られる、1又は複数の方法に一対一に対応する1又は複数の第2数値データllが入力される第2エンコーダ22bと、第1エンコーダ22aの出力hs及び第2エンコーダ22bの出力hlを合成する合成部23と、合成部23により合成されたデータmが入力され、置換テキストデータを出力するデコーダ24と、を含む。 FIG. 4 is a diagram showing the configuration of the language model 20. The language model 20 is obtained by converting the first time-series numerical data X short including the number sequence associated with the passage of time at the first interval by the first preprocessing unit 21a by one or a plurality of methods. A first encoder 22a in which one or a plurality of first numerical data l s corresponding to a plurality of methods one-to-one is input, and a number sequence associated with the passage of time in a second interval longer than the first interval. Two time-series numerical data X long is converted by the second preprocessing unit 21b by one or more methods, and one or more second numerical data l l corresponding to one or more methods is input. The second encoder 22b, the compositing unit 23 that synthesizes the output h s of the first encoder 22a and the output h l of the second encoder 22b, and the data m synthesized by the compositing unit 23 are input, and the replacement text data is input. Includes a decoder 24 for output.

本例では、第1時系列数値データXshortは、「12167.29」や「12278.83」等の数値を含む62次元のベクトルとして与えられる。また、第2時系列数値データXlongは、「12116.57」や「12120.94」等の数値を含む7次元のベクトルとして与えられる。第1前処理部21aは、入力された第1時系列数値データXshortを3種類の方法で変換して、変換して得られた3種類のベクトルの直和によって第1数値データlsを出力する。ここで、3種類の方法は、入力された第1時系列数値データXshortを所定の数値範囲に正規化した数値データを算出することと、標準化した数値データを算出することと、基準値に関して相対化した数値データを算出することである。本例の場合、第1前処理部21aから出力される第1数値データlsは、186次元のベクトルとなる。 In this example, the first time series numerical data X short is given as a 62-dimensional vector including numerical values such as "12167.29" and "12278.83". Further, the second time series numerical data X long is given as a 7-dimensional vector including numerical values such as "1211.6.57" and "12120.94". The first preprocessing unit 21a converts the input first time series numerical data X short by three kinds of methods, and converts the first numerical data l s by the direct sum of the three kinds of vectors obtained by the conversion. Output. Here, the three types of methods are to calculate the numerical data obtained by normalizing the input first time-series numerical data X short into a predetermined numerical range, to calculate the standardized numerical data, and to obtain a reference value. It is to calculate relativized numerical data. In the case of this example, the first numerical data l s output from the first preprocessing unit 21a is a 186-dimensional vector.

このように、異なる時間間隔で時間の経過と対応付けられた数列を含む時系列数値データを用いることで、時系列数値データの履歴に依存する単語を正しく含むように、時系列数値データの変動を説明するテキストを生成することができる。また、時系列数値データを1又は複数の方法で変換して得られる1又は複数の数値データを言語モデルに入力することで、生成されるテキストが時系列数値データの絶対値に依存してぶれることが防止される。 In this way, by using time-series numerical data that includes a number sequence associated with the passage of time at different time intervals, fluctuations in the time-series numerical data so as to correctly include words that depend on the history of the time-series numerical data. Can generate text that describes. In addition, by inputting one or more numerical data obtained by converting time series numerical data by one or more methods into the language model, the generated text is blurred depending on the absolute value of the time series numerical data. Is prevented.

同様に、第2前処理部21bは、入力された第2時系列数値データXlongを3種類の方法で変換して、変換して得られた3種類のベクトルの直和によって第2数値データllを出力する。ここで、3種類の方法は、入力された第2時系列数値データXlongを所定の数値範囲に正規化した数値データを算出することと、標準化した数値データを算出することと、基準値に関して相対化した数値データを算出することである。本例の場合、第2前処理部21bから出力される第2数値データllは、21次元のベクトルとなる。 Similarly, the second preprocessing unit 21b converts the input second time series numerical data X long by three kinds of methods, and the second numerical data by the direct sum of the three kinds of vectors obtained by the conversion. Output l l. Here, the three types of methods are to calculate the numerical data obtained by normalizing the input second time-series numerical data X long into a predetermined numerical range, to calculate the standardized numerical data, and to obtain a reference value. It is to calculate relativized numerical data. In the case of this example, the second numerical data l l output from the second preprocessing unit 21b is a 21-dimensional vector.

第1エンコーダ22aには、第1前処理部21aから出力される第1数値データlsが入力され、ベクトルhsを出力する。ここで、ベクトルhsの次元は、第1エンコーダ22aの出力層に含まれる出力ノードの数となる。同様に、第2エンコーダ22bには、第2前処理部21bから出力される第2数値データllが入力され、ベクトルhlを出力する。ここで、ベクトルhlの次元は、第2エンコーダ22bの出力層に含まれる出力ノードの数となる。第1エンコーダ22a及び第2エンコーダ22bは、MLP、CNN及びRNNのうちいずれかであってよく、その他のモデルであってもよい。 The first numerical data l s output from the first preprocessing unit 21a is input to the first encoder 22a, and the vector h s is output. Here, the dimension of the vector h s is the number of output nodes included in the output layer of the first encoder 22a. Similarly, the second numerical data l l output from the second preprocessing unit 21b is input to the second encoder 22b, and the vector h l is output. Here, the dimension of the vector h l is the number of output nodes included in the output layer of the second encoder 22b. The first encoder 22a and the second encoder 22b may be any of MLP, CNN and RNN, and may be other models.

合成部23は、第1エンコーダ22aの出力hs、第2エンコーダ22bの出力hl、第1前処理部21aから出力される第1数値データls及び第2前処理部21bから出力される第2数値データllの直和によってこれらのデータを合成する。 The compositing unit 23 is output from the output h s of the first encoder 22a, the output h l of the second encoder 22b, the first numerical data l s output from the first preprocessing unit 21a, and the second preprocessing unit 21b. These data are combined by the direct sum of the second numerical data l l.

デコーダ24には、合成部23により合成されたデータm及び時系列数値データの時系列に関するデータTが入力される。時系列に関するデータTは、第1時系列数値データXshortに含まれる数列が対応付けられた時刻のうち最新の時刻に関するデータであったり、第2時系列数値データXlongに含まれる数列が対応付けられた営業日の範囲に関するデータであったりしてよい。 The data m synthesized by the synthesizing unit 23 and the time-series data T of the time-series numerical data are input to the decoder 24. The data T related to the time series corresponds to the data related to the latest time among the times associated with the number strings included in the first time series numerical data X short, or the numerical strings included in the second time series numerical data X long. It may be data about the range of business days attached.

本例では、デコーダ24は、「日経」、「平均」、「、」、「上げ幅」、「<price1>」、「円」、「超える」、「</s>」という置換テキストデータを出力している。ここで、5番目に出力された文字列「<price1>」は、テキスト生成装置10の置換部14によって時系列数値データに関係する数値に置き換えられる所定の文字列である。また、最後に出力された文字列「</s>」は、テキストデータの終わりを示す所定の文字列である。テキスト生成装置10は、デコーダ24から出力されたこれらの文字列によって新たな置換テキストデータを「日経平均、上げ幅<price1>円超える」と生成する。そして、置換部14によって、「<price1>」という所定の文字列を、Xlongの最後の値(Xlong,7、前日の終値)とXshortの最後の値(Xshort,62、当日の終値)の差に置き換えて、株価の変動を説明するテキストデータを生成する。 In this example, the decoder 24 outputs replacement text data such as "Nikkei", "average", ",", "raise width", "<price1>", "circle", "exceeds", and "</ s>". is doing. Here, the fifth output character string "<price1>" is a predetermined character string to be replaced with a numerical value related to the time-series numerical data by the replacement unit 14 of the text generation device 10. The last output character string "</ s>" is a predetermined character string indicating the end of the text data. The text generator 10 generates new replacement text data by these character strings output from the decoder 24 as "Nikkei average, increase width <price1> circle exceeds". Then, the replacing unit 14, the predetermined character string "<price1>", the last value of X long (X long, 7, the day before the closing price) last value of the X short (X short, 62, the day Replace with the difference of the closing price) to generate text data explaining the fluctuation of the stock price.

本例の言語モデル20のように、異なる時間間隔で時間の経過と対応付けられた数列を含む時系列数値データをそれぞれ異なるエンコーダに入力し、出力を合成してデコーダに入力することで、時系列数値データの履歴に依存する単語を正しく含むように、時系列数値データの変動を説明するテキストを生成することができる。また、デコーダに対して、エンコーダの出力のみならず、複数の数値データを入力することで、時系列数値データの履歴に依存する単語を正しく含むように、時系列数値データの変動を説明するテキストを生成することができる。さらに、デコーダに対して、合成部により合成されたデータのみならず、時系列数値データの時系列に関するデータを入力することで、時系列数値データの履歴に依存する単語を正しく含むように、時系列数値データの変動を説明するテキストを生成することができる。 As in the language model 20 of this example, time series numerical data including a number sequence associated with the passage of time at different time intervals is input to different encoders, and the outputs are combined and input to the decoder. Text can be generated to explain the variation of the time series numerical data so that it correctly contains the words that depend on the history of the series numerical data. In addition, by inputting not only the output of the encoder but also multiple numerical data to the decoder, a text explaining the fluctuation of the time series numerical data so as to correctly include words that depend on the history of the time series numerical data. Can be generated. Furthermore, by inputting not only the data synthesized by the synthesizer but also the time-series data of the time-series numerical data to the decoder, the time so as to correctly include the words that depend on the history of the time-series numerical data. It is possible to generate text explaining the fluctuation of series numerical data.

本実施形態に係るテキスト生成装置10によれば、時系列数値データの履歴に依存する単語を正しく含むように、時系列数値データの変動を説明するテキストを生成することで、例えば、「上げ幅」、「続落」、「反発」といった単語のように過去の株価の履歴を参照する表現を正しく生成したり、「始まる」、「寄り付き」、「前引け」、「午後」、「大引け」といった単語のように、時間帯に依存する表現を正しく生成したりすることができる。 According to the text generation device 10 according to the present embodiment, for example, by generating a text explaining the fluctuation of the time-series numerical data so as to correctly include words that depend on the history of the time-series numerical data, for example, "increase". Properly generate expressions that refer to past stock price history, such as words such as "continuation" and "repulsion", and words such as "start", "close", "close ahead", "afternoon", and "close close". It is possible to correctly generate expressions that depend on the time zone, such as.

図5は、時系列数値データに関係する数値の種類と所定の文字列とを対応付ける規則D3を示す図である。規則D3は、規則記憶部15に記憶され、置換部14によって参照される所定の規則の一例である。 FIG. 5 is a diagram showing rule D3 for associating a predetermined character string with a type of numerical value related to time-series numerical data. Rule D3 is an example of a predetermined rule stored in the rule storage unit 15 and referenced by the replacement unit 14.

規則D3は、12種類の文字列について、時系列数値データに関係する12種類の数値を対応付ける規則である。各文字列は、時系列数値データに関係する数値に1対1に対応する。本例では、<price1>という文字列は、Xlongの最後の値(Xlong,7)とXshortの最後の値(Xshort,62)の差と対応付けられる。また、<price2>という文字列は、Xlongの最後の値とXshortの最後の値の差を10の位で切り捨てた値と対応付けられる。 Rule D3 is a rule for associating 12 types of numerical values related to time-series numerical data with respect to 12 types of character strings. Each character string has a one-to-one correspondence with a numerical value related to time-series numerical data. In this example, the string <price1> is associated with the difference between the last value (X long, 7) and the last value of X short of X long (X short, 62) . Further, the character string <price2> is associated with a value obtained by rounding down the difference between the last value of X long and the last value of X short at the tens digit.

また、<price3>という文字列は、Xlongの最後の値とXshortの最後の値の差を100の位で切り捨てた値と対応付けられ、<price4>という文字列は、Xlongの最後の値とXshortの最後の値の差を10の位で切り上げた値と対応付けられ、<price5>という文字列は、Xlongの最後の値とXshortの最後の値の差を100の位で切り上げた値と対応付けられる。 Further, the character string <price3> is associated with the value obtained by rounding down the difference between the last value of X long and the last value of X short by the 100s, and the character string <price4> is the last value of X long . The difference between the last value of X long and the last value of X short is associated with the value rounded up to the tens place, and the character string <price5> is the difference between the last value of X long and the last value of X short is 100. It is associated with the value rounded up to the nearest whole number.

さらに、<price6>という文字列は、Xshortの最後の値に対応付けられ、<price7>という文字列は、Xshortの最後の値を100の位で切り捨てた値に対応付けられ、<price8>という文字列は、Xshortの最後の値を1000の位で切り捨てた値に対応付けられ、<price9>という文字列は、Xshortの最後の値を10000の位で切り捨てた値に対応付けられる。同様に、<price10>という文字列は、Xshortの最後の値を100の位で切り上げた値に対応付けられ、<price11>という文字列は、Xshortの最後の値を1000の位で切り上げた値に対応付けられ、<price12>という文字列は、Xshortの最後の値を10000の位で切り上げた値に対応付けられる。 Further, the character string <price6> is associated with the last value of X short , and the character string <price7> is associated with the value obtained by truncating the last value of X short by the 100s digit, and <price8>. The character string> is associated with the value obtained by truncating the last value of X short at the 1000s place, and the character string <price9> is associated with the value obtained by truncating the last value of X short at the 10000s place. Be done. Similarly, the string <price10> is associated with the last value of X short rounded up to the 100s, and the string <price11> rounds up the last value of X short to the 1000s. The character string <price12> is associated with the last value of X short rounded up to the nearest 10,000.

このように、時系列数値データに関係する数値の種類と所定の文字列とを対応付けることで、時系列数値データの引用や時系列数値データを演算した結果得られる数値を含むように、時系列数値データの変動を説明するテキストを生成することができる。 In this way, by associating the types of numerical values related to the time-series numerical data with a predetermined character string, the time-series includes the numerical values obtained as a result of quoting the time-series numerical data and calculating the time-series numerical data. It is possible to generate text that explains the fluctuations in numerical data.

図6は、本実施形態に係るテキスト生成装置10で実行される処理のフローチャートである。はじめに、取得部12によって、5分間隔で記録された株価を第1時系列数値データとして取得し(S10)、1営業日間隔で記録された株価を第2時系列数値データとして取得する(S11)。 FIG. 6 is a flowchart of processing executed by the text generator 10 according to the present embodiment. First, the acquisition unit 12 acquires the stock price recorded at 5-minute intervals as the first time-series numerical data (S10), and acquires the stock price recorded at one business day interval as the second time-series numerical data (S11). ).

その後、生成部13によって、第1時系列数値データ及び第2時系列数値データを言語モデル20に入力する。言語モデル20は、第1前処理部21aによって、第1時系列数値データを、正規化した数値データ、標準化した数値データ及び相対化した数値データに変換し(S12)、第2前処理部21bによって、第2時系列数値データを、正規化した数値データ、標準化した数値データ及び相対化した数値データに変換する(S13)。そして、第1時系列数値データを変換して得られた複数の第1数値データを第1エンコーダ22aに入力し(S14)、第2時系列数値データを変換して得られた複数の第2数値データを第2エンコーダ22bに入力する(S15)。 After that, the generation unit 13 inputs the first time-series numerical data and the second time-series numerical data into the language model 20. The language model 20 uses the first preprocessing unit 21a to convert the first time-series numerical data into normalized numerical data, standardized numerical data, and relativized numerical data (S12), and the second preprocessing unit 21b. Converts the second time-series numerical data into normalized numerical data, standardized numerical data, and relativized numerical data (S13). Then, a plurality of first numerical data obtained by converting the first time-series numerical data are input to the first encoder 22a (S14), and a plurality of second numerical data obtained by converting the second time-series numerical data are converted. Numerical data is input to the second encoder 22b (S15).

さらに、合成部23によって、複数の第1数値データ、複数の第2数値データ、第1エンコーダ22aの出力及び第2エンコーダ22bの出力を合成する(S16)。その後、合成されたデータ及び時系列に関するデータをデコーダ24に入力する(S17)。 Further, the compositing unit 23 synthesizes a plurality of first numerical data, a plurality of second numerical data, the output of the first encoder 22a, and the output of the second encoder 22b (S16). After that, the synthesized data and the data related to the time series are input to the decoder 24 (S17).

置換部14は、デコーダ24から出力される置換テキストデータのうち、所定の文字列を所定の規則で数値に置き換え(S18)、時系列数値データの変動を説明するテキストデータを生成する。以上により、処理が終了する。 Of the replacement text data output from the decoder 24, the replacement unit 14 replaces a predetermined character string with a numerical value according to a predetermined rule (S18), and generates text data explaining the variation of the time-series numerical data. This completes the process.

本実施形態に係るテキスト生成装置10によれば、言語モデルの出力によって新たな時系列数値データを説明する新たな置換テキストデータを生成し、新たな置換テキストデータに含まれる所定の文字列を、所定の規則で新たな時系列数値データに関係する数値に置き換えることで、時系列数値データに関係する数値を言語モデルによって直接出力する必要が無くなり、数値が様々に変化する場合であってもその数値に関する記載を正しく含むように、時系列数値データの変動を説明するテキストを生成することができる。 According to the text generation device 10 according to the present embodiment, new replacement text data for explaining the new time-series numerical data is generated by the output of the language model, and a predetermined character string included in the new replacement text data is generated. By replacing the numerical values related to the new time-series numerical data with the numerical values related to the new time-series numerical data according to a predetermined rule, it is not necessary to directly output the numerical values related to the time-series numerical data by the language model, and even if the numerical values change variously, the numerical values can be changed. Text can be generated to explain the fluctuations in the time series numerical data so that the description of the numerical values is correctly included.

図7は、本実施形態に係るテキスト生成装置10で生成されるテキストを示す図である。同図では、言語モデルとして従来のモデルを用いた場合と、本実施形態に係る言語モデル20又は本実施形態に係る言語モデル20の一部を変更したモデルを用いた場合とについて、生成されるテキストをまとめた第1表R1を示している。本実施形態に係る言語モデル20は、図4を用いて説明した言語モデル20であって、第1エンコーダ22a及び第2エンコーダ22bをMLPとしたモデルである。また、本実施形態に係る言語モデル20の一部を変更したモデルの第1例は、図4を用いて説明した言語モデル20のうち標準化したデータを用いないモデル、すなわち第1前処理部21a及び第2前処理部21bによって正規化したデータ及び相対化したデータの2種類を算出するモデルである。また、本実施形態に係る言語モデル20の一部を変更したモデルの第2例は、図4を用いて説明した言語モデル20のうち置換テキストデータを用いないモデル、すなわち言語モデルによって時系列数値データに関係する数値を直接生成するモデルである。また、本実施形態に係る言語モデル20の一部を変更したモデルの第3例は、図4を用いて説明した言語モデル20のうちデコーダ24に時系列数値データの時系列に関するデータを入力しないモデルである。 FIG. 7 is a diagram showing text generated by the text generator 10 according to the present embodiment. In the figure, it is generated when a conventional model is used as a language model and when a language model 20 according to the present embodiment or a model in which a part of the language model 20 according to the present embodiment is modified is used. Table 1 R1 summarizing the text is shown. The language model 20 according to the present embodiment is the language model 20 described with reference to FIG. 4, and is a model in which the first encoder 22a and the second encoder 22b are MLPs. Further, the first example of the model in which a part of the language model 20 according to the present embodiment is modified is a model of the language model 20 described with reference to FIG. 4, which does not use standardized data, that is, the first preprocessing unit 21a. This is a model for calculating two types of data, normalized data and relativized data by the second preprocessing unit 21b. Further, the second example of the model in which a part of the language model 20 according to the present embodiment is modified is a model of the language model 20 described with reference to FIG. 4 that does not use replacement text data, that is, a time-series numerical value depending on the language model. It is a model that directly generates numerical values related to data. Further, in the third example of the model in which a part of the language model 20 according to the present embodiment is modified, the data related to the time series of the time series numerical data is not input to the decoder 24 of the language model 20 described with reference to FIG. It is a model.

同図では、第1表R1の他に、正確なテキストデータの例Eを示している。正確なテキストデータの例Eは、「日経平均大引け、続伸終値は32円高の16906円」である。 In the figure, in addition to Table 1 R1, an example E of accurate text data is shown. An example E of accurate text data is "Nikkei average close, continuous growth closing price is 16906 yen, which is 32 yen higher."

これに対して、言語モデルとして従来のモデルを用いた場合に生成されるテキストの例は、「日経平均、反落前引けは57円安の20606円」であり、テキストデータの配信時間帯を誤って「前引け」としている点、前日との株価の差を誤って「反落」と表現している点、前日終値との差を誤って「57円安」としている点、現在の株価を誤って「20606円」としている点で、正確性を欠いている。 On the other hand, an example of the text generated when the conventional model is used as the language model is "Nikkei average, the closing price before the fall is 20606 yen, which is 57 yen lower", and the delivery time zone of the text data is incorrect. The point that the stock price is "closed ahead", the difference between the stock price and the previous day is mistakenly expressed as "rebound", the difference from the closing price on the previous day is mistakenly set as "57 yen depreciation", and the current stock price is wrong. It lacks accuracy in that it is set at "20606 yen".

一方、第1表R1の上から2番目に記載された、本実施形態に係る言語モデル20を用いた場合に生成されるテキストの例は、「日経平均、続伸大引けは32円高の16906円」であり、テキストデータの配信時間帯を「大引け」と正しく表現し、前日との株価の差を「続伸」と正しく表現し、前日終値との差を「32円高」と正しく算出しており、現在の株価を「16906円」と正しく引用しており、全ての表現が正確である。 On the other hand, an example of the text generated when the language model 20 according to the present embodiment, which is described second from the top of Table 1 R1, is "Nikkei average, continuous growth close is 16906 yen, which is 32 yen higher. The text data delivery time zone is correctly expressed as "closed", the difference in stock price from the previous day is correctly expressed as "continuation growth", and the difference from the previous day's closing price is correctly calculated as "32 yen higher". The current stock price is correctly quoted as "16906 yen", and all expressions are accurate.

第1表R1の上から3番目に記載された、本実施形態に係る言語モデル20の一部を変更したモデルの第1例を用いた場合に生成されるテキストの例は、「日経平均、続伸大引けは32円高の16906円」であり、テキストデータの配信時間帯を「大引け」と正しく表現し、前日との株価の差を「続伸」と正しく表現し、前日終値との差を「32円高」と正しく算出しており、現在の株価を「16906円」と正しく引用しており、全ての表現が正確である。このことから、第1前処理部21a及び第2前処理部21bによって正規化したデータ及び相対化したデータの2種類を算出するモデルであっても、第1前処理部21a及び第2前処理部21bによって、標準化したデータ、正規化したデータ及び相対化したデータの3種類を算出するモデルと同等以上の精度で時系列数値データを説明するテキストデータを生成できることがわかる。 An example of the text generated when the first example of the model in which a part of the language model 20 according to the present embodiment is modified, which is described third from the top of Table 1 R1, is "Nikkei 225, The continuous growth close is 16906 yen, which is 32 yen higher, and the text data delivery time zone is correctly expressed as "close", the difference in stock price from the previous day is correctly expressed as "sequential growth", and the difference from the previous day's closing price is " It is calculated correctly as "32 yen appreciation", and the current stock price is correctly quoted as "16906 yen", and all expressions are accurate. From this, even in the model that calculates two types of data, the data normalized by the first preprocessing unit 21a and the second preprocessing unit 21b and the relativized data, the first preprocessing unit 21a and the second preprocessing unit 21a and the second preprocessing It can be seen that part 21b can generate text data that explains time-series numerical data with an accuracy equal to or higher than that of a model that calculates three types of standardized data, normalized data, and relativized data.

第1表R1の上から4番目に記載された、本実施形態に係る言語モデル20の一部を変更したモデルの第2例を用いた場合に生成されるテキストの例は、「日経平均、続伸大引けは28円高の<unk>円」であり、テキストデータの配信時間帯を「大引け」と正しく表現し、前日との株価の差を「続伸」と正しく表現し、前日終値との差を誤って「28円高」と算出しており、現在の株価が引用できず「<unk>円」となっている。ここで、<unk>は、unknownを表す文字列であり、適当な単語が生成できなかったことを示す。このことから、言語モデルによって時系列数値データに関係する数値を直接生成するのでは、時系列数値データに関係する数値を正しく生成することが難しく、時系列数値データの演算を伴う表現のみならず、時系列数値データの引用を含めることも困難であることがわかる。 An example of the text generated when the second example of the model in which a part of the language model 20 according to the present embodiment is modified, which is described fourth from the top of Table 1 R1, is "Nikkei 225, The continuous growth close is the yen, which is 28 yen higher, and the text data delivery time zone is correctly expressed as "close", the difference in stock price from the previous day is correctly expressed as "sequential growth", and the difference from the previous day's closing price.を誤って「28円高」と算出しており、現在の株価が引用できず「<unk>円」となっている。 Here, is a character string representing unknown, and indicates that an appropriate word could not be generated. For this reason, if the numerical values related to the time-series numerical data are directly generated by the language model, it is difficult to correctly generate the numerical values related to the time-series numerical data, and not only the expressions involving the calculation of the time-series numerical data but also the expressions. , It turns out that it is also difficult to include citations of time series numerical data.

第1表R1の上から5番目に記載された、本実施形態に係る言語モデル20の一部を変更したモデルの第3例を用いた場合に生成されるテキストの例は、「日経平均、続伸前引けは32円高の16906円」であり、テキストデータの配信時間帯を誤って「前引け」と表現し、前日との株価の差を「続伸」と正しく表現し、前日終値との差を「32円高」と正しく算出しており、現在の株価を「16906円」と正しく引用している。このことから、デコーダ24に時系列数値データの時系列に関するデータを入力しないモデルでは、時系列数値データが取得された時間帯について正しく言及することが難しいことがわかる。 An example of the text generated when the third example of the model in which a part of the language model 20 according to the present embodiment is modified, which is described in the fifth from the top of Table 1 R1, is "Nikkei 225, The closing price of the previous day is 16906 yen, which is 32 yen higher. The difference is correctly calculated as "32 yen higher", and the current stock price is correctly quoted as "16906 yen". From this, it can be seen that it is difficult to correctly refer to the time zone in which the time-series numerical data was acquired in the model in which the time-series-related data of the time-series numerical data is not input to the decoder 24.

図8は、本実施形態に係るテキスト生成装置10で生成されるテキストと基準となるテキストとの近さを評価した指標値を示す図である。同図では、言語モデルとして従来のモデルを用いた場合と、本実施形態に係る言語モデル20又は本実施形態に係る言語モデル20の一部を変更したモデルを用いた場合とについて、生成されるテキストと基準となるテキストとの近さを評価した指標値をまとめた第2表R2を示している。なお、指標値は、BLEU(BiLingual Evaluation Understudy)と呼ばれる値であり、0から1までの値を取り、1に近いほど基準となるテキスト(正確なテキスト)に近いことを表す。この指標値は、テキストの評価を行うために用いられるものの一例であり、他の指標値を用いてテキストの評価を行うこともできる。 FIG. 8 is a diagram showing index values for evaluating the closeness between the text generated by the text generator 10 according to the present embodiment and the reference text. In the figure, it is generated when a conventional model is used as a language model and when a language model 20 according to the present embodiment or a model in which a part of the language model 20 according to the present embodiment is modified is used. Table 2 R2 summarizes the index values for evaluating the closeness between the text and the reference text. The index value is a value called BLEU (BiLingual Evaluation Understudy), which takes a value from 0 to 1, and the closer it is to 1, the closer it is to the reference text (accurate text). This index value is an example of what is used to evaluate the text, and the text can be evaluated using other index values.

本実施形態に係る言語モデル20は、図4を用いて説明した言語モデル20であって、第1エンコーダ22a及び第2エンコーダ22bをMLPとしたモデルと、第1エンコーダ22a及び第2エンコーダ22bをCNNとしたモデルと、第1エンコーダ22a及び第2エンコーダ22bをRNNとしたモデルである。 The language model 20 according to the present embodiment is the language model 20 described with reference to FIG. 4, and includes a model in which the first encoder 22a and the second encoder 22b are MLPs, and the first encoder 22a and the second encoder 22b. A model in which CNN is used and a model in which the first encoder 22a and the second encoder 22b are RNNs.

また、本実施形態に係る言語モデル20の一部を変更したモデルの第1例は、図4を用いて説明した言語モデル20のうち第1時系列数値データを用いないモデル、すなわち第2時系列数値データのみを用いるモデルである。本実施形態に係る言語モデル20の一部を変更したモデルの第2例は、図4を用いて説明した言語モデル20のうち第2時系列数値データを用いないモデル、すなわち第1時系列数値データのみを用いるモデルである。 Further, the first example of the model in which a part of the language model 20 according to the present embodiment is modified is the model of the language model 20 described with reference to FIG. 4, which does not use the first time series numerical data, that is, the second time. This model uses only series numerical data. The second example of the model in which a part of the language model 20 according to the present embodiment is modified is a model of the language model 20 described with reference to FIG. 4, which does not use the second time series numerical data, that is, the first time series numerical value. This is a model that uses only data.

また、本実施形態に係る言語モデル20の一部を変更したモデルの第3例は、図4を用いて説明した言語モデル20のうち正規化したデータを用いないモデル、すなわち第1前処理部21a及び第2前処理部21bによって標準化したデータ及び相対化したデータの2種類を算出するモデルである。本実施形態に係る言語モデル20の一部を変更したモデルの第4例は、図4を用いて説明した言語モデル20のうち標準化したデータを用いないモデル、すなわち第1前処理部21a及び第2前処理部21bによって正規化したデータ及び相対化したデータの2種類を算出するモデルである。本実施形態に係る言語モデル20の一部を変更したモデルの第5例は、図4を用いて説明した言語モデル20のうち相対化したデータを用いないモデル、すなわち第1前処理部21a及び第2前処理部21bによって標準化したデータ及び正規化したデータの2種類を算出するモデルである。 Further, the third example of the model in which a part of the language model 20 according to the present embodiment is modified is a model of the language model 20 described with reference to FIG. 4, which does not use normalized data, that is, the first preprocessing unit. This is a model for calculating two types of data, standardized data and relativized data by 21a and the second preprocessing unit 21b. The fourth example of the model in which a part of the language model 20 according to the present embodiment is modified is a model of the language model 20 described with reference to FIG. 4, which does not use standardized data, that is, the first preprocessing unit 21a and the first. 2 This is a model for calculating two types of data, normalized data and relativized data by the preprocessing unit 21b. The fifth example of the model in which a part of the language model 20 according to the present embodiment is modified is a model of the language model 20 described with reference to FIG. 4, which does not use relativized data, that is, the first preprocessing unit 21a and This is a model for calculating two types of data, standardized data and normalized data, by the second preprocessing unit 21b.

また、本実施形態に係る言語モデル20の一部を変更したモデルの第6例は、図4を用いて説明した言語モデル20のうちデコーダ24に時系列数値データを1又は複数の方法で変換して得られる1又は複数の数値データを入力しないモデル、すなわちデコーダ24に第1エンコーダ22aの出力及び第2エンコーダ22bの出力のみを入力するモデルである。本実施形態に係る言語モデル20の一部を変更したモデルの第7例は、図4を用いて説明した言語モデル20のうち置換テキストデータを用いないモデル、すなわち言語モデルによって時系列数値データに関係する数値を直接生成するモデルである。また、本実施形態に係る言語モデル20の一部を変更したモデルの第8例は、図4を用いて説明した言語モデル20のうちデコーダ24に時系列数値データの時系列に関するデータを入力しないモデルである。 Further, in the sixth example of the model in which a part of the language model 20 according to the present embodiment is modified, the time-series numerical data is converted to the decoder 24 in the language model 20 described with reference to FIG. 4 by one or a plurality of methods. This is a model in which one or a plurality of numerical data obtained as described above is not input, that is, a model in which only the output of the first encoder 22a and the output of the second encoder 22b are input to the decoder 24. The seventh example of the model in which a part of the language model 20 according to the present embodiment is modified is a model that does not use replacement text data among the language models 20 described with reference to FIG. 4, that is, time-series numerical data is obtained by the language model. It is a model that directly generates related numerical values. Further, in the eighth example of the model in which a part of the language model 20 according to the present embodiment is modified, the data related to the time series of the time series numerical data is not input to the decoder 24 of the language model 20 described with reference to FIG. It is a model.

言語モデルとして従来のモデルを用いた場合に生成されるテキストの評価値は、「0.244」であるのに対して、本実施形態に係る言語モデル20を用いてテキスト生成装置10により生成されるテキストの評価値は、エンコーダにMLPを用いる場合「0.415」、エンコーダにCNNを用いる場合「0.414」、エンコーダにRNNを用いる場合「0.415」である。いずれの場合、従来よりも評価値が大幅に改善しており、正確なテキストデータが生成できていることがわかる。 The evaluation value of the text generated when the conventional model is used as the language model is "0.244", whereas the evaluation value of the text is generated by the text generator 10 using the language model 20 according to the present embodiment. The evaluation value of the text is "0.415" when MLP is used for the encoder, "0.414" when CNN is used for the encoder, and "0.415" when RNN is used for the encoder. In any case, the evaluation value is significantly improved as compared with the conventional case, and it can be seen that accurate text data can be generated.

第2表R2の上から5番目に記載された、本実施形態に係る言語モデル20の一部を変更したモデルの第1例を用いて生成されるテキストの評価値は「0.356」、第2表R2の上から6番目に記載された、本実施形態に係る言語モデル20の一部を変更したモデルの第2例を用いて生成されるテキストの評価値は「0.397」であり、異なる時間間隔で取得された2種類の時系列数値データを用いることで、評価値が改善することがわかる。これは、本実施形態に係るテキスト生成装置10によれば、時系列数値データの履歴に依存する単語を正しく生成できることによると考えられる。 The evaluation value of the text generated by using the first example of the model in which the language model 20 according to the present embodiment is partially modified, which is described in the fifth from the top of Table 2, R2, is "0.356". The evaluation value of the text generated by using the second example of the model in which the language model 20 according to the present embodiment is partially modified, which is described in the sixth from the top of Table 2 R2, is "0.397". It can be seen that the evaluation value is improved by using two types of time-series numerical data acquired at different time intervals. It is considered that this is because the text generator 10 according to the present embodiment can correctly generate words that depend on the history of time-series numerical data.

また、第2表R2の上から7番目に記載された、本実施形態に係る言語モデル20の一部を変更したモデルの第3例を用いて生成されるテキストの評価値は「0.424」、第2表R2の上から8番目に記載された、本実施形態に係る言語モデル20の一部を変更したモデルの第4例を用いて生成されるテキストの評価値は「0.424」、第2表R2の上から9番目に記載された、本実施形態に係る言語モデル20の一部を変更したモデルの第5例を用いて生成されるテキストの評価値は「0.408」である。これらのことから、正規化されたデータ及び標準化されたデータのいずれか一方と、相対化されたデータとを用いると、正規化されたデータ、標準化されたデータ及び相対化されたデータ全てを用いる場合よりもより適切なテキストデータが生成できることがわかる。また、相対化されたデータを用いないと、評価値が悪化することがわかる。 Further, the evaluation value of the text generated by using the third example of the model in which the language model 20 according to the present embodiment is partially modified, which is described in the seventh from the top of Table 2, R2, is "0.424". The evaluation value of the text generated by using the fourth example of the model in which the language model 20 according to the present embodiment is partially modified, which is described in the eighth from the top of Table 2, R2, is "0.424". The evaluation value of the text generated by using the fifth example of the model in which the language model 20 according to the present embodiment is partially modified, which is described in the ninth from the top of Table 2, R2, is "0.408". ". From these facts, when either one of the normalized data and the standardized data and the relativized data are used, the normalized data, the standardized data and the relativized data are all used. It can be seen that more appropriate text data can be generated than in the case. Moreover, it can be seen that the evaluation value deteriorates unless the relativized data is used.

また、第2表R2の上から10番目に記載された、本実施形態に係る言語モデル20の一部を変更したモデルの第6例を用いて生成されるテキストの評価値は「0.397」、第2表R2の上から11番目に記載された、本実施形態に係る言語モデル20の一部を変更したモデルの第7例を用いて生成されるテキストの評価値は「0.313」、第2表R2の上から12番目に記載された、本実施形態に係る言語モデル20の一部を変更したモデルの第8例を用いて生成されるテキストの評価値は「0.358」である。これらのことから、デコーダ24に第1エンコーダ22aの出力及び第2エンコーダ22bの出力のみを入力するモデルや、言語モデルによって時系列数値データに関係する数値を直接生成するモデル、時系列数値データの時系列に関するデータを入力しないモデルを用いる場合には、本実施形態に係る言語モデル20を用いる場合よりも指標値が悪化することがわかる。 Further, the evaluation value of the text generated by using the sixth example of the model in which a part of the language model 20 according to the present embodiment is modified, which is described in the tenth position from the top of Table 2 R2, is "0.397". The evaluation value of the text generated by using the seventh example of the model in which a part of the language model 20 according to the present embodiment is modified, which is described in the eleventh from the top of Table 2 R2, is "0.313". The evaluation value of the text generated by using the eighth example of the model in which the language model 20 according to the present embodiment is partially modified, which is described in the twelfth from the top of Table 2, R2, is "0.358". ". Based on these facts, a model that inputs only the output of the first encoder 22a and the output of the second encoder 22b to the decoder 24, a model that directly generates numerical values related to time-series numerical data by a language model, and time-series numerical data. It can be seen that when a model in which data related to the time series is not input is used, the index value is worse than when the language model 20 according to the present embodiment is used.

以上説明した実施形態は、本発明の理解を容易にするためのものであり、本発明を限定して解釈するためのものではない。実施形態が備える各要素並びにその配置、材料、条件、形状及びサイズ等は、例示したものに限定されるわけではなく適宜変更することができる。また、異なる実施形態で示した構成同士を部分的に置換し又は組み合わせることが可能である。 The embodiments described above are for facilitating the understanding of the present invention, and are not for limiting and interpreting the present invention. Each element included in the embodiment and its arrangement, material, condition, shape, size, and the like are not limited to those exemplified, and can be changed as appropriate. In addition, the configurations shown in different embodiments can be partially replaced or combined.

10…テキスト生成装置、10a…CPU、10b…RAM、10c…ROM、10d…通信部、10e…入力部、10f…表示部、11…学習部、12…取得部、13…生成部、14…置換部、15…規則記憶部、20…言語モデル、21a…第1前処理部、21b…第2前処理部、22a…第1エンコーダ、22b…第2エンコーダ、23…合成部、24…デコーダ、30…ユーザ端末、40…株価配信サーバ、100…テキスト生成システム、D1…置換テキストデータ、D2…時系列数値データ、D3…規則、E…正確なテキストデータの例、N…通信ネットワーク、R1…第1表、R2…第2表 10 ... Text generator, 10a ... CPU, 10b ... RAM, 10c ... ROM, 10d ... Communication unit, 10e ... Input unit, 10f ... Display unit, 11 ... Learning unit, 12 ... Acquisition unit, 13 ... Generation unit, 14 ... Replacement unit, 15 ... Regular storage unit, 20 ... Language model, 21a ... First preprocessing unit, 21b ... Second preprocessing unit, 22a ... First encoder, 22b ... Second encoder, 23 ... Synthesis unit, 24 ... Decoder , 30 ... user terminal, 40 ... stock distribution server, 100 ... text generation system, D1 ... replacement text data, D2 ... time series numerical data, D3 ... rule, E ... accurate text data example, N ... communication network, R1 … Table 1, R2… Table 2

Claims (10)

時間の経過と対応付けられた数列を含む時系列数値データの変動を説明するテキストデータを生成するテキスト生成装置であって、
前記テキストデータのうち前記時系列数値データに関係する数値を所定の規則で所定の文字列に置き換えた置換テキストデータと前記時系列数値データとを学習用データとして、前記時系列数値データが入力された場合に、前記置換テキストデータを出力するように言語モデルを学習させる学習部と、
前記学習部により学習された前記言語モデルに新たな時系列数値データを入力し、前記言語モデルの出力によって新たな置換テキストデータを生成する生成部と、
前記新たな置換テキストデータに含まれる前記所定の文字列を、前記所定の規則で前記新たな時系列数値データに関係する数値に置き換える置換部と、
を備えるテキスト生成装置。
A text generator that generates text data that explains changes in time-series numerical data, including a sequence of numbers associated with the passage of time.
The time-series numerical data is input using the replacement text data in which the numerical values related to the time-series numerical data among the text data are replaced with predetermined character strings according to a predetermined rule and the time-series numerical data as learning data. In this case, the learning unit that trains the language model so as to output the replacement text data,
A generation unit that inputs new time-series numerical data to the language model learned by the learning unit and generates new replacement text data by the output of the language model.
A replacement unit that replaces the predetermined character string included in the new replacement text data with a numerical value related to the new time-series numerical data according to the predetermined rule.
A text generator equipped with.
前記時系列数値データに関係する数値は、
前記時系列数値データに含まれる数列のうち所定の時点に対応付けられた数値と、
前記時系列数値データに含まれる数列のうち異なる時点に対応付けられた数値の差と、
前記時系列数値データに含まれる数列のうち所定の時点に対応付けられた数値を所定の桁で切り捨てた数値と、
前記時系列数値データに含まれる数列のうち異なる時点に対応付けられた数値の差を所定の桁で切り捨てた数値と、
前記時系列数値データに含まれる数列のうち所定の時点に対応付けられた数値を所定の桁で切り上げた数値と、
前記時系列数値データに含まれる数列のうち異なる時点に対応付けられた数値の差を所定の桁で切り上げた数値と、のうち少なくともいずれかを含み、
前記所定の規則は、前記時系列数値データに関係する数値の種類と前記所定の文字列とを対応付ける規則である、
請求項1に記載のテキスト生成装置。
Numerical values related to the time series numerical data are
Of the sequence of numbers included in the time-series numerical data, the numerical value associated with a predetermined time point and
The difference between the numerical values associated with different time points in the sequence of numbers included in the time series numerical data, and
Of the sequence of numbers included in the time-series numerical data, the numerical value associated with a predetermined time point is rounded down to a predetermined digit, and
Of the sequence of numbers included in the time-series numerical data, the difference between the numerical values associated with different time points is rounded down to a predetermined digit, and
Of the sequence of numbers included in the time-series numerical data, the numerical value associated with a predetermined time point is rounded up to a predetermined digit, and
Includes at least one of the numerical values obtained by rounding up the difference between the numerical values associated with different time points in the sequence of numerical values included in the time-series numerical data by a predetermined digit.
The predetermined rule is a rule for associating the type of numerical value related to the time series numerical data with the predetermined character string.
The text generator according to claim 1.
前記時系列数値データは、第1間隔で時間の経過と対応付けられた数列を含む第1時系列数値データと、前記第1間隔より長い第2間隔で時間の経過と対応付けられた数列を含む第2時系列数値データとを含む、
請求項1又は2に記載のテキスト生成装置。
The time-series numerical data includes a first time-series numerical data including a sequence of numbers associated with the passage of time in the first interval, and a sequence of numbers associated with the passage of time in a second interval longer than the first interval. Including the second time series numerical data including,
The text generator according to claim 1 or 2.
前記生成部は、前記時系列数値データを1又は複数の方法で変換して得られる、前記1又は複数の方法に一対一に対応する1又は複数の数値データを、前記言語モデルに入力する、
請求項1から3のいずれか一項に記載のテキスト生成装置。
The generation unit inputs one or a plurality of numerical data having a one-to-one correspondence to the one or a plurality of methods, which is obtained by converting the time series numerical data by one or a plurality of methods, into the language model.
The text generator according to any one of claims 1 to 3.
前記1又は複数の数値データは、
前記時系列数値データに含まれる数列を所定の数値範囲に正規化した数値データと、
前記時系列数値データに含まれる数列の平均値及び標準偏差を用いて前記時系列数値データを標準化した数値データと、
前記時系列数値データに含まれる数列のうち所定の時点に対応付けられた数値を基準値として、前記時系列数値データに含まれる数列を前記基準値に関して相対化した数値データと、
のうち少なくともいずれかを含む、
請求項4に記載のテキスト生成装置。
The one or more numerical data is
Numerical data obtained by normalizing the sequence of numbers included in the time-series numerical data to a predetermined numerical range, and
Numerical data obtained by standardizing the time-series numerical data using the average value and standard deviation of the sequence included in the time-series numerical data, and
Numerical data obtained by relativizing the sequence included in the time-series numerical data with respect to the reference value, using the numerical value associated with a predetermined time point as the reference value among the sequence included in the time-series numerical data.
Including at least one of
The text generator according to claim 4.
前記言語モデルは、
第1間隔で時間の経過と対応付けられた数列を含む第1時系列数値データを1又は複数の方法で変換して得られる、前記1又は複数の方法に一対一に対応する1又は複数の第1数値データが入力される第1エンコーダと、
前記第1間隔より長い第2間隔で時間の経過と対応付けられた数列を含む第2時系列数値データを前記1又は複数の方法で変換して得られる、前記1又は複数の方法に一対一に対応する1又は複数の第2数値データが入力される第2エンコーダと、
前記第1エンコーダの出力及び前記第2エンコーダの出力を合成する合成部と、
前記合成部により合成されたデータが入力され、前記置換テキストデータを出力するデコーダと、を含む、
請求項1から5のいずれか一項に記載のテキスト生成装置。
The language model is
One or more corresponding to the one or more methods, which is obtained by converting the first time series numerical data including a sequence of numbers associated with the passage of time in the first interval by one or a plurality of methods. The first encoder to which the first numerical data is input and
One-to-one with the one or more methods obtained by converting the second time series numerical data including the sequence associated with the passage of time in the second interval longer than the first interval by the one or more methods. A second encoder into which one or more second numerical data corresponding to
A compositing unit that synthesizes the output of the first encoder and the output of the second encoder,
A decoder in which the data synthesized by the synthesis unit is input and the replacement text data is output is included.
The text generator according to any one of claims 1 to 5.
前記合成部は、前記第1エンコーダの出力、前記第2エンコーダの出力、前記1又は複数の第1数値データ及び前記1又は複数の第2数値データを合成する、
請求項6に記載のテキスト生成装置。
The synthesizing unit synthesizes the output of the first encoder, the output of the second encoder, the one or more first numerical data, and the one or more second numerical data.
The text generator according to claim 6.
前記デコーダには、前記合成部により合成されたデータ及び前記時系列数値データの時系列に関するデータが入力される、
請求項6又は7に記載のテキスト生成装置。
Data synthesized by the synthesis unit and data related to the time series of the time series numerical data are input to the decoder.
The text generator according to claim 6 or 7.
ハードウェアプロセッサ及びメモリを備えるコンピュータによって、時間の経過と対応付けられた数列を含む時系列数値データの変動を説明するテキストデータを生成するテキスト生成方法であって、
前記テキストデータのうち前記時系列数値データに関係する数値を所定の規則で所定の文字列に置き換えた置換テキストデータと前記時系列数値データとを学習用データとして、前記時系列数値データが入力された場合に、前記置換テキストデータを出力するように言語モデルを学習させることと、
学習された前記言語モデルに新たな時系列数値データを入力し、前記言語モデルの出力によって前記新たな時系列数値データを説明する新たな置換テキストデータを生成することと、
前記新たな置換テキストデータに含まれる前記所定の文字列を、前記所定の規則で前記新たな時系列数値データに関係する数値に置き換えることと、
を実行するテキスト生成方法。
A text generation method in which a computer equipped with a hardware processor and memory generates text data that explains fluctuations in time-series numerical data including a sequence of numbers associated with the passage of time.
The time-series numerical data is input using the replacement text data in which the numerical values related to the time-series numerical data among the text data are replaced with predetermined character strings according to a predetermined rule and the time-series numerical data as learning data. In that case, the language model is trained to output the replacement text data, and
Input new time-series numerical data into the trained language model, and generate new replacement text data explaining the new time-series numerical data by the output of the language model.
Replacing the predetermined character string included in the new replacement text data with a numerical value related to the new time-series numerical data according to the predetermined rule,
How to generate text to execute.
時間の経過と対応付けられた数列を含む時系列数値データの変動を説明するテキストデータを生成するテキスト生成装置に備えられたコンピュータを、
前記テキストデータのうち前記時系列数値データに関係する数値を所定の規則で所定の文字列に置き換えた置換テキストデータと前記時系列数値データとを学習用データとして、前記時系列数値データが入力された場合に、前記置換テキストデータを出力するように言語モデルを学習させる学習部、
前記学習部により学習された前記言語モデルに新たな時系列数値データを入力し、前記言語モデルの出力によって前記新たな時系列数値データを説明する新たな置換テキストデータを生成する生成部、及び
前記新たな置換テキストデータに含まれる前記所定の文字列を、前記所定の規則で前記新たな時系列数値データに関係する数値に置き換える置換部、
として機能させるテキスト生成プログラム。
A computer equipped with a text generator that generates text data that explains the fluctuations in time-series numerical data, including a sequence of numbers associated with the passage of time.
The time-series numerical data is input using the replacement text data in which the numerical values related to the time-series numerical data among the text data are replaced with predetermined character strings according to a predetermined rule and the time-series numerical data as learning data. In this case, the learning unit that trains the language model so as to output the replacement text data.
A generation unit that inputs new time-series numerical data to the language model learned by the learning unit and generates new replacement text data for explaining the new time-series numerical data by the output of the language model, and the generation unit. A replacement unit that replaces the predetermined character string included in the new replacement text data with a numerical value related to the new time-series numerical data according to the predetermined rule.
A text generator that functions as.
JP2017168673A 2017-09-01 2017-09-01 Text generator, text generator and text generator Active JP6910061B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017168673A JP6910061B2 (en) 2017-09-01 2017-09-01 Text generator, text generator and text generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017168673A JP6910061B2 (en) 2017-09-01 2017-09-01 Text generator, text generator and text generator

Publications (2)

Publication Number Publication Date
JP2019046158A JP2019046158A (en) 2019-03-22
JP6910061B2 true JP6910061B2 (en) 2021-07-28

Family

ID=65812819

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017168673A Active JP6910061B2 (en) 2017-09-01 2017-09-01 Text generator, text generator and text generator

Country Status (1)

Country Link
JP (1) JP6910061B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112069777B (en) * 2020-06-15 2022-09-30 北京理工大学 Two-stage data-to-text generation method based on skeleton

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06259409A (en) * 1993-03-09 1994-09-16 Nippon Telegr & Teleph Corp <Ntt> Numerical data explanatory sentence generating method
JP2001351011A (en) * 2000-06-08 2001-12-21 Kentex Kk Method, device, and system for automatically generating stock name analysis information
US9396181B1 (en) * 2013-09-16 2016-07-19 Arria Data2Text Limited Method, apparatus, and computer program product for user-directed reporting
JP6902945B2 (en) * 2017-07-07 2021-07-14 株式会社野村総合研究所 Text summarization system

Also Published As

Publication number Publication date
JP2019046158A (en) 2019-03-22

Similar Documents

Publication Publication Date Title
Yang et al. Fingpt: Open-source financial large language models
Siami-Namini et al. The performance of LSTM and BiLSTM in forecasting time series
Siami-Namini et al. A comparative analysis of forecasting financial time series using arima, lstm, and bilstm
Huo et al. Knowledge modeling via contextualized representations for LSTM-based personalized exercise recommendation
CN110147551B (en) Multi-category entity recognition model training, entity recognition method, server and terminal
CN112131861B (en) Dialog state generation method based on hierarchical multi-head interaction attention
JP7262539B2 (en) Conversation recommendation method, device and equipment
CN112100406B (en) Data processing method, device, equipment and medium
CN112632351B (en) Classification model training method, classification method, device and equipment
CN112528634A (en) Text error correction model training and recognition method, device, equipment and storage medium
CN110175469A (en) A kind of social media privacy of user leakage detection method, system, equipment and medium
CN112463989A (en) Knowledge graph-based information acquisition method and system
CN115455205A (en) Time sequence knowledge graph-based occupational development planning method
JP6910061B2 (en) Text generator, text generator and text generator
CN114118570A (en) Service data prediction method and device, electronic equipment and storage medium
Munn et al. Explainable AI for Practitioners
CN113807728A (en) Performance assessment method, device, equipment and storage medium based on neural network
CN112000788A (en) Data processing method and device and computer readable storage medium
CN108122613A (en) Health forecast method and apparatus based on health forecast model
Seddik et al. Multi-variable time series decoding with Long Short-Term Memory and mixture attention
CN113705092B (en) Disease prediction method and device based on machine learning
CN115270792A (en) Medical entity identification method and device
Kezar et al. Improving sign recognition with phonology
CN113570455A (en) Stock recommendation method and device, computer equipment and storage medium
CN112257461A (en) XML document translation and evaluation method based on attention mechanism

Legal Events

Date Code Title Description
A80 Written request to apply exceptions to lack of novelty of invention

Free format text: JAPANESE INTERMEDIATE CODE: A80

Effective date: 20170922

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200622

TRDD Decision of grant or rejection written
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210528

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20210608

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210629

R150 Certificate of patent or registration of utility model

Ref document number: 6910061

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150