Method for generating training data for machine translation, method for creating a learnable model for machine translation processing, machine translation processing method, and machine translation training data generation device.
The method addresses the challenge of retaining markup language tags in machine translation by generating training data with partial placeholder replacement, enabling accurate translation of tagged texts without extensive labeled data.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-06-16
- Publication Date
- 2026-03-16
AI Technical Summary
Existing machine translation methods struggle to accurately retain markup language tags during translation, either by ignoring tags which leads to poor tag retention or requiring large amounts of tagged target translation text which is difficult to obtain.
A method for generating training data that detects start-end correspondence codes in parallel data without markup language tags, replaces them with placeholders, and sets a partial replacement ratio to ensure accurate tag retention, allowing for large-scale training data generation and model learning.
Enables high-precision machine translation of texts with markup language tags by maintaining tag information without needing extensive tagged parallel texts, ensuring accurate tag retention in translation results.
Smart Images

Figure 0007829861000001 
Figure 0007829861000002 
Figure 0007829861000003
Abstract
Description
Technical Field
[0001] The present invention relates to machine translation processing technology, and more particularly to machine translation processing technology corresponding to tags of markup languages.
Background Art
[0002] In the field of industrial translation, the original text to be translated often contains XML tags (an example of tags for markup languages). There is a high demand for accurately machine-translating such an original text while retaining the tag information.
[0003] As a method for dealing with the case where the original text to be translated contains XML tags, for example, as disclosed in Non-Patent Document 1, at the time of machine translation, the tags in the original text are removed and machine translation is performed, and then for the machine translation result, based on the word alignment between the original text and the translated text, there is a method of reinserting the tags.
[0004] Also, Patent Document 1 discloses a technique of training a machine translation engine using a translated text in which tags for a markup language (for example, XML tags) are inserted. In the technique of Patent Document 1, when training the machine translation engine, the tags for the markup language are replaced with placeholders, and the machine translation engine is trained using the translated text in which the tags for the markup language are replaced with placeholders. And in the technique of Patent Document 1, at the time of machine translation, after replacing the tags in the original text with placeholders and translating, a process of replacing the placeholders in the translated text with the original tags is performed.
Prior Art Documents
Patent Documents
[0005]
Patent Document 1
Non-Patent Documents
[0006]
Non-Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0007] However, in the method of reinserting the tags disclosed in Non-Patent Document 1, although there is an advantage that the machine translation engine can be trained even if the target translation text does not contain tags, since the translation is performed without considering the tags during machine translation, it is difficult to appropriately retain the tags in the translation.
[0008] On the other hand, in the method of training a machine translation engine using the tagged target translation text disclosed in Patent Document 1, although there are no problems with translation accuracy and tag retention accuracy, there is a problem that it is difficult to prepare a large amount of tagged target translation text.
[0009] Therefore, in view of the above problems, the present invention aims to realize a machine translation processing method, a method for generating training data for machine translation, a method for creating a learnable model for machine translation processing, a machine translation processing method, a training data generation device for machine translation, and a machine translation processing system that enable high-precision machine translation of an original text including tags for a markup language while retaining the information of the tags for the markup language without preparing a large amount of tagged target translation text.
Means for Solving the Problems
[0010] The first invention for solving the above problems is a machine translation processing system for machine translation processing of language data including markup language tags, comprising a method for generating training data for training a learnable model for machine translation processing (machine translation training data generation method), which includes a start / end corresponding code detection step and a replacement processing step.
[0011] The start-end correspondence code detection step detects start-end correspondence codes, which are codes that correspond to the start and end of a parallel data set that combines first language data and second language data which is data that has been translated from the first language data into a second language, and does not include markup language tags.
[0012] The substitution processing step involves performing a substitution process on the parallel data, replacing the start and end corresponding codes with alternative codes, thereby obtaining the parallel data after the substitution process.
[0013] This method for generating training data for machine translation detects start-end correspondence codes (codes where the left and right sides correspond, such as () and []) in parallel text (parallel data) that do not contain markup language tags (e.g., XML tags), and replaces the detected start-end correspondence codes with substitute codes (placeholders). This allows for the easy and large-scale generation of data equivalent to parallel data with markup language tags (e.g., XML tags) inserted.
[0014] Furthermore, since the parallel text data obtained by this machine translation training data generation method includes placeholders equivalent to markup language tags, using this parallel text data as training data for the machine translation model's learning process can achieve the same effect as when using parallel text data with markup language tags (e.g., XML tags) as training data for the machine translation model's learning process (it can perform the same learning process).
[0015] The second invention is the first invention, further comprising a substitution ratio setting step of setting a substitution ratio.
[0016] The replacement processing step performs a replacement process of replacing the start / end corresponding codes with alternative codes on the parallel translation data at the replacement ratio set in the replacement ratio setting step.
[0017] In this method for generating training data for machine translation, by setting the replacement ratio in the replacement ratio setting step (by setting it to a value less than 1.0), it is guaranteed that not all start / end corresponding codes are replaced with alternative codes (placeholders). As a result, in this method for generating training data for machine translation, it is guaranteed that the start / end corresponding codes are included in the parallel translation data after the replacement process, and appropriate learning processing (training) can also be performed for the start / end corresponding codes (it becomes possible to correctly appear (perform machine translation) the start / end corresponding codes of the source language data in the machine translation processing result data (target language data)).
[0018] Note that the replacement ratio may be in units of parallel translation data (parallel sentence units). That is, when there are N1 (N1: natural number) parallel translation data including start / end corresponding codes among the parallel translation data being processed, and the replacement ratio is r (r: real number, 0 < r < 1), replacement processing may be performed on int(N1×r) (int(x): a function that obtains the largest integer value not exceeding x) of the parallel translation data including start / end corresponding codes.
[0019] A third invention is a method for creating a learnable model for machine translation processing in a machine translation processing system that performs machine translation processing on language data including markup language tags using the training data generated by the method for generating training data for machine translation according to the first or second invention, the method comprising a data input step, an output data acquisition step, a loss evaluation step, and a parameter update step.
[0020] The data input step inputs the first language data included in the parallel translation data after the replacement process into the learnable model for machine translation processing.
[0021] The output data acquisition step acquires the output data of a trainable model for machine translation processing applied to the data input in the data input step.
[0022] The loss evaluation step acquires the output data obtained in the output data acquisition step and the second language data included in the translated data after the replacement process as ground truth data, and evaluates the loss between the output data and the ground truth data.
[0023] The parameter update step updates the parameters of the trainable model for machine translation processing so that the loss obtained in the loss evaluation step is reduced.
[0024] In this method for creating a trainable model for machine translation, the trainable model for machine translation can be trained using the first language data and the second language data included in the replaced parallel data as ground truth data. Therefore, a trained model of the trainable model that machine translates the replaced first language data into the replaced second language data can be obtained.
[0025] The fourth invention is a method (machine translation processing method) for performing machine translation processing using a trained model of a trainable model for machine translation processing obtained by training with the method for creating a trainable model for machine translation processing, which is the third invention, and comprises a forward replacement processing step, a machine translation processing step, and a reverse replacement processing step.
[0026] The forward replacement step performs a forward replacement process that replaces the markup language tags contained in the input first language data with alternative codes.
[0027] The machine translation processing step involves performing machine translation on the first language data after sequential replacement using a trained model of a learnable model for machine translation, thereby obtaining the second language data after machine translation.
[0028] The reverse replacement step performs a reverse replacement process in which the alternative codes contained in the second language data obtained by the machine translation process step are replaced with the markup language tags that were replaced in the forward replacement step.
[0029] In this machine translation processing method, for input data containing markup language tags (e.g., XML tags), the markup language tags are replaced with alternative codes (placeholders) similar to those used during training data generation. The machine translation process is then performed using a trained model of a machine translation model optimized on parallel data with the inserted alternative codes. This allows for the acquisition of appropriate machine translation result data while appropriately maintaining the state in which the alternative codes have been inserted. Furthermore, in this machine translation processing method, by replacing the alternative codes with XML tags (reverting them back) in the machine translation result data (machine-translated text) with the inserted alternative codes, it is possible to obtain machine translation result data (machine-translated text) with XML tags inserted in an appropriate state.
[0030] Thus, this machine translation processing method makes it possible to machine translate source texts containing markup language tags with high accuracy, while preserving the information of the markup language tags, without having to prepare a large number of tagged parallel texts.
[0031] The fifth invention relates to a machine translation processing system for machine translation processing of language data including markup language tags, and provides a method for generating training data for training a learnable model for machine translation processing (machine translation training data generation method), comprising a corresponding element detection step and a replacement processing step.
[0032] The correspondence element detection step detects correspondence elements in parallel data, which is a combination of first language data and second language data, which is data translated from the first language data into a second language, and which does not include markup language tags, in which it is determined that there is a correspondence between the first language data and the second language data.
[0033] The substitution step obtains the substituted translator data by performing a substitution process on the translator data, which involves inserting alternative codes before and after the corresponding elements.
[0034] This method for generating training data for machine translation detects corresponding elements between source and target texts in parallel texts (parallel data) that do not contain markup language tags (e.g., XML tags), and replaces these elements with placeholders before and after them. This allows for the easy and large-scale generation of data equivalent to parallel text data with markup language tags (e.g., XML tags) inserted.
[0035] The sixth invention relates to a machine translation processing system for machine translation processing of language data including markup language tags, and includes a device for generating training data for training a learnable model for machine translation processing (machine translation training data generation device), which comprises a substitution processing unit.
[0036] The replacement processing unit detects a start-end correspondence code, which is a code that corresponds to the start and end of a parallel data set that combines first language data and second language data which is data that has been translated from the first language data into the second language, and which does not include markup language tags, and By performing a substitution process on the parallel text data, which replaces the start and end corresponding codes with alternative codes, the resulting parallel text data is obtained.
[0037] This makes it possible to realize a machine translation training data generation device that produces the same effects as the first invention. [Effects of the Invention]
[0038] According to the present invention, it is possible to realize a machine translation processing method, a machine translation training data generation method, a machine translation training data generation device, and a machine translation processing system that enable machine translation of source text containing markup language tags into a source text containing markup language tags with high accuracy, while retaining information about the markup language tags, without having to prepare a large amount of tagged parallel texts. [Brief explanation of the drawing]
[0039] [Figure 1] A schematic diagram of the machine translation processing system 1000 according to the first embodiment. [Figure 2] A flowchart of the training data generation process performed by the machine translation processing system 1000. [Figure 3] A diagram illustrating the substitution process performed by the training data generation device 1 of the machine translation processing system 1000. [Figure 4] A flowchart of the prediction process (machine translation execution process) performed by the machine translation processing system 1000. [Figure 5] A diagram illustrating the prediction process (machine translation execution process) of the machine translation processing system 1000. [Figure 6] This figure shows the result of machine translation processing performed by the machine translation system 1000 on first language data (Japanese data) with XML tags. [Figure 7] A schematic diagram of the machine translation processing system 2000 according to the second embodiment. [Figure 8] A diagram illustrating the substitution process performed by the training data generation device 1A of the machine translation processing system 2000. [Figure 9] A diagram showing the CPU bus configuration. [Modes for carrying out the invention]
[0040] [First Embodiment] The first embodiment will be described below with reference to the drawings.
[0041] <1.1: Configuration of the Machine Translation Processing System> Figure 1 is a schematic diagram of the machine translation processing system 1000 according to the first embodiment.
[0042] As shown in Figure 1, the machine translation processing system 1000 comprises a training data generation device 1, a data storage unit DB1, and a machine translation processing device 2. In the following description, it is assumed that the target of machine translation processing is language data including markup language tags. However, the target of the machine translation processing device 2 does not necessarily need to include markup language tags. If input data without tags is provided, machine translation processing will be executed without any substitution or other processing.
[0043] As shown in Figure 1, the training data generation device 1 comprises a replacement ratio setting unit 11 and a replacement processing unit 12.
[0044] The replacement ratio setting unit 11 sets the ratio at which start and end corresponding codes are replaced with substitute codes (placeholders). The replacement ratio setting unit 11 then outputs data indicating the set ratio at which start and end corresponding codes are replaced with substitute codes (placeholders) (this is called "replacement ratio data") as data r_rep to the replacement processing unit 12.
[0045] The replacement processing unit 12 receives parallel data Din_tr, which is a pair of data consisting of data in the first language (source language data) and data in the second language (target language data), which is the data obtained by translating the first language data into the second language, and which does not include markup language tags. The replacement processing unit 12 also receives replacement ratio data r_rep, which is output from the replacement ratio setting unit 11. The replacement processing unit 12 performs a process to replace the start and end corresponding codes contained in the parallel data Din_tr with substitute codes (placeholders) at the ratio indicated by the replacement ratio data r_rep. The replacement processing unit 12 then outputs the parallel data after the replacement process as replaced parallel data Do_tr to the data storage unit DB1.
[0046] For the sake of explanation, the parallel translation data Din_tr input to the training data generator 1 consists of N pairs (N: a natural number), and the i-th (i: a natural number, 1 ≤ i ≤ N) first language data (source language data) of the parallel translation data Din_tr is referred to as "src i The data in the second language (the data to be translated into the target language), which is the data obtained by translating the data in the first language into the second language, is referred to as "dst i The i-th parallel data is written as "{src i dst i It is written as}.
[0047] Also, the i-th first language data of the translation data Do_tr after replacement (replacement process) rear (First language data) is "src_rep i The data for the first language is written as "dst_rep", and the data for the second language that is paired with the data for the first language (to form a parallel translation) (the second language data after replacement) is written as "dst_rep i It is written as " and the i-th data (translation data) of the translation data Do_tr after replacement processing is "{src_rep i dst_rep i It is written as}.
[0048] The data storage unit DB1 receives the post-substitution parallel data Do_tr output from the training data generation device 1 and stores the data. Furthermore, the data storage unit DB1 reads the stored data (post-substitution parallel data Do_tr) according to a command from the machine translation processing device 2 and outputs the read data as data Din_tr_rep to the machine translation processing device 2. As shown in Figure 1, the machine translation processing device 2 comprises a training data acquisition unit 21, a forward substitution processing unit 22, a first selector SEL21, a machine translation processing unit 23, a second selector SEL22, a loss evaluation unit 24, and a reverse substitution processing unit 25.
[0049] The training data acquisition unit 21 outputs a data read command to the data storage unit DB1, and reads from the data storage unit DB1 the post-replacement parallel data stored in the data storage unit DB1 as training parallel data Din_tr_rep. The training data acquisition unit 21 extracts the data in the first language (source language data) from the training parallel data Din_tr_rep, and outputs the extracted data in the first language (source language data) as training input data Din_tr to the first selector SEL21. Further, the training data acquisition unit 21 extracts the data in the second language (target language data) that is parallel to the data in the first language output to the first selector SEL21 from the training parallel data Din_tr_rep, and outputs the extracted data in the second language (target language data) as training correct data D_correct to the loss evaluation unit 24.
[0050] For the sake of convenience in explanation, it is assumed that the training data acquisition unit 21 reads M sets (M: natural number, M ≤ N) of post-replacement parallel data Din_tr from the data storage unit DB1, and the j-th (j: natural number, 1 ≤ j ≤ M) data in the first language of the read parallel data Din_tr is denoted as "src_rep" j ", and the data in the second language that forms a pair (constitutes a parallel translation) with the data in the first language is denoted as "dst_rep" j ", and the j-th data (parallel data) of the parallel data Din_tr is denoted as "{src_rep" j ,dst_rep" j}".
[0051] The forward replacement processing unit 22 receives data of the first language to be processed by machine translation (source language data), which includes markup language tags (e.g., XML tags), as data Din_src. The forward replacement processing unit 22 then performs a process (forward replacement process) in which it replaces the markup language tags contained in data Din_src with placeholders. The forward replacement processing unit 22 then outputs the first language data after the forward replacement process as data Din_rep to the first selector SEL21. In addition, the forward replacement processing unit 22 generates a list of correspondences between markup language tags and the placeholders that replace them, and outputs the data containing this list as data D_list_rep to the reverse replacement processing unit 25.
[0052] The first selector SEL21 receives the data Din_tr output from the training data acquisition unit 21 and the data Din_rep output from the sequential replacement processing unit 22. The first selector SEL21 also receives the selection signal sel21 output from the control unit (not shown) that controls each functional unit of the machine translation processing device 2. The first selector SEL21 selects either the data Din_tr or the data Din_rep according to the selection signal se21 and outputs the selected data as data D1 to the machine translation processing unit 23.
[0053] (1) When the machine translation processing unit 23 performs learning processing (training processing) (during learning processing (training)), the control unit outputs a selection signal sel21 with a signal value of "0" to the first selector SEL21, and the first selector SEL21 selects the data Din_tr according to the selection signal and outputs the selected data Din_tr as data D1 to the machine translation processing unit 23. (2) When the machine translation processing unit 23 performs prediction processing (machine translation processing) (during prediction processing (machine translation execution)), the control unit outputs a selection signal sel21 with a signal value of "1" to the first selector SEL21, and the first selector SEL21 selects the data Din_rep according to the selection signal and outputs the selected data Din_rep as data D1 to the machine translation processing unit 23.
[0054] The machine translation processing unit 23 includes a machine translation model and receives data D1 output from the first selector SEL21 as input. The machine translation model included in the machine translation processing unit 23 is a learnable model (a model in which a trained model is constructed by optimizing parameters through data-based learning) and is a model for learning machine translation (for example, a machine translation model using a neural network).
[0055] (1) During the learning process (training), the machine translation model of the machine translation processing unit 23 receives data D1 (=Din_tr) from the first selector SEL21 and outputs the data acquired by the machine translation model as data D2 to the second selector SEL22. Also during the learning process (training), the machine translation model of the machine translation processing unit 23 receives parameter update data update(θ) output from the loss evaluation unit 24 and updates the parameters of the machine translation model based on the parameter update data update(θ) (for example, if the machine translation model of the machine translation processing unit 23 is a model using a neural network, the parameters of the machine translation model of the machine translation processing unit 23 are updated by backpropagation).
[0056] (2) During prediction processing (when machine translation processing is executed), the machine translation model of the machine translation processing unit 23 (a machine translation model with optimal parameters obtained through the learning process set (trained model)) receives data D1 (=Din_rep) from the first selector SEL21, and outputs the data obtained by the machine translation model (trained model) of the machine translation processing unit 23 as data D2 to the second selector SEL22.
[0057] The second selector SEL22 receives data D2 output from the machine translation processing unit 23 and selection signal sel22 output from the control unit (not shown) that controls each functional part of the machine translation processing unit 2. The second selector SEL22 outputs data D2 to either the loss evaluation unit 24 or the inverse substitution processing unit 25 according to the selection signal sel22.
[0058] (1) When the machine translation processing unit 23 performs learning processing (training processing) (during learning processing (training)), the control unit outputs a selection signal sel22 with a signal value of "0" to the second selector SEL22, and the second selector SEL22 outputs data D2 as data D21 to the loss evaluation unit 24 according to the selection signal. (2) When the machine translation processing unit 23 performs prediction processing (machine translation processing) (during prediction processing (machine translation execution)), the control unit outputs a selection signal sel22 with a signal value of "1" to the second selector SEL22, and the second selector SEL22 outputs data D2 as data D22 to the inverse substitution processing unit 25 according to the selection signal.
[0059] The loss evaluation unit 24 receives the training ground truth data D_correct output from the training data acquisition unit 21 and the data D21 output from the second selector SEL22. The loss evaluation unit 24 evaluates the loss (e.g., error) between the data D21 and the training ground truth data D_correct using, for example, a loss function, and generates parameter update data update(θ), which is data for updating the parameters of the machine translation model in the machine translation processing unit 23, based on the evaluation result. The loss evaluation unit 24 then outputs the generated parameter update data update(θ) to the machine translation processing unit 23. Note that in Figure 1, the path from the output of the machine translation processing unit 23 to the loss evaluation unit 24 and the path from the loss evaluation unit 24 to the machine translation processing unit 23 for outputting the parameter update data update(θ) are shown as separate paths, but this is for convenience (for illustrative purposes) and is not limited to the configuration in Figure 1. In the machine translation processing device 2, when updating the parameters of the machine translation model of the machine translation processing unit 23 using the backpropagation method, the error obtained by the loss evaluation unit 24 (the error obtained by the error function (for example, the cross-entropy error)) should be propagated sequentially (backpropagated) along a path that retraces the path through which the output data was obtained by the machine translation model of the machine translation processing unit 23 (the forward propagation path), thereby updating each parameter of the machine translation model of the machine translation processing unit 23 (the parameters of each layer of the machine translation model of the machine translation processing unit 23).
[0060] Furthermore, the loss evaluation unit 24 determines that it is not necessary to continue the learning process and terminates the learning process if (1) the acquired error (loss) falls within a predetermined range, or (2) the amount of change in the error (loss) falls within a predetermined range.
[0061] The reverse substitution processing unit 25 receives data D22 output from the second selector SEL22 and data D_list_rep output from the forward substitution processing unit 22. The reverse substitution processing unit 25 detects the substitute codes (placeholders) replaced by the forward substitution processing unit 22 from data D22, and performs a reverse substitution process to return (replace) the detected substitute codes back to the original markup language tags based on the list contained in data D_list_rep (a list of correspondences between markup language tags and the substitute codes (placeholders) that replaced those markup language tags in the forward substitution process). The reverse substitution processing unit 25 then outputs the data after performing the reverse substitution process on data D22 as output data Do_dst.
[0062] <1.2: Operation of the machine translation processing system> The operation of the machine translation processing system 1000, configured as described above, will now be explained.
[0063] The operation of the machine translation processing system 1000 will be explained below, divided into (1) training data generation process, (2) machine translation model learning process (training process) (creation method), and (3) prediction process (machine translation execution process).
[0064] For the sake of clarity, the machine translation processing system 1000 is assumed to be a system for performing machine translation from a first language (source language) to a second language (target language).
[0065] (1.2.1: Training data generation process) First, we will explain the training data generation process performed by the machine translation processing system 1000.
[0066] Figure 2 is a flowchart of the training data generation process performed by the machine translation processing system 1000.
[0067] Figure 3 is a diagram illustrating the substitution process performed by the training data generation device 1 of the machine translation processing system 1000.
[0068] The following describes the training data generation process performed by the machine translation system 1000, with reference to the flowchart in Figure 2.
[0069] (Step S101): In step S101, the process of setting alternative codes (placeholders) is executed. Specifically, the process is executed as follows.
[0070] The replacement processing unit 12 of the training data generation device 1 sets start and end corresponding codes to be replaced with placeholders for parallel data Din_tr (parallel data input to the training data generation device 1), which is parallel data consisting of a first language data (source language data) and a second language data (target language data) which is data obtained by translating the first language data into a second language, and which does not include markup language tags.
[0071] A "start-end correspondence code" refers to a code in a word sequence or string (including subword sequences) that indicates the start (or origin) of a word sequence (start code) and is used in correspondence with that start code (used to form a pair) with a code that indicates the end (or destination) of a word sequence (or subword sequence). For example, the following codes can be considered "start-end correspondence codes". (1) ``()'' (Left parenthesis (start sign) and right parenthesis (end sign)) (2) ``[]'' (Left bracket (start symbol) and right bracket (end symbol)) (3) ``" (double quotation marks on the left (start) and double quotation marks on the right (end)) (4) ``'' (Left single quotation mark (start mark) and right single quotation mark ( end sign)) Furthermore, the start and end corresponding codes are not limited to those described above; any other codes may be used as long as the start and end codes correspond (the left code and the right code correspond).
[0072] Furthermore, if the first and second languages use 2-byte character codes, the start and end correspondence codes in those languages may be set as 2-byte code (character code) codes. For example, if the first language is Japanese and the second language is English, and the start and end correspondence code is set to "()" (left parenthesis (start code) and right parenthesis (end code)), then (A) in Japanese (first language), which is a 2-byte code language, the start and end correspondence codes may be set to the left parenthesis (start code) and right parenthesis (end code) of 1-byte code (half-width character), and / or the left parenthesis (start code) and right parenthesis (end code) of 2-byte code (full-width character), and (B) for the second language (English), the start and end correspondence codes may be set to the left parenthesis (start code) and right parenthesis (end code) of 1-byte code (half-width character).
[0073] For the sake of explanation, in the following, the first language will be Japanese and the second language will be English, and the start and end correspondence codes will be... (1) ``()'' (Left parenthesis (start sign) and right parenthesis (end sign)) (2) ``[]'' (Left bracket (start symbol) and right bracket (end symbol)) This section explains an example of setting a single-byte character (half-width character) as the start and end correspondence code for both the first and second languages.
[0074] The replacement processing unit 12 of the training data generation device 1 sets the first language to Japanese and the second language to English, and the start / end corresponding code (1) ``()'' (Left parenthesis (start sign) and right parenthesis (end sign)) (2) ``[]'' (Left bracket (start symbol) and right bracket (end symbol)) Set to this.
[0075] (Step S102): In step S102, the process for setting the replacement ratio is executed. Specifically, the process is executed as follows.
[0076] The replacement ratio setting unit 11 sets the ratio at which start and end corresponding codes are replaced with substitute codes (placeholders). The replacement ratio setting unit 11 then outputs the set replacement ratio data (data indicating the ratio at which start and end corresponding codes are replaced with substitute codes (placeholders)) as data r_rep to the replacement processing unit 12. In this embodiment, for the sake of explanation, the replacement ratio setting unit 11 is set to "0.1" (10%) for the replacement ratio at which start and end corresponding codes are replaced with substitute codes (placeholders), and this will be explained below.
[0077] Furthermore, it is preferable that the ratio set by the replacement ratio setting unit 11 (the ratio indicated by the replacement ratio data r_rep) is set such that the probability of a placeholder appearing is approximately the same as the probability of a markup language tag appearing in the first language data with markup language tags (source language data) input to the machine translation processing device 2. In other words, it is preferable that the probability of placeholders appearing in the parallel data Do_tr after the replacement processing (probability distribution) is similar to the probability of markup language tags appearing in the first language data with markup language tags (source language data) (data targeted for machine translation processing) input to the machine translation processing device 2. By doing so, the probability distribution of placeholders appearing in the training data becomes similar to the probability distribution of markup language tags appearing in the language data actually targeted for machine translation processing, thereby improving the accuracy of the learning process of machine translation using the training data. Furthermore, the inventor's research indicates that the occurrence probability of "()" and "[]" in a large corpus is approximately 0.1, and if 10% of these are replaced, 1% will become alternative codes. This ratio is close to the occurrence probability of markup language tags in the language data (including plain text and sentences with markup language tags) that serves as input for the target machine translation process.
[0078] Furthermore, by setting the replacement ratio using the replacement ratio setting unit 11 (by setting it to a value less than 1.0), it is guaranteed that not all start-end corresponding codes will be replaced with substitute codes (placeholders). This guarantees that the start-end corresponding codes will be included in the parallel data after the replacement process, and that these start-end corresponding codes can also be appropriately trained (making it possible to correctly make the start-end corresponding codes in the source language data appear in the machine translation processing result data (target language data) (to be machine translated)).
[0079] (Step S103): In step S103, loop processing (loop 1) is started. If the parallel translation data Din_tr input to the training data generator 1 is N pairs (N: natural number), then each parallel translation data {src_rep i dst_rep i For each of the following (i: natural number, 1 ≤ i ≤ N): the loop process (loop 1) is executed N times. In other words, from the first translation data {src_rep1, dst_rep1} to the Nth translation data {src_rep N dst_rep N The loop process (loop 1) is executed for}.
[0080] (Steps S104, S105): In steps S104 and S105, the first language data (src i ) replacement process, and second language data (dst i The replacement process for ) is performed. Specifically, the following processes are performed.
[0081] The replacement processing unit 12 receives parallel translation data Din_tr, which is a pair of data consisting of data in the first language (source language data) and data in the second language (target language data) which is the data obtained by translating the first language data into the second language, and which does not include markup language tags. It is assumed that both the first and second languages of the parallel translation data Din_tr have undergone morphological analysis and are data separated into morphemes (word sequences, subword sequences, etc.).
[0082] Furthermore, the replacement processing unit 12 performs a process to replace the start and end corresponding codes included in the parallel translation data Din_tr with substitute codes (placeholders) at the rate indicated by the replacement rate data r_rep output from the replacement rate setting unit 11. In this embodiment, since the rate indicated by the replacement rate data r_rep is set to "0.1" (10%), the replacement processing unit 12 targets 10% of the sentences (parallel translation data) containing the start and end corresponding codes that have been set to be replaced with substitute codes (placeholders) for the replacement process (the process of replacing the start and end corresponding codes with substitute codes (placeholders)), and executes the replacement process on the parallel translation data that has been targeted for replacement.
[0083] Here, we will explain the case shown in Figure 3 as an example of a substitution process.
[0084] As shown in Figure 3, the first language (Japanese) data of the i-th parallel data (src i ), and data in the second language (English) (dst i Assume that ) is as follows: <First language (Japanese) data (src i )> [Generic Name] Teriparatide (Genetically Modified) <Second language (English) data (dst i )> [Non-proprietary name] Teriparatide (Genetical Recombination) Then, the substitution processing unit 12 uses the start-end corresponding code. (1) ``()'' (Left parenthesis (start sign) and right parenthesis (end sign)) (2) ``[]'' (Left bracket (start symbol) and right bracket (end symbol)) Since it is set to (1) and (2) above, replace the symbols with alternative symbols (placeholders).
[0085] Specifically, the replacement processing unit 12 processes the data (src) in the first language (Japanese). i), and data in the second language (English) (dst i In this case, the start code of the start-end correspondence code is replaced with "TAGS_k" (or a string containing "TAGS_k"), and the end code is replaced with "TAGE_k" (or a string containing "TAGE_k"). The subscript k of the substitute code for the start code and the substitute code for the end code shall be set to the same integer value for the same type of start-end correspondence code within the same sentence (within the same parallel data), and the subscript k shall be set to an integer value randomly obtained from a predetermined range.
[0086] Figure 3: Translation data ({src i dst i In the case of}), the substitution processing unit 12 sets the substitute code (placeholder) for the left parenthesis "(", which is the start code of the start-end correspondence code "()", to "_@@@_TAGS_1", and sets the substitute code (placeholder) for the right parenthesis ")", which is the end code of the start-end correspondence code "()", to "_@@@_TAGE_1".
[0087] Also, the parallel data in Figure 3 ({src i dst i In the case of}), the substitution processing unit 12 sets the substitute code (placeholder) for the left bracket "[", which is the start code of the start-end correspondence code "[]", to "_@@@_TAGS_2", and sets the substitute code (placeholder) for the right parenthesis "[]", which is the end code of the start-end correspondence code "[]", to "_@@@_TAGE_2" (setting of substitution targets and substitute codes).
[0088] Then, the replacement processing unit 12, according to the above settings for the replacement target and alternative code, processes the data (src) of the first language (Japanese). i The replacement process is performed on the first language data src_rep after the replacement process. i The following data is obtained. In other words, the replacement processing unit 12 takes the following data and converts it into the first language data src_rep i It is obtained as (step S104). <First language (Japanese) data after replacement (src i )> _@@@_TAGS_2 Common name _@@@_TAGE_2 Teriparatide _@@@_TAGS_1 Genetic modification _@@@_TAGE_1 Furthermore, the replacement processing unit 12, according to the above settings for the replacement target and alternative code, processes the data (dst) in the second language (English). i The replacement process is performed on ) and the second language data after the replacement process dst_rep i The following data is obtained. In other words, the replacement processing unit 12 takes the following data and converts it into the second language data dst_rep i It is obtained as (step S105). <Second language (English) data after replacement (dst i )> _@@@_TAGS_2 Non - proprietary name _@@@_TAGE_2 Teriparatide _@@@_TAGS_1 Genetical Recombination _@@@_TAGE_1 (Step S106): In step S106, the replacement processing unit 12 processes the first language data src_rep obtained in steps S104 and S105 after replacement. i And the second language data after the substitution process dst_rep i The translated data after replacement processing, with pairs of and ({src_rep i dst_rep i}) is obtained, and the translated data after the replacement process is obtained ({src_rep i dst_rep i The result of the substitution process is output to the data storage unit DB1 as the translated data Do_tr and stored in the data storage unit DB1.
[0089] (Step S107): In step S107, the replacement processing unit 12 determines whether the termination condition of the loop processing (loop 1) is met (whether the replacement process has been performed on all of the parallel data targeted for replacement). If it determines that the termination condition of the loop processing is not met, it returns to step S103 and executes the processes in steps S104 to S106. On the other hand, if the replacement processing unit 12 determines that the termination condition of the loop processing is met, it terminates the process (terminates the training data generation process).
[0090] As described above, the training data generation device 1 can, for example, obtain N translated data after substitution processing if the number of translated data to be subjected to substitution processing is N (the proportion of translated data that has undergone substitution processing is 10% (the proportion set in r_rep) of the translated sentences that contain the start and end corresponding codes set as targets for substitution).
[0091] The training data generation device 1, through the above process, can insert placeholders equivalent to markup language tags (e.g., XML tags) into parallel texts (parallel data) that do not contain markup language tags (e.g., XML tags). In other words, the training data generation device 1, through the above process, can obtain parallel texts (parallel data) equivalent to parallel texts (parallel data) with markup language tags (e.g., XML tags). That is, since the parallel data obtained by the above process by the training data generation device 1 contains placeholders equivalent to markup language tags, using the parallel data obtained by the above process as training data for the machine translation model's learning process can achieve the same effect as when the machine translation model's learning process is performed using parallel texts (parallel data) with markup language tags (e.g., XML tags) as training data.
[0092] (1.2.2: Machine Translation Model Learning Process (Training Process) (Creation Method)) Next, we will explain the learning process (training process) (creation method) of the machine translation model executed by the machine translation processing system 1000.
[0093] The training data acquisition unit 21 outputs a data read command to the data storage unit DB1, and retrieves the post-replacement parallel data stored in the data storage unit DB1 as training parallel data Din_tr_rep(={src_rep j dst_rep j The training data acquisition unit 21 reads the first language data (source language data) (src_rep) from the training parallel data Din_tr_rep. j ) is extracted, and the extracted first language data (source language data) is used as training input data Din_tr(=src_rep j The first selector SEL21 outputs the following: ) and the second language data (target language data) (dst_rep) which is the parallel translation of the first language data output to the first selector SEL21. The training data acquisition unit 21 also obtains the second language data (target language data) (dst_rep) from the training parallel translation data Din_tr_rep. j ) is extracted, and the extracted second language data (target language data) is used as training ground truth data D_correct(=dst_rep j This is output to the loss evaluation unit 24.
[0094] For the sake of explanation, the training data acquisition unit 21 reads the translation data Din_tr after substitution processing of M pairs (M: natural number, M≦N) from the data storage unit DB1, and the j-th (j: natural number, 1≦j≦M) first language data of the read translation data Din_tr is "src_rep j The data for the second language that is paired with the data for the first language (to form a parallel translation) is written as "dst_rep j It is written as " and the j-th data (translation data) of the translation data Din_tr is written as "{src_rep j dst_rep j It is written as}.
[0095] The control unit (not shown) that controls each functional part of the machine translation processing device 2 outputs a selection signal sel21 to the first selector SEL21, which sets the signal value to "0". The first selector SEL21 selects the data Din_tr according to the selection signal, and the selected data Din_tr (=src_rep j This is output to the machine translation processing unit 23 as data D1.
[0096] The machine translation model in the machine translation processing unit 23 receives data D1 (=Din_tr) from the first selector SEL21, performs machine translation processing using the machine translation model, and outputs the data obtained by the machine translation processing as data D2 to the second selector SEL22.
[0097] The control unit (not shown) that controls each functional part of the machine translation processing device 2 outputs a selection signal sel22 to the second selector SEL22, which sets the signal value to "0". The second selector SEL22 selects a path to output the data D2 output from the machine translation processing unit 23 to the loss evaluation unit 24 according to the selection signal, and outputs the data D2 to the loss evaluation unit 24.
[0098] The loss evaluation unit 24 receives the training ground truth data D_correct output from the training data acquisition unit 21 and the data D21 output from the second selector SEL22. The loss evaluation unit 24 evaluates the loss (e.g., error) between the data D21 and the training ground truth data D_correct using, for example, a loss function, and generates parameter update data update(θ), which is data for updating the parameters of the machine translation model in the machine translation processing unit 23, based on the evaluation result. The loss evaluation unit 24 then outputs the generated parameter update data update(θ) to the machine translation processing unit 23. Note that in Figure 1, the path from the output of the machine translation processing unit 23 to the loss evaluation unit 24 and the path from the loss evaluation unit 24 to the machine translation processing unit 23 for outputting the parameter update data update(θ) are shown as separate paths, but this is for convenience (for illustrative purposes) and is not limited to the configuration in Figure 1. In the machine translation processing device 2, when updating the parameters of the machine translation model of the machine translation processing unit 23 using the backpropagation method, the error obtained by the loss evaluation unit 24 (the error obtained by the error function (for example, the cross-entropy error)) should be propagated sequentially (backpropagated) along a path that retraces the path through which the output data was obtained by the machine translation model of the machine translation processing unit 23 (the forward propagation path), thereby updating each parameter of the machine translation model of the machine translation processing unit 23 (the parameters of each layer of the machine translation model of the machine translation processing unit 23).
[0099] In the machine translation processing device 2, the above learning process uses the parallel translation data ({src_rep) acquired (read out) from the data storage unit DB1 by the training data acquisition unit 21. j dst_rep j This is executed repeatedly against}).
[0100] Then, if the error (loss) obtained by the loss evaluation unit 24 falls within (1) a predetermined range, or if the change in the error (loss) obtained by the loss evaluation unit 24 falls within a predetermined range, the loss evaluation unit 24 determines that it is not necessary to continue the learning process and terminates the learning process. At the time the learning process is terminated, the parameters set in the machine translation model of the machine translation processing unit 23 are set (fixed) as optimization parameters in the machine translation model of the machine translation processing unit 23, and the trained model of the machine translation model of the machine translation processing unit 23 is obtained.
[0101] As described above, in the machine translation processing system 1000, the machine translation model is trained, and the trained model of the machine translation model is obtained in the machine translation processing unit 23.
[0102] (1.2.3: Prediction Processing (Machine Translation Execution Processing)) Next, we will explain the prediction process (machine translation execution process) performed by the machine translation processing system 1000.
[0103] Figure 4 is a flowchart of the prediction process (machine translation execution process) performed by the machine translation processing system 1000.
[0104] Figure 5 is a diagram illustrating the prediction process (machine translation execution process) of the machine translation processing system 1000.
[0105] The following describes the prediction process (machine translation execution process) performed by the machine translation system 1000, referring to the flowchart in Figure 4.
[0106] The machine translation processing device 2 is assumed to receive data in a first language (Japanese) that includes markup language tags (e.g., XML tags). The case where the markup language tags are XML tags will be explained below.
[0107] (Step S201): In step S201, a sequential replacement process is performed. Specifically, the following processes are executed.
[0108] The sequential replacement processing unit 22 receives data in the first language (Japanese) to be processed by machine translation (source language data), which includes markup language tags (XML tags), as data Din_src. The data in the first language (source language data) is assumed to be data that has undergone morphological analysis and been separated into morphemes (word sequences, subword sequences, etc.).
[0109] The sequential replacement processing unit 22 detects markup language tags (XML tags) contained in the data Din_src and performs a process (sequential replacement) to replace the detected markup language tags (XML tags) with placeholders. Then, the sequential replacement processing unit 22 outputs the first language data after the replacement process as data Din_rep to the first selector SEL21.
[0110] The sequential replacement processing unit 22 performs sequential replacement by replacing the XML start and end tags in the data (sentence) of the first language data Din_src, which contains the input markup language tags (XML tags), with the same placeholders used during the training data generation process. Specifically, the sequential replacement processing unit 22 (1) replaces the XML start tag in the data (sentence) of the first language data Din_src, which contains the input markup language tags (XML tags), with "TAGS_k" (or a string containing "TAGS_k"), and (2) replaces the XML end tag in the data (sentence) of the data Din_src with "TAGE_k" (or a string containing "TAGE_k").
[0111] Furthermore, as with the training data generation process, the subscript k of the XML start tag alternative code ("TAGS_k") and the XML end tag alternative code ("TAGE_k") shall be set to the same integer value for the same type of XML start and end tag within the same sentence (within the same input data (within the data of the processing unit subject to the sequential replacement process)), and the subscript k shall be set to an integer value randomly obtained from a predetermined range.
[0112] For example, the input data Din_src(="Today's weather is") shown in Figure 5 sunny If the following is input to the machine translation processing device 2, the sequential replacement processing device 22 will replace the XML start tag " included in the input data Din_src " and closing tag " It detects the XML start tag " Replace " with the alternative code "_@@@_TAGS_1", and the XML closing tag " The sequential replacement process is performed by replacing " with the alternative code "_@@@_TAGE_1", and the data Din_rep (="Today's weather is _@@@_TAGS_1 sunny _@@@_TAGE_1.") after the sequential replacement is obtained, as shown in Figure 5.
[0113] The sequential replacement processing unit 22 outputs the first language data after performing the sequential replacement process as data Din_rep to the first selector SEL21.
[0114] Furthermore, the forward replacement processing unit 22 generates a list of correspondences between XML tags (tags for markup languages) and substitute codes (placeholders) that replace those XML tags during the forward replacement process, and outputs the data containing this list as data D_list_rep to the reverse replacement processing unit 25. In the case of Figure 5, the forward replacement processing unit 22 generates a list of correspondences between XML tags " Replace " with the alternative code "_@@@_TAGS_1", and the XML tag " A list is generated indicating that "" has been replaced with the alternative code "_@@@_TAGE_1", and the data containing this list is output to the reverse replacement processing unit 25 as data D_list_rep.
[0115] The control unit (not shown) that controls each functional part of the machine translation processing device 2 outputs a selection signal sel21 with a signal value of "0" to the first selector SEL21. The first selector SEL21 selects the data Din_rep output from the sequential replacement processing unit 22 according to the selection signal and outputs the selected data Din_rep as data D1 to the machine translation processing unit 23.
[0116] (Step S202): In step S202, machine translation processing is performed. Specifically, the following processes are performed.
[0117] The machine translation model in the machine translation processing unit 23 receives data D1 (=Din_tr) from the first selector SEL21 and performs machine translation processing using the machine translation model.
[0118] For example, in the case of Figure 5, when the data Din_rep (="Today's weather is sunny _@@@_TAGS_1 TAGE_1.") after sequential replacement is input to the machine translation model of the machine translation processing unit 23, the machine translation processing unit 23 uses the machine translation model (trained model) to perform machine translation on the input data and obtains the machine translation result data shown in Figure 5 (="The weather is fine _@@@_TAGS_1 today."). The machine translation model in the machine translation processing unit 23 is a model that has been trained and optimized using parallel data that includes placeholders. Therefore, when data in which XML tags have been replaced with placeholders (first language data) is input to the machine translation model (trained model), the machine translation model (trained model) outputs (acquires) an appropriate machine translation sentence (machine translation processing result data (second language (English) data)) while maintaining the placeholders in their appropriate positions (positions within the sentence).
[0119] In this way, the data acquired by the machine translation model (trained model) of the machine translation processing unit 23 (data after machine translation processing) is output as data D2 from the machine translation processing unit 23 to the second selector SEL22.
[0120] The control unit (not shown) that controls each functional part of the machine translation processing device 2 outputs a selection signal sel22 with a signal value of "1" to the second selector SEL22. The second selector SEL22 selects a path to output the data D2 output from the machine translation processing unit 23 to the reverse substitution processing unit 25 according to the selection signal, and outputs the data D2 to the reverse substitution processing unit 25.
[0121] (Step S203): In step S203, the reverse substitution process is performed. Specifically, the following process is performed.
[0122] The reverse replacement processing unit 25 receives data D22 output from the second selector SEL22 and data D_list_rep output from the forward replacement processing unit 22. The reverse replacement processing unit 25 detects the substitute codes (placeholders) replaced by the forward replacement processing unit 22 from data D22, and performs a reverse replacement process to return (replace) the detected substitute codes back to the original markup language tags based on the list contained in data D_list_rep (a list of correspondences between markup language tags and the substitute codes (placeholders) that replaced those markup language tags in the forward replacement process).
[0123] For example, in Figure 5, the data D_list_rep contains the XML tag " Replace " with the alternative code "_@@@_TAGS_1", and the XML tag "Since the list contains an indication that " has been replaced with the alternative code "_@@@_TAGE_1", the reverse replacement processing unit 25 retrieves the list and performs a process (reverse replacement) to replace (return) the alternative code contained in the machine-translated data D2 with the original XML tag. In other words, in the case of Figure 5, in the machine-translated data D2 (= "The weather is _@@@_TAGS_1 fine _@@@_TAGE_1 today."), the alternative code "_@@@_TAGS_1" is replaced with the XML tag " Replace (revert) to " and set the alternative code "_@@@_TAGE_1" to the XML tag " The process of replacing (reverting) the data with "" is performed (reverse replacement process). As a result, the reverse replacement processing unit 25 processes the data after the reverse replacement process (= "The weather is fine Get today.
[0124] Then, the reverse substitution processing unit 25 outputs the data after performing the reverse substitution process on data D22 to output data Do_dst(=「The weather is fine Output it as "today." (in the case of Figure 5).
[0125] As described above, the machine translation processing system 1000 replaces the XML tags in the input data containing XML tags with alternative codes (placeholders) similar to those used during training data generation, and performs machine translation processing using a trained model of a machine translation model optimized on parallel data with the inserted alternative codes. This allows for the acquisition of appropriate machine translation result data while appropriately maintaining the state in which the alternative codes have been inserted. Furthermore, the machine translation processing system 1000 can obtain machine translation result data (machine-translated text) in which the alternative codes have been inserted by replacing (reverting) the alternative codes back to XML tags.
[0126] Figure 6 shows the results of machine translation processing of XML-tagged first language data (Japanese data) by the machine translation processing system 1000. The upper part of Figure 6 displays the XML-tagged data (XML source code) of the input data Din_src and the data Do_dst after reverse substitution processing, while the lower part of Figure 6 displays the XML tags of the input data Din_src and the data Do_dst after reverse substitution processing after interpretation. As can be seen from Figure 6, the XML tags are maintained in the appropriate positions, and the machine translation processing (machine translation processing from the first language (Japanese) to the second language (English)) is performed appropriately.
[0127] Summary As described above, the machine translation processing system 1000 uses the training data generation device 1 to perform training data generation processing. This allows it to detect start-end correspondence codes (codes where the left and right sides correspond, such as () and []) in parallel texts (parallel data) that do not contain markup language tags (e.g., XML tags), and replace the detected start-end correspondence codes with substitute codes (placeholders). This enables the easy and large-scale generation of data equivalent to parallel data with markup language tags (e.g., XML tags) inserted.
[0128] Furthermore, the parallel text data obtained by the training data generation device 1 of the machine translation processing system 1000 includes placeholders equivalent to markup language tags. Therefore, by using the parallel text data obtained by the training data generation device 1 as training data for the machine translation model's learning process, it is possible to achieve the same effect as when the machine translation model's learning process is performed using parallel text (parallel text data) with markup language tags (e.g., XML tags) as training data.
[0129] Furthermore, the machine translation processing system 1000 replaces markup language tags (e.g., XML tags) in input data containing markup language tags with alternative codes (placeholders) similar to those used during training data generation, and performs machine translation processing using a trained model of a machine translation model optimized on parallel data with the inserted alternative codes. This allows for the acquisition of appropriate machine translation result data while appropriately maintaining the state in which the alternative codes have been inserted. In addition, the machine translation processing system 1000 can obtain machine translation result data (machine-translated text) in which XML tags have been inserted appropriately by replacing the alternative codes with XML tags (reverting them back).
[0130] Thus, the machine translation processing system 1000 makes it possible to machine translate source texts containing markup language tags with high accuracy, while retaining the information of the markup language tags, without having to prepare a large number of tagged parallel texts.
[0131] [Second Embodiment] Next, a second embodiment will be described. Parts similar to those in the above embodiment are denoted by the same reference numerals, and detailed descriptions are omitted.
[0132] Figure 7 is a schematic diagram of the machine translation processing system 2000 according to the second embodiment.
[0133] Figure 8 illustrates the substitution process performed by the training data generation device 1A of the machine translation processing system 2000.
[0134] The second embodiment of the machine translation processing system 2000 has a configuration in which the training data generation device 1 is replaced with a training data generation device 1A in the machine translation processing system 1000 of the first embodiment.
[0135] Furthermore, the training data generation device 1A has a configuration in which the substitution processing unit 12 is replaced with a substitution processing unit 12A in the training data generation device 1 of the first embodiment. Otherwise, the machine translation processing system 2000 of the second embodiment is the same as the machine translation processing system 1000 of the first embodiment.
[0136] The replacement processing unit 12A receives parallel data Din_tr, which is data that pairs first language data (source language data) with second language data (target language data) which is the data obtained by translating the first language data into the second language, and does not include markup language tags. The replacement processing unit 12A inserts placeholders around elements that correspond within the parallel data Din_tr (in the parallel text). For example, if there is a clear correspondence between the first language data (source text) and the second language data (translation text), such as proper nouns or numbers, or if word alignment processing is performed and correspondences can be made between words or phrases, the replacement processing unit 12A inserts placeholders before and after the corresponding elements. The replacement processing unit 12A uses the same symbols as in the first embodiment as placeholders.
[0137] Specifically, the substitution processing unit 12A (1) inserts the substitute code "TAGS_k" (or a string containing "TAGS_k") for the start code of the first embodiment before elements (words, subwords, etc.) that correspond between the first language data (source text) and the second language data (translation text), and (2) inserts the substitute code "TAGE_k" (or a string containing "TAGE_k") for the end code of the first embodiment after elements (words, subwords, etc.) that correspond between the first language data (source text) and the second language data (translation text).
[0138] Here, we will explain the case shown in Figure 8 as an example of the substitution process performed by the substitution processing unit 12A.
[0139] As shown in Figure 8, the first language (Japanese) data of the i-th parallel data (src i ), and data in the second language (English) (dsti Assume that ) is as follows: <First language (Japanese) data (src i )> I will be going to work at the National Institute of Information and Communications Technology. <Second language (English) data (dst i )> I am going to work at the National Institute of Information and Communications Technology. The replacement processing unit 12A then detects corresponding elements (proper nouns in the above case) between the first language data and the second language data, and inserts substitute codes (placeholders) before and after the detected elements. In other words, the replacement processing unit 12A detects the proper noun "National Institute of Information and Communications Technology" in the first language data and "the National Institute of Information and Communications Technology" in the second language (detects corresponding proper nouns), and inserts substitute codes (placeholders) before and after the detected elements (the strings that make up the proper nouns in the above case). As a result, the replacement processing unit 12A produces the following replaced parallel data ({src_rep i dst_rep i}) obtain. <First language (Japanese) data after replacement (src i )> I will be going to work at the National Institute of Information and Communications Technology (TAGS1). <Second language (English) data after replacement (dst i )> I am going to work at _@@@_TAGS_1 the National Institute of Information and Communications Technology _@@@_TAGE_1. The replacement processing unit 12A performs the above replacement process (the process of inserting a substitute code (placeholder) to replace the corresponding element) at the ratio set by the replacement ratio setting unit 11 (the ratio indicated by the replacement ratio data r_rep), similar to the first embodiment.
[0140] Furthermore, it is preferable that the ratio set by the replacement ratio setting unit 11 (the ratio indicated by the replacement ratio data r_rep, 1% in the second embodiment) be set such that the probability of a placeholder appearing is approximately the same as the probability of a markup language tag appearing in the first language data with markup language tags input to the machine translation processing device 2 (source language data). In other words, it is preferable that the probability of placeholders appearing in the parallel data Do_tr after the replacement processing (probability distribution) is similar to the probability of markup language tags appearing in the first language data (source language data) input to the machine translation processing device 2 (data targeted for machine translation processing). By doing so, the probability distribution of placeholders appearing in the training data becomes similar to the probability distribution of markup language tags appearing in the language data with markup language tags that are actually targeted for machine translation processing, thereby improving the accuracy of the learning process of machine translation using the training data.
[0141] The data Do_tr acquired by the training data generation device 1A through the above process is stored in the data storage unit DB1 and, as in the first embodiment, is used in the machine translation processing system 2000 for learning (training) the machine translation model. Then, after the learning process is completed, the machine translation processing system 2000 executes the prediction process (machine translation execution process).
[0142] As described above, the machine translation processing system 2000 uses the training data generation device 1A to perform training data generation processing. This allows it to detect elements that correspond between the source and target texts in parallel texts (parallel data) that do not contain markup language tags (e.g., XML tags), and to easily and efficiently generate a large amount of data equivalent to parallel text data with markup language tags (e.g., XML tags) inserted by replacing the detected elements with placeholders before and after them.
[0143] Furthermore, the parallel text data acquired by the training data generation device 1A of the machine translation processing system 2000 includes placeholders equivalent to markup language tags. Therefore, by using the parallel text data acquired by the training data generation device 1A as training data for the machine translation model's learning process, it is possible to achieve the same effect as when the machine translation model's learning process is performed using parallel text (parallel text data) with markup language tags (e.g., XML tags) as training data.
[0144] Furthermore, in the machine translation processing system 2000, for input data containing markup language tags (e.g., XML tags), the markup language tags are replaced with alternative codes (placeholders) similar to those used during training data generation. The machine translation processing is then performed using a trained model of a machine translation model optimized on parallel data with the inserted alternative codes. This allows for the acquisition of appropriate machine translation result data while appropriately maintaining the state in which the alternative codes have been inserted. In addition, the machine translation processing system 2000 can obtain machine translation result data (machine-translated text) with XML tags inserted appropriately by replacing the alternative codes with XML tags (reverting them back) in the machine translation result data (machine-translated text) in which the alternative codes have been inserted.
[0145] Thus, the machine translation processing system 2000 makes it possible to machine translate source texts containing markup language tags with high accuracy, while preserving the information of the markup language tags, without having to prepare a large number of tagged parallel texts.
[0146] [Other embodiments] Each functional unit of the machine translation processing systems 1000 and 2000 described in the above embodiments may be implemented by a single device (system) or by multiple devices.
[0147] Furthermore, some or all of the above embodiments may be combined.
[0148] Furthermore, although the above embodiment describes the case in which morphologically analyzed parallel data or first language data is input to the training data generation device 1, 1A and the machine translation processing device 2, it is not limited to this, and the training data generation device 1, 1A and the machine translation processing device 2 may also receive parallel data or first language data that has not undergone morphological analysis. In this case, the morphological analysis unit may be provided before the substitution processing unit 12, 12A and the sequential substitution processing unit 22. Then, the morphological analysis unit will separate the data sequence into morphemes, and the resulting parallel data, or the data of the language to be machine translated (first language data), will be input to the training data generation device 1, 1A or the machine translation processing device 2.
[0149] Furthermore, although the above embodiment describes a case where the first language data is Japanese and the second language data is English, the system is not limited to this, and the first language data and / or the second language data may be in other languages. In other words, in the machine translation processing systems 1000 and 2000 of the above embodiment, the source language and the target language may be any language.
[0150] Furthermore, if there are start-end correspondence codes that are commonly used in the first language data and the second language data, the machine translation processing systems 1000 and 2000 may perform a substitution process to replace such start-end correspondence codes with alternative codes (placeholders).
[0151] Furthermore, in the machine translation processing systems 1000 and 2000 described in the above embodiments, each block may be individually integrated into a single chip using semiconductor devices such as LSIs, or it may be integrated into a single chip including some or all of the blocks.
[0152] Although we have used the term LSI here, depending on the degree of integration, they may also be called IC, system LSI, super LSI, or ultra LSI.
[0153] Furthermore, the method of integrated circuit implementation is not limited to LSIs; it may also be implemented using dedicated circuits or general-purpose processors. FPGAs (Field Programmable Gate Arrays), which can be programmed after LSI manufacturing, or reconfigurable processors, which allow for the reconfiguration of the connections and settings of circuit cells within the LSI, may also be used.
[0154] Furthermore, some or all of the processing of each functional block in each of the above embodiments may be implemented by a program. And some or all of the processing of each functional block in each of the above embodiments is performed by the central processing unit (CPU) in a computer. The programs for each of these processes are stored in a storage device such as a hard disk or ROM, and are read from the ROM or RAM and executed.
[0155] Furthermore, each of the processes in the above embodiment may be implemented by hardware, or by software (including cases where it is implemented together with an OS (operating system), middleware, or a predetermined library). It may also be implemented by a combination of software and hardware processing.
[0156] For example, when each functional part of the above embodiment is implemented by software, the hardware configuration shown in Figure 9 (for example, a hardware configuration in which a CPU, GPU, ROM, RAM, input unit, output unit, communication unit, storage unit (for example, a storage unit implemented by an HDD, SSD, etc.), and an external media drive are connected by a bus) may be used to implement each functional part by software processing.
[0157] Furthermore, when each of the functional units of the above embodiment is implemented by software, the software may be implemented using a single computer having the hardware configuration shown in Figure 9, or it may be implemented using distributed processing with multiple computers.
[0158] Furthermore, the execution order of the processing method in the above embodiments is not necessarily limited to the description of the above embodiments, and the execution order can be changed without departing from the spirit of the invention. Also, in the processing method in the above embodiments, some steps may be executed in parallel with other steps without departing from the spirit of the invention.
[0159] A computer program that causes a computer to execute the method described above, and a computer-readable recording medium on which such program is recorded, are included in the scope of the present invention. Examples of computer-readable recording media include flexible disks, hard disks, CD-ROMs, MOs, DVDs, DVD-ROMs, DVD-RAMs, high-capacity DVDs, next-generation DVDs, and semiconductor memory.
[0160] The above-mentioned computer program is not limited to one recorded on the above-mentioned recording medium, but may also be transmitted via telecommunications lines, wireless or wired communication lines, networks such as the Internet, etc.
[0161] It should be noted that the specific configuration of the present invention is not limited to the embodiments described above, and various changes and modifications are possible without departing from the spirit of the invention. [Explanation of Symbols]
[0162] 1000, 2000 Machine Translation Processing Systems 1. 1A Training Data Generation Device 11 Replacement ratio setting unit 11 12, 12A Replacement Processing Unit 2. Machine Translation Processing Device 22 Sequential Permutation Processing Unit 23 Machine Translation Processing Unit 24 Loss Assessment Department 25 Reverse Permutation Processing Unit
Claims
1. A machine translation system, which is executed using a computer and performs machine translation processing by replacing markup language tags in language data containing markup language tags with alternative codes, provides a method for generating training data for training a learnable model for machine translation processing, A start-end correspondence code detection step, which uses the computer to detect a start-end correspondence code, which is a code where the start and end correspond in parallel data obtained by combining first language data and second language data which is data obtained by translating the first language data into a second language, and which does not include the markup language tags, A replacement processing step involves using the computer to perform a replacement process on the parallel translation data, replacing the start-end corresponding code with an alternative code, thereby obtaining the parallel translation data after the replacement process, which has a data structure equivalent to the parallel translation data into which the markup language tags have been inserted. A method for generating training data for machine translation, comprising the following features.
2. The system further comprises a replacement ratio setting step, in which the replacement ratio is set using the aforementioned computer. The substitution step is, A replacement process is performed on the aforementioned parallel data, in which the start and end corresponding codes are replaced with alternative codes at the replacement ratio set in the replacement ratio setting step. The method for generating training data for machine translation according to claim 1.
3. A machine translation processing system for performing machine translation processing by replacing markup language tags in language data including markup language tags with alternative codes using training data generated by the machine translation training data generation method described in claim 1 or 2, wherein a method for training a learnable model for machine translation processing is provided, and the method is performed using a computer. A data input step of inputting the first language data included in the translated data after the substitution process into a learnable model for machine translation processing using the computer, An output data acquisition step using the computer to acquire output data of a learnable model for machine translation processing for the data input in the data input step, A loss evaluation step is performed using the computer to obtain the output data obtained in the output data acquisition step and the second language data included in the translated data after the replacement process as correct data, and to evaluate the loss between the output data and the correct data. A parameter update step, using the computer, to update the parameters of the learnable model for machine translation processing so that the loss obtained in the loss evaluation step becomes smaller, A method for creating a trainable model for machine translation processing that includes [a specific feature / feature].
4. A method for performing machine translation processing using a trained model of a trainable model for machine translation processing obtained by training with the method for creating a trainable model for machine translation processing described in claim 3, wherein the method is performed using a computer, A sequential replacement step is performed using the computer to perform a sequential replacement process in which the markup language tags contained in the input first language data are replaced with the alternative codes. A machine translation processing step in which, using the computer, machine translation is performed on the first language data after the sequential replacement process using a trained model of the trainable model for machine translation processing, thereby obtaining the second language data after machine translation processing, A reverse replacement processing step is performed using the computer to perform a reverse replacement process in which the substitute codes contained in the second language data after the machine translation process obtained in the machine translation processing step are replaced with the markup language tags that were replaced in the forward replacement processing step. A machine translation processing method comprising the following features.
5. A machine translation system for performing machine translation by replacing markup language tags in language data containing markup language tags with alternative codes, a method for generating training data for training a learnable model for machine translation, Parallel data comprising first language data and second language data which is data obtained by translating the first language data into a second language, wherein the parallel data does not include markup language tags, and includes a correspondence element detection step for detecting a correspondence element which is an element that is determined to be an element that can be matched between the first language data and the second language data, by (1) the data of the second language data corresponding to predetermined data included in the first language data is known, or (2) when word alignment processing is performed on the first language data and the second language data, the data of the second language data corresponding to predetermined data included in the first language data can be identified, A replacement processing step to obtain the replacement data, which has a data structure equivalent to the replacement data with the markup language tags inserted, by performing a replacement process on the replacement data to insert alternative codes before and after the corresponding elements. A method for generating training data for machine translation, comprising the following features.
6. A machine translation system for performing machine translation by replacing markup language tags in language data containing markup language tags with alternative codes, comprising a device for generating training data for training a learnable model for machine translation, Parallel data comprising first language data and second language data which is data obtained by translating the first language data into a second language, wherein the parallel data does not include markup language tags, and a start-end correspondence code is detected which is a code that corresponds to the start and end of the data, A replacement processing unit performs a replacement process on the aforementioned parallel translation data, replacing the start-end corresponding code with an alternative code, thereby obtaining the replaced parallel translation data, which has a data structure equivalent to the parallel translation data with the markup language tags inserted. A machine translation training data generation device equipped with the following features.
Citation Information
Patent Citations
Transliteration device, transliteration program, computer-readable recording medium in which transliteration program is recorded and method of transliteration
JP2012185679A
Structured text translation
US10963652B2
Method to preserve the place of parentheses and tags in statistical machine translation systems
US20100235162A1