Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7624851B2 - Natural language processing device, translation device, and program - Google Patents
[go: Go Back, main page]

JP7624851B2 - Natural language processing device, translation device, and program - Google Patents

Natural language processing device, translation device, and program Download PDF

Info

Publication number
JP7624851B2
JP7624851B2 JP2021035594A JP2021035594A JP7624851B2 JP 7624851 B2 JP7624851 B2 JP 7624851B2 JP 2021035594 A JP2021035594 A JP 2021035594A JP 2021035594 A JP2021035594 A JP 2021035594A JP 7624851 B2 JP7624851 B2 JP 7624851B2
Authority
JP
Japan
Prior art keywords
sentence
sentences
training
unit
data
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
JP2021035594A
Other languages
Japanese (ja)
Other versions
JP2022135649A (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.)
Japan Broadcasting Corp
Original Assignee
Japan Broadcasting Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Japan Broadcasting Corp filed Critical Japan Broadcasting Corp
Priority to JP2021035594A priority Critical patent/JP7624851B2/en
Publication of JP2022135649A publication Critical patent/JP2022135649A/en
Application granted granted Critical
Publication of JP7624851B2 publication Critical patent/JP7624851B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Machine Translation (AREA)

Description

特許法第30条第2項適用 (1) 発行日(公開日) 令和2年(西暦2020年)5月22日 刊行物 2020年度 人工知能学会全国大会(第34回)予稿集PDF 一般社団法人 人工知能学会 発行(Web公開(ダウンロード)URL:https://confit.atlas.jp/guide/event/jsai2020/proceedings/list) <資 料> 2020年度 人工知能学会全国大会(第34回)予稿集PDF 掲載論文 抜粋 <資料> 予稿集PDFダウンロードサイト ウェブページ Article 30, paragraph 2 of the Patent Act applies (1) Date of issue (publication date) May 22, 2020 (Reiwa 2) Publication Proceedings of the 34th Annual Conference of the Japanese Society for Artificial Intelligence (PDF) Published by the Japanese Society for Artificial Intelligence (Website publication (download) URL: https://confit.atlas.jp/guide/event/jsai2020/proceedings/list) <Materials> Proceedings of the 34th Annual Conference of the Japanese Society for Artificial Intelligence (PDF) Published papers Excerpts <Materials> Proceedings PDF download site Webpage

特許法第30条第2項適用 (2) 開催日(公開日) 令和2年(西暦2020年)6月12日(会期:6月9日~6月12日) 集会名、開催場所 2020年度 人工知能学会全国大会(第34回) 一般社団法人 人工知能学会 主催 インターネットによる通信(Zoom)を用いたオンライン開催(Web公開(抄録)URL:https://confit.atlas.jp/guide/event/jsai2020/subject/4Rin1-44/category?cryptoId= <資 料> 2020年度 人工知能学会全国大会(第34回)開催案内 ウェブページ <資 料> 2020年度 人工知能学会全国大会(第34回)重要日程 ウェブページ <資 料> 2020年度 人工知能学会全国大会(第34回)タイムテーブル ウェブページ <資 料> 2020年度 人工知能学会全国大会(第34回)セッション情報 ウェブページ <資 料> 2020年度 人工知能学会全国大会(第34回)講演情報(抄録) ウェブページArticle 30, paragraph 2 of the Patent Act applies (2) Date of event (publication date) June 12, 2020 (Dates: June 9 to June 12) Name of event, location of event 2020 National Conference of the Japanese Society for Artificial Intelligence (34th) Sponsored by the Japanese Society for Artificial Intelligence (General Incorporated Association) Held online using internet communication (Zoom) (Web publication (abstract) URL: https://confit.atlas.jp/guide/event/jsai2020/subject/4Rin1-44/categories?cryptoId= <Materials> 2020 National Conference of the Japanese Society for Artificial Intelligence (34th) Event Guide Webpage <Materials> 2020 National Conference of the Japanese Society for Artificial Intelligence (34th) Important Dates Webpage <Materials> <Materials> 2020 Japanese Society for Artificial Intelligence National Conference (34th) Timetable Webpage <Materials> 2020 Japanese Society for Artificial Intelligence National Conference (34th) Session Information Webpage <Materials> 2020 Japanese Society for Artificial Intelligence National Conference (34th) Lecture Information (Abstracts) Webpage

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

近年の機械翻訳の技術のレベルは、用途によっては実用に耐え得る程度にまで向上してきている。また、機械翻訳の技術を有効に活用するため、用途に応じた工夫なども研究されている。 In recent years, the level of machine translation technology has improved to a level that is practical for some applications. In addition, in order to make effective use of machine translation technology, research is being conducted into ways to improve it depending on the application.

非特許文献1および非特許文献2には、自然言語によって記述された文の機械翻訳を行う装置が記載されている。 Non-Patent Documents 1 and 2 describe devices that perform machine translation of sentences written in natural language.

Rico Sennrich,Barry Haddow,Alexandra Birch,Neural Machine Translation of Rare Words with Subword Units,Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics,p.1715-1725,2016年8月,Association for Computational Linguistics,URL:https://www.aclweb.org/anthology/P16-1162.pdfRico Sennrich, Barry Haddow, Alexandra Birch, Neural Machine Translation of Rare Words with Subword Units, Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, p.1715-1725, August 2016, Association for Computational Linguistics, URL: https://www.aclweb.org/anthology/P16-1162.pdf Ashish Vaswani,Noam Shazeer,Niki Parmar,Jakob Uszkoreit,Llion Jones,Aidan N. Gomez,Lukasz Kaiser,Illia Polosukhin, Attention Is All You Need,31st Conference on Neural Information Processing Systems (NIPS 2017),Long Beach, CA, USA.,2017年,URL:https://papers.nips.cc/paper/7181-attention-is-all-you-need.pdfAshish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, Illia Polosukhin, Attention Is All You Need, 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA., 2017, URL: https://papers.nips.cc/paper/7181-attention-is-all-you-need.pdf

平均的な一文の中に込められる内容の量は、言語の種類に応じて異なる場合がある。また、機械翻訳の技術の特定の応用分野では、一文の中に込める内容の量を適切に制御したい場合もある。 The amount of content packed into an average sentence may vary depending on the type of language. Also, in certain applications of machine translation technology, it may be desirable to have appropriate control over the amount of content packed into a sentence.

例えば、英語の一文に通常含まれる内容の量は、日本語の一文のそれよりも少ない場合が多い。また、テレビや、ラジオや、動画配信や、インターネットのニュースサイト等におけるニュースにおいて、日本語のニュース原稿の一文は相対的に長い傾向がある。一方、上記のようなニュースにおいて英語のニュース原稿の一文は相対的に短い傾向がある。英語のニュース原稿は、基本的に一文一義で表現される。したがって、例えば、日本語のニュース原稿を基に、翻訳して英語のニュース原稿を制作する場合には、日本語の一文が英語の複数文に短く区切って翻訳されることが多い。 For example, the amount of content typically contained in a single English sentence is often less than that contained in a single Japanese sentence. Furthermore, in news on television, radio, video streaming, Internet news sites, and the like, sentences in Japanese news scripts tend to be relatively long. On the other hand, sentences in English news scripts for the above-mentioned types of news tend to be relatively short. English news scripts are basically written with one meaning per sentence. Therefore, for example, when translating a Japanese news script to produce an English news script, a single Japanese sentence is often translated into several short English sentences.

このように、言語によって、あるいは用途によって、翻訳処理の出力側(目的言語側)の文の数を制御したい場合がある。また、出力側の文の数を制御することにより、出力側の一文の長さを制御することも可能である。 In this way, it may be necessary to control the number of sentences on the output side (target language side) of the translation process depending on the language or application. Also, by controlling the number of sentences on the output side, it is possible to control the length of each sentence on the output side.

しかしながら、従来の技術において、翻訳処理の入力側(原言語側)の文を与えた際に、出力側(目的言語側)の文の数を制御することはできない。非特許文献1や非特許文献2にも、出力側(目的言語側)の文の数の制御については記載されていない。特定の言語ペアにおける機械翻訳や、特定の利用目的のための機械翻訳の処理を考えたときに、原言語側の一文を目的言語側の所望の(適切な)文数の文に翻訳できるようになることが望ましい。 However, in conventional technology, when a sentence is given on the input side (source language side) of the translation process, it is not possible to control the number of sentences on the output side (target language side). Neither Non-Patent Document 1 nor Non-Patent Document 2 describes controlling the number of sentences on the output side (target language side). When considering machine translation for a specific language pair or machine translation processing for a specific purpose, it is desirable to be able to translate a sentence on the source language side into the desired (appropriate) number of sentences on the target language side.

そのためには、次の2つのタスクを自動的に実行できるようにすることが望まれる。第1のタスクは、適切な出力文数を推定することである。第2のタスクは、特定の出力文数になるように翻訳機を制御することである。 To achieve this, it is desirable to be able to automatically perform the following two tasks. The first task is to estimate an appropriate number of output sentences. The second task is to control the translator so that a specific number of output sentences is achieved.

本発明は、上記の課題認識に基づいて行なわれたものであり、翻訳対象とする原言語文に応じて、翻訳結果である目的言語文の文数を少なくとも推定することのできる自然言語処理装置、翻訳装置、およびプログラムを提供しようとするものである。 The present invention was made based on the recognition of the above problem, and aims to provide a natural language processing device, a translation device, and a program that can at least estimate the number of sentences in a target language sentence, which is the translation result, depending on the source language sentence to be translated.

[1]上記の課題を解決するため、本発明の一態様による自然言語処理装置は、学習用原言語文と、前記学習用原言語文に対応する学習用目的言語文と、前記学習用目的言語文の文数を表す学習用文数情報と、を含む学習用データを供給する学習用データ供給部と、機械学習可能なモデルを備え、原言語文を入力し、前記原言語文に対応する目的言語文の文数を表す文数情報を少なくとも出力する推定部と、前記推定部に対して前記原言語文を供給する原言語文供給部と、を備え、学習モードで動作する場合には、前記推定部は、前記学習用データ供給部が供給する前記学習用データに基づいて、前記モデルの機械学習を行い、推定実行モードで動作する場合には、前記推定部は、前記原言語文供給部が供給する前記原言語文に基づいて、当該原言語文に対応する前記文数情報を出力する、ものである。 [1] In order to solve the above problem, a natural language processing apparatus according to one aspect of the present invention includes a learning data supply unit that supplies learning data including a learning source sentence, a learning target sentence corresponding to the learning source sentence, and learning sentence number information indicating the number of sentences in the learning target sentence; an estimation unit that has a machine learning model and inputs a source sentence and outputs at least sentence number information indicating the number of sentences in the target sentence corresponding to the source sentence; and a source sentence supply unit that supplies the source sentence to the estimation unit. When operating in a learning mode, the estimation unit performs machine learning of the model based on the learning data supplied by the learning data supply unit, and when operating in an estimation execution mode, the estimation unit outputs the sentence number information corresponding to the source sentence based on the source sentence supplied by the source sentence supply unit.

[2]また、本発明の一態様による自然言語処理装置は、機械学習可能なモデルを備え、原言語文を入力し、前記原言語文に対応する目的言語文の文数を表す文数情報を少なくとも出力する推定部と、前記推定部に対して前記原言語文を供給する原言語文供給部と、を備え、前記モデルは、学習用原言語文と、前記学習用原言語文に対応する学習用目的言語文と、前記学習用目的言語文の文数を表す学習用文数情報と、を含む学習用データに基づいて機械学習済みであり、前記推定部は、前記原言語文供給部が供給する前記原言語文に基づいて、当該原言語文に対応する前記文数情報を出力する、ものである。 [2] In addition, a natural language processing device according to one aspect of the present invention includes a model capable of machine learning, an estimation unit that inputs a source language sentence and outputs at least sentence number information indicating the number of sentences of a target language sentence corresponding to the source language sentence, and a source language sentence supply unit that supplies the source language sentence to the estimation unit, the model has been machine-learned based on learning data including a training source language sentence, a training target language sentence corresponding to the training source language sentence, and training sentence number information indicating the number of sentences of the training target language sentence, and the estimation unit outputs the sentence number information corresponding to the source language sentence based on the source language sentence supplied by the source language sentence supply unit.

[3]また、本発明の一態様による自然言語処理装置は、学習用原言語文と、前記学習用原言語文に対応する学習用目的言語文と、前記学習用目的言語文の文数を表す学習用文数情報と、を含む学習用データを供給する学習用データ供給部と、機械学習可能なモデルを備え、原言語文を入力し、前記原言語文に対応する目的言語文の文数を表す文数情報を少なくとも出力する推定部と、を備え、前記推定部は、前記学習用データ供給部が供給する前記学習用データに基づいて、前記モデルの機械学習を行う、ものである。 [3] A natural language processing device according to one aspect of the present invention includes a training data supply unit that supplies training data including a training source language sentence, a training target language sentence corresponding to the training source language sentence, and training sentence number information indicating the number of sentences in the training target language sentence, and an estimation unit that has a machine learning model, inputs a source language sentence, and outputs at least sentence number information indicating the number of sentences in the target language sentence corresponding to the source language sentence, and the estimation unit performs machine learning of the model based on the training data supplied by the training data supply unit.

[4]また、本発明の一態様による翻訳装置は、学習用原言語文と学習用目的言語文との対のデータを供給する文対供給部と、供給された前記学習用目的言語文に含まれる文数を求める文数推定部と、前記学習用原言語文に、前記文数推定部が求めた前記文数の情報を付加して、前記学習用目的言語文の文数の情報が付加された前記学習用原言語文のデータを出力する文数情報付与部と、前記学習用目的言語文の文数の情報が付加された学習用原言語文のデータと、前記学習用目的言語文のデータとの対を、学習用データとして供給する学習用データ供給部と、入力された入力原言語文に、当該入力原言語文に対応する出力用の出力目的言語文の文数の情報を付加する文数指定部と、モデルを備え、前記学習用データを用いて前記モデルの学習を行うとともに、前記出力目的言語文の文数の情報を付加した前記入力原言語文を、前記モデルに入力することによって、前記モデルが求めた出力目的言語文を出力する翻訳処理部と、上記[1]または[2]に記載の自然言語処理装置と、を備え、前記自然言語処理装置の原言語文供給部は、前記入力原言語文を、前記自然言語処理装置の前記推定部に供給し、前記文数指定部は、前記自然言語処理装置の前記推定部が出力した前記文数情報に基づいて、前記出力用の出力目的言語文の文数の情報を付加する、ものである。 [4] A translation device according to one aspect of the present invention includes a sentence pair supplying unit that supplies data of a pair of a training source language sentence and a training target language sentence, a sentence number estimating unit that determines the number of sentences included in the supplied training target language sentence, a sentence number information adding unit that adds information on the number of sentences determined by the sentence number estimating unit to the training source language sentence and outputs data of the training source language sentence to which the information on the number of sentences of the training target language sentence has been added, a training data supplying unit that supplies pairs of data of the training source language sentence to which the information on the number of sentences of the training target language sentence has been added and data of the training target language sentence as training data, and an output object for output corresponding to the input source language sentence, which is input to the input source language sentence. a translation processing unit that includes a model, the model being trained using the training data, and the input source language sentence to which the information on the number of sentences of the output target language sentence has been added is input to the model, thereby outputting the output target language sentence determined by the model; and a natural language processing device according to [1] or [2] above, wherein a source language sentence supply unit of the natural language processing device supplies the input source language sentence to the estimation unit of the natural language processing device, and the number of sentences designation unit adds information on the number of sentences of the output target language sentence for output based on the number of sentences information output by the estimation unit of the natural language processing device.

[5]また、本発明の一態様による翻訳装置は、入力された入力原言語文に、当該入力原言語文に対応する出力用の出力目的言語文の文数の情報を付加する文数指定部と、モデルを備え、前記出力目的言語文の文数の情報を付加した前記入力原言語文を、前記モデルに入力することによって、前記モデルが求めた出力目的言語文を出力する翻訳処理部と、上記[1]または[2]に記載の自然言語処理装置と、を備え、前記モデルは、学習用目的言語文の文数の情報が付加された学習用原言語文のデータと、学習用目的言語文のデータと、の対である学習用データを用いて学習済みであり、前記自然言語処理装置の原言語文供給部は、前記入力原言語文を、前記自然言語処理装置の前記推定部に供給し、前記文数指定部は、前記自然言語処理装置の前記推定部が出力した前記文数情報に基づいて、前記出力用の出力目的言語文の文数の情報を付加する、ものである。 [5] A translation device according to one aspect of the present invention includes a sentence number designation unit that adds, to an input source sentence, information on the number of sentences of an output target language sentence for output corresponding to the input source sentence, a model, and a translation processing unit that outputs an output target language sentence determined by the model by inputting the input source sentence to which the information on the number of sentences of the output target language sentence has been added, into the model, and the natural language processing device described in [1] or [2] above, wherein the model has been trained using training data that is a pair of data on a training source language sentence to which information on the number of sentences of the training target language sentence has been added and data on a training target language sentence, and a source language sentence supply unit of the natural language processing device supplies the input source language sentence to the estimation unit of the natural language processing device, and the sentence number designation unit adds information on the number of sentences of the output target language sentence for output based on the sentence number information output by the estimation unit of the natural language processing device.

[6]また、本発明の一態様は、上記[1]から[3]までのいずれかに記載の自然言語処理装置、としてコンピューターを機能させるためのプログラムである。 [6] Another aspect of the present invention is a program for causing a computer to function as a natural language processing device according to any one of [1] to [3] above.

[7]また、本発明の一態様は、上記[4]または[5]の翻訳装置、としてコンピューターを機能させるためのプログラムである。 [7] Another aspect of the present invention is a program for causing a computer to function as the translation device described above in [4] or [5].

[参考態様]上記[4]において、前記文数推定部は、供給された前記学習用目的言語文に含まれる文末記号の数をカウントすることによって、前記学習用目的言語文に含まれる文数を求める、ものであってもよい。 [Reference embodiment] In the above [4], the sentence number estimation unit may determine the number of sentences contained in the target language sentence for training by counting the number of sentence-final symbols contained in the supplied target language sentence for training.

[参考態様]上記[4]において、前記文数情報付与部は、テキストデータである前記学習用原言語文の先頭部分に、前記学習用目的言語文の文数の情報を付加し、前記文数指定部は、テキストデータである前記入力原言語文の先頭部分に、前記出力目的言語文の文数の情報を付加する、ものであってもよい。 [Reference aspect] In the above [4], the sentence number information adding unit may add information on the number of sentences of the target language sentence for training to the beginning of the source language sentence for training, which is text data, and the sentence number designation unit may add information on the number of sentences of the output target language sentence to the beginning of the input source language sentence, which is text data.

[参考態様]学習用原言語文と学習用目的言語文との対のデータを供給する文対供給部と、供給された前記学習用目的言語文に含まれる文数を求める文数推定部と、前記学習用原言語文に、前記文数推定部が求めた前記文数の情報を付加して、前記学習用目的言語文の文数の情報が付加された前記学習用原言語文のデータを出力する文数情報付与部と、前記学習用目的言語文の文数の情報が付加された学習用原言語文のデータと、前記学習用目的言語文のデータとの対を、学習用データとして供給する学習用データ供給部と、前記学習用データを用いてモデルの学習を行う学習処理部と、を備える学習装置において、文数情報付与部は、[1]や[2]の自然言語処理装置の推定部が推定した文数情報に基づいて、前記文数の情報を付加してもよい。 [Reference embodiment] In a learning device including a sentence pair supplying unit that supplies data of pairs of a training source language sentence and a training target language sentence, a sentence number estimating unit that determines the number of sentences included in the supplied training target language sentence, a sentence number information adding unit that adds the information on the number of sentences determined by the sentence number estimating unit to the training source language sentence and outputs data of the training source language sentence to which the information on the number of sentences of the training target language sentence has been added, a training data supplying unit that supplies pairs of data of the training source language sentence to which the information on the number of sentences of the training target language sentence has been added and data of the training target language sentence as training data, and a learning processing unit that uses the training data to train a model, the sentence number information adding unit may add the information on the number of sentences based on the sentence number information estimated by the estimation unit of the natural language processing device of [1] or [2].

本発明によれば、原言語文を与えたときに、文数推定装置が、その原言語文に対応する目的言語文(翻訳結果)の適切な文数を推定することができる。 According to the present invention, when a source language sentence is given, the sentence number estimation device can estimate the appropriate number of sentences in the target language sentence (translation result) that corresponds to the source language sentence.

また、文数推定装置が推定した文数を指定することによって、翻訳装置が出力する目的言語文(翻訳結果)の文数を制御することができる。 In addition, by specifying the number of sentences estimated by the sentence number estimation device, it is possible to control the number of sentences in the target language sentences (translation results) output by the translation device.

本発明の第1実施形態による文数推定装置の概略機能構成を示すブロック図である。1 is a block diagram showing a schematic functional configuration of a number-of-sentences estimation device according to a first embodiment of the present invention. 同実施形態による文数推定装置が学習モードで動作する場合に、文対供給部が供給するデータの構成例を示す概略図である。11 is a schematic diagram showing an example of the configuration of data supplied by a sentence pair supplying unit when the sentence number estimation device according to the embodiment operates in a learning mode. FIG. 同実施形態による文数推定装置が学習モードで動作する場合に、文数情報付与部が学習用データ供給部に渡すデータの構成例を示す概略図である。11 is a schematic diagram showing an example of the configuration of data that a number-of-sentences information providing unit passes to a learning data supplying unit when the number-of-sentences estimation device according to the embodiment operates in a learning mode. FIG. 同実施形態による文数推定装置が推定実行モードで動作する場合に、原言語文供給部が推定部に渡すデータの構成例を示す概略図である。13 is a schematic diagram showing an example of the structure of data that a source language sentence supply unit passes to an estimation unit when the sentence number estimation device according to the embodiment operates in an estimation execution mode. FIG. 同実施形態による文数推定装置が推定実行モードで動作する場合に、推定部が出力するデータ(推定された文数の情報を含む)の例を示す概略図である。11 is a schematic diagram showing an example of data (including information on the estimated number of sentences) output by the estimation unit when the sentence number estimation device according to the embodiment operates in an estimation execution mode. FIG. 本発明の第2施形態による翻訳装置の概略機能構成を示すブロック図である。FIG. 11 is a block diagram showing a schematic functional configuration of a translation device according to a second embodiment of the present invention. 同実施形態における文対供給部が供給する文対のデータの例を示す概略図である。11 is a schematic diagram showing an example of text pair data supplied by a text pair supplying unit in the embodiment. FIG. 同実施形態における学習用データ供給部が翻訳処理部に渡す学習用データ(文対)の例を示す概略図である。4 is a schematic diagram showing an example of learning data (sentence pairs) that a learning data supply unit in the embodiment passes to a translation processing unit. FIG. 同実施形態における翻訳処理部が機械学習を行うための学習用データを生成する処理の手順を示すフローチャートである。11 is a flowchart showing the procedure of a process for generating learning data for machine learning by a translation processing unit in the embodiment. 同実施形態による翻訳装置の内部構成の例を示すブロック図である。2 is a block diagram showing an example of an internal configuration of the translation device according to the embodiment. FIG. 同実施形態による翻訳装置を用いて翻訳処理を行った結果の例を示す概略図である。11 is a schematic diagram showing an example of a result of a translation process performed by the translation device according to the embodiment. FIG.

次に、本発明の複数の実施形態について、図面を参照しながら説明する。 Next, several embodiments of the present invention will be described with reference to the drawings.

[第1実施形態]
第1実施形態の文数推定装置は、原言語(source language)の文を目的言語(target language)の文に翻訳する際に有用な、文数情報を推定するものである。具体的には、この文数推定装置は、翻訳対象である原言語文が与えられたときに、その原言語文に対応する目的言語文(翻訳結果)の適正な文数を推定するものである。なお、この文数推定装置は、下で説明するように、機械学習可能なモデルを備える。
[First embodiment]
The number-of-sentences estimation device of the first embodiment estimates number-of-sentences information that is useful when translating a sentence in a source language into a sentence in a target language. Specifically, when a source language sentence to be translated is given, this number-of-sentences estimation device estimates an appropriate number of sentences in a target language sentence (translation result) corresponding to the source language sentence. Note that this number-of-sentences estimation device includes a model capable of machine learning, as described below.

なお、以下の説明では、原言語文が日本語の文であり、目的言語文が英語の文である場合の例を用いる。ただし、原言語および目的言語のそれぞれが他の言語であってもよい。原言語および目的言語のそれぞれは、例えば、英語、ドイツ語、日本語、フランス語、ロシア語、スペイン語、イタリア語、中国語、韓国語、あるいはその他の言語であってよい。 In the following explanation, an example is used in which the source language sentence is a Japanese sentence and the target language sentence is an English sentence. However, the source language and the target language may each be another language. The source language and the target language may each be, for example, English, German, Japanese, French, Russian, Spanish, Italian, Chinese, Korean, or another language.

図1は、本実施形態による文数推定装置の概略機能構成を示すブロック図である。図示するように、文数推定装置320は、推定部321と、原言語文供給部322と、文数情報抽出部323と、文対供給部326と、文数情報付与部327と、学習用データ供給部328とを含んで構成される。これらの各機能部は、例えば、コンピューターと、プログラムとで実現することが可能である。また、各機能部は、必要に応じて、記憶手段を有する。記憶手段は、例えば、プログラム上の変数や、プログラムの実行によりアロケーションされるメモリーである。また、必要に応じて、磁気ハードディスク装置やソリッドステートドライブ(SSD)といった不揮発性の記憶手段を用いるようにしてもよい。また、各機能部の少なくとも一部の機能を、プログラムではなく専用の電子回路等として実現してもよい。文数推定装置320を構成する各部の機能については、下で説明する。 1 is a block diagram showing a schematic functional configuration of a sentence number estimation device according to this embodiment. As shown in the figure, the sentence number estimation device 320 includes an estimation unit 321, a source language sentence supply unit 322, a sentence number information extraction unit 323, a sentence pair supply unit 326, a sentence number information assignment unit 327, and a learning data supply unit 328. Each of these functional units can be realized, for example, by a computer and a program. Each functional unit also has a storage means as necessary. The storage means is, for example, a variable in the program or a memory allocated by the execution of the program. Also, non-volatile storage means such as a magnetic hard disk drive or a solid state drive (SSD) may be used as necessary. Also, at least a part of the functions of each functional unit may be realized as a dedicated electronic circuit or the like rather than a program. The functions of each unit constituting the sentence number estimation device 320 will be described below.

なお、文数推定装置320は、学習モードと、推定実行モードとの、いずれかのモードで動作することができる。学習モードで動作する場合には、文数推定装置320は、内部のモデルの機械学習を行う。推定実行モードで動作する場合には、翻訳装置1は、そのときの状態のモデルに基づいて、入力文に合った出力文の文数を推定する処理を行う。 The number of sentences estimation device 320 can operate in either a learning mode or an estimation execution mode. When operating in the learning mode, the number of sentences estimation device 320 performs machine learning of an internal model. When operating in the estimation execution mode, the translation device 1 performs a process of estimating the number of sentences in an output sentence that matches an input sentence, based on the model in the current state.

なお、文数推定装置320は、上記の通りモデルの学習を行う機能を持つ。よって、文数推定装置320を学習装置と呼んでもよい。また、文数推定装置320は、自然言語のデータを処理する機能を持つ。よって、文数推定装置320を自然言語処理装置と呼んでもよい。 Note that the number of sentences estimation device 320 has a function of learning a model as described above. Therefore, the number of sentences estimation device 320 may be called a learning device. Furthermore, the number of sentences estimation device 320 has a function of processing natural language data. Therefore, the number of sentences estimation device 320 may be called a natural language processing device.

推定部321は、入力される原言語文のデータに基づいて、目的言語文(翻訳結果)のデータを出力する。ただし、推定部321は、目的言語文とともに、翻訳結果の適正な文数についての推定値の情報を出力する。推定部321は、機械学習可能なモデルを内部に備える。このモデルは、例えば、ニューラルネットワークを用いて実現される。このモデルとしては、例えば、Transformerなどを使用することができる。推定部321は、ニューラルネットワークの内部パラメーターを記憶する記憶手段を持つ。内部パラメーターの値は更新可能である。 The estimation unit 321 outputs data of the target language sentence (translation result) based on data of the input source language sentence. However, the estimation unit 321 outputs information on an estimated value regarding the appropriate number of sentences in the translation result together with the target language sentence. The estimation unit 321 has an internal model capable of machine learning. This model is realized, for example, using a neural network. For example, a Transformer or the like can be used as this model. The estimation unit 321 has a storage means for storing internal parameters of the neural network. The values of the internal parameters are updatable.

つまり、推定部321は、機械学習可能なモデルを備え、原言語文を入力し、前記原言語文に対応する目的言語文の文数を表す文数情報を少なくとも出力するものである。 In other words, the estimation unit 321 is equipped with a model capable of machine learning, receives a source language sentence as input, and outputs at least sentence count information indicating the number of target language sentences corresponding to the source language sentence.

文数推定装置320が学習モードで稼働する場合には、推定部321は、学習用データ供給部328から渡される大量の学習用データを用いて、内部のモデルの学習を行う。つまり、推定部321は、学習用データに基づいて、モデルの内部パラメーターの値を調整する。学習用データは、原言語文と目的言語文(翻訳結果)との対である。ただし、この対における目的言語文のデータには、出力文数の情報が付加されている。出力文数の情報は、例えば、目的言語文の先頭に付加されたタグ情報である。つまり、推定部321は、機械学習により、入力される原言語文に対応する、適切な出力文数の情報を出力するように訓練される。言い換えれば、推定部321は、機械学習により、そのように内部パラメーターの値を調整する。推定部321が学習のために用いる学習用データについては、後で図3を参照しながら説明する。 When the sentence number estimation device 320 operates in the learning mode, the estimation unit 321 uses a large amount of learning data passed from the learning data supply unit 328 to learn the internal model. That is, the estimation unit 321 adjusts the values of the internal parameters of the model based on the learning data. The learning data is a pair of a source language sentence and a target language sentence (translation result). However, information on the number of output sentences is added to the data of the target language sentence in this pair. The information on the number of output sentences is, for example, tag information added to the beginning of the target language sentence. That is, the estimation unit 321 is trained by machine learning to output information on the appropriate number of output sentences corresponding to the input source language sentence. In other words, the estimation unit 321 adjusts the values of the internal parameters in this way by machine learning. The learning data used by the estimation unit 321 for learning will be described later with reference to FIG. 3.

つまり、学習モードにおいて、推定部321は、学習用データ供給部328が供給する学習用データに基づいて、モデルの機械学習を行う。 In other words, in the learning mode, the estimation unit 321 performs machine learning of the model based on the learning data supplied by the learning data supply unit 328.

文数推定装置320が推定実行モードで稼働する場合には、推定部321は、学習済みのモデルの内部パラメーターに基づいて、原言語文に対応する目的言語文の適切な文数を推定する処理を行う。具体的には、推定部321は、原言語文供給部322から渡される原言語文のデータに基づいて、対応する目的言語文(翻訳結果)の文数の情報を出力する。推定部321は、出力するデータを、文数情報抽出部323に渡す。なお、推定部321は、入力される原言語文に対応する、出力文数の情報と、翻訳結果である目的言語文との情報とを、あわせて文数情報抽出部323に渡すようにしてよい。推定部321が原言語文供給部322から受け取るデータの構成については、後で図4を参照しながら説明する。また、推定部321が文数情報抽出部323に渡すデータの構成については、後で図5を参照しながら説明する。 When the sentence number estimation device 320 operates in the estimation execution mode, the estimation unit 321 performs a process of estimating an appropriate number of sentences of a target language sentence corresponding to a source language sentence, based on the internal parameters of the trained model. Specifically, the estimation unit 321 outputs information on the number of sentences of the corresponding target language sentence (translation result) based on the data of the source language sentence passed from the source language sentence supply unit 322. The estimation unit 321 passes the output data to the sentence number information extraction unit 323. Note that the estimation unit 321 may pass information on the output number of sentences corresponding to the input source language sentence and information on the target language sentence that is the translation result together to the sentence number information extraction unit 323. The structure of the data that the estimation unit 321 receives from the source language sentence supply unit 322 will be described later with reference to FIG. 4. The structure of the data that the estimation unit 321 passes to the sentence number information extraction unit 323 will be described later with reference to FIG. 5.

つまり、推定実行モードにおいて、推定部321は、原言語文供給部322が供給する原言語文に基づいて、当該原言語文に対応する文数情報を出力する。 In other words, in the estimation execution mode, the estimation unit 321 outputs sentence count information corresponding to a source language sentence based on the source language sentence supplied by the source language sentence supply unit 322.

原言語文供給部322は、文数推定装置320が推定実行モードで動作する場合において、翻訳処理の対象である原言語文のデータを、推定部321に供給する。この原言語文のデータは、語の列として表わされる、1個の文のデータである。原言語文供給部322が供給するデータの構成については、後で図4を参照しながら説明する。 When the sentence number estimation device 320 operates in the estimation execution mode, the source language sentence supply unit 322 supplies data of the source language sentence that is the subject of the translation process to the estimation unit 321. This source language sentence data is data of one sentence expressed as a string of words. The structure of the data supplied by the source language sentence supply unit 322 will be described later with reference to FIG. 4.

文数情報抽出部323は、文数推定装置320が推定実行モードで動作する場合において、推定部321が出力するデータから、目的言語文(翻訳結果)の文数情報のみを抽出する。文数情報抽出部323は、得られた文数情報(数値)を、外部に出力する。文数情報抽出部323が抽出した文数のデータは、例えば、翻訳処理の際の出力文数を制御するために使用可能である(第2実施形態を参照)。 When the number of sentences estimation device 320 operates in the estimation execution mode, the number of sentences information extraction unit 323 extracts only the number of sentences information of the target language sentence (translation result) from the data output by the estimation unit 321. The number of sentences information extraction unit 323 outputs the obtained number of sentences information (numerical value) to the outside. The data on the number of sentences extracted by the number of sentences information extraction unit 323 can be used, for example, to control the number of output sentences during the translation process (see the second embodiment).

文対供給部326は、文数推定装置320が学習モードで動作する場合において、原言語文と目的言語文との対を供給する。ここで、目的言語文は、原言語文の翻訳結果に相当する。つまり、この文対は、対訳文対である。文対供給部326は、推定部321の学習のために、大量の文対を供給することができる。文対供給部326が供給するデータの構成例については、後で図2を参照しながら説明する。 When the sentence number estimation device 320 operates in the learning mode, the sentence pair supplying unit 326 supplies pairs of source language sentences and target language sentences. Here, the target language sentences correspond to the translation results of the source language sentences. In other words, these sentence pairs are bilingual sentence pairs. The sentence pair supplying unit 326 can supply a large number of sentence pairs for learning by the estimation unit 321. An example of the configuration of the data supplied by the sentence pair supplying unit 326 will be described later with reference to FIG. 2.

文数情報付与部327は、文対供給部326が供給するデータに、目的言語文の文数の情報を付加する。文数情報付与部327は、文対供給部326から渡される文対における、目的語文データに含まれる文の数をカウントする。文数情報付与部327は、カウントした結果である数値の情報を、タグとして、文対データに付加する。具体的には、文数情報付与部327は、例えば、目的語文の先頭部分に、この文数を表すタグを付加する。文数情報付与部327は、文数の情報を付加した後の文対データを、推定部321の学習に用いられるように、学習用データ供給部328に渡す。 The sentence number information adding unit 327 adds information on the number of sentences in the target language sentence to the data supplied by the sentence pair supplying unit 326. The sentence number information adding unit 327 counts the number of sentences included in the object sentence data in the sentence pair passed from the sentence pair supplying unit 326. The sentence number information adding unit 327 adds numerical information resulting from the count as a tag to the sentence pair data. Specifically, the sentence number information adding unit 327 adds a tag indicating the number of sentences to, for example, the beginning of the object sentence. The sentence number information adding unit 327 passes the sentence pair data after the sentence number information has been added to the learning data supplying unit 328 so that it can be used for learning by the estimation unit 321.

文数情報付与部327は、例えば、目的言語文データにおける文の区切りをカウントすることによって、文数のカウントを行う。文の区切りは、英語文の場合には、例えば、ピリオドや、疑問符や、感嘆符などの文字である。文数情報付与部327は、他の方法によって目的言語文データに含まれる文の数を求めてもよい。一例として、文数情報付与部327は、目的言語文の構文解析処理を行うことによって、目的言語文データに含まれる各文を特定し、文数を決定してよい。 The sentence count information adding unit 327 counts the number of sentences, for example, by counting sentence separators in the target language sentence data. In the case of English sentences, sentence separators are characters such as periods, question marks, and exclamation marks. The sentence count information adding unit 327 may determine the number of sentences included in the target language sentence data by other methods. As one example, the sentence count information adding unit 327 may identify each sentence included in the target language sentence data and determine the number of sentences by performing a syntactic analysis process on the target language sentence.

なお、文数情報付与部327は、人手でカウントした文数に基づいて、その文数を表すタグをデータに付加するものであってもよい。 The sentence count information adding unit 327 may add a tag representing the number of sentences to the data based on a manually counted number of sentences.

文数情報付与部327が学習用データ供給部328に渡すデータの構成例については、後で図3を参照しながら説明する。 An example of the structure of the data that the sentence number information assignment unit 327 passes to the learning data supply unit 328 will be described later with reference to Figure 3.

学習用データ供給部328は、文数情報付与部327から受け取ったデータを、学習用データとして、推定部321に供給する。学習用データ供給部328は、原言語文データと、文数情報が付加された目的言語文データとのそれぞれを、推定部321に渡す。原言語文データは、推定部321が持つモデル(ニューラルネットワーク等)への入力データとして使用される。文数情報が付加された目的言語文データは、例えば誤差逆伝播法を実行するための誤差(loss)を算出するために、推定部321に渡される。なお、誤差逆伝播法等を用いてモデルの機械学習を行う手法自体は、既存技術に属するものである。 The learning data supply unit 328 supplies the data received from the sentence number information attachment unit 327 to the estimation unit 321 as learning data. The learning data supply unit 328 passes both the source language sentence data and the target language sentence data to which the sentence number information has been added to the estimation unit 321. The source language sentence data is used as input data to a model (such as a neural network) held by the estimation unit 321. The target language sentence data to which the sentence number information has been added is passed to the estimation unit 321 to calculate an error (loss) for executing, for example, an error backpropagation method. Note that the method of performing machine learning of a model using an error backpropagation method or the like is itself an existing technology.

つまり、学習用データ供給部328は、学習用原言語文と、前記学習用原言語文に対応する学習用目的言語文と、前記学習用目的言語文の文数を表す学習用文数情報と、を含む学習用データを供給するものである。 In other words, the learning data supply unit 328 supplies learning data including learning source language sentences, learning target language sentences corresponding to the learning source language sentences, and learning sentence number information indicating the number of sentences in the learning target language sentences.

上で説明した各部を備える文数推定装置320による処理について、さらに以下で説明する。 The processing performed by the sentence count estimation device 320, which has the components described above, is described further below.

まず、原言語文データ(日本語テキスト)と目的言語文データ(英語テキスト)とを用意する。ここで、目的言語文データ(英語テキスト)は、原言語文データ(日本語テキスト)の各文を人手で翻訳したものである。すべての原言語文データ(日本語テキスト)と目的言語文データ(英語テキスト)とは、相互に対応付けられている。なお、原言語文データ(日本語テキスト)の1文が、目的言語文データ(英語テキスト)における複数文に対応付く場合もある。 First, source language sentence data (Japanese text) and target language sentence data (English text) are prepared. Here, the target language sentence data (English text) is a manual translation of each sentence in the source language sentence data (Japanese text). All source language sentence data (Japanese text) and target language sentence data (English text) are associated with each other. Note that one sentence in the source language sentence data (Japanese text) may correspond to multiple sentences in the target language sentence data (English text).

上記のデータを文対供給部326が供給する。 The above data is provided by the text pair supply unit 326.

文数情報付与部327は、目的言語文データ(英語テキスト)が、いくつの文を含むかを推定する。言い換えれば、文数情報付与部327は、原言語文データ(日本語テキスト)の1文が対応する英語テキストの文数を推定(カウント)する。文数情報付与部327は、例えば、目的言語文データ(英語テキスト)が含むピリオド(文の区切り)の数を数える。ただし、英語では「Mr.」といった省略形を表現する場合等にもピリオドが使用される。こういった例による文数の誤推定を避けるため、文数情報付与部327は、byte-pair-encodingなどの方法で英文を分割し、ピリオド単体で分割されたものの数を数えるようにしてもよい。 The sentence count information adding unit 327 estimates how many sentences the target language sentence data (English text) contains. In other words, the sentence count information adding unit 327 estimates (counts) the number of sentences in the English text that correspond to one sentence in the source language sentence data (Japanese text). The sentence count information adding unit 327 counts, for example, the number of periods (sentence separators) contained in the target language sentence data (English text). However, periods are also used in English to express abbreviations such as "Mr." In order to avoid erroneous estimation of the number of sentences due to such examples, the sentence count information adding unit 327 may divide the English sentence using a method such as byte-pair-encoding and count the number of sentences divided by a single period.

文数情報付与部327は、各文対の目的言語文データ(英語テキスト)の先頭に、推定結果である文数を表すタグを付与する。文数情報付与部327は、このタグが付いたデータを、推定部321の学習用のデータとして出力する。 The sentence count information adding unit 327 adds a tag indicating the number of sentences, which is the estimation result, to the beginning of the target language sentence data (English text) of each sentence pair. The sentence count information adding unit 327 outputs the data with this tag as learning data for the estimation unit 321.

推定部321は、学習モードでの動作により、上記の学習用データを用いて、モデルの機械学習を行う。学習済みのモデルの情報は、推定部321の内部の記憶手段に保存される。 The estimation unit 321 operates in the learning mode and performs machine learning of the model using the above learning data. Information on the trained model is stored in the internal storage means of the estimation unit 321.

上記のようにして、文数推定装置320は、入力される原言語文に対応する適切な目的言語文の数を推定することができるようになる。 In this manner, the sentence number estimation device 320 becomes able to estimate the appropriate number of target language sentences that correspond to the input source language sentence.

次に、図2、図3、図4、図5を参照しながら、文数推定装置320が処理するデータについて説明する。 Next, we will explain the data processed by the sentence count estimation device 320 with reference to Figures 2, 3, 4, and 5.

図2は、文数推定装置320が学習モードで動作する場合に、文対供給部326が供給するデータの構成例を示す概略図である。図示するように、文対供給部326が供給するデータは、原言語文(日本語文)と目的言語文(英語文)の対のデータである。この原言語文と目的言語文の対は、対訳文対である。本例では、原言語文(日本語文)は「全国一の生産量を誇る広島特産のカキを夏にも観光客らに楽しんでもらおうと、広島県は新たに生食用のカキを開発し、16日、関係者を集めて試食会を開きました。」である。また、目的言語文(英語文)は、「Hiroshima is the number one producer of oysters in the country. The prefecture has newly developed oysters for eating raw so that tourists can enjoy oysters, a specialty of Hiroshima, also in summer. Officials held a tasting event on July 16, inviting people concerned.」である。 FIG. 2 is a schematic diagram showing an example of the configuration of data supplied by the sentence pair supply unit 326 when the sentence number estimation device 320 operates in the learning mode. As shown in the figure, the data supplied by the sentence pair supply unit 326 is data of a pair of a source language sentence (Japanese sentence) and a target language sentence (English sentence). This pair of a source language sentence and a target language sentence is a bilingual sentence pair. In this example, the source language sentence (Japanese sentence) is "Hiroshima prefecture has developed new oysters for eating raw so that tourists can enjoy oysters, a specialty of Hiroshima, which boasts the highest production volume in the country, even in the summer. Officials held a tasting event on July 16, inviting people concerned." The target language sentence (English sentence) is "Hiroshima is the number one producer of oysters in the country. The prefecture has newly developed oysters for eating raw so that tourists can enjoy oysters, a specialty of Hiroshima, also in summer. Officials held a tasting event on July 16, inviting people concerned."

文対供給部326から図2のデータを受け取った場合、文数情報付与部327は、その文対データにおける目的語文の文数の情報を付加する。 When the data in FIG. 2 is received from the sentence pair supply unit 326, the sentence number information adding unit 327 adds information on the number of object sentences in the sentence pair data.

図3は、文数推定装置320が学習モードで動作する場合に、文数情報付与部327が学習用データ供給部328に渡すデータの構成例を示す概略図である。図示するように、文数情報付与部327が出力するデータには、当該文対における目的言語文の文数の情報が付加されている。具体的には、このデータは、目的言語文の先頭の部分に<3>というタグ情報を持っている。この「3」は、目的言語文「Hiroshima is the number one・・・(以下省略)」に含まれる文の数を表す。 Figure 3 is a schematic diagram showing an example of the configuration of data that the sentence number information adding unit 327 passes to the learning data supply unit 328 when the sentence number estimation device 320 operates in learning mode. As shown in the figure, the data output by the sentence number information adding unit 327 has information on the number of sentences in the target language sentence in the sentence pair added to it. Specifically, this data has tag information <3> at the beginning of the target language sentence. This "3" represents the number of sentences included in the target language sentence "Hiroshima is the number one... (omitted)".

図3に示すデータは、推定部321が持つモデルの学習を行う際に、学習用データ供給部328が推定部321に対して供給するものである。つまり、推定部321が持つモデルは、目的言語文の先頭に文数の情報が付加された状態での対訳文対による機械学習を行う。つまり、目的言語文自体の情報とともに、目的言語文の文数の情報が、そのモデルが持つ内部パラメーターの調整に作用を及ぼす。言い換えれば、推定部321が持つモデルがニューラルネットワークを用いて構成される場合には、目的言語文の文数(図3のデータの場合には「3」)が、誤差逆伝播法を用いたときに、そのニューラルネットワークの内部パラメーターの値の更新に影響する。 The data shown in FIG. 3 is supplied to the estimation unit 321 by the learning data supply unit 328 when the model held by the estimation unit 321 is trained. In other words, the model held by the estimation unit 321 performs machine learning using a bilingual sentence pair with information on the number of sentences added to the beginning of the target language sentence. In other words, information on the number of sentences in the target language sentence, together with information on the target language sentence itself, affects the adjustment of the internal parameters of the model. In other words, when the model held by the estimation unit 321 is constructed using a neural network, the number of sentences in the target language sentence ("3" in the case of the data in FIG. 3) affects the update of the values of the internal parameters of the neural network when the backpropagation method is used.

図4は、文数推定装置320が推定実行モードで動作する場合に、原言語文供給部322が推定部321に渡すデータの構成例を示す概略図である。図示するように、このデータは、翻訳対象である原言語文のデータである。図4に示すデータ自体は、翻訳結果である目的言語文の文数に関する情報を持たない。本例では、原言語文は、図2における原言語文の「全国一の生産量を誇る広島特産のカキを・・・(以下省略)」と同一である。ただし、原言語文供給部322が推定部321に渡す文は、原言語(ここでは、日本語)で記述された任意の文であってよい。 Figure 4 is a schematic diagram showing an example of the configuration of data that the source language sentence supply unit 322 passes to the estimation unit 321 when the sentence number estimation device 320 operates in the estimation execution mode. As shown in the figure, this data is data on the source language sentence to be translated. The data shown in Figure 4 itself does not have information regarding the number of sentences in the target language sentence, which is the translation result. In this example, the source language sentence is the same as the source language sentence in Figure 2, "Oysters, a specialty of Hiroshima, boast the highest production volume in the country... (omitted)." However, the sentence that the source language sentence supply unit 322 passes to the estimation unit 321 may be any sentence written in the source language (here, Japanese).

図5は、文数推定装置320が推定実行モードで動作する場合に、推定部321が出力するデータの例を示す概略図である。図5のデータは、図4のデータが入力された場合に推定部321が出力するデータの例である。図示するように、図5のデータは、翻訳結果である目的言語(ここでは、英語)の文を含むとともに、その先頭に数値情報のタグを付加したものである。本例では、そのタグは<3>である。このタグは、目的言語文の文数の推定結果を表す数値を表す。文数の情報は、多数の学習用データに基づいて学習済みのモデルが生成したものである。 Figure 5 is a schematic diagram showing an example of data output by the estimation unit 321 when the sentence number estimation device 320 operates in the estimation execution mode. The data in Figure 5 is an example of data output by the estimation unit 321 when the data in Figure 4 is input. As shown, the data in Figure 5 includes a sentence in the target language (English in this case) that is the translation result, and has a tag of numerical information added to the beginning of the sentence. In this example, the tag is <3>. This tag represents a number that indicates the estimation result of the number of sentences in the target language sentence. The information on the number of sentences is generated by a trained model based on a large amount of training data.

推定部321が図5のデータを出力すると、文数情報抽出部323は、このデータから文数情報を抽出する。具体的には、文数情報抽出部323は、図5のデータの先頭の<3>というタグに基づき、文数「3」を抽出する。文数情報抽出部323は、抽出した文数情報(たとえば、3)を外部に抽出する。 When the estimation unit 321 outputs the data in FIG. 5, the sentence number information extraction unit 323 extracts sentence number information from this data. Specifically, the sentence number information extraction unit 323 extracts the sentence number "3" based on the tag <3> at the beginning of the data in FIG. 5. The sentence number information extraction unit 323 externally extracts the extracted sentence number information (for example, 3).

以上説明したように、本実施形態の文数推定装置320によれば、入力される原言語文に応じて、適切な目的言語文(前記原言語文の翻訳結果)の文数を推定することができるようになる。また、推定された文数の情報を用いて、次に説明する第2実施形態の翻訳装置1が、その文数(またはそれに近い文数)の翻訳結果を出力することができるようになる。 As described above, the sentence number estimation device 320 of this embodiment makes it possible to estimate the appropriate number of sentences in a target language sentence (the translation result of the source language sentence) according to the input source language sentence. Furthermore, by using information on the estimated number of sentences, the translation device 1 of the second embodiment described next becomes able to output a translation result of that number of sentences (or a number of sentences close to that number).

第1実施形態の変形例として、文数推定装置320が、学習済みのモデルを用いて、原言語文に対応する目的言語文の出力文数を推定するようにしてもよい。この場合には、文数推定装置320は、モデルの学習を行うための機能を必要としない。また、別の変形例として、文数推定装置320が、モデルの学習のみを行うようにしてもよい。このように学習したモデルを、他の装置に移植することができる。この場合には、文数推定装置320は、モデルの学習を行うための機能のみを備えれば十分であり、実際に出力文数を推定するための機能を必要としない。 As a variation of the first embodiment, the number of sentences estimation device 320 may use a trained model to estimate the number of output sentences of a target language sentence corresponding to a source language sentence. In this case, the number of sentences estimation device 320 does not need a function for training the model. As another variation, the number of sentences estimation device 320 may only train the model. The model trained in this way can be ported to other devices. In this case, it is sufficient for the number of sentences estimation device 320 to have only the function for training the model, and does not need a function for actually estimating the number of output sentences.

なお、コンピューターおよびプログラムを用いて文数推定装置320を実現することが可能である。コンピューターおよびプログラムを用いて文数推定装置320を実現する具体的な方法については、次の第2実施形態の中で説明する。本実施形態の文数推定装置320は、第2実施形態における文数推定部32に相当する装置である。 It is possible to realize the number-of-sentences estimation device 320 using a computer and a program. A specific method for realizing the number-of-sentences estimation device 320 using a computer and a program will be described in the following second embodiment. The number-of-sentences estimation device 320 of this embodiment is a device equivalent to the number-of-sentences estimation unit 32 in the second embodiment.

[第2実施形態]
次に、本発明の第2実施形態について説明する。なお、前実施形態において既に説明した事項については以下において説明を省略する場合がある。ここでは、本実施形態に特有の事項を中心に説明する。
[Second embodiment]
Next, a second embodiment of the present invention will be described. Note that the description of the matters already described in the previous embodiment may be omitted. Here, the description will be centered on matters unique to this embodiment.

本実施形態は自然言語で記述された文の翻訳処理を行う翻訳装置に係るものである。翻訳処理の入力側の文は、原言語(source language)で記述されている。翻訳処理の出力側の文は、目的言語(target language)で記述されるものである。原言語および目的言語のそれぞれは、例えば、英語、ドイツ語、日本語、フランス語、ロシア語、スペイン語、イタリア語、中国語、韓国語、あるいはその他の言語である。基本的には、翻訳処理において原言語の種類と目的言語の種類とは異なるものである。但し、原言語の種類と目的言語の種類とが同一であってもよい。 This embodiment relates to a translation device that performs translation processing of a sentence written in a natural language. The sentence on the input side of the translation processing is written in a source language. The sentence on the output side of the translation processing is written in a target language. The source language and the target language are, for example, English, German, Japanese, French, Russian, Spanish, Italian, Chinese, Korean, or other languages. Basically, the type of source language and the type of target language in the translation processing are different. However, the type of source language and the type of target language may be the same.

図6は、本実施形態による翻訳装置の概略機能構成を示すブロック図である。図示するように、翻訳装置1は、原言語文入力部21と、文数指定部22と、翻訳処理部23と、翻訳結果出力部24と、文対供給部31と、文数推定部32と、文数情報付与部33と、学習用データ供給部34とを含んで構成される。これらの各機能部は、例えば、コンピューターと、プログラムとで実現することが可能である。また、各機能部は、必要に応じて、記憶手段を有する。記憶手段は、例えば、プログラム上の変数や、プログラムの実行によりアロケーションされるメモリーである。また、必要に応じて、磁気ハードディスク装置やソリッドステートドライブ(SSD)といった不揮発性の記憶手段を用いるようにしてもよい。また、各機能部の少なくとも一部の機能を、プログラムではなく専用の電子回路等として実現してもよい。 FIG. 6 is a block diagram showing the schematic functional configuration of the translation device according to this embodiment. As shown in the figure, the translation device 1 includes a source language sentence input unit 21, a sentence number designation unit 22, a translation processing unit 23, a translation result output unit 24, a sentence pair supply unit 31, a sentence number estimation unit 32, a sentence number information assignment unit 33, and a learning data supply unit 34. Each of these functional units can be realized, for example, by a computer and a program. Each functional unit also has a storage unit as necessary. The storage unit is, for example, a variable in the program or a memory allocated by the execution of the program. Also, non-volatile storage units such as a magnetic hard disk device or a solid state drive (SSD) may be used as necessary. Also, at least a part of the functions of each functional unit may be realized as a dedicated electronic circuit or the like rather than a program.

なお、翻訳装置1は、学習モードと、翻訳実行モードとの、いずれかのモードで動作することができる。学習モードで動作する場合には、翻訳装置1は、内部のモデルの機械学習を行う。翻訳実行モードで動作する場合には、翻訳装置1は、そのときの状態のモデルに基づいて、自然言語の翻訳処理を行う。 The translation device 1 can operate in either a learning mode or a translation execution mode. When operating in the learning mode, the translation device 1 performs machine learning of an internal model. When operating in the translation execution mode, the translation device 1 performs natural language translation processing based on the model in the current state.

なお、翻訳装置1は、上記の通りモデルの学習を行う機能を持つ。よって、翻訳装置1を学習装置と呼んでもよい。また、翻訳装置1は、自然言語のデータを処理する機能を持つ。よって、翻訳装置1を自然言語処理装置と呼んでもよい。 Note that translation device 1 has a function for learning a model as described above. Therefore, translation device 1 may be called a learning device. Translation device 1 also has a function for processing natural language data. Therefore, translation device 1 may be called a natural language processing device.

原言語文入力部21、文数指定部22、翻訳処理部23、翻訳結果出力部24という直列のつながりは、翻訳装置1が翻訳実行モードで動作するときの処理の流れに対応する。以下では、原言語文入力部21、文数指定部22、翻訳処理部23、翻訳結果出力部24の各部の機能を、翻訳実行モードで動作と関連付けて説明する。 The serial connection of the source language sentence input unit 21, the sentence number designation unit 22, the translation processing unit 23, and the translation result output unit 24 corresponds to the processing flow when the translation device 1 operates in the translation execution mode. Below, the functions of each of the source language sentence input unit 21, the sentence number designation unit 22, the translation processing unit 23, and the translation result output unit 24 will be explained in relation to their operation in the translation execution mode.

原言語文入力部21は、翻訳対象である原言語文を取得し、文数指定部22に渡す。原言語文入力部21は、原言語文を、例えば外部から取得したり、翻訳装置1からアクセス可能な記憶部から読み出したりする。原言語文は、例えば、テキストデータとして翻訳装置1内で存在する。ここで入力される原言語文を、入力原言語文と呼ぶ。また、この入力原言語文に対応する出力用の目的言語文(翻訳結果)を出力目的言語文と呼ぶ。 The source language sentence input unit 21 acquires the source language sentence to be translated and passes it to the sentence number designation unit 22. The source language sentence input unit 21 acquires the source language sentence, for example, from an external source, or reads it from a storage unit accessible to the translation device 1. The source language sentence exists, for example, as text data within the translation device 1. The source language sentence input here is called the input source language sentence. Also, the target language sentence for output (translation result) corresponding to this input source language sentence is called the output target language sentence.

文数指定部22は、原言語文入力部21から受け取った原言語文を翻訳した結果における、目的言語文の文数を指定する。文数指定部22は、例えば、外部から取得した数値や、翻訳装置1内の所定の記憶部から読み出した数値等に基づいて、目的言語文の文数を指定する。文数指定部22は、目的言語文の文数の情報を、前記原言語文に付加する。文数指定部22は、目的言語文の文数の情報を付加した状態の原言語文を、翻訳処理部23に渡す。文数指定部22が目的言語文の文数の情報を原言語文に付加する具体的な方法の例については、後述する。つまり、文数指定部22は、入力された入力原言語文に、当該入力原言語文に対応する出力用の出力目的言語文の文数の情報を付加して、翻訳処理部23に渡す。 The number of sentences designation unit 22 designates the number of sentences in the target language sentence resulting from translating the source language sentence received from the source language sentence input unit 21. The number of sentences designation unit 22 designates the number of sentences in the target language sentence based on, for example, a numerical value acquired from an external source or a numerical value read from a predetermined storage unit in the translation device 1. The number of sentences designation unit 22 adds information on the number of sentences in the target language sentence to the source language sentence. The number of sentences designation unit 22 passes the source language sentence with the information on the number of sentences in the target language sentence added to the translation processing unit 23. An example of a specific method in which the number of sentences designation unit 22 adds the information on the number of sentences in the target language sentence to the source language sentence will be described later. In other words, the number of sentences designation unit 22 adds information on the number of sentences in the output target language sentence for output corresponding to the input source language sentence to the input source language sentence, and passes the result to the translation processing unit 23.

文数指定部22は、後で例示するように、テキストデータである入力原言語文の先頭部分に、出力目的言語文の文数の情報を付加してよい。この場合、学習用データにおいても、原言語文の先頭部分に目的言語文の文数の情報を付加するようにする。原言語文の先頭に文数の情報を付加することにより、原言語文のテキストが可変長であっても、文数の情報は常に固定の位置に付加される。これは、文数の情報に基づく機械学習を行う際に有利である。 As exemplified later, the sentence number designation unit 22 may add information about the number of sentences in the output target language sentence to the beginning of the input source language sentence, which is text data. In this case, information about the number of sentences in the target language sentence is also added to the beginning of the source language sentence in the learning data. By adding information about the number of sentences to the beginning of the source language sentence, the information about the number of sentences is always added to a fixed position even if the text of the source language sentence is of variable length. This is advantageous when performing machine learning based on information about the number of sentences.

翻訳処理部23は、入力される原言語文を基に、翻訳処理を行い、目的言語文を出力する。翻訳処理部23は、内部に翻訳用のモデルを持っている。このモデルは、学習用データを用いて学習可能なものである。モデルは、例えば、ニューラルネットワークを用いて実現される。より具体的には、モデルは、RNN(再帰型ニューラルネットワーク、Recurrent Neural Network)や、Transformer(トランスフォーマー)等を用いて実現されてよい。ただし、モデルを実現するための具体的な構成は、ここに例示したものには限定されない。なお、ここで挙げたニューラルネットワーク、RNN、Transformerといった技術自体は、利用可能な既存技術である。翻訳処理部23の内部のモデルが適切に学習されていた場合、翻訳処理部23は、入力される原言語文の翻訳文である目的言語文(複数の文である場合もある)を生成して出力することが期待される。また、翻訳処理部23の内部のモデルが適切に学習されていた場合、翻訳処理部23は、文数指定部22によって指定された数の(あるいは少なくとも、指定された数に近い数の)目的言語文を生成して出力することが期待される。つまり、翻訳処理部23は、モデルを備え、学習用データを用いてそのモデルの学習を行うとともに、出力目的言語文の文数の情報を付加した入力原言語文を、モデルに入力することによって、モデルが求めた出力目的言語文を出力するものである。また、翻訳処理部23は、上記の通りモデルの学習を行うものであり、「学習処理部」と呼んでもよい。 The translation processing unit 23 performs translation processing based on the input source language sentence, and outputs a target language sentence. The translation processing unit 23 has an internal translation model. This model can be trained using training data. The model is realized, for example, using a neural network. More specifically, the model may be realized using an RNN (Recurrent Neural Network) or a Transformer. However, the specific configuration for realizing the model is not limited to the example shown here. The technologies themselves, such as the neural network, RNN, and Transformer, listed here, are existing technologies that can be used. If the internal model of the translation processing unit 23 has been properly trained, the translation processing unit 23 is expected to generate and output a target language sentence (which may be multiple sentences) that is a translation of the input source language sentence. Furthermore, if the model inside the translation processing unit 23 has been properly trained, the translation processing unit 23 is expected to generate and output the number of target language sentences specified by the sentence number designation unit 22 (or at least a number close to the specified number). In other words, the translation processing unit 23 is provided with a model, trains the model using training data, and outputs the output target language sentence determined by the model by inputting an input source language sentence to which information on the number of sentences in the output target language sentence has been added into the model. Furthermore, the translation processing unit 23 trains the model as described above, and may be called a "training processing unit."

なお、翻訳処理部23の、学習モードにおける動作と、翻訳実行モードにおける動作とは、次の通りである。 The operation of the translation processing unit 23 in the learning mode and in the translation execution mode is as follows:

学習モードにおいては、翻訳処理部23は、学習用データ供給部34から提供される学習用データに基づいて、モデルの学習処理を行う。学習用データは、モデルへの入力データと出力データとの対の集合である。本実施形態において、モデルへの入力データは、出力データである目的言語文の文数(推定値)が付加された、原言語文のテキストデータである。また、学習用データに含まれる出力データは、目的言語文の正解のテキストデータである。ニューラルネットワークで実現されているモデルは、この入力データを基に、ネットワークの各ノードでの演算を行い、出力データを求める。モデルが求めた出力データは、目的言語文に対応するものである。翻訳処理部23は、入力データに基づいてモデルが算出した出力データ(推定データ)と、学習用データ内の出力データとの、差(ロス)を算出する。そして、翻訳処理部23は、算出された差に基づいて、誤差逆伝播法(バックプロパゲーション)によりモデルの内部パラメーターを更新する。誤差逆伝播法によるニューラルネットワークの内部パラメーターの更新は、既存の技術により実行可能である。翻訳処理部23は、更新後のモデルの内部パラメーターの値を、適宜、記憶部(不図示)に書き込む。翻訳処理部23は、学習用データに含まれる多数の文対のそれぞれについてこのような処理を繰り返すことにより、モデルの学習を行う。 In the learning mode, the translation processing unit 23 performs a learning process for the model based on the learning data provided by the learning data supply unit 34. The learning data is a set of pairs of input data and output data to the model. In this embodiment, the input data to the model is text data of the source language sentence to which the number of sentences (estimated value) of the target language sentence, which is the output data, is added. The output data included in the learning data is the correct text data of the target language sentence. The model realized by the neural network performs calculations at each node of the network based on this input data to obtain output data. The output data obtained by the model corresponds to the target language sentence. The translation processing unit 23 calculates the difference (loss) between the output data (estimated data) calculated by the model based on the input data and the output data in the learning data. Then, the translation processing unit 23 updates the internal parameters of the model by the backpropagation method based on the calculated difference. Updating the internal parameters of the neural network by the backpropagation method can be performed by existing technology. The translation processing unit 23 writes the updated internal parameter values of the model to a storage unit (not shown) as appropriate. The translation processing unit 23 learns the model by repeating this process for each of the many sentence pairs included in the training data.

翻訳処理部23が翻訳実行モードで動作する場合には、少なくとも所定量の学習処理が完了していることが前提である。翻訳実行モードにおいては、翻訳処理部23は、文数指定部22から渡される入力データを受け取る。この入力データは、原言語文のテキストデータと、文数を指定するデータ(例えば、タグとして表現された数値)とを含む。翻訳処理部23は、入力データを基に、モデル内部の演算を行い、モデルからの出力データを求める。なお、翻訳処理部23は、必要に応じてモデル内部のパラメーター(学習済みのパラメーター集合の値)を記憶部(不図示)等から読み出してよい。翻訳処理部23が求めた出力データは、翻訳結果としての目的言語文のテキストであることが期待される。翻訳処理部23は、その出力データ(目的言語文)を、翻訳結果出力部24に渡す。 When the translation processing unit 23 operates in the translation execution mode, it is assumed that at least a predetermined amount of learning processing has been completed. In the translation execution mode, the translation processing unit 23 receives input data passed from the sentence number designation unit 22. This input data includes text data of the source language sentence and data specifying the number of sentences (for example, a numerical value expressed as a tag). The translation processing unit 23 performs calculations within the model based on the input data, and obtains output data from the model. Note that the translation processing unit 23 may read parameters within the model (values of a learned parameter set) from a storage unit (not shown) or the like as necessary. The output data obtained by the translation processing unit 23 is expected to be the text of the target language sentence as the translation result. The translation processing unit 23 passes the output data (target language sentence) to the translation result output unit 24.

翻訳結果出力部24は、翻訳処理部23から出力される目的言語文を外部に出力する。
翻訳結果出力部24は、翻訳結果の目的言語文を、例えば、外部装置に向けて送信したり、ディスプレイ装置に表示したり、記録媒体(ハードディスクや、半導体メモリー等)に記録したり、などといった形で出力する。翻訳結果出力部24が、その他の形態で目的言語文を出力してもよい。
The translation result output unit 24 outputs the target language sentence output from the translation processing unit 23 to the outside.
The translation result output unit 24 outputs the target language sentence as the translation result, for example, by transmitting it to an external device, displaying it on a display device, recording it on a recording medium (such as a hard disk or semiconductor memory), etc. The translation result output unit 24 may also output the target language sentence in other forms.

文対供給部31、文数推定部32、文数情報付与部33、学習用データ供給部34という機能群は、翻訳装置1の学習モードで使用するための学習用データを生成して、翻訳処理部23内のモデルに供給するための機能群である。以下では、文対供給部31、文数推定部32、文数情報付与部33、学習用データ供給部34の各部の機能を、学習用データの生成の動作と関連付けて説明する。 The functional group consisting of the sentence pair supply unit 31, the sentence number estimation unit 32, the sentence number information assignment unit 33, and the learning data supply unit 34 is a functional group for generating learning data to be used in the learning mode of the translation device 1 and supplying it to the model in the translation processing unit 23. Below, the functions of each of the sentence pair supply unit 31, the sentence number estimation unit 32, the sentence number information assignment unit 33, and the learning data supply unit 34 will be explained in relation to the operation of generating learning data.

文対供給部31は、原言語文と目的言語文との対(文対)を供給する。ここでの原言語文を学習用言語文と呼ぶ。また、ここでの目的言語文を学習用目的言語文と呼ぶ。つまり、文対供給部31は、学習用原言語文と学習用目的言語文との対のデータを供給するものである。文対供給部31は、例えば外部から取得した文対や、翻訳装置1内の記憶部(不図示)等から読み出した文対を、1対ずつ処理して、文数推定部32、文数情報付与部33、学習用データ供給部34に渡す。具体的には、文対供給部31は、文対内の原言語文を、文数情報付与部33に渡す。また、文対供給部31は、文対内の目的言語文を、文数推定部32と、学習用データ供給部34とに渡す。 The sentence pair supplying unit 31 supplies pairs (sentence pairs) of source language sentences and target language sentences. The source language sentences here are referred to as learning language sentences. The target language sentences here are referred to as learning target language sentences. In other words, the sentence pair supplying unit 31 supplies data of pairs of learning source language sentences and learning target language sentences. The sentence pair supplying unit 31 processes sentence pairs acquired from the outside, or sentence pairs read from a storage unit (not shown) in the translation device 1, one pair at a time, and passes them to the sentence number estimation unit 32, sentence number information assignment unit 33, and learning data supplying unit 34. Specifically, the sentence pair supplying unit 31 passes the source language sentences in the sentence pair to the sentence number information assignment unit 33. The sentence pair supplying unit 31 also passes the target language sentences in the sentence pair to the sentence number estimation unit 32 and learning data supplying unit 34.

文対供給部31が供給する文対は、同じ意味を持つ原言語文と目的言語文との対である。言い換えれば、ある文対内において、原言語文を翻訳した結果が目的言語文である。また、基本的にたいていの場合において、ある文対内において、目的言語文を翻訳した結果は原言語文であり得る。ある文対内における原言語文は、1つまたは複数の文であってよい。また、ある文対内における目的言語文は、1つまたは複数の文であってよい。このような文対は、既存の言語コーパスを基に得ることができる。あるいは、原言語文を人手で翻訳することによって目的言語文を得て、これら両者を文対としてもよい。 The sentence pairs supplied by the sentence pair supply unit 31 are pairs of source language sentences and target language sentences that have the same meaning. In other words, within a sentence pair, the result of translating a source language sentence is the target language sentence. Basically, in most cases, the result of translating a target language sentence within a sentence pair can be the source language sentence. The source language sentence within a sentence pair may be one or more sentences. The target language sentence within a sentence pair may be one or more sentences. Such sentence pairs can be obtained based on an existing language corpus. Alternatively, a target language sentence can be obtained by manually translating a source language sentence, and the two can be used as a sentence pair.

なお、文対を構成する際に、原言語と目的言語の対は、学習しようとするモデルに整合するものとする。翻訳用のモデル(翻訳処理部23の内部のモデル)に整合する限りにおいて、原言語の種類や目的言語の種類は任意である。一例として、翻訳装置1に日英翻訳の処理を行わせるためには、原言語を日本語とし、目的言語を英語とする。 When constructing a sentence pair, the pair of source language and target language is assumed to match the model to be learned. The type of source language and the type of target language are arbitrary as long as they match the model for translation (the model inside the translation processing unit 23). As an example, to have the translation device 1 perform Japanese-English translation processing, the source language is Japanese and the target language is English.

文数推定部32は、文対供給部31から供給された目的言語文に含まれる文の数を推定し、出力する。つまり、文数推定部32は、ある文対における学習用目的言語文に含まれる文数を求める。文数推定部32は、目的言語の種類に応じた方法を用いて文の数を推定する。例えば、文数推定部32は、欧米系の言語(英語、フランス語、ドイツ語等)に関しては、一文の終わりはピリオドやクエスションマークで終わるという特徴に基づいて、ピリオドやクエスションマークの数を数えることにより、文数を推定する。ただし、ピリオドやクエスションマークは、文末以外において現れる場合もある。例えば英語における「Mr.」(「mister」の省略表記)といった表現にピリオドが含まれるが、この例におけるピリオドは文末であることを表さない。このため、文数推定部32は、推定精度を上げるため、他の方法を用いてもよい。 The sentence number estimation unit 32 estimates and outputs the number of sentences included in the target language sentences supplied from the sentence pair supply unit 31. That is, the sentence number estimation unit 32 obtains the number of sentences included in the learning target language sentence in a certain sentence pair. The sentence number estimation unit 32 estimates the number of sentences using a method according to the type of target language. For example, for Western languages (English, French, German, etc.), the sentence number estimation unit 32 estimates the number of sentences by counting the number of periods and question marks based on the characteristic that a sentence ends with a period or a question mark. However, periods and question marks may appear other than at the end of a sentence. For example, an expression such as "Mr." (an abbreviation of "mister") in English includes a period, but the period in this example does not indicate that it is the end of a sentence. For this reason, the sentence number estimation unit 32 may use other methods to improve the estimation accuracy.

例えば、文数推定部32は、バイト対符号化(Byte pair encoding、BPE)の手法を用いて、目的言語文(例えば、英語文)を分割する。バイト対符号化の手法自体は、既存技術である。文数推定部32は、例えば、バイト対符号化によってピリオドが単体で分割された場合のピリオドの数を数えることにより、文数を推定する。 For example, the sentence count estimation unit 32 divides a target language sentence (e.g., an English sentence) using a byte pair encoding (BPE) technique. The byte pair encoding technique itself is an existing technology. The sentence count estimation unit 32 estimates the number of sentences, for example, by counting the number of periods when periods are divided individually by byte pair encoding.

また、例えば、文数推定部32は、目的言語文の構文解析処理を行うことにより、文数を推定してもよい。例えば、目的言語が英語である場合、目的言語文の一文は、SV、SVO、SVC、SVOCなどといった基本構造を持つ。ここで、Sは主語、Vは述語、Oは目的語、Cは補語である。文数推定部32は、このような構文解析結果に基づいて、文数を数え上げ、その結果を推定された文数とする。英語以外の各言語においても、基本的に、構文解析処理による文数の推定は有効である。なお、さらに推定精度を上げるため、文数推定部32は、構文解析の結果と、ピリオドやクエスションマークの数との、両方に基づいて文数を推定するようにしてもよい。 For example, the sentence count estimation unit 32 may estimate the number of sentences by performing a syntactic analysis process on the target language sentence. For example, when the target language is English, one target language sentence has a basic structure such as SV, SVO, SVC, SVOC, etc. Here, S is the subject, V is the predicate, O is the object, and C is the complement. The sentence count estimation unit 32 counts up the number of sentences based on such a syntactic analysis result, and the result is the estimated number of sentences. In each language other than English, the estimation of the number of sentences by the syntactic analysis process is basically effective. Note that, in order to further improve the estimation accuracy, the sentence count estimation unit 32 may estimate the number of sentences based on both the result of the syntactic analysis and the number of periods and question marks.

また、例えば、文数推定部32は、目的言語文に対応して外部から与えられる数値を、文数の推定結果としてもよい。例えば、人が判断することによって、目的言語文ごとにその文数を入力し、文数推定部32がその数値を文数の推定結果としてもよい。あるいは、目的言語文に対応付けて記憶部(不図示)等に記憶されている数値を、文数推定部32が読み出して、文数の推定結果としてもよい。 For example, the number of sentences estimation unit 32 may take a numerical value provided from outside in correspondence with the target language sentence as the estimated result of the number of sentences. For example, the number of sentences for each target language sentence may be input by a person through judgment, and the number of sentences estimation unit 32 may take that numerical value as the estimated result of the number of sentences. Alternatively, the number of sentences estimation unit 32 may read out a numerical value stored in a memory unit (not shown) or the like in correspondence with the target language sentence, and use that numerical value as the estimated result of the number of sentences.

例えば英語における前述のピリオドやクエスションマーク等は、文末であることを示す記号である。このように文末であることを示す記号を、文末記号と呼ぶ。例えば日本語においては、句点(まる)やピリオドは、文末記号である。また、他の言語においても、文末記号に基づいて、文数推定部32は、文数を求めてもよいつまり、文数推定部32は、供給された前記学習用目的言語文に含まれる文末記号の数をカウントすることによって、学習用目的言語文に含まれる文数を求めてよい。 For example, the aforementioned periods and question marks in English are symbols that indicate the end of a sentence. Symbols that indicate the end of a sentence like this are called sentence-ending symbols. For example, in Japanese, full stops and periods are sentence-ending symbols. Also, in other languages, the sentence number estimation unit 32 may determine the number of sentences based on sentence-ending symbols. In other words, the sentence number estimation unit 32 may determine the number of sentences included in the target language sentence for training by counting the number of sentence-ending symbols included in the target language sentence for training that is supplied.

文数情報付与部33は、文対供給部31から原言語文を受け取るとともに、文数推定部32から目的言語文の文数(上記の推定値)を受け取る。文数情報付与部33は、文対供給部31から受け取った原言語文のデータに、文数推定部32から受け取った文数の情報を付加して、出力する。つまり、文数情報付与部33は、学習用原言語文に、文数推定部32が求めた文数の情報を付加して、学習用目的言語文の文数の情報が付加された学習用原言語文のデータを出力する。文数情報付与部33は、目的言語文の文数(推定値)の情報が付加された原言語文のデータを、学習用データ供給部34に渡す。文数情報付与部33が文数の情報を付加する方法の一例は、目的言語文の文数を表すタグを、原言語文のテキストに付加することである。なお、文数情報付与部33は、テキストデータである学習用原言語文の先頭部分に、学習用目的言語文の文数の情報を付加してよい。文数情報付与部33が文数の情報を付加する位置は、文数指定部22のそれに合わせる。原言語文の先頭部分に文数の情報を付加することの利点は、既に説明した通りである。 The number of sentences information adding unit 33 receives the source language sentence from the sentence pair supplying unit 31, and receives the number of sentences of the target language sentence (the above-mentioned estimated value) from the sentence number estimating unit 32. The sentence number information adding unit 33 adds the number of sentences information received from the sentence number estimating unit 32 to the data of the source language sentence received from the sentence pair supplying unit 31, and outputs the data. In other words, the sentence number information adding unit 33 adds the number of sentences information calculated by the sentence number estimating unit 32 to the learning source language sentence, and outputs the data of the learning source language sentence to which the information of the number of sentences of the learning target language sentence has been added. The sentence number information adding unit 33 passes the data of the source language sentence to which the information of the number of sentences of the target language sentence (estimated value) has been added to the learning data supplying unit 34. One example of a method in which the sentence number information adding unit 33 adds the information on the number of sentences is to add a tag indicating the number of sentences of the target language sentence to the text of the source language sentence. The sentence number information adding unit 33 may add information about the number of sentences in the target language sentence for training to the beginning of the source language sentence for training, which is text data. The position where the sentence number information adding unit 33 adds the sentence number information is aligned with that of the sentence number designation unit 22. The advantages of adding sentence number information to the beginning of a source language sentence have already been explained.

なお、目的言語文の文数(推定値)の情報が付加された原言語文のデータの実例については、後で、別の図を参照しながら説明する。 An example of source language sentence data with information on the number of target language sentences (estimated value) will be explained later with reference to another figure.

学習用データ供給部34は、文対供給部31から渡された目的言語文のデータと、文数情報付与部33から渡された原言語文のデータ(ただし、目的言語文の文数の推定値付き)とを、対として、翻訳処理部23に渡す。この対は、翻訳処理部23が持つ前記モデルの、学習用データとして使用することができる。つまり、学習用データ供給部34は、学習用目的言語文の文数の情報が付加された学習用原言語文のデータと、学習用目的言語文のデータとの対を、学習用データとして供給する。 The learning data supply unit 34 passes the target language sentence data passed from the sentence pair supply unit 31 and the source language sentence data passed from the sentence number information attachment unit 33 (with an estimated value for the number of sentences in the target language sentence) as a pair to the translation processing unit 23. This pair can be used as learning data for the model held by the translation processing unit 23. In other words, the learning data supply unit 34 supplies the pair of the training source language sentence data with information on the number of sentences of the training target language sentence added, and the training target language sentence data, as learning data.

文対供給部31は、多数の文対を供給してよい。文対供給部31が供給する文対のそれぞれに対応して、学習用データ供給部34は、原言語文(文数の推定値付き)と目的言語文との対を、翻訳処理部23に渡す。これらそれぞれの対を用いて、翻訳処理部23の内部のモデルの機械学習処理を行うことが可能である。学習用データとして学習用データ供給部34が供給する文対の数は、任意である。学習用データ供給部34は、大量の文対を供給してよい。学習用データとして供給される文対の数は、例えば、数十万対あるいは数百万対に達するものであってもよい。 The sentence pair supplying unit 31 may supply a large number of sentence pairs. Corresponding to each sentence pair supplied by the sentence pair supplying unit 31, the learning data supplying unit 34 passes a pair of a source language sentence (with an estimated value for the number of sentences) and a target language sentence to the translation processing unit 23. Each of these pairs can be used to perform machine learning processing of a model inside the translation processing unit 23. The number of sentence pairs supplied by the learning data supplying unit 34 as learning data is arbitrary. The learning data supplying unit 34 may supply a large number of sentence pairs. The number of sentence pairs supplied as learning data may reach hundreds of thousands or millions of pairs, for example.

次に、学習用データの構成のしかた等について説明する。 Next, we will explain how to configure the learning data.

図7は、文対供給部31が供給する文対のデータの例を示す概略図である。図示する文対において、原言語文は日本語文であり、目的言語文は英語文である。原言語文は、「全国一の生産量を誇る広島特産のカキを夏にも観光客らに楽しんでもらおうと、広島県は新たに生食用のカキを開発し、16日、関係者を集めて試食会を開きました。」というテキストのデータである。この原言語文に対応する目的言語文は、「Hiroshima is the number one producer of oysters in the country.」という文と、「The prefecture has newly developed oysters for eating raw so that tourists can enjoy oysters, a specialty of Hiroshima, also in summer.」という文と、「Officials held a tasting event on July 16, inviting people concerned.」という文の3つの文を含むテキストのデータである。 Fig. 7 is a schematic diagram showing an example of data of a sentence pair supplied by the sentence pair supply unit 31. In the illustrated sentence pair, the source language sentence is a Japanese sentence, and the target language sentence is an English sentence. The source language sentence is text data of "Hiroshima prefecture has developed new oysters for eating raw so that tourists can enjoy oysters, a specialty of Hiroshima, which boasts the highest production volume in the country, even in the summer, and held a tasting event on the 16th, gathering related parties." The target language sentence corresponding to this source language sentence is text data including three sentences: "Hiroshima is the number one producer of oysters in the country.", "The prefecture has newly developed oysters for eating raw so that tourists can enjoy oysters, a specialty of Hiroshima, also in summer.", and "Officials held a tasting event on July 16, inviting people concerned."

図8は、学習用データ供給部34が翻訳処理部23に渡す学習用データ(文対)の例を示す概略図である。図8に示すデータは、図7のデータに基づいて作成されたものである。図8に示すデータが、図7に示したデータと異なる点は、原言語文側のテキストの先頭に、<3>というタグが付加されていることである。このタグは、目的言語側の文数が3であることに対応する。言い換えれば、このタグは、目的言語側の文数を表すタグである。目的言語側の文数が3であることは、前述の通り、文数推定部32による推定結果に基づく。また、その推定結果にしたがって<3>というタグを原言語文データに付加したのは、文数情報付与部33である。つまり、図8に示すデータにおいて、原言語文データは「<3>全国一の生産量を誇る広島特産のカキを夏にも観光客らに楽しんでもらおうと、広島県は新たに生食用のカキを開発し、16日、関係者を集めて試食会を開きました。」というテキストのデータである。図8に示す目的言語文データは、図7におけるそれと同一のテキストデータである。 8 is a schematic diagram showing an example of learning data (sentence pair) that the learning data supply unit 34 passes to the translation processing unit 23. The data shown in FIG. 8 is created based on the data shown in FIG. 7. The data shown in FIG. 8 differs from the data shown in FIG. 7 in that a tag <3> is added to the beginning of the text on the source language side. This tag corresponds to the number of sentences on the target language side being 3. In other words, this tag is a tag that represents the number of sentences on the target language side. As described above, the number of sentences on the target language side being 3 is based on the estimation result by the sentence number estimation unit 32. In addition, it is the sentence number information attachment unit 33 that added the tag <3> to the source language sentence data in accordance with the estimation result. In other words, in the data shown in FIG. 8, the source language sentence data is the text data "<3> Hiroshima Prefecture has developed a new oyster for eating raw, so that tourists can enjoy oysters, a specialty of Hiroshima, which boasts the highest production volume in the country, in the summer, and held a tasting event for related parties on the 16th." The target language sentence data shown in Figure 8 is the same text data as that in Figure 7.

図8に示すような学習用データを用いて機械学習を行うことにより、翻訳処理部23内の翻訳モデルは、原言語文そのものと目的言語文との対応関係を学習するだけではなく、「3」という数値(推定された文数)と目的言語文との対応関係をも学習する。 By performing machine learning using learning data such as that shown in Figure 8, the translation model in the translation processing unit 23 not only learns the correspondence between the source language sentence itself and the target language sentence, but also learns the correspondence between the number "3" (the estimated number of sentences) and the target language sentence.

図9は、翻訳装置1の翻訳処理部23が機械学習を行うための学習用データを生成する処理の手順を示すフローチャートである。このフローチャートは、1対の入出力データを生成するための手順である。このフローチャートの処理は、入出力データ対ごとに繰り返して実行され得る。以下、このフローチャートに沿って動作手順を説明する。 Figure 9 is a flowchart showing the steps of a process for generating learning data for machine learning by the translation processing unit 23 of the translation device 1. This flowchart shows the steps for generating a pair of input and output data. The process of this flowchart can be repeatedly executed for each pair of input and output data. Below, the operation steps are explained according to this flowchart.

まず、ステップS11において、文対供給部31は、原言語文と目的言語文とから成る1対の言語対を取得し、翻訳装置1内に供給する。前述の通り、文対供給部31は、文対に含まれる原言語文を、文数情報付与部33に供給する。また、文対供給部31は、文対に含まれる目的言語文を、文数推定部32および学習用データ供給部34に供給する。 First, in step S11, the sentence pair supplying unit 31 acquires a language pair consisting of a source language sentence and a target language sentence, and supplies it to the translation device 1. As described above, the sentence pair supplying unit 31 supplies the source language sentence included in the sentence pair to the sentence number information adding unit 33. In addition, the sentence pair supplying unit 31 supplies the target language sentence included in the sentence pair to the sentence number estimation unit 32 and the learning data supplying unit 34.

次に、ステップS12において、文数推定部32は、ステップS11で文対供給部31から渡された目的言語文に含まれる文の数を推定する。文数推定部32が具体的に用いる推定手法の例については、既に説明した通りである。文数推定部32は、推定結果である文数を、文数情報付与部33に通知する。 Next, in step S12, the sentence count estimation unit 32 estimates the number of sentences included in the target language sentence passed from the sentence pair supply unit 31 in step S11. An example of the estimation method specifically used by the sentence count estimation unit 32 has already been described. The sentence count estimation unit 32 notifies the sentence count information assignment unit 33 of the estimated number of sentences.

次に、ステップS13において、文数情報付与部33は、ステップS11で文対供給部31から渡された原言語文に、ステップS12において推定された目的言語文の文数の情報を付加する。具体的な例としては、文数情報付与部33は、目的言語文の文数を表すタグを、原言語文のデータに付加する。目撃言語文の文数の推定値が付加された原言語文のデータの例については、既に説明した通りである(図8を参照)。 Next, in step S13, the sentence number information adding unit 33 adds information on the number of sentences of the target language sentence estimated in step S12 to the source language sentence passed from the sentence pair supplying unit 31 in step S11. As a specific example, the sentence number information adding unit 33 adds a tag indicating the number of sentences of the target language sentence to the data of the source language sentence. An example of the data of the source language sentence to which the estimated value of the number of sentences of the witness language sentence has been added has already been described (see FIG. 8).

次に、ステップS14において、文数情報付与部33は、目撃言語文の文数の推定値が付加された原言語文のデータを、学習用データ供給部34に渡す。学習用データ供給部34は、目撃言語文の文数の推定値が付加された原言語文のデータを、学習用データの入力側のデータとする。 Next, in step S14, the sentence number information adding unit 33 passes the data of the source language sentence to which the estimated value of the number of sentences of the witnessed language sentence has been added to the learning data supplying unit 34. The learning data supplying unit 34 sets the data of the source language sentence to which the estimated value of the number of sentences of the witnessed language sentence has been added as input data for the learning data.

次に、ステップS15において、学習用データ供給部34は、ステップS11で文対供給部31から渡された目的言語文のデータを、学習用データの出力側のデータとする。 Next, in step S15, the learning data supply unit 34 sets the target language sentence data passed from the sentence pair supply unit 31 in step S11 as the output data of the learning data.

次に、ステップS16において、学習用データ供給部34は、上記の入力側データ(目的言語文の文数の推定値が付加された原言語文のデータ)と、出力側データ(目的言語文のデータ)との対を、出力する。この1対のデータは、翻訳処理部23における学習処理に用いられるものである。 Next, in step S16, the learning data supply unit 34 outputs a pair of the above-mentioned input data (data of the source language sentence to which an estimated value of the number of sentences in the target language sentence has been added) and output data (data of the target language sentence). This pair of data is used for the learning process in the translation processing unit 23.

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

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

以上、実施形態を説明したが、さらに次のような変形例で実施してもよい。なお複数の変形例を、組み合わせることが可能な限りにおいて、組み合わせて実施してもよい。 Although the embodiment has been described above, the following modified examples may be implemented. Note that multiple modified examples may be implemented in combination to the extent that they can be combined.

[第1変形例]
上記の第2実施形態では、翻訳装置1は、学習モードと翻訳実行モードの両方で動作し得るものであった。第1変形例では、翻訳装置1は、学習モードで動作せず、翻訳実行モードでのみ動作する。この場合、翻訳処理部23の中の翻訳モデルは、学習用データに基づく機械学習処理を完了済みである。あるいは、翻訳モデルの学習済みの内部パラメーターの値を、翻訳モデルが外部からインポートできるようにしてもよい。第1変形例の翻訳装置1は、図6に示した機能構成のうちの、少なくとも、原言語文入力部21、文数指定部22、翻訳処理部23、翻訳結果出力部24のすべてを備える。また、その翻訳装置1は、文対供給部31、文数推定部32、文数情報付与部33、学習用データ供給部34の一部または全部を備えない構成としてもよい。第1変形例の翻訳装置1は、学習済みのモデルを用いて、指定された数の文からなる目的言語文を出力する処理を行うことが期待される。
[First Modification]
In the second embodiment, the translation device 1 can operate in both the learning mode and the translation execution mode. In the first modified example, the translation device 1 does not operate in the learning mode, but operates only in the translation execution mode. In this case, the translation model in the translation processing unit 23 has completed machine learning processing based on the learning data. Alternatively, the translation model may be configured to import the learned internal parameter values of the translation model from the outside. The translation device 1 of the first modified example includes at least the source language sentence input unit 21, the sentence number designation unit 22, the translation processing unit 23, and the translation result output unit 24 of the functional configuration shown in FIG. 6. In addition, the translation device 1 may be configured not to include some or all of the sentence pair supply unit 31, the sentence number estimation unit 32, the sentence number information assignment unit 33, and the learning data supply unit 34. It is expected that the translation device 1 of the first modified example performs processing to output a target language sentence consisting of a specified number of sentences using a learned model.

上記のような第1変形例の翻訳装置1は、つまり、入力された入力原言語文に、当該入力原言語文に対応する出力用の出力目的言語文の文数の情報を付加する文数指定部22と、モデルを備え、前記出力目的言語文の文数の情報を付加した前記入力原言語文を、前記モデルに入力することによって、前記モデルが求めた出力目的言語文を出力する翻訳処理部23と、を備え、前記モデルは、学習用目的言語文の文数の情報が付加された学習用原言語文のデータと、学習用目的言語文のデータと、の対である学習用データを用いて学習済みである、というものである。 The translation device 1 of the first modified example as described above comprises a sentence number designation unit 22 that adds information on the number of sentences of an output target language sentence for output corresponding to an input source language sentence to the input source language sentence, and a translation processing unit 23 that has a model and outputs an output target language sentence determined by the model by inputting the input source language sentence to which the information on the number of sentences of the output target language sentence has been added, and the model has been trained using training data that is a pair of data of a training source language sentence to which information on the number of sentences of the training target language sentence has been added, and data of a training target language sentence.

[第2変形例]
上記の第2実施形態では、翻訳装置1は、学習モードと翻訳実行モードの両方で動作し得るものであった。第2変形例では、翻訳装置1は、翻訳実行モードで動作せず、学習モードでのみ動作する。つまり、第2変形例の翻訳装置1は、学習処理のみを行うものであり、「学習装置」と呼んでもよい。この場合、翻訳処理部23の中の翻訳モデルは、学習処理によって内部パラメーターを更新する。学習後のモデルを、例えば、外部の装置にエクスポートすることができる。この際、翻訳装置1とその外部の装置が同一のネットワーク構造を予め持っている場合には、学習後のモデルの内部パラメーターの値の集合のみをエクスポートするようにしてもよい。これにより、第2変形例の翻訳装置1(学習装置)で学習した結果に基づいて、その外部の装置が、翻訳処理を行うことができる。その外部の装置は、指定された数の文からなる目的言語文を出力する翻訳処理を行うことが期待される。第2変形例の翻訳装置1(学習装置)は、図6に示した機能構成のうちの、少なくとも、文対供給部31、文数推定部32、文数情報付与部33、学習用データ供給部34、翻訳処理部23のすべてを備える。また、その翻訳装置1(学習装置)は、原言語文入力部21、文数指定部22、翻訳結果出力部24の一部または全部を備えない構成としてもよい。
[Second Modification]
In the second embodiment, the translation device 1 can operate in both the learning mode and the translation execution mode. In the second modified example, the translation device 1 does not operate in the translation execution mode, but operates only in the learning mode. That is, the translation device 1 of the second modified example performs only the learning process, and may be called a "learning device". In this case, the translation model in the translation processing unit 23 updates the internal parameters by the learning process. The learned model can be exported to, for example, an external device. In this case, if the translation device 1 and the external device have the same network structure in advance, only a set of values of the internal parameters of the learned model may be exported. This allows the external device to perform a translation process based on the results of learning by the translation device 1 (learning device) of the second modified example. It is expected that the external device will perform a translation process to output a target language sentence consisting of a specified number of sentences. The translation device 1 (learning device) of the second modified example includes at least all of the sentence pair supply unit 31, the sentence number estimation unit 32, the sentence number information assignment unit 33, the learning data supply unit 34, and the translation processing unit 23 among the functional configurations shown in FIG. 6. Furthermore, the translation device 1 (learning device) may be configured without some or all of the source language sentence input unit 21, the sentence number designation unit 22, and the translation result output unit 24.

上記のような第2変形例の翻訳装置1は、つまり、学習用原言語文と学習用目的言語文との対のデータを供給する文対供給部31と、供給された前記学習用目的言語文に含まれる文数を求める文数推定部32と、前記学習用原言語文に、前記文数推定部が求めた前記文数の情報を付加して、前記学習用目的言語文の文数の情報が付加された前記学習用原言語文のデータを出力する文数情報付与部33と、前記学習用目的言語文の文数の情報が付加された学習用原言語文のデータと、前記学習用目的言語文のデータとの対を、学習用データとして供給する学習用データ供給部34と、前記学習用データを用いてモデルの学習を行う翻訳処理部23(学習処理部)と、を備えるものである。 The translation device 1 of the second modified example as described above includes a sentence pair supplying unit 31 that supplies data pairs of training source language sentences and training target language sentences, a sentence number estimating unit 32 that determines the number of sentences included in the supplied training target language sentences, a sentence number information adding unit 33 that adds the information on the number of sentences determined by the sentence number estimating unit to the training source language sentences and outputs data of the training source language sentences to which the information on the number of sentences of the training target language sentences has been added, a training data supplying unit 34 that supplies pairs of the data of the training source language sentences to which the information on the number of sentences of the training target language sentences has been added and the data of the training target language sentences as training data, and a translation processing unit 23 (learning processing unit) that uses the training data to train a model.

[第3変形例]
上記の第2実施形態では、文数推定部32が推定した文数の情報を用いて、学習用データを生成した。第3変形例においては、推定値ではなく、文数推定部32に確定的な文数の情報を与えてもよい。その場合には、文数推定部32は、与えられたその文数を推定値として用いる。第3変形例の学習用データ供給部34は、そのように作成された学習用データを、翻訳処理部23に提供する。翻訳処理部23は、そのように作成された学習用データを用いて、モデルの学習処理を行う。
[Third Modification]
In the above-described second embodiment, the learning data is generated using information on the number of sentences estimated by the number-of-sentences estimation unit 32. In the third modified example, definite information on the number of sentences may be provided to the number-of-sentences estimation unit 32 instead of an estimated value. In that case, the number-of-sentences estimation unit 32 uses the provided number of sentences as an estimated value. The learning data supply unit 34 of the third modified example provides the learning data created in this way to the translation processing unit 23. The translation processing unit 23 performs a model learning process using the learning data created in this way.

[第4変形例]
上記の第2実施形態では、文数情報付与部33は、推定された文数の情報を、角括弧<>で囲われたタグの形式のデータとして、原言語文の先頭に付加した。第4実施形態では、付加する文数の情報の形態はこれには限られない。第4変形例における文数情報付与部33は、上記のタグ以外の形態で、文数の情報を原言語文に付加する。また、第4変形例における文数情報付与部33が文数の情報を付加する位置は、原言語文の先頭には限らず、他の場所であってもよい。いずれの場合も、文数情報付与部33は、原言語文のテキストの情報と、文数の数値に対応する情報とを含んだデータを、学習用のモデルへの入力データとして、学習用データ供給部34に渡す。翻訳処理部23は、そのように作成された学習用データを用いて、モデルの学習処理を行う。
[Fourth Modification]
In the second embodiment, the sentence count information adding unit 33 added the estimated sentence count information to the beginning of the source language sentence as data in the form of a tag surrounded by square brackets <>. In the fourth embodiment, the form of the added sentence count information is not limited to this. The sentence count information adding unit 33 in the fourth modified example adds sentence count information to the source language sentence in a form other than the above tag. In addition, the position where the sentence count information adding unit 33 in the fourth modified example adds the sentence count information is not limited to the beginning of the source language sentence, and may be another position. In either case, the sentence count information adding unit 33 passes data including the text information of the source language sentence and information corresponding to the sentence count value to the learning data supply unit 34 as input data for the learning model. The translation processing unit 23 performs a learning process for the model using the learning data created in this way.

以上、この発明の実施形態(変形例を含む)について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。 The above describes in detail an embodiment of the present invention (including modified examples) with reference to the drawings, but the specific configuration is not limited to this embodiment, and includes designs that do not deviate from the gist of the present invention.

[文数を制御した翻訳装置(第2実施形態)の実施例と評価]
以下では、上記実施形態の翻訳装置1を実施した例と、その評価結果について説明する。
[Example and evaluation of a translation device that controls the number of sentences (second embodiment)]
In the following, an example of implementing the translation device 1 of the above embodiment and the evaluation results thereof will be described.

図11は、翻訳装置1を用いて翻訳処理を行った結果の例を示す概略図である。本例において、原言語は日本語であり、目的言語は英語である。同図は、日本語の入力文と、英語の5種類の出力文とを示している。入力文の文数は、1である。目的言語文のAは、比較対象であり、人手による翻訳を行った結果である。Aの翻訳結果の文数は3である。出力文のBは、翻訳装置1における目的言語文の文数として1を指定した場合の翻訳結果である。Bの翻訳結果の文数は、指定した通り、1である。出力文のCは、目的言語文の文数として2を指定した場合の翻訳結果である。Cの翻訳結果の文数は、指定した通り、2である。出力文のDは、目的言語文の文数として3を指定した場合の翻訳結果である。Dの翻訳結果の文数は、指定した通り、3である。出力文のEは、比較対象として、目的言語文の文数を指定しない形の機械翻訳処理を行った場合の結果である。Eの翻訳結果の文数は、2となった。一方、本実施形態の翻訳装置1で出力文数を1、2、3とそれぞれ指定した場合には、指定した通りの文数の結果が得られた。 Figure 11 is a schematic diagram showing an example of the results of a translation process performed using the translation device 1. In this example, the source language is Japanese and the target language is English. The figure shows an input sentence in Japanese and five types of output sentences in English. The number of sentences in the input sentence is 1. Target language sentence A is the subject of comparison and is the result of manual translation. The number of sentences in the translation result of A is 3. Output sentence B is the translation result when 1 is specified as the number of sentences in the target language sentence in the translation device 1. The number of sentences in the translation result of B is 1, as specified. Output sentence C is the translation result when 2 is specified as the number of sentences in the target language sentence. The number of sentences in the translation result of C is 2, as specified. Output sentence D is the translation result when 3 is specified as the number of sentences in the target language sentence. The number of sentences in the translation result of D is 3, as specified. Output sentence E is the result of a machine translation process performed without specifying the number of sentences in the target language sentence, as the subject of comparison. The number of sentences in the translation result for E was 2. On the other hand, when the number of output sentences was specified as 1, 2, or 3 in the translation device 1 of this embodiment, the result with the specified number of sentences was obtained.

なお、出力文数の指定を行わなかった場合には、出力文数は、望ましい数よりは少なくなる(一文の長さが長くなりがちである)ことが、本実験によりわかった。つまり、本実施形態の翻訳装置1において出力文数を指定できることは、有用である。 In addition, this experiment showed that if the number of output sentences is not specified, the number of output sentences will be less than desired (the length of each sentence will tend to be long). In other words, being able to specify the number of output sentences in the translation device 1 of this embodiment is useful.

また、以下の方法により、本実施形態の翻訳装置1が有効であることを定量的に評価した。具体的には、出力文数(目的言語文の文数)を指定する情報を付与する場合(本実施形態)と付与しない場合(比較対象)との翻訳結果を比較した。両方の場合とも、学習用データとしては、日本語(原言語文)の各文に対応する人手英訳文(目的言語文)の、約10万文対を用いた。また、開発データおよび評価データとも同様のデータセットで、それぞれ3000文対および5001文対を用いた。 The effectiveness of the translation device 1 of this embodiment was quantitatively evaluated by the following method. Specifically, the translation results were compared between the case where information specifying the number of output sentences (number of sentences in the target language sentence) was provided (this embodiment) and the case where it was not provided (comparison). In both cases, approximately 100,000 sentence pairs of manual English translations (target language sentences) corresponding to each sentence in Japanese (source language sentence) were used as learning data. Furthermore, the development data and evaluation data were similar datasets, with 3,000 sentence pairs and 5,001 sentence pairs, respectively.

(1)出力文数情報付与ありの場合には、原言語文データに文数タグを付与し、本実施形態の翻訳処理部23で学習した翻訳モデル(ネットワーク)を用いた。その場合の翻訳時には、評価用日本語テキストデータに対応する英語テキストデータに基づいて、本実施形態の文数推定部32で文数の推定を行った。そして、その推定結果の文数を表すタグを、評価用日本語テキストデータの文頭に付与して、翻訳処理を実行した。 (1) When output sentence number information was added, a sentence number tag was added to the source language sentence data, and a translation model (network) trained by the translation processing unit 23 of this embodiment was used. During translation in this case, the sentence number estimation unit 32 of this embodiment estimated the number of sentences based on the English text data corresponding to the evaluation Japanese text data. Then, a tag indicating the estimated number of sentences was added to the beginning of the sentence of the evaluation Japanese text data, and the translation process was performed.

(2)出力文数情報付与なしの場合には、原言語文データへの文数タグの付与を行わずに、本実施形態の翻訳処理部23で学習した翻訳モデル(ネットワーク)を用いた。翻訳時にも、原言語文データへの文数タグの付与を行わずに、翻訳処理を行った。 (2) When output sentence count information was not added, a sentence count tag was not added to the source language sentence data, and the translation model (network) trained by the translation processing unit 23 of this embodiment was used. During translation, the translation process was also performed without adding a sentence count tag to the source language sentence data.

両方の場合の実験結果は次の通りである。評価数値としては、出力した文数の元の評価用英文(目的言語文)の文数との一致率、およびBLEU値による翻訳性能を用いた。評価数値の結果は、次の通りである。 The experimental results for both cases are as follows. The evaluation values used were the rate of agreement between the number of output sentences and the number of sentences in the original evaluation English sentences (target language sentences), and the translation performance based on the BLEU score. The evaluation values are as follows:

出力文数情報の付与あり: 文数の一致率96.6%
出力文数情報の付与なし: 文数の一致率60.4%
With output sentence count information: Sentence count match rate 96.6%
Without output sentence count information: Sentence count match rate 60.4%

出力文数情報の付与あり: BLEU 19.14
出力文数情報の付与なし: BLEU 18.38
With output sentence count information: BLEU 19.14
No output sentence count information: BLEU 18.38

上記の通り、出力文数の指定を行わなかった場合には文数の一致率が60.4%であったのに対して、出力文数の指定を行った場合の文数の一致率は96.6%であった。つまり、本実施形態の翻訳装置1は、非常に高い確率で、翻訳結果として指定した文数の目的言語文を出力できることが確認できた。 As described above, when the number of output sentences was not specified, the match rate of the number of sentences was 60.4%, whereas when the number of output sentences was specified, the match rate of the number of sentences was 96.6%. In other words, it was confirmed that the translation device 1 of this embodiment can output the specified number of target language sentences as the translation result with a very high probability.

また、上記の通り、出力文数の指定を行わなかった場合のBLEU値が18.38であったのに対して、出力文数の指定を行って翻訳した場合のBLEU値は19.14であった。つまり、本実施形態の翻訳装置1のように出力文数の指定を行って翻訳処理を行った場合にも、そうでない場合と比較して、翻訳精度は少なくとも悪くならないことが確認できた。また、上記の通り、出力文数の指定を行って翻訳した場合のBLEU値は、出力文数の指定を行わなかった場合のそれよりも0.76高くなっている。この差が優位なものであるか否かは今後のさらなる検証が必要であるが、一つの可能性としては、出力文数を指定したことにより、出力文のパターンが元のデータセットの目的言語文のパターンに近づくように作用したためであるとも推察される。 As described above, the BLEU value was 18.38 when the number of output sentences was not specified, whereas the BLEU value was 19.14 when the number of output sentences was specified and translation was performed. In other words, it was confirmed that even when the number of output sentences was specified and translation processing was performed as in the translation device 1 of this embodiment, the translation accuracy at least did not deteriorate compared to when it was not specified. As described above, the BLEU value when the number of output sentences was specified and translation was performed was 0.76 higher than when the number of output sentences was not specified. Whether this difference is significant or not requires further verification in the future, but one possibility is that specifying the number of output sentences acted to make the patterns of the output sentences closer to the patterns of the target language sentences in the original dataset.

以上、説明したように、本実施形態によれば、翻訳性能を劣化させることなく指定した文数を出力するような翻訳処理が可能である。言い換えれば、本実施形態により、翻訳性能を劣化させることなく出力文数を制御することが可能となった。本実施形態の検証にはニューラルネットワークを利用したため、そのようなメリットが得られる理由は必ずしも明示的に得られたわけではない。しかし、可能性として、ピリオドの数が合うようにモデルが翻訳結果を制御したことや、あるいは指定した文数になるようにモデルが深層において構文構造を制御したことが考えられる。 As described above, this embodiment makes it possible to perform translation processing that outputs a specified number of sentences without degrading translation performance. In other words, this embodiment makes it possible to control the number of sentences to be output without degrading translation performance. Because a neural network was used to verify this embodiment, the reason why such an advantage is obtained was not necessarily explicitly stated. However, one possibility is that the model controlled the translation result so that the number of periods matched, or that the model controlled the syntactic structure at a deeper level so that the specified number of sentences was obtained.

[文数推定装置の実施例と評価]
原言語を日本語とし、目的言語を英語とした場合の実施例を評価した。具体的には、以下の2つの方法を比較し、出力文数の評価用英文との一致率と翻訳性能を比較した。モデルを学習するための学習データとしては、日本語文と、それに対応する人手による英訳文との、約96000文対の対訳データを用いた。また、同様の対訳データから、開発データ5001文対を用いた。評価データとしては、日本語一文を二名の翻訳者がそれぞれ翻訳したマルチリファレンスデータ773文を用いた。
[Example and Evaluation of the Sentence Number Estimation Device]
An example was evaluated when the source language was Japanese and the target language was English. Specifically, the following two methods were compared, and the matching rate of the number of output sentences with the evaluation English sentences and the translation performance were compared. As training data for learning the model, bilingual data of about 96,000 sentence pairs of Japanese sentences and their corresponding English translations by hand were used. In addition, from the same bilingual data, development data of 5,001 sentence pairs was used. As evaluation data, multi-reference data of 773 sentences in which one Japanese sentence was translated by two translators each were used.

第1の方法は、出力文数推定を用いる方法である。上記の学習データで学習した文数推定装置320(第1実施形態)を用いて、評価用日本語文に対応する出力文数を推定した。推定された文数のタグを付与し、翻訳装置1(第2実施形態)で翻訳した。翻訳装置1の翻訳モデルも、同様の学習データで学習済みである。 The first method is a method that uses output sentence number estimation. The number of output sentences corresponding to the Japanese sentences for evaluation was estimated using a sentence number estimation device 320 (first embodiment) trained with the above-mentioned training data. A tag for the estimated number of sentences was added, and translation was performed using a translation device 1 (second embodiment). The translation model of the translation device 1 has also been trained with the same training data.

第2の方法は、出力文数推定を用いない方法である。出力文数推定を用いることなく、第1の方法と同様の翻訳モデルを用いて翻訳を行った。 The second method does not use output sentence number estimation. Translation was performed using the same translation model as the first method, without using output sentence number estimation.

実験結果は次の通りである。上記の第1および第2の方法のそれぞれにおける出力文数の、評価用英文テキストとの一致率により評価した。ただし、一致率は、翻訳者二名のいずれかの翻訳結果の英文数と一致していれば一致、として算出している。
第1の方法(出力文数推定あり、本実施形態):87.0%
第2の方法(出力文数推定なし、比較対象):81.8%
The experimental results are as follows. The number of output sentences in each of the first and second methods was evaluated based on the degree of agreement with the English text for evaluation. The degree of agreement was calculated as a match if the number of English sentences in the translation results of either of the two translators matched.
First method (with estimation of the number of output sentences, this embodiment): 87.0%
Second method (no estimation of the number of output sentences, comparison): 81.8%

上記の通り、第1実施形態の文数推定装置320を用いることにより、適切な出力文数を推定できることがわかった。また、第2実施形態の翻訳装置1を用いることにより、適切な文数で翻訳結果を出力できることがわかった。 As described above, it has been found that by using the sentence number estimation device 320 of the first embodiment, it is possible to estimate an appropriate number of output sentences. It has also been found that by using the translation device 1 of the second embodiment, it is possible to output a translation result with an appropriate number of sentences.

以上、この発明の複数の実施形態および変形例について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。 Although several embodiments and variations of the present invention have been described in detail above with reference to the drawings, the specific configurations are not limited to these embodiments and include designs that do not deviate from the gist of the present invention.

本発明は、例えば、自然言語の翻訳処理を利用する産業において利用することができる。一例として、報道あるいはコンテンツ提供の事業において、ニュース等の文章によるコンテンツを自動的に翻訳する業務に利用できる。但し、本発明の利用範囲はここに例示したものには限られない。 The present invention can be used, for example, in industries that use natural language translation processing. As an example, it can be used in the business of automatically translating news and other written content in the news reporting or content provision industry. However, the scope of use of the present invention is not limited to the examples given here.

1 翻訳装置(学習装置、自然言語処理装置)
21 原言語文入力部
22 文数指定部
23 翻訳処理部(学習処理部)
24 翻訳結果出力部
31 文対供給部
32 文数推定部
33 文数情報付与部
34 学習用データ供給部
320 文数推定装置(学習装置、自然言語処理装置)
321 推定部
322 原言語文供給部
323 文数情報抽出部
326 文対供給部
327 文数情報付与部
328 学習用データ供給部
901 中央処理装置
902 RAM
903 入出力ポート
904,905 入出力デバイス
906 バス
1. Translation device (learning device, natural language processing device)
21 source language sentence input unit 22 number of sentences designation unit 23 translation processing unit (learning processing unit)
24 Translation result output unit 31 Sentence pair supply unit 32 Sentence number estimation unit 33 Sentence number information assignment unit 34 Learning data supply unit 320 Sentence number estimation device (learning device, natural language processing device)
321 Estimation unit 322 Source language sentence supply unit 323 Sentence number information extraction unit 326 Sentence pair supply unit 327 Sentence number information assignment unit 328 Learning data supply unit 901 Central processing unit 902 RAM
903 Input/Output Port 904, 905 Input/Output Device 906 Bus

Claims (5)

学習用原言語文と学習用目的言語文との対のデータを供給する文対供給部と、
供給された前記学習用目的言語文に含まれる文数を求める文数推定部と、
前記学習用原言語文に、前記文数推定部が求めた前記文数の情報を付加して、前記学習用目的言語文の文数の情報が付加された前記学習用原言語文のデータを出力する文数情報付与部と、
前記学習用目的言語文の文数の情報が付加された学習用原言語文のデータと、前記学習用目的言語文のデータとの対を、学習用データとして供給する学習用データ供給部と、
入力された入力原言語文に、当該入力原言語文に対応する出力用の出力目的言語文の文数の情報を付加する文数指定部と、
モデルを備え、前記学習用データを用いて前記モデルの学習を行うとともに、前記出力目的言語文の文数の情報を付加した前記入力原言語文を、前記モデルに入力することによって、前記モデルが求めた出力目的言語文を出力する翻訳処理部と、
然言語処理装置と、
を備え、
前記自然言語処理装置は、
学習用原言語文と、前記学習用原言語文に対応する学習用目的言語文と、前記学習用目的言語文の文数を表す学習用文数情報と、を含む学習用データを供給する学習用データ供給部と、
機械学習可能なモデルを備え、原言語文を入力し、前記原言語文に対応する目的言語文の文数を表す文数情報を少なくとも出力する推定部と、
前記推定部に対して前記原言語文を供給する原言語文供給部と、
を備え、
学習モードで動作する場合には、前記推定部は、前記学習用データ供給部が供給する前記学習用データに基づいて、前記モデルの機械学習を行い、
推定実行モードで動作する場合には、前記推定部は、前記原言語文供給部が供給する前記原言語文に基づいて、当該原言語文に対応する前記文数情報を出力する、
ものであり、
前記自然言語処理装置の原言語文供給部は、前記入力原言語文を、前記自然言語処理装置の前記推定部に供給し、
前記文数指定部は、前記自然言語処理装置の前記推定部が出力した前記文数情報に基づいて、前記出力用の出力目的言語文の文数の情報を付加する、
翻訳装置。
a sentence pair providing unit for providing data pairs of source language sentences for training and target language sentences for training;
a sentence number estimation unit for determining the number of sentences contained in the supplied target language sentence for training;
a sentence number information adding unit that adds the information on the number of sentences determined by the sentence number estimation unit to the training source language sentence, and outputs data of the training source language sentence to which the information on the number of sentences of the training target language sentence has been added;
a training data supplying unit that supplies, as training data, pairs of data on the training source language sentences to which information on the number of sentences in the training target language sentences has been added and data on the training target language sentences;
a sentence number specification unit for adding information on the number of sentences of an output target language sentence for output corresponding to an input source language sentence inputted;
a translation processing unit including a model, learning the model using the learning data, and inputting the input source language sentence to which information on the number of sentences in the output target language sentence has been added into the model, thereby outputting an output target language sentence determined by the model;
A natural language processing device;
Equipped with
The natural language processing device comprises:
a training data supplying unit that supplies training data including training source sentences, training target language sentences corresponding to the training source sentences, and training sentence number information indicating the number of sentences in the training target language sentences;
an estimation unit that is equipped with a machine learning model, inputs a source language sentence, and outputs at least sentence number information indicating the number of sentences of a target language sentence corresponding to the source language sentence;
a source language sentence supply unit that supplies the source language sentence to the estimation unit;
Equipped with
When operating in a learning mode, the estimation unit performs machine learning of the model based on the learning data supplied by the learning data supply unit;
When operating in an estimation execution mode, the estimation unit outputs the sentence number information corresponding to the source language sentence based on the source language sentence supplied by the source language sentence supply unit.
It is something that
a source language sentence supply unit of the natural language processing apparatus supplies the input source language sentence to the estimation unit of the natural language processing apparatus;
the sentence number designation unit adds information on the number of sentences of the output target language sentence for output based on the sentence number information output by the estimation unit of the natural language processing device.
Translation device.
学習用原言語文と学習用目的言語文との対のデータを供給する文対供給部と、
供給された前記学習用目的言語文に含まれる文数を求める文数推定部と、
前記学習用原言語文に、前記文数推定部が求めた前記文数の情報を付加して、前記学習用目的言語文の文数の情報が付加された前記学習用原言語文のデータを出力する文数情報付与部と、
前記学習用目的言語文の文数の情報が付加された学習用原言語文のデータと、前記学習用目的言語文のデータとの対を、学習用データとして供給する学習用データ供給部と、
入力された入力原言語文に、当該入力原言語文に対応する出力用の出力目的言語文の文数の情報を付加する文数指定部と、
モデルを備え、前記学習用データを用いて前記モデルの学習を行うとともに、前記出力目的言語文の文数の情報を付加した前記入力原言語文を、前記モデルに入力することによって、前記モデルが求めた出力目的言語文を出力する翻訳処理部と、
然言語処理装置と、
を備え、
前記自然言語処理装置は、
機械学習可能なモデルを備え、原言語文を入力し、前記原言語文に対応する目的言語文の文数を表す文数情報を少なくとも出力する推定部と、
前記推定部に対して前記原言語文を供給する原言語文供給部と、
を備え、
前記モデルは、学習用原言語文と、前記学習用原言語文に対応する学習用目的言語文と、前記学習用目的言語文の文数を表す学習用文数情報と、を含む学習用データに基づいて機械学習済みであり、
前記推定部は、前記原言語文供給部が供給する前記原言語文に基づいて、当該原言語文に対応する前記文数情報を出力する、
ものであり、
前記自然言語処理装置の原言語文供給部は、前記入力原言語文を、前記自然言語処理装置の前記推定部に供給し、
前記文数指定部は、前記自然言語処理装置の前記推定部が出力した前記文数情報に基づいて、前記出力用の出力目的言語文の文数の情報を付加する、
翻訳装置。
a sentence pair providing unit for providing data pairs of source language sentences for training and target language sentences for training;
a sentence number estimation unit for determining the number of sentences contained in the supplied target language sentence for training;
a sentence number information adding unit that adds the information on the number of sentences determined by the sentence number estimation unit to the training source language sentence, and outputs data of the training source language sentence to which the information on the number of sentences of the training target language sentence has been added;
a training data supplying unit that supplies, as training data, pairs of data on the training source language sentences to which information on the number of sentences in the training target language sentences has been added and data on the training target language sentences;
a sentence number specification unit for adding information on the number of sentences of an output target language sentence for output corresponding to an input source language sentence inputted;
a translation processing unit including a model, learning the model using the learning data, and inputting the input source language sentence to which information on the number of sentences in the output target language sentence has been added into the model, thereby outputting an output target language sentence determined by the model;
A natural language processing device;
Equipped with
The natural language processing device comprises:
an estimation unit that is equipped with a machine learning model, inputs a source language sentence, and outputs at least sentence number information indicating the number of sentences of a target language sentence corresponding to the source language sentence;
a source language sentence supply unit that supplies the source language sentence to the estimation unit;
Equipped with
the model has been machine-trained based on training data including training source language sentences, training target language sentences corresponding to the training source language sentences, and training sentence number information indicating the number of sentences in the training target language sentences;
the estimation unit outputs the sentence number information corresponding to the source language sentence based on the source language sentence supplied by the source language sentence supply unit.
It is something that
a source language sentence supply unit of the natural language processing apparatus supplies the input source language sentence to the estimation unit of the natural language processing apparatus;
the sentence number designation unit adds information on the number of sentences of the output target language sentence for output based on the sentence number information output by the estimation unit of the natural language processing device.
Translation device.
入力された入力原言語文に、当該入力原言語文に対応する出力用の出力目的言語文の文数の情報を付加する文数指定部と、
モデルを備え、前記出力目的言語文の文数の情報を付加した前記入力原言語文を、前記モデルに入力することによって、前記モデルが求めた出力目的言語文を出力する翻訳処理部と、
然言語処理装置と、
を備え、
前記自然言語処理装置は、
学習用原言語文と、前記学習用原言語文に対応する学習用目的言語文と、前記学習用目的言語文の文数を表す学習用文数情報と、を含む学習用データを供給する学習用データ供給部と、
機械学習可能なモデルを備え、原言語文を入力し、前記原言語文に対応する目的言語文の文数を表す文数情報を少なくとも出力する推定部と、
前記推定部に対して前記原言語文を供給する原言語文供給部と、
を備え、
学習モードで動作する場合には、前記推定部は、前記学習用データ供給部が供給する前記学習用データに基づいて、前記モデルの機械学習を行い、
推定実行モードで動作する場合には、前記推定部は、前記原言語文供給部が供給する前記原言語文に基づいて、当該原言語文に対応する前記文数情報を出力する、
ものであり、
前記モデルは、学習用目的言語文の文数の情報が付加された学習用原言語文のデータと、学習用目的言語文のデータと、の対である学習用データを用いて学習済みであり、
前記自然言語処理装置の原言語文供給部は、前記入力原言語文を、前記自然言語処理装置の前記推定部に供給し、
前記文数指定部は、前記自然言語処理装置の前記推定部が出力した前記文数情報に基づいて、前記出力用の出力目的言語文の文数の情報を付加する、
翻訳装置。
a sentence number specification unit for adding information on the number of sentences of an output target language sentence for output corresponding to an input source language sentence inputted;
a translation processing unit including a model, the input source sentence having information about the number of sentences of the output target language sentence added thereto being input to the model, and outputting an output target language sentence determined by the model;
A natural language processing device;
Equipped with
The natural language processing device comprises:
a training data supplying unit that supplies training data including training source sentences, training target language sentences corresponding to the training source sentences, and training sentence number information indicating the number of sentences in the training target language sentences;
an estimation unit that is equipped with a machine learning model, inputs a source language sentence, and outputs at least sentence number information indicating the number of sentences of a target language sentence corresponding to the source language sentence;
a source language sentence supply unit that supplies the source language sentence to the estimation unit;
Equipped with
When operating in a learning mode, the estimation unit performs machine learning of the model based on the learning data supplied by the learning data supply unit;
When operating in an estimation execution mode, the estimation unit outputs the sentence number information corresponding to the source language sentence based on the source language sentence supplied by the source language sentence supply unit.
It is something that
the model has been trained using training data that is a pair of data of training source language sentences to which information on the number of sentences in the training target language sentences has been added, and data of the training target language sentences;
a source language sentence supply unit of the natural language processing apparatus supplies the input source language sentence to the estimation unit of the natural language processing apparatus;
the sentence number designation unit adds information on the number of sentences of the output target language sentence for output based on the sentence number information output by the estimation unit of the natural language processing device.
Translation device.
入力された入力原言語文に、当該入力原言語文に対応する出力用の出力目的言語文の文数の情報を付加する文数指定部と、
モデルを備え、前記出力目的言語文の文数の情報を付加した前記入力原言語文を、前記モデルに入力することによって、前記モデルが求めた出力目的言語文を出力する翻訳処理部と、
然言語処理装置と、
を備え、
前記自然言語処理装置は、
機械学習可能なモデルを備え、原言語文を入力し、前記原言語文に対応する目的言語文の文数を表す文数情報を少なくとも出力する推定部と、
前記推定部に対して前記原言語文を供給する原言語文供給部と、
を備え、
前記モデルは、学習用原言語文と、前記学習用原言語文に対応する学習用目的言語文と、前記学習用目的言語文の文数を表す学習用文数情報と、を含む学習用データに基づいて機械学習済みであり、
前記推定部は、前記原言語文供給部が供給する前記原言語文に基づいて、当該原言語文に対応する前記文数情報を出力する、
ものであり、
前記モデルは、学習用目的言語文の文数の情報が付加された学習用原言語文のデータと、学習用目的言語文のデータと、の対である学習用データを用いて学習済みであり、
前記自然言語処理装置の原言語文供給部は、前記入力原言語文を、前記自然言語処理装置の前記推定部に供給し、
前記文数指定部は、前記自然言語処理装置の前記推定部が出力した前記文数情報に基づいて、前記出力用の出力目的言語文の文数の情報を付加する、
翻訳装置。
a sentence number specification unit for adding information on the number of sentences of an output target language sentence for output corresponding to an input source language sentence inputted;
a translation processing unit including a model, the input source sentence having information about the number of sentences of the output target language sentence added thereto being input to the model, and outputting an output target language sentence determined by the model;
A natural language processing device;
Equipped with
The natural language processing device comprises:
an estimation unit that is equipped with a machine learning model, inputs a source language sentence, and outputs at least sentence number information indicating the number of sentences of a target language sentence corresponding to the source language sentence;
a source language sentence supply unit that supplies the source language sentence to the estimation unit;
Equipped with
the model has been machine-trained based on training data including training source language sentences, training target language sentences corresponding to the training source language sentences, and training sentence number information indicating the number of sentences in the training target language sentences;
the estimation unit outputs the sentence number information corresponding to the source language sentence based on the source language sentence supplied by the source language sentence supply unit.
It is something that
the model has been trained using training data that is a pair of data of training source language sentences to which information on the number of sentences in the training target language sentences has been added, and data of the training target language sentences;
a source language sentence supply unit of the natural language processing apparatus supplies the input source language sentence to the estimation unit of the natural language processing apparatus;
the sentence number designation unit adds information on the number of sentences of the output target language sentence for output based on the sentence number information output by the estimation unit of the natural language processing device.
Translation device.
請求項1から4までのいずれか一項に記載の翻訳装置、としてコンピューターを機能させるためのプログラム。 A program for causing a computer to function as the translation device according to any one of claims 1 to 4 .
JP2021035594A 2021-03-05 2021-03-05 Natural language processing device, translation device, and program Active JP7624851B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021035594A JP7624851B2 (en) 2021-03-05 2021-03-05 Natural language processing device, translation device, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021035594A JP7624851B2 (en) 2021-03-05 2021-03-05 Natural language processing device, translation device, and program

Publications (2)

Publication Number Publication Date
JP2022135649A JP2022135649A (en) 2022-09-15
JP7624851B2 true JP7624851B2 (en) 2025-01-31

Family

ID=83232032

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021035594A Active JP7624851B2 (en) 2021-03-05 2021-03-05 Natural language processing device, translation device, and program

Country Status (1)

Country Link
JP (1) JP7624851B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008233955A (en) 2007-03-16 2008-10-02 Nippon Hoso Kyokai <Nhk> Example database creation device, example database creation program, translation device, and translation program
CN109344413A (en) 2018-10-16 2019-02-15 北京百度网讯科技有限公司 Translation processing method and apparatus
JP2019036093A (en) 2017-08-14 2019-03-07 日本電信電話株式会社 Model learning device, conversion device, method, and program
JP2020166501A (en) 2019-03-29 2020-10-08 株式会社日立製作所 Split model generation system, text segmentation device and split model generation method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008233955A (en) 2007-03-16 2008-10-02 Nippon Hoso Kyokai <Nhk> Example database creation device, example database creation program, translation device, and translation program
JP2019036093A (en) 2017-08-14 2019-03-07 日本電信電話株式会社 Model learning device, conversion device, method, and program
CN109344413A (en) 2018-10-16 2019-02-15 北京百度网讯科技有限公司 Translation processing method and apparatus
JP2020166501A (en) 2019-03-29 2020-10-08 株式会社日立製作所 Split model generation system, text segmentation device and split model generation method

Also Published As

Publication number Publication date
JP2022135649A (en) 2022-09-15

Similar Documents

Publication Publication Date Title
US11816442B2 (en) Multi-turn dialogue response generation with autoregressive transformer models
US11934781B2 (en) Systems and methods for controllable text summarization
US12032910B2 (en) Joint intent and entity recognition using transformer models
US12079602B2 (en) Systems and methods for a conversational framework of program synthesis
US11520992B2 (en) Hybrid learning system for natural language understanding
US10970487B2 (en) Templated rule-based data augmentation for intent extraction
CN107656921B (en) A short text dependency analysis method based on deep learning
US20240176962A1 (en) CROSS-LINGUAL NATURAL LANGUAGE UNDERSTANDING MODEL FOR MULTI-LANGUAGE NATURAL LANGUAGE UNDERSTANDING (mNLU)
US20220100967A1 (en) Lifecycle management for customized natural language processing
CN119968612A (en) Code recommendations based on software licenses
US20220229986A1 (en) System and method for compiling and using taxonomy lookup sources in a natural language understanding (nlu) framework
US20240241714A1 (en) Source code conversion from an original computer programming language to a target programming language
JP7624851B2 (en) Natural language processing device, translation device, and program
JP7527176B2 (en) Translation device, learning device, translation method, and program
JP7716885B2 (en) Natural language processing device, classification device, and program
US20260050589A1 (en) Better inference pattern for long context retrieval
Du et al. Generate-then-Revise: An Effective Synthetic Training Data Generation Framework for Event Detection
KR20240073535A (en) Method and apparatus for training question generation model
JP2025122963A (en) Information processing device and program
JP2025162196A (en) Comment generation program, comment generation device, and comment generation method
JP2025071488A (en) Voice recognition device and program
Sulaiman Digital Linguistic Sovereignty: The Exclusion of African Languages in Natural Language Processing

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

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20240201

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20240918

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20241105

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20241213

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20241224

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20250121

R150 Certificate of patent or registration of utility model

Ref document number: 7624851

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150