JP6965951B2 - Training methods, devices and storage media for neural machine translation models - Google Patents
Training methods, devices and storage media for neural machine translation models Download PDFInfo
- Publication number
- JP6965951B2 JP6965951B2 JP2020029283A JP2020029283A JP6965951B2 JP 6965951 B2 JP6965951 B2 JP 6965951B2 JP 2020029283 A JP2020029283 A JP 2020029283A JP 2020029283 A JP2020029283 A JP 2020029283A JP 6965951 B2 JP6965951 B2 JP 6965951B2
- Authority
- JP
- Japan
- Prior art keywords
- sentence
- machine translation
- model
- training
- corpus
- 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
Links
- 238000013519 translation Methods 0.000 title claims description 137
- 230000001537 neural effect Effects 0.000 title claims description 92
- 238000012549 training Methods 0.000 title claims description 82
- 238000000034 method Methods 0.000 title claims description 58
- 238000004590 computer program Methods 0.000 claims description 11
- 238000004364 calculation method Methods 0.000 claims description 5
- 230000015654 memory Effects 0.000 description 27
- 230000008569 process Effects 0.000 description 19
- 238000004422 calculation algorithm Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 9
- 238000012545 processing Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 4
- 238000013528 artificial neural network Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000003058 natural language processing Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000013441 quality evaluation Methods 0.000 description 1
- 230000002194 synthesizing effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Machine Translation (AREA)
Description
本発明は自然言語処理(NLP、 Natural Language Processing)におけるニューラル機械翻訳技術分野に関し、具体的にはニューラル機械翻訳モデルの訓練方法、装置及び記憶媒体に関する。 The present invention relates to the field of neural machine translation technology in natural language processing (NLP), and specifically to training methods, devices and storage media for neural machine translation models.
ニューラル機械翻訳(NMT、 Neural Machine Translation)はニューラルネットワークを直接に用いてエンドツーエンド方式で翻訳モデリングを行う機械翻訳方法を指す。ディープランニング技術を利用して従来の統計機械翻訳におけるあるモジュールを完璧にする方法と異なり、ニューラル機械翻訳はシンプルで直観的な方法を用いて翻訳作業を実現する。まず、エンコーダ(Encoder)と呼ばれるニューラルネットワークを用いてソース言語センテンスを密集ベクトルに符号化し、次に、デコーダ(Decoder)と呼ばれるニューラルネットワークを用いて該ベクトルからターゲット言語センテンスを復号する。上記ニューラルネットワークモデルは一般的には「エンコーダ-デコーダ(Encoder-Decoder)」構造と呼ばれる。 Neural Machine Translation (NMT) refers to a machine translation method that uses a neural network directly to perform end-to-end translation modeling. Unlike traditional methods of perfecting certain modules in statistical machine translation using deep running techniques, neural machine translation uses a simple and intuitive method to accomplish the translation task. First, a neural network called an encoder is used to encode the source language sentence into a dense vector, and then a neural network called a decoder is used to decode the target language sentence from the vector. The neural network model is commonly referred to as an "encoder-decoder" structure.
従来技術は、機械翻訳品質を評価するために、二言語相互翻訳品質評価(BLEU、 Blingual Evaluation Understudy)アルゴリズムを使用することが多い。BLEUアルゴリズムの設計思想は機械翻訳の良否を判断する考え方と一致する。即ち、機械翻訳結果が専門的な人工翻訳の結果に近ければ近いほど、翻訳品質が良好である。Nグラム(N-gram)は統計言語モデルであり、該モデルは一つのセンテンスをN個の連続する単語から構成される単語列で表示することができる。コンテキストにおける隣接単語間の組み合わせ情報を利用してセンテンスの確率を計算することにより、この一つのセンテンスのロジックが順当か否かを判断する。BLEUアルゴリズムはN-gramのマッチングルールを用いる。それによって予測訳文と参照訳文とにおけるNグラム類似の占有率を計算し、さらに機械翻訳品質の評価指標を得ることができる。 Conventional techniques often use a bilingual mutual translation quality evaluation (BLEU) algorithm to evaluate machine translation quality. The design concept of the BLEU algorithm is consistent with the idea of judging the quality of machine translation. That is, the closer the machine translation result is to the result of professional artificial translation, the better the translation quality. N-gram is a statistical language model, which can display one sentence as a word string composed of N consecutive words. By calculating the probability of a sentence using the combination information between adjacent words in the context, it is judged whether or not the logic of this one sentence is appropriate. The BLEU algorithm uses N-gram matching rules. Thereby, the occupancy rate similar to N grams in the predicted translation and the reference translation can be calculated, and the evaluation index of the machine translation quality can be obtained.
現在のところ、一般的なNMTモデルは系列‐系列(seq2seq)モデル、畳み込み系列−系列(convS2S)モデルおよびtransformerモデルがある。これらの従来技術はニューラル機械モデル自体を改善することによって機械翻訳性能を向上させている。このため、従来のニューラル機械翻訳の翻訳性能をさらに向上させ、ソース言語とターゲット言語との間の翻訳をより正確に実現することは、当技術分野において早急に解決しようとする技術的課題である。 Currently, common NMT models include the series-series (seq2seq) model, the convolution series-series (convS2S) model, and the transformer model. These prior arts improve machine translation performance by improving the neural machine model itself. Therefore, further improving the translation performance of conventional neural machine translation and realizing more accurate translation between the source language and the target language is a technical problem to be solved immediately in this technical field. ..
本発明の実施例は上記の技術的な課題を鑑みて、ニューラル機械翻訳モデルの訓練方法、装置及び記憶媒体を提供し、ニューラル機械翻訳の翻訳性能を向上させる。 In view of the above technical problems, the embodiment of the present invention provides a training method, an apparatus and a storage medium for a neural machine translation model, and improves the translation performance of the neural machine translation.
上記技術的な問題を解決するために、本発明の実施例は、ニューラル機械翻訳モデルの訓練方法であって、Nグラムのターゲットセンテンスコーパスにおける出現頻度を計算するステップであって、前記ターゲットセンテンスコーパスは複数のターゲットセンテンスを含み、Nは2以上である、ステップと、前記Nグラムから前記出現頻度が所定閾値より高い高頻度Nグラムを選択し、所定の区切り記号により、前記ターゲットセンテンスに存在する前記高頻度Nグラムを一つの一体化単語に合成し、更新されたターゲットセンテンスコーパスを取得するステップと、ソースセンテンスコーパス及び更新されたターゲットセンテンスコーパスを利用して、ニューラル機械翻訳モデルを訓練するステップと、を含むことを特徴とする訓練方法を提供する。 In order to solve the above technical problem, an embodiment of the present invention is a method for training a neural machine translation model, which is a step of calculating the frequency of occurrence of N grams in a target sentence corpus, and is a step of calculating the frequency of occurrence of the target sentence corpus. Contains a plurality of target sentences, N is 2 or more, a step and a high frequency N gram whose appearance frequency is higher than a predetermined threshold are selected from the N gram, and are present in the target sentence by a predetermined delimiter. A step of synthesizing the high-frequency N-grams into one integrated word to obtain an updated target sentence corpus, and a step of training a neural machine translation model using the source sentence corpus and the updated target sentence corpus. And, a training method characterized by including.
好ましくは、ニューラル機械翻訳モデルを訓練した後に、訓練されたニューラル機械翻訳モデルを用いて、翻訳すべきセンテンスを翻訳して予測センテンスを取得するステップと、前記予測センテンスに前記一体化単語が存在する場合、前記予測センテンスに存在する前記一体化単語を分離的なN個の単語にリセットした後に、前記予測センテンスを出力するステップと、前記予測センテンスに前記一体化単語が存在しない場合、前記予測センテンスをそのまま出力するステップと、をさらに含む。 Preferably, after training the neural machine translation model, the trained neural machine translation model is used to translate the sentence to be translated to obtain the predicted sentence, and the integrated word is present in the predicted sentence. In the case, the step of outputting the predicted sentence after resetting the integrated word existing in the predicted sentence to N separate words, and the predicted sentence when the integrated word does not exist in the predicted sentence. Further includes a step of outputting as it is.
好ましくは、前記予測センテンスに存在する前記一体化単語を分離的なN個の単語にリセットするステップは、前記一体化単語における所定の区切り記号に基づいて、前記予測センテンスに存在する前記一体化単語に対して分割を行い、N個の単語を取得するステップ、を含む。 Preferably, the step of resetting the integrated word present in the predicted sentence to N separate words is the integrated word present in the predicted sentence based on a predetermined delimiter in the integrated word. Includes a step of dividing into and retrieving N words.
好ましくは、ソースセンテンスコーパス及び更新されたターゲットセンテンスコーパスを利用して、ニューラル機械翻訳モデルを訓練するステップは、ソースセンテンスコーパスにおけるソースセンテンス及び前記ソースセンテンスに対応するターゲットセンテンスからなる平行コーパスを用いて、ニューラル機械翻訳モデルを訓練するステップ、を含み、前記ターゲットセンテンスに存在する前記一体化単語は、訓練において分割されない。 Preferably, the step of training the neural machine translation model using the source sentence corpus and the updated target sentence corpus uses a parallel corpus consisting of the source sentence in the source sentence corpus and the target sentence corresponding to the source sentence. , The integrated word present in the target sentence, including the step of training the neural machine translation model, is not divided in the training.
好ましくは、前記Nグラムは、2グラム、3グラム又は4グラムである。 Preferably, the N grams are 2 grams, 3 grams or 4 grams.
好ましくは、前記ニューラル機械翻訳モデルは、seq2seqモデル、convS2Sモデル又はtransformerモデルである。 Preferably, the neural machine translation model is a seq2seq model, a convS2S model, or a transformer model.
また、本発明の実施例は、ニューラル機械翻訳モデルの訓練装置であって、Nグラムのターゲットセンテンスコーパスにおける出現頻度を計算する頻度計算ユニットであって、前記ターゲットセンテンスコーパスは複数のターゲットセンテンスを含み、Nは2以上である、頻度計算ユニットと、前記Nグラムから前記出現頻度が所定閾値より高い高頻度Nグラムを選択し、所定の区切り記号により、前記ターゲットセンテンスに存在する前記高頻度Nグラムを一つの一体化単語に合成し、更新されたターゲットセンテンスコーパスを取得する単語セットユニットと、ソースセンテンスコーパス及び更新されたターゲットセンテンスコーパスを利用して、ニューラル機械翻訳モデルを訓練するモデル訓練ユニットと、を含む訓練装置を提供する。 Further, an embodiment of the present invention is a training device for a neural machine translation model, which is a frequency calculation unit for calculating the appearance frequency of N grams in a target sentence corpus, and the target sentence corpus includes a plurality of target sentences. , N is 2 or more, the frequency calculation unit and the high frequency N gram whose appearance frequency is higher than a predetermined threshold are selected from the N gram, and the high frequency N gram existing in the target sentence by a predetermined delimiter. A word set unit that synthesizes into one integrated word and obtains an updated target sentence corpus, and a model training unit that trains a neural machine translation model using the source sentence corpus and the updated target sentence corpus. , Including training equipment.
好ましくは、前記訓練装置は、前記モデル訓練ユニットにより訓練されたニューラル機械翻訳モデルを用いて、翻訳すべきセンテンスを翻訳して予測センテンスを取得し、前記予測センテンスに前記一体化単語が存在する場合、前記予測センテンスに存在する前記一体化単語を分離的なN個の単語にリセットした後に、前記予測センテンスを出力し、前記予測センテンスに前記一体化単語が存在しない場合、前記予測センテンスをそのまま出力する翻訳ユニット、をさらに含む。 Preferably, the training device uses a neural machine translation model trained by the model training unit to translate a sentence to be translated to obtain a predicted sentence, and the integrated word is present in the predicted sentence. After resetting the integrated word existing in the predicted sentence to N separate words, the predicted sentence is output, and if the integrated word does not exist in the predicted sentence, the predicted sentence is output as it is. Also includes a translation unit, which does.
好ましくは、前記訓練装置において、前記翻訳ユニットは、前記一体化単語における所定の区切り記号に基づいて、前記予測センテンスに存在する前記一体化単語に対して分割を行い、N個の単語を取得する。 Preferably, in the training device, the translation unit divides the integrated word existing in the predicted sentence based on a predetermined delimiter in the integrated word, and acquires N words. ..
好ましくは、前記訓練装置において、前記モデル訓練ユニットは、ソースセンテンスコーパスにおけるソースセンテンス及び前記ソースセンテンスに対応するターゲットセンテンスからなる平行コーパスを用いて、ニューラル機械翻訳モデルを訓練し、前記ターゲットセンテンスに存在する前記一体化単語は、訓練において分割されない。 Preferably, in the training apparatus, the model training unit trains a neural machine translation model using a parallel corpus consisting of a source sentence in the source sentence corpus and a target sentence corresponding to the source sentence, and is present in the target sentence. The united word to be used is not divided in training.
好ましくは、前記訓練装置において、前記Nグラムは、2グラム、3グラム又は4グラムである。 Preferably, in the training device, the N grams are 2 grams, 3 grams or 4 grams.
好ましくは、前記訓練装置において、前記ニューラル機械翻訳モデルは、seq2seqモデル、convS2Sモデル又はtransformerモデルである。 Preferably, in the training apparatus, the neural machine translation model is a seq2seq model, a convS2S model, or a transformer model.
更に、本発明の実施例は、ニューラル機械翻訳モデルの訓練装置を提供し、メモリと、プロセッサと、前記メモリに記憶されるコンピュータプログラムとを含み、前記コンピュータプログラムがプロセッサに実行されると、上記ニューラル機械翻訳モデルの訓練方法におけるステップが実現されることを特徴とする装置を提供する。 Further, an embodiment of the present invention provides a training device for a neural machine translation model, which includes a memory, a processor, and a computer program stored in the memory, and when the computer program is executed by the processor, the above Provided is an apparatus characterized in that steps in a method of training a neural machine translation model are realized.
最後に、本発明の実施例は、コンピュータプログラムが記憶されているコンピュータ読み取り可能な記憶媒体であって、前記コンピュータプログラムがプロセッサに実行されると、上記ニューラル機械翻訳モデルの訓練方法のステップが実現されることを特徴とする記憶媒体を提供する。 Finally, an embodiment of the present invention is a computer-readable storage medium in which a computer program is stored, and when the computer program is executed by a processor, the steps of the training method of the neural machine translation model are realized. Provided is a storage medium characterized by being used.
従来技術に比べて、本発明の実施例が提供するニューラル機械翻訳モデルの訓練方法、装置及び記憶媒体は、ニューラル機械翻訳モデルの訓練過程において、ターゲットセンテンスコーパスにおいて発生頻度が所定の閾値よりも高い高頻度Nグラムを分割不可な単語として訓練することにより、訓練されたニューラル機械翻訳モデルを用いて実際の翻訳を行い、得られた予測センテンスに含まれる高頻度NグラムをN個の単語に分割することで、正しく翻訳された単語から構成されるより多くのNグラムを含む翻訳結果が得られる。それにより、ニューラル機械翻訳の採点結果が向上され、機械翻訳品質が向上される。 Compared with the prior art, the training method, apparatus and storage medium of the neural machine translation model provided by the embodiment of the present invention have a higher frequency of occurrence in the target sentence corpus than a predetermined threshold in the training process of the neural machine translation model. By training the high-frequency N-grams as indivisible words, the actual translation is performed using the trained neural machine translation model, and the high-frequency N-grams contained in the obtained predicted sentence are divided into N words. This will give you a translation result that contains more N grams of correctly translated words. As a result, the scoring result of the neural machine translation is improved, and the machine translation quality is improved.
本発明の実施例の技術的解決手段をより明確に説明するために、以下では本発明の実施例の説明に必要な図面を簡単に説明し、明らかなように、以下の説明における図面は本発明のいくつかの実施例に過ぎず、当業者にとっては、創造的な労力を払うことなく、さらにこれら図面に基づいて他の図面を取得することができる。
本発明が解決しようとする技術的問題、技術的解決手段及び利点をより明確にするために、以下では図面及び具体的な実施例を参照しながら詳細に説明する。以下の説明では、特定の構成および構成要素などの特定の詳細は、本発明の実施形態を完全に理解するのを助けるために提供される。したがって、本発明の範囲および精神から逸脱することなく、本明細書に記載される実施形態に様々な変更および修正を加えることができることが当業者には明らかであろう。また、公知の機能及び構成について、簡潔にするために、その説明を省略する。 In order to clarify the technical problems, technical solutions and advantages to be solved by the present invention, the following will be described in detail with reference to the drawings and specific examples. In the following description, specific details, such as specific configurations and components, are provided to aid in a complete understanding of embodiments of the present invention. Therefore, it will be apparent to those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. In addition, the description of known functions and configurations will be omitted for the sake of brevity.
本明細書全体を通して言及される「一つの実施例」または「一実施例」は、実施例に関連する特定の特徴、構造または特性が、本発明の少なくとも1つの実施例に含まれることを意味することが理解されるべきである。したがって、明細書全体を通して出現する「一つの実施例では」または「一実施例では」という用語は必ずしも同じ実施例を指すものではない。さらに、これらの特定の特徴、構造や特性は、任意で適切な方法で1つまたは複数の実施例に組み込むことができる。 "One Example" or "One Example" as referred to throughout the specification means that a particular feature, structure or property associated with an example is included in at least one embodiment of the present invention. It should be understood to do. Therefore, the terms "in one embodiment" or "in one embodiment" that appear throughout the specification do not necessarily refer to the same embodiment. Moreover, these particular features, structures and properties can optionally be incorporated into one or more embodiments in any suitable manner.
本発明の様々な実施例において、以下の各プロセスの番号の大きさは実行順序の前後を意味するものではないと理解されるべきである。各プロセスの実行順序はその機能または固有な論理によって決定されるものであり、本発明の実施例にかかる実施プロセスを限定するものでもない。 In various embodiments of the present invention, it should be understood that the magnitude of each process number below does not mean before or after the order of execution. The execution order of each process is determined by its function or its own logic, and does not limit the execution process according to the embodiment of the present invention.
図1は本発明の実施例より提供されるニューラル機械翻訳モデルの訓練方法を示すフローチャートである。該ニューラル機械翻訳モデルの訓練方法は訓練して得られたニューラル機械翻訳モデルの翻訳性能を向上させることができる。具体的には、前記ニューラル機械翻訳モデルは系列−系列(seq2seq)モデル、畳み込み系列−系列(convS2S)モデル又はtransformerモデルである。当然ながら、本発明の実施例はさらに他のタイプのニューラル機械翻訳モデルを適用することができる。本発明はこれを詳細に限定しない。図1に示すように、本発明の実施例より提供されるニューラル機械翻訳モデルの訓練方法は以下を含む。 FIG. 1 is a flowchart showing a training method of a neural machine translation model provided by an embodiment of the present invention. The training method of the neural machine translation model can improve the translation performance of the neural machine translation model obtained by training. Specifically, the neural machine translation model is a series-series (seq2seq) model, a convolution series-series (convS2S) model, or a transformer model. Of course, the embodiments of the present invention can still apply other types of neural machine translation models. The present invention does not limit this in detail. As shown in FIG. 1, the training method of the neural machine translation model provided by the embodiment of the present invention includes the following.
ステップ101で、Nグラムのターゲットセンテンスコーパスにおける出現頻度を計算し、前記ターゲットセンテンスコーパスは複数のターゲットセンテンスを含み、前記Nは2以上である。
In
ニューラル機械翻訳モデルの訓練過程において、訓練コーパスは一般的にソースセンテンスコーパス及びターゲットセンテンスコーパスを含む。ソースセンテンスコーパスは複数のソース言語のソースセンテンスを含み、ターゲットセンテンスコーパスは複数のターゲット言語のターゲットセンテンスを含む。ソースセンテンス毎には該当ソースセンテンスに対応するターゲットセンテンスが存在し、両者は一つの平行なコーパスを構成する。本発明の実施例は上記ステップ101において、ターゲットセンテンスコーパスにおける各種のNグラムの出現頻度を計算する。例えば、ターゲットセンテンスのコーパスに100万個のターゲットセンテンスが含まれるとし、あるNグラムはこれらのターゲットセンテンスにおいて合計2万回出現し、該Nグラムの出現頻度は2/100=0.02である。当然のことながら、出現頻度は出現回数に応じて統計することができ、この場合、該Nグラムの出現頻度は20万回である。
In the process of training a neural machine translation model, the training corpus generally includes a source sentence corpus and a target sentence corpus. A source sentence corpus contains source sentences in multiple source languages, and a target sentence corpus contains target sentences in multiple target languages. Each source sentence has a target sentence corresponding to the corresponding source sentence, and both form one parallel corpus. In the embodiment of the present invention, in
ここで、Nグラムに関する概念について、従来技術の関連説明を参照することができる。通常、前記Nグラムは対応するセンテンスにおいてN個の連続する単語であってもよく、N個の連続する単語及び句読点であってもよい。これらの単語及び句読点はセンテンスの中で連続すればよく、紙面を節約するために、ここでは詳細な説明を省略する。好ましくは、Nは2以上の整数であり、例えば、2、3又は4の値を取る。当然ながら、他のより大きな数値であってもよい。好ましい実施形態として、BLEUアルゴリズムでは一般的に4グラムを用いて機械翻訳性能を評価するため、本発明の実施例ではNグラムは4グラムであることが好ましい。ターゲット言語が英語であることを例とする場合に、ターゲットセンテンスである「it is said that it will rain tomorrow」に、Nグラムは「it is said that」、「is said that it」、「said that it will」…「it will rain tomorrow」等複数ある。本発明の実施例は、そのうちの「it is said that」に対して、当該4グラムがターゲットセンテンスコーパスのすべてのターゲットセンテンスにおける出現頻度を計算する。 Here, you can refer to the related description of the prior art for the concept of N-grams. Generally, the N-gram may be N consecutive words or N consecutive words and punctuation marks in the corresponding sentence. These words and punctuation may be continuous in the sentence, and detailed description is omitted here in order to save space. Preferably, N is an integer greater than or equal to 2 and can take a value of, for example, 2, 3 or 4. Of course, it may be another larger number. As a preferred embodiment, the BLEU algorithm generally uses 4 grams to evaluate machine translation performance, so in the examples of the present invention, N grams is preferably 4 grams. For example, if the target language is English, the target sentence is "it is said that it will rain tomorrow", and Ngram is "it is said that", "is said that it", and "said that". "it will" ... "it will rain tomorrow" and so on. In the embodiment of the present invention, for "it is said that", the frequency of occurrence of the 4 grams in all target sentences of the target sentence corpus is calculated.
ステップ102で、前記Nグラムから前記出現頻度が予め設定された閾値より高い高頻度Nグラムを選択し、且つ所定の区切り記号を介して、前記ターゲットセンテンスに存在する前記高頻度Nグラムを一つの一体化単語として構成することにより、更新されたターゲットセンテンスコーパスを得る。
In
ここで、本発明の実施例はNグラムの出現頻度が予め設定された閾値より高いかどうかに基づいて、Nグラムが高頻度Nグラムであるか否かを決定する。高頻度Nグラムは該Nグラムがターゲットセンテンスコーパスにおいて頻繁に出現することを意味する。このため、該Nグラムはしばしば一体として使用される。以上の要因を考慮し、本発明の実施例は高頻度Nグラムを一つの分割不可な一体化単語として構成する。前記分割不可はニューラル機械翻訳モデルの訓練過程において該一体化単語がさらに小さいサブワードに分割されることを禁止することを意味する。 Here, the embodiment of the present invention determines whether or not N-gram is a high-frequency N-gram based on whether or not the appearance frequency of N-gram is higher than a preset threshold value. A high frequency N-gram means that the N-gram appears frequently in the target sentence corpus. For this reason, the N-grams are often used together. In consideration of the above factors, the embodiment of the present invention constructs a high-frequency N-gram as one indivisible integrated word. The indivisible means prohibiting the integrated word from being divided into smaller subwords during the training process of the neural machine translation model.
モデル訓練の際に、上記高頻度Nグラムからなる一体化単語の識別を容易にするために、本発明の実施例は所定の区切り記号を用いて高頻度Nグラム内の各単語を連結して、一つの一体化単語を形成する。例えば、「@_」をNグラム内の各単語を接続するため区切り記号として使用することができる。上記の「it is said that」を例にとると、上述の区切り記号によって、「it@_is@_said@_that」という一体化単語が得られる。以上の処理により、本発明の実施例はターゲットセンテンスコーパスにおける各ターゲットセンテンスに存在する高頻度Nグラムを一体化単語とすることにより、ターゲットセンテンスコーパスの更新を実現する。当然ながら、あるターゲットセンテンスに高頻度Nグラムが存在しない場合には、上記の処理を行う必要がない。 In order to facilitate the identification of the integrated word consisting of the high frequency N gram during model training, in the embodiment of the present invention, each word in the high frequency N gram is concatenated by using a predetermined delimiter. , Form one united word. For example, "@_" can be used as a delimiter to connect each word in the Ngram. Taking the above "it is said that" as an example, the above delimiter gives the unified word "it @ _is @ _said @ _that". Through the above processing, the embodiment of the present invention realizes the update of the target sentence corpus by using the high frequency N grams existing in each target sentence in the target sentence corpus as an integrated word. Of course, if a high frequency N-gram is not present in a target sentence, the above process does not need to be performed.
なお、後続のニューラル機械翻訳モデルの訓練過程において採用される単語分割アルゴリズムは特定の区切り記号を使用する場合がある。ステップ102での前記所定の区切り記号は上記単語分割アルゴリズムで使用する区切り記号とは区別する必要があり、即ち、それと異なる区切り記号を使用する。例えば、バイトペアエンコーダ(BPE、 Byte Pair Encoder)アルゴリズムを例にとると、BPEでは「@@」を区切り記号として用いた場合、後続する訓練モデルがBPEアルゴリズムを採用すると、ステップ102において所定の区切り記号は「@@」と異なる区切り記号を用いる必要がある。
Note that the word division algorithm adopted in the subsequent training process of the neural machine translation model may use a specific delimiter. The predetermined delimiter in
ステップ103で、ソースセンテンスコーパス及び更新されたターゲットセンテンスコーパスを利用して、ニューラル機械翻訳モデルを訓練する。
In
上記ステップ103において、本発明の実施例は更新されたターゲットセンテンスコーパスとオリジナルのソースセンテンスコーパスを利用し、ニューラル機械翻訳モデルを訓練し、 ソース言語からターゲット言語への翻訳用の訓練済みの最終ニューラル機械翻訳モデルを得る。
In
上記訓練過程において、本発明の実施例は、ソースセンテンスコーパスにおけるソースセンテンス及び前記ソースセンテンスに対応するターゲットセンテンスからなる平行コーパスを用いて、ニューラル機械翻訳モデルを訓練する。その中で、前記ターゲットセンテンスに高頻度Nグラムにより構成される一体化単語が存在する場合、訓練過程において、該一体化単語の分割を禁止する。すなわち、訓練過程において、ターゲットセンテンスに前記一体化単語が存在する場合、該一体化単語に対して更なる分割を行わない。 In the above training process, the embodiment of the present invention trains a neural machine translation model using a parallel corpus consisting of a source sentence in the source sentence corpus and a target sentence corresponding to the source sentence. Among them, when the target sentence contains an integrated word composed of high-frequency N-grams, the division of the integrated word is prohibited in the training process. That is, in the training process, if the integrated word is present in the target sentence, the integrated word is not further divided.
なお、本発明の実施例はニューラル機械翻訳モデルに適用されることができる。例えば、上記ステップ103において、前記ニューラル機械翻訳モデルは系列−系列(seq2seq)モデル、畳み込み系列−系列(convS2S)モデル又はtransformerモデルである。他のタイプのニューラル機械翻訳モデルを適用することもできるが、本発明はこれを詳細に限定しない。
The embodiment of the present invention can be applied to a neural machine translation model. For example, in
以上のステップにより、本発明の実施例は、高頻度Nグラムにより構成される一体化単語を利用してニューラル機械翻訳モデルの訓練を行い、訓練過程において高頻度Nグラムが一体として訓練することを保証される。このように訓練されたニューラル機械翻訳モデルは実際の翻訳時に多くの高頻度Nグラムを含む翻訳結果を得ることにより、ニューラル機械翻訳の採点結果が向上され、機械翻訳品質が向上される。 According to the above steps, in the embodiment of the present invention, the neural machine translation model is trained using the integrated word composed of the high-frequency N-grams, and the high-frequency N-grams are trained as one in the training process. Guaranteed. The neural machine translation model trained in this way improves the scoring result of the neural machine translation and improves the machine translation quality by obtaining the translation result containing many high-frequency N-grams at the time of actual translation.
本発明の実施例にかかるニューラル機械翻訳モデルの訓練方法は、以上のステップ101〜103により、より高い翻訳性能を有するニューラル機械翻訳モデルを得ることができる。その後に訓練された前記ニューラル機械翻訳モデルを利用してソース言語からターゲット言語への翻訳を行うことができる。
In the method for training the neural machine translation model according to the embodiment of the present invention, a neural machine translation model having higher translation performance can be obtained by the
図2は本発明の実施例が提供するニューラル機械翻訳モデルの訓練方法を示す。上記ステップ103の後に、さらに以下のステップを含む。
FIG. 2 shows a training method of a neural machine translation model provided by an embodiment of the present invention. Following
ステップ104で、訓練されたニューラル機械翻訳モデルを用いて、翻訳対象である翻訳センテンスを翻訳して予測センテンスを得る。
In
ステップ105で、前記予測センテンスに前記一体化単語が存在する場合、前記予測センテンスに存在する前記一体化単語を分離するN個の単語にリセットした後に、前記予測センテンスを出力する。
In
ステップ106で、前記予測センテンスに前記一体化単語が存在しない場合、前記予測センテンスをそのまま出力する。
In
以上のステップ104において、ステップ103で得たニューラル機械翻訳モデルを利用して翻訳を行い、翻訳された予測センテンスには高頻度Nグラムで構成される一体化単語が含まれる場合がある。このため、本発明の実施例はステップ105で、その中に存在する可能性がある一体化単語をさらに分割する。具体的には、前記一体化単語における所定の区切り記号に基づいて、隣接する単語間の分割点を確定し、前記予測センテンスに存在する前記一体化単語に対してさらに分割を行うことにより、N個の単語が得られる。もちろん、前記予測センテンスに前記一体化単語が存在しない場合には、ステップ106で該予測センテンスをそのまま出力する。
In
以上のステップにより、本発明の実施例は訓練されたニューラル機械翻訳モデルによる翻訳応用を実現する。予めト訓練されたニューラル機械翻訳モデルは、実際の翻訳時により多くのNグラムを含む翻訳結果を得ることにより、ニューラル機械翻訳のスコア結果が向上され、機械翻訳品質が向上される。 Through the above steps, the embodiment of the present invention realizes a translation application by a trained neural machine translation model. The pre-trained neural machine translation model improves the score result of neural machine translation and improves the machine translation quality by obtaining the translation result containing more N grams at the time of actual translation.
以上の方法に基づき、本発明の実施例はさらに上記方法を実施する装置を提供する。図3に示すように、本発明の実施例にかかるニューラル機械翻訳モデルの訓練装置300は、以下のユニットを含む。
Based on the above method, the examples of the present invention further provide an apparatus for carrying out the above method. As shown in FIG. 3, the
頻度計算ユニット301は、Nグラムのターゲットセンテンスコーパスにおける出現頻度を計算し、前記ターゲットセンテンスコーパスは複数のターゲットセンテンスを含み、前記Nは2以上である。
The
単語セットユニット302は、前記Nグラムから前記出現頻度が予め設定された閾値より高い高頻度Nグラムを選択し、且つ所定の区切り記号を介して、前記ターゲットセンテンスに存在する前記高頻度Nグラムを一つの一体化単語として構成することにより、更新されたターゲットセンテンスコーパスを得る。
The word set
モデル訓練ユニット303は、ソースセンテンスコーパス及び更新されたターゲットセンテンスコーパスを利用して、ニューラル機械翻訳モデルを訓練する。
The
以上のユニットにより、本発明の実施例にかかるニューラル機械翻訳モデルの訓練装置300は、高頻度Nグラムにより構成される一体化単語を利用してニューラル機械翻訳モデルの訓練を行い、訓練過程において高頻度Nグラムが一体として訓練することを保証される。このように訓練されたニューラル機械翻訳モデルは実際の翻訳時に多くの高頻度Nグラムを含む翻訳結果を得ることにより、ニューラル機械翻訳の採点結果が向上され、機械翻訳品質が向上される。
With the above unit, the neural machine translation
好ましくは、前記モデル訓練ユニット303は、ソースセンテンスコーパスにおけるソースセンテンス及び前記ソースセンテンスに対応するターゲットセンテンスからなる平行コーパスを用いて、ニューラル機械翻訳モデルを訓練し、その中で、前記ターゲットセンテンスに存在する前記一体化単語の分割は訓練過程において禁止される。
Preferably, the
好ましくは、前記Nグラムは2グラムまたは3グラム若しくは4グラムである。 Preferably, the N grams are 2 grams or 3 grams or 4 grams.
好ましくは、前記ニューラル機械翻訳モデルは系列−系列(seq2seq)モデルまたは畳み込み系列−系列(convS2S)モデル若しくはtransformerモデルである。 Preferably, the neural machine translation model is a series-series (seq2seq) model or a convolution series-series (convS2S) model or a transformer model.
好ましくは、図4に示すように、前記ニューラル機械翻訳モデルの訓練装置300は、更に、前記モデル訓練ユニット303により訓練されたニューラル機械翻訳モデルを用いて、翻訳対象である翻訳センテンスを翻訳して予測センテンスを得;前記予測センテンスに前記一体化単語が存在する場合、前記予測センテンスに存在する前記一体化単語を分離するN個の単語にリセットした後に、前記予測センテンスを出力し;前記予測センテンスに前記一体化単語が存在しない場合、前記予測センテンスをそのまま出力する翻訳ユニット304を含む。
Preferably, as shown in FIG. 4, the
好ましくは、翻訳ユニット304は、前記一体化単語における所定の区切り記号に基づいて、前記予測センテンスに存在する前記一体化単語に対して分割を行うことにより、N個の単語が得られる。
Preferably, the
図5は本発明の実施例にかかるニューラル機械翻訳モデルの訓練装置のハードウェア構成の一例を示すブロック図である。図5に示すように、該ニューラル機械翻訳モデルの訓練装置500は、プロセッサ502と、コンピュータプログラム指令が記憶されるメモリ504と、を含む。前記コンピュータプログラム指令が前記プロセッサ502によって実行されると、Nグラムのターゲットセンテンスコーパスにおける出現頻度を計算し、前記ターゲットセンテンスコーパスは複数のターゲットセンテンスを含み、前記Nは2以上であり;前記Nグラムから前記出現頻度が予め設定された閾値より高い高頻度Nグラムを選択し、且つ所定の区切り記号を介して、前記ターゲットセンテンスに存在する前記高頻度Nグラムを一つの一体化単語として構成することにより、更新されたターゲットセンテンスコーパスを得;ソースセンテンスコーパス及び更新されたターゲットセンテンスコーパスを利用して、ニューラル機械翻訳モデルを訓練するステップが実行される。
FIG. 5 is a block diagram showing an example of the hardware configuration of the training device of the neural machine translation model according to the embodiment of the present invention. As shown in FIG. 5, the
また、図5に示すように、該ニューラル機械翻訳モデルの訓練装置500はさらにネットワークインターフェース501、入力装置503、ハードディスク505、及び表示装置506を含む。
Further, as shown in FIG. 5, the
上記各インターフェースはバスアーキテクチャを介してそれぞれ各装置に接続される。バスアーキテクチャは任意の数の相互接続を含むことができるバスとブリッジである。具体的に、プロセッサ502に代表される1つ又は複数の中央処理器(CPU)と、メモリ504が代表される1つまたは複数のメモリの各種回路が接続される。また、バスアーキテクチャより、例えば外付け機器、レギュレータ―及び電力管理回路などの他の様々な回路が接続される。このように、バスアーキテクチャよりこれらの機器が通信可能に接続される。バスアーキテクチャは、データバス以外に、電源バス、制御バス及び状態信号バスを含む。これらは本発明分野の公知技術であり、本文において詳細な説明を省略する。
Each of the above interfaces is connected to each device via a bus architecture. A bus architecture is a bus and bridge that can contain any number of interconnects. Specifically, one or more central processing units (CPUs) represented by the
前記ネットワークインターフェース501は、ネットワーク(例えば、インターネットやLANなど)に接続され、ネットワークからソースセンテンスコーパス及びターゲットセンテンスコーパスを集め、ハードディスク505に記憶させるインターフェースである。
The
前記入力装置503はユーザより入力される各種指令を受け付け、プロセッサ502に送信して実行させる手段である。また、入力装置503はキーボードやクリック手段(例えば、マウス、トラックボール、タッチボード)等がある。
The
前記表示装置506はプロセッサ502が指令を実行した結果を表示する手段である。例えば、モデル訓練の進捗や翻訳するセンテンスの翻訳結果等を表示する。
The
前記メモリ504はオペレティングシステム(OS)実行に必要なプログラムとデータ、及びプロセッサ502の計算過程における中間結果等のデータを記憶するメモリである。
The
本発明の実施例にかかるメモリ504は揮発性メモリ又は非揮発性メモリ、もしくは揮発性と非揮発性の両方を含むメモリである。その中に、非揮発性メモリはROM、PROM、EPROM、EEPROM、フラッシュメモリである。揮発性メモリはRAMであり、外部キャッシュとして使用される。しかし、本明細書に記載される装置及び方法に用いったメモリ504はこれらのメモリに限定されず、他の適切なタイプのメモリでもよい。
The
一部の実施形態において、メモリ504に、実行可能なモジュール又はデータ構成若しくはこれらのサブモジュールや拡張モジュールであるオペレティングシステム(OS)5041及びアプリケーションプログラム(APP)5042が記憶される。
In some embodiments, the
その中に、オペレティングシステム5041は、各種システムプログラム、例えばフレームワーク層、コアライブラリ層、駆動層を含み、様々な基幹業務やハードウェアベースのタスクを実現するために用いられる。アプリケーションプログラム442は各種アプリケーションプログラム、例えばウェブブラウザ―(Browser)等を含み、様々なアプリケーション業務を実現するためのものである。本実施例にかかる方法を実行するプログラムはアプリケーションプログラム5042に含む。
Among them, the operating system 5041 includes various system programs such as a framework layer, a core library layer, and a driving layer, and is used to realize various mission-critical tasks and hardware-based tasks. The application program 442 includes various application programs such as a web browser (Browser), and is for realizing various application operations. A program that executes the method according to this embodiment is included in the
上記本発明の実施例にかかる方法は、プロセッサ402に適用され、またはプロセッサ402によって実現される。プロセッサ502は信号を処理する能力を持つ集積回路基板である。上記方法の各ステップはプロセッサ502におけるハードウェアである集積論理回路又はソフトウェア形式の指令によって実現される。上記プロセッサ502は汎用プロセッサ、デジタル信号処理装置(DSP)、専用集積回路(ASIC)、既製プログラマブルゲートアレイ(FPGA)または他のプログラマブル論理デバイス、ディスクリートゲートまたはトランジスタ論理デバイス、ディスクリートハードウェア部品であり、本発明の実施例に開示される各方法、ステップ及び論理ボックスを実現又は実行可能なものである。汎用処理器はマイクロプロセッサ又は任意の一般処理器などである。本発明の実施例にかかる方法の各ステップは、ハードウェアであるデコーダにより実行されることで実現されてもよく、または、デコーダにお行けるハードウェアとソフトウェアとの組み合わせによって実現されても良い。ソフトウェアモジュールはランダムメモリ、フラッシュメモリ、読出し専用メモリ、プログラマブル読出し専用メモリ、あるいは電気的消去可能なプログラマブルメモリ、レジスタなど、本分野で成熟した記憶媒体に記憶される。このソフトウェアが記憶される記憶媒体を備えるメモリ504から、プロセッサ502は情報を読み取り、ハードウェアに合わせて上記方法のステップを実現させる。
The method according to the embodiment of the present invention is applied to or realized by the processor 402.
以上に説明した実施例は、ハードウェア、ソフトウェア、ファームウェア、ミドルウェア、マイクロコード、またはそれらの組み合わせで実現される。その中に、ハードウェアの実現に関して、処理ユニットは一つまたは複数の専用集積回路(ASIC)、デジタル信号処理プロセッサ(DSP)、デジタル信号処理装置(DSPD)、プログラム可能論理回路 (PLD)、フィールドプログラマブルゲートアレイ(FPGA)、汎用プロセッサ、コントローラ、マイクロコントローラ、マイクロプロセッサ、本発明の機能を実行する他の電子ユニット或はその組合せにより実現される。 The embodiments described above are realized by hardware, software, firmware, middleware, microcode, or a combination thereof. Among them, regarding the realization of hardware, the processing unit is one or more dedicated integrated circuits (ASIC), digital signal processing processor (DSP), digital signal processing device (DSPD), programmable logic circuit (PLD), field. It is implemented by programmable gate arrays (FPGAs), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units that perform the functions of the present invention, or a combination thereof.
また、ソフトウェアの実現に関しては、以上で説明した機能を実現するモジュール(たとえばプロセス、関数など)により上記技術が実現される。ソフトウェアコードは、メモリに保存され、プロセッサによって実行される。なお、メモリはプロセッサの内部または外部で実現される。 Further, regarding the realization of software, the above technology is realized by a module (for example, a process, a function, etc.) that realizes the functions described above. The software code is stored in memory and executed by the processor. The memory is realized inside or outside the processor.
具体的に、前記コンピュータプログラムがプロセッサ502により実行される時に、ニューラル機械翻訳モデルを訓練した後に、訓練されたニューラル機械翻訳モデルを用いて、翻訳対象である翻訳センテンスを翻訳して予測センテンスを得;前記予測センテンスに前記一体化単語が存在する場合、前記予測センテンスに存在する前記一体化単語を分離するN個の単語にリセットした後に、前記予測センテンスを出力し;前記予測センテンスに前記一体化単語が存在しない場合、前記予測センテンスをそのまま出力するステップを含む。
Specifically, when the computer program is executed by the
具体的に、前記コンピュータプログラムがプロセッサ502により実行される時に、前記一体化単語における所定の区切り記号に基づいて、前記予測センテンスに存在する前記一体化単語に対して分割を行うことにより、N個の単語が得られるステップを含む。
Specifically, when the computer program is executed by the
具体的に、前記コンピュータプログラムがプロセッサ502により実行される時に、ソースセンテンスコーパスにおけるソースセンテンス及び前記ソースセンテンスに対応するターゲットセンテンスからなる平行コーパスを用いて、ニューラル機械翻訳モデルを訓練し、その中で、前記ターゲットセンテンスに存在する前記一体化単語の分割は訓練過程において禁止される。
Specifically, when the computer program is executed by
好ましくは、前記Nグラムは2グラムまたは3グラム若しくは4グラムである。 Preferably, the N grams are 2 grams or 3 grams or 4 grams.
好ましくは、前記ニューラル機械翻訳モデルは系列−系列(seq2seq)モデルまたは畳み込み系列−系列(convS2S)モデル若しくはtransformerモデルである。 Preferably, the neural machine translation model is a series-series (seq2seq) model or a convolution series-series (convS2S) model or a transformer model.
本発明の技術分野の当業者は、以上で開示された実施例に記載された各例のユニットおよびアルゴリズムのステップが、電子ハードウェア、またはコンピュータソフトウェアと電子ハードウェアとの組み合わせで実現されることが容易に想到される。これらの機能はハードウェアまたはソフトウェアのいずれかで実行することは、発明の特定的な適用や設計制約に依存する。当業者が特定の適用に応じた方法で上記の機能を実現させることができるが、本発明の範囲を超えるべきではない。 Those skilled in the art of the present invention will appreciate that the unit and algorithm steps of each of the examples described above are realized in electronic hardware, or in combination with computer software and electronic hardware. Is easily conceived. Performing these functions in either hardware or software depends on the specific application and design constraints of the invention. Those skilled in the art can achieve the above functions in a manner according to a particular application, but should not go beyond the scope of the present invention.
また、説明上便宜と簡潔性のため、上記のシステム、装置及びユニットの具体的な作業過程に関して、上記した実施例中の対応過程に参照することができることが、当業者とって明らかであるために、詳細な説明を省略する。 Also, for convenience and brevity for explanation, it will be apparent to those skilled in the art that the specific work processes of the above systems, devices and units can be referred to in the corresponding processes in the above examples. A detailed description will be omitted.
本願で提供される実施例において、理解すべきことは、開示された装置及び方法は、他の方式で実現されてもよいことである。例えば、以上に説明された装置実施例は概略的なものであり、例えば、前記ユニットの分割は、論理機能分割のみであり、実際に実現する時に別の分割方式を有することができ、例えば複数のユニット又は構成要素を組み合わせ又は集積することができ又はいくつかの特徴を無視することができ、又は実行しないことができる。また、表示又は議論された相互間の結合又は直接結合若しくは通信接続はいくつかのインターフェース、装置又はユニットの間接結合又は通信接続であってもよく、電気的であってもよく、機械的又は他の形式であってもよい。 In the embodiments provided in the present application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiment described above is a schematic one. For example, the division of the unit is only a logical function division, and it is possible to have another division method when actually realizing the unit, for example, a plurality of divisions. Units or components can be combined or integrated, or some features can be ignored or not implemented. Also, the coupling or direct coupling or communication connection between the displayed or discussed may be an indirect coupling or communication connection of some interface, device or unit, may be electrical, mechanical or other. It may be in the form of.
分離部品として説明されたユニットは、物理的に別個であってもなくてもよい。ユニットとして表示される部品は、物理ユニットであってもよく又は物理ユニットでなくてもよく、すなわち一つの場所に位置してもよく、又は複数のネットワークユニットに分散されてもよい。実際のニーズに応じてその中の一部又は全部のユニットを選択して本発明の実施例の解決手段を実現することができる。 The units described as separate parts may or may not be physically separate. The parts displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed among a plurality of network units. Some or all of the units can be selected according to the actual needs to realize the solution of the embodiment of the present invention.
なお、本発明の実施例にかかる各機能的ユニットは、1つの処理ユニットに集約しても良く、物理的に単独でもよく、2つ以上で一つのユニットとして集約してもよい。 Each functional unit according to the embodiment of the present invention may be integrated into one processing unit, physically alone, or two or more as one unit.
前記機能は、ソフトウェア機能ユニットの形で実現し、且つ、独立製品として販売または使用する場合に、コンピュータ読取り可能な記憶媒体に記憶することができる。この場合に、本発明の技術方案は本質的、または従来技術に貢献する部分若しくは前記技術方案の部分はソフトウェア製品の形で表現される。前記コンピュータソフトウェア製品は、記憶媒体に記憶され、コンピュータ装置(パーソナルコンピュータ、サーバ、或はネットワークデバイスなど)により本発明の各実施例にかかる前記方法の全部或は一部のステップを実行させる複数の指令を含む。なお、前述の記憶媒体は、USBメモリ、リムーバブルディスク、ROM、RAM、磁気ディスク、あるいは光ディスクなど、プログラムコードを格納できる様々な媒体を含む。 The function is realized in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. In this case, the technical plan of the present invention is essentially, or a part that contributes to the prior art or a part of the technical plan is expressed in the form of a software product. The computer software product is stored in a storage medium and causes a computer device (personal computer, server, network device, etc.) to perform all or part of the steps of the method according to each embodiment of the present invention. Includes directives. The above-mentioned storage medium includes various media such as a USB memory, a removable disk, a ROM, a RAM, a magnetic disk, or an optical disk, which can store a program code.
以上のように、本発明の具体的な実施形態に過ぎず、本発明の保護範囲はこれに限定されるものではなく、当業者が本発明に開示する技術範囲内で、容易に変更又は置換することができ、いずれも本発明の保護範囲内に含まれるべきである。従って、本発明の保護範囲は特許請求の保護範囲を基準とすべきである。 As described above, it is only a specific embodiment of the present invention, and the scope of protection of the present invention is not limited to this, and can be easily changed or replaced within the technical scope disclosed by those skilled in the art. And all should be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims (11)
Nグラムのターゲットセンテンスコーパスにおける出現頻度を計算するステップであって、前記ターゲットセンテンスコーパスは複数のターゲットセンテンスを含み、Nは2以上である、ステップと、
前記Nグラムから前記出現頻度が所定閾値より高い高頻度Nグラムを選択し、所定の区切り記号により、前記ターゲットセンテンスに存在する前記高頻度Nグラムを一つの一体化単語に合成し、更新されたターゲットセンテンスコーパスを取得するステップと、
ソースセンテンスコーパス及び更新されたターゲットセンテンスコーパスを利用して、ニューラル機械翻訳モデルを訓練するステップと、
訓練されたニューラル機械翻訳モデルを用いて、翻訳すべきセンテンスを翻訳して予測センテンスを取得するステップと、
前記予測センテンスに前記一体化単語が存在する場合、前記予測センテンスに存在する前記一体化単語を分離的なN個の単語にリセットした後に、前記予測センテンスを出力するステップと、
前記予測センテンスに前記一体化単語が存在しない場合、前記予測センテンスをそのまま出力するステップと、を含むことを特徴とする訓練方法。 A training method for neural machine translation models
A step of calculating the frequency of occurrence of N grams in a target sentence corpus, wherein the target sentence corpus contains a plurality of target sentences and N is 2 or more.
A high-frequency N-gram having an appearance frequency higher than a predetermined threshold was selected from the N-gram, and the high-frequency N-gram existing in the target sentence was synthesized into one integrated word by a predetermined delimiter and updated. Steps to get the target sentence corpus and
Steps to train a neural machine translation model using the source sentence corpus and the updated target sentence corpus,
Using a trained neural machine translation model, the steps to translate the sentence to be translated and obtain the predicted sentence,
When the integrated word is present in the predicted sentence, the step of outputting the predicted sentence after resetting the integrated word existing in the predicted sentence to N separate words.
A training method comprising a step of outputting the predicted sentence as it is when the integrated word does not exist in the predicted sentence.
前記一体化単語における所定の区切り記号に基づいて、前記予測センテンスに存在する前記一体化単語に対して分割を行い、N個の単語を取得するステップ、を含むことを特徴とする請求項1に記載の訓練方法。 The step of resetting the integrated word existing in the predicted sentence to N separate words is
Based on a predetermined delimiter in said integral words, the performed division to the integrated word present in the predicted sentence, the step of obtaining N pieces of word, in claim 1, characterized in that it comprises Described training method.
ソースセンテンスコーパスにおけるソースセンテンス及び前記ソースセンテンスに対応するターゲットセンテンスからなる平行コーパスを用いて、ニューラル機械翻訳モデルを訓練するステップ、を含み、
前記ターゲットセンテンスに存在する前記一体化単語は、訓練において分割されないことを特徴とする請求項1に記載の訓練方法。 The steps to train a neural machine translation model using the source sentence corpus and the updated target sentence corpus are:
Including a step of training a neural machine translation model using a parallel corpus consisting of a source sentence in the source sentence corpus and a target sentence corresponding to the source sentence.
The training method according to claim 1, wherein the integrated word existing in the target sentence is not divided in the training.
Nグラムのターゲットセンテンスコーパスにおける出現頻度を計算する頻度計算ユニットであって、前記ターゲットセンテンスコーパスは複数のターゲットセンテンスを含み、Nは2以上である、頻度計算ユニットと、
前記Nグラムから前記出現頻度が所定閾値より高い高頻度Nグラムを選択し、所定の区切り記号により、前記ターゲットセンテンスに存在する前記高頻度Nグラムを一つの一体化単語に合成し、更新されたターゲットセンテンスコーパスを取得する単語セットユニットと、
ソースセンテンスコーパス及び更新されたターゲットセンテンスコーパスを利用して、ニューラル機械翻訳モデルを訓練するモデル訓練ユニットと、
前記モデル訓練ユニットにより訓練されたニューラル機械翻訳モデルを用いて、翻訳すべきセンテンスを翻訳して予測センテンスを取得し、前記予測センテンスに前記一体化単語が存在する場合、前記予測センテンスに存在する前記一体化単語を分離的なN個の単語にリセットした後に、前記予測センテンスを出力し、前記予測センテンスに前記一体化単語が存在しない場合、前記予測センテンスをそのまま出力する翻訳ユニットと、を含む訓練装置。 A training device for neural machine translation models
A frequency calculation unit that calculates the frequency of occurrence of N grams in a target sentence corpus, wherein the target sentence corpus contains a plurality of target sentences and N is 2 or more.
A high-frequency N-gram having an appearance frequency higher than a predetermined threshold was selected from the N-gram, and the high-frequency N-gram existing in the target sentence was synthesized into one integrated word by a predetermined delimiter and updated. With a word set unit to get the target sentence corpus,
A model training unit that trains neural machine translation models using the source sentence corpus and the updated target sentence corpus,
Using the neural machine translation model trained by the model training unit, the sentence to be translated is translated to obtain the predicted sentence, and when the integrated word is present in the predicted sentence, the said sentence existing in the predicted sentence. Training including a translation unit that outputs the predicted sentence after resetting the integrated word to N separate words, and outputs the predicted sentence as it is when the integrated word does not exist in the predicted sentence. Device.
前記ターゲットセンテンスに存在する前記一体化単語は、訓練において分割されないことを特徴とする請求項6に記載の訓練装置。 The model training unit trains a neural machine translation model using a parallel corpus consisting of a source sentence in the source sentence corpus and a target sentence corresponding to the source sentence.
The training device according to claim 6 , wherein the integrated word present in the target sentence is not divided in training.
The step of the method for training a neural machine translation model according to any one of claims 1 to 5 , when the computer program is stored in a computer-readable storage medium and the computer program is executed by the processor. A storage medium characterized in that
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910142831.5A CN111626064B (en) | 2019-02-26 | 2019-02-26 | Training method, training device and storage medium for neural machine translation model |
CN201910142831.5 | 2019-02-26 |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2020140710A JP2020140710A (en) | 2020-09-03 |
JP6965951B2 true JP6965951B2 (en) | 2021-11-10 |
Family
ID=72260475
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020029283A Active JP6965951B2 (en) | 2019-02-26 | 2020-02-25 | Training methods, devices and storage media for neural machine translation models |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP6965951B2 (en) |
CN (1) | CN111626064B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112733552B (en) * | 2020-12-30 | 2024-04-12 | 中国科学技术大学 | Machine translation model construction method, device and equipment |
CN112765996B (en) * | 2021-01-19 | 2021-08-31 | 延边大学 | Middle-heading machine translation method based on reinforcement learning and machine translation quality evaluation |
CN112764784B (en) * | 2021-02-03 | 2022-10-11 | 河南工业大学 | Automatic software defect repairing method and device based on neural machine translation |
CN113343717A (en) * | 2021-06-15 | 2021-09-03 | 沈阳雅译网络技术有限公司 | Neural machine translation method based on translation memory library |
CN113515959B (en) * | 2021-06-23 | 2022-02-11 | 网易有道信息技术(北京)有限公司 | Training method of machine translation model, machine translation method and related equipment |
CN113553864B (en) * | 2021-06-30 | 2023-04-07 | 北京百度网讯科技有限公司 | Translation model training method and device, electronic equipment and storage medium |
CN113743095A (en) * | 2021-07-19 | 2021-12-03 | 西安理工大学 | Chinese problem generation unified pre-training method based on word lattice and relative position embedding |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1643512A (en) * | 2002-03-27 | 2005-07-20 | 南加利福尼亚大学 | A phrase to phrase joint probability model for statistical machine translation |
US8296123B2 (en) * | 2006-02-17 | 2012-10-23 | Google Inc. | Encoding and adaptive, scalable accessing of distributed models |
US7983898B2 (en) * | 2007-06-08 | 2011-07-19 | Microsoft Corporation | Generating a phrase translation model by iteratively estimating phrase translation probabilities |
CN101685441A (en) * | 2008-09-24 | 2010-03-31 | 中国科学院自动化研究所 | Generalized reordering statistic translation method and device based on non-continuous phrase |
CN102193912B (en) * | 2010-03-12 | 2013-11-06 | 富士通株式会社 | Phrase division model establishing method, statistical machine translation method and decoder |
US8781810B2 (en) * | 2011-07-25 | 2014-07-15 | Xerox Corporation | System and method for productive generation of compound words in statistical machine translation |
CN103631771A (en) * | 2012-08-28 | 2014-03-12 | 株式会社东芝 | Method and device for improving linguistic model |
CN103823795B (en) * | 2012-11-16 | 2017-04-12 | 佳能株式会社 | Machine translation system, machine translation method and decoder used together with system |
CN107870900B (en) * | 2016-09-27 | 2023-04-18 | 松下知识产权经营株式会社 | Method, apparatus and recording medium for providing translated text |
CN108132932B (en) * | 2017-12-27 | 2021-07-20 | 苏州大学 | Neural machine translation method with replication mechanism |
-
2019
- 2019-02-26 CN CN201910142831.5A patent/CN111626064B/en active Active
-
2020
- 2020-02-25 JP JP2020029283A patent/JP6965951B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN111626064B (en) | 2024-04-30 |
CN111626064A (en) | 2020-09-04 |
JP2020140710A (en) | 2020-09-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6965951B2 (en) | Training methods, devices and storage media for neural machine translation models | |
KR102382499B1 (en) | Translation method, target information determination method, related apparatus and storage medium | |
JP2020140709A (en) | Training method for neural machine translation model, apparatus, and storage medium | |
CN113110988B (en) | Testing applications with defined input formats | |
JP5774751B2 (en) | Extracting treelet translation pairs | |
CN110264991A (en) | Training method, phoneme synthesizing method, device, equipment and the storage medium of speech synthesis model | |
KR101130457B1 (en) | Extracting treelet translation pairs | |
CA2899532A1 (en) | Method and device for acoustic language model training | |
JP2004362249A (en) | Translation knowledge optimization device, computer program, computer and storage medium for translation knowledge optimization | |
JP7222162B2 (en) | Model training method, device, electronic device, program and storage medium in machine translation | |
CN108132932B (en) | Neural machine translation method with replication mechanism | |
JP7413630B2 (en) | Summary generation model training method, apparatus, device and storage medium | |
JP7226514B2 (en) | PRE-TRAINED LANGUAGE MODEL, DEVICE AND COMPUTER-READABLE STORAGE MEDIA | |
CN110084323B (en) | End-to-end semantic analysis system and training method | |
CN111709234A (en) | Training method and device of text processing model and electronic equipment | |
US7725306B2 (en) | Efficient phrase pair extraction from bilingual word alignments | |
JP7044839B2 (en) | End-to-end model training methods and equipment | |
JP2020064624A (en) | Sub-word-unit division method and device, and computer-readable storage medium | |
CN110889295A (en) | Machine translation model, and method, system and equipment for determining pseudo-professional parallel corpora | |
JP5791097B2 (en) | Parallel translation phrase learning apparatus, phrase-based statistical machine translation apparatus, parallel phrase learning method, and parallel phrase production method | |
CA3152958A1 (en) | Automatic preprocessing for black box translation | |
JP5710551B2 (en) | Machine translation result evaluation apparatus, translation parameter optimization apparatus, method, and program | |
KR102427934B1 (en) | Translation method using proper nouns coding based on neural network and the system thereof | |
US20220207243A1 (en) | Internal state modifying device | |
US20180011833A1 (en) | Syntax analyzing device, learning device, machine translation device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200225 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20210128 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20210209 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210412 |
|
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: 20210921 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20211004 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6965951 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |