Japanese-Chinese machine translation method and system using cognates
By using homologous dictionary and public-private representation methods in Chinese-Japanese machine translation, the problem of limited translation effect of existing Chinese-Japanese machine translation technology is solved, and more consistent bilingual semantic alignment and better translation effect are achieved.
Patent Information
- Application Number
- CN202111262328.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-28
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2041-10-28
AI Technical Summary
The existing Chinese and Japanese machine translation technology has limited translation effects and has failed to effectively utilize the language-specific linguistic knowledge.
By obtaining the word sequence of Japanese origin sentences, a pre-constructed homologous dictionary is used to determine whether each word has Chinese homologous words. If it exists, it will be converted into homologous words. The public representation is obtained in the shared dictionary and the private representation is obtained in the Japanese dictionary, merge it into the final word vector representation, and enter the Transformer model for translation.
By using homologous words to expand the number of shared words between bilinguals, and using shared word embedding methods to improve bilingual semantic alignment, thereby improving translation effect and modeling the semantic deviation of homologous words in Japanese.
Smart Images

Figure CN114169345B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machine translation, and in particular to a Japanese-Chinese machine translation method, system, storage medium and electronic device using cognates. Background Art
[0002] Machine translation refers to the technology of using computers to automatically translate one natural language into another, such as Chinese into English. Since the idea of machine translation modeling based on noise channels was proposed, researchers have been committed to the study of machine translation systems for various languages. In recent years, with the development of deep learning, machine translation based on deep neural networks has become the mainstream technology today, and has achieved great success both in industry and academia.
[0003] In neural machine translation, the translation process can be implemented by the encoder-decoder framework. The encoder encodes the source language sentence and extracts the information in the source language for distributed representation. The decoder then generates this information into sentences in the target language. The encoder and decoder can use different model structures. The development of machine translation in recent years is mostly reflected in the improvement and replacement of these model structures. The most representative ones are models based on RNN, CNN and Transformer. Among them, the main structure of Transformer can be summarized as "multi-layer multi-head self-attention". Transformer does not rely on any recurrent unit or convolution unit, but uses a structure called self-attention network to represent the sequence. The self-attention mechanism can very efficiently describe the dependency between any distances, and has become one of the most advanced architectures in machine translation.
[0004] However, although the above machine translation based on neural networks such as RNN, CNN and Transformer has achieved good results, the current research focus is on English-centric machine translation, that is, machine translation with English as the source language or target language. For machine translation where both the source language and the target language are non-English, such as Chinese-Japanese machine translation, there is a lack of targeted optimization and no use of the linguistic knowledge unique to these languages. Summary of the invention
[0005] 1. Technical issues to be resolved
[0006] In view of the deficiencies of the prior art, the present invention provides a Japanese-Chinese machine translation method, system, storage medium and electronic device using cognates, which solves the technical problem that the existing Chinese-Japanese machine translation technology has limited translation effect.
[0007] (II) Technical solution
[0008] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0009] A Japanese-Chinese machine translation method using cognates, comprising:
[0010] S1, obtaining and segmenting a Japanese source sentence to obtain a word sequence corresponding to the Japanese source sentence;
[0011] S2, judging whether each word in the word sequence has a Chinese cognate word according to the pre-acquired cognate dictionary; if so, converting the current word into a corresponding cognate word shape and proceeding to S3; otherwise, proceeding to S4;
[0012] S3, obtaining the word vector representation of the cognate word shape in the shared dictionary, recorded as the public representation, and obtaining the word vector representation of the current word in the Japanese dictionary, recorded as the private representation, and merging the public representation and the private representation as the final word vector representation of the current word; the shared dictionary means that the source language and the target language share the same word embedding matrix;
[0013] S4, obtaining the word vector representation of the current word in the shared dictionary and using it as the final word vector representation of the current word;
[0014] S5. Obtain a complete word vector representation of the Japanese source sentence according to the final word vector representation of each word;
[0015] S6. Input the complete word vector representation of the Japanese source sentence into the Transformer model to obtain the corresponding Chinese target sentence.
[0016] Preferably, the homology dictionary construction process in S2 includes cognate word mining, and the cognate word mining includes cognate Chinese character mapping and cognate word mapping.
[0017] Preferably, the homologous Chinese character mapping includes: constructing a homologous Chinese character mapping dictionary, wherein Jian is a Japanese character and Value is a Chinese character.
[0018] Preferably, the cognate word mapping includes:
[0019] First, we segmented the Japanese and Chinese sentences in the parallel corpus, counted the word frequencies, and created monolingual dictionaries for Japanese and Chinese respectively for the medium and high frequency words.
[0020] According to the monolingual dictionaries of Japanese and Chinese, the cognate word mapping is completed, and the specific extraction rules include:
[0021] Rule 1: Only conduct cognate mapping mining on words in the Japanese dictionary that contain only Chinese characters;
[0022] Rule 2: If the Japanese word e appears directly in the Chinese dictionary, then (e, e) is retained in the cognate mapping dictionary;
[0023] Rule 3: If the Japanese word e does not appear in the Chinese dictionary, then e is converted into 0 or more candidate words f through the cognate mapping; if f appears in the Chinese dictionary, then (e, f) is retained in the cognate mapping dictionary;
[0024] Rule 4: If there are multiple cognate candidates f for the same Japanese word e, only the f with the largest number of co-occurrences with e in the parallel corpus is retained.
[0025] Preferably, the final word vector representation of the current word in S3 specifically includes:
[0026]
[0027] α=sigmoid(WE share (e)+UE private (e)+b)
[0028] Among them, E share (e) is the shared word vector of Japanese and Chinese, i.e., the public representation; E private (e) is a Japanese private word vector, i.e., the private representation; is the element-wise multiplication, α is the weight vector; W∈R n×n and U∈R n×n is the weight matrix parameter, b∈R n are bias items, all of which are learnable parameters, and n is the dimension of the word vector.
[0029] Preferably, the S6 specifically includes:
[0030] S61, inputting the complete word vector representation of the Japanese source sentence into the encoder of the Transformer model, and obtaining the context representation of each word through multiple layers of Transformer sublayers;
[0031] S62. Input the context representation into the decoder of the Transformer model. The decoder combines the word vector representation of the translation output at the previous moment and the final word vector representation corresponding to the current word to obtain the translation output at the current moment, and connects the translation outputs at all moments to obtain the Chinese target sentence.
[0032] Preferably, the model parameters of the Transformer model are obtained by end-to-end training based on a maximum likelihood estimation method.
[0033] A Japanese-Chinese machine translation system using cognates, comprising:
[0034] The word segmentation module is used to execute: S1, obtaining and performing word segmentation processing on a Japanese source sentence, and obtaining a word sequence corresponding to the Japanese source sentence;
[0035] A judgment module is used to execute: S2, judging whether each word in the word sequence has a Chinese cognate word according to a pre-acquired cognate dictionary; if so, converting the current word into a corresponding cognate word shape and transferring to S3; otherwise, transferring to S4;
[0036] The first processing module is used to execute: S3, obtaining the word vector representation of the cognate word shape in the shared dictionary, recorded as the public representation, and obtaining the word vector representation of the current word in the Japanese dictionary, recorded as the private representation, and merging the public representation and the private representation as the final word vector representation of the current word; the shared dictionary refers to the source language and the target language sharing the same word embedding matrix;
[0037] The second processing module is used to execute: S4, obtaining a word vector representation of the current word in the shared dictionary and using it as the final word vector representation of the current word;
[0038] The first acquisition module is used to execute: S5, acquiring a complete word vector representation of the Japanese source sentence according to the final word vector representation of each word;
[0039] The second acquisition module is used to execute: S6, inputting the complete word vector representation of the Japanese source sentence into the Transformer model to obtain the corresponding Chinese target sentence.
[0040] A storage medium stores a computer program for Japanese-Chinese machine translation using cognates, wherein the computer program causes a computer to execute the Japanese-Chinese machine translation method using cognates as described above.
[0041] An electronic device, comprising:
[0042] one or more processors;
[0043] Memory; and
[0044] One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs including instructions for executing the Japanese-Chinese machine translation method using cognates as described above.
[0045] (III) Beneficial effects
[0046] The present invention provides a Japanese-Chinese machine translation method, system, storage medium and electronic device using cognates. Compared with the prior art, the present invention has the following beneficial effects:
[0047] According to the present invention, if there is a Chinese cognate in the word sequence corresponding to the Japanese source sentence, the current word is converted into the corresponding cognate glyph, the word vector representation of the cognate glyph in the shared dictionary is obtained, recorded as a public representation, and the word vector representation of the current word in the Japanese dictionary is obtained, recorded as a private representation, and the public representation and the private representation are combined as the final word vector representation of the current word. Finally, the complete word vector representation of the Japanese source sentence is input into the Transformer model to obtain the corresponding Chinese target sentence. By using the same Chinese characters to obtain Chinese and Japanese cognates, the number of words shared between the two languages is expanded, and the shared word embedding method is used in neural machine translation to obtain a more consistent bilingual semantic alignment, which is theoretically conducive to the improvement of the final translation effect; in addition, the Japanese words with Chinese cognates use the public-private representation method to model the linguistic phenomenon that the semantics of cognates in Japanese deviate from their original semantics. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1 A flowchart of a Japanese-Chinese machine translation method using cognates provided by an embodiment of the present invention;
[0050] Figure 2 This is a comparison diagram of attention weights between the Transformer system and the embodiment of the present invention;
[0051] Figure 3 A structural block diagram of a Japanese-Chinese machine translation system using cognates provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] The embodiments of the present application solve the technical problem of limited translation effect of existing Chinese-Japanese machine translation technology by providing a Japanese-Chinese machine translation method, system, storage medium and electronic device using cognates.
[0054] The technical solution in the embodiment of the present application is to solve the above technical problems, and the overall idea is as follows:
[0055] According to the embodiment of the present invention, if there is a Chinese cognate in the word sequence corresponding to the Japanese source sentence, the current word is converted into the corresponding cognate glyph, the word vector representation of the cognate glyph in the shared dictionary is obtained, recorded as a public representation, and the word vector representation of the current word in the Japanese dictionary is obtained, recorded as a private representation, and the public representation and the private representation are combined as the final word vector representation of the current word. Finally, the complete word vector representation of the Japanese source sentence is input into the Transformer model to obtain the corresponding Chinese target sentence. By using the same Chinese characters to obtain Chinese and Japanese cognates, the number of words shared between the two languages is expanded, and the shared word embedding method is used in neural machine translation to obtain a more consistent bilingual semantic alignment, which is theoretically conducive to the improvement of the final translation effect; in addition, the Japanese words with Chinese cognates use the public-private representation method, which can model the language phenomenon that the semantics of cognates in Japanese deviate from their original semantics.
[0056] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0057] Example:
[0058] First, as Figure 1 As shown, the embodiment of the present invention provides a Japanese-Chinese machine translation method using cognates, comprising:
[0059] S1, obtaining and segmenting a Japanese source sentence to obtain a word sequence corresponding to the Japanese source sentence;
[0060] S2, judging whether each word in the word sequence has a Chinese cognate word according to the pre-acquired cognate dictionary; if so, converting the current word into a corresponding cognate word shape and proceeding to S3; otherwise, proceeding to S4;
[0061] S3, obtaining the word vector representation of the cognate word shape in the shared dictionary, recorded as the public representation, and obtaining the word vector representation of the current word in the Japanese dictionary, recorded as the private representation, and merging the public representation and the private representation as the final word vector representation of the current word; the shared dictionary means that the source language and the target language share the same word embedding matrix;
[0062] S4, obtaining the word vector representation of the current word in the shared dictionary and using it as the final word vector representation of the current word;
[0063] S5. Obtain a complete word vector representation of the Japanese source sentence according to the final word vector representation of each word;
[0064] S6. Input the complete word vector representation of the Japanese source sentence into the Transformer model to obtain the corresponding Chinese target sentence.
[0065] The embodiment of the present invention uses the same Chinese characters to obtain Chinese and Japanese cognates, thereby expanding the number of words shared between the two languages, and uses the shared word embedding method in neural machine translation to obtain more consistent bilingual semantic alignment, which is theoretically beneficial to the improvement of the final translation effect; in addition, Japanese words with Chinese cognates use a public-private representation method, which can model the linguistic phenomenon in which the semantics of cognates in Japanese deviate from their original semantics.
[0066] The following will introduce the various steps of the above solution in combination with specific content:
[0067] S1. Acquire and segment a Japanese source sentence to obtain a word sequence corresponding to the Japanese source sentence.
[0068] The word segmentation process refers to segmenting a sentence into word sequences and adding tags between the words for use by upper-layer applications.
[0069] S2. According to the pre-acquired homology dictionary, determine one by one whether each word in the word sequence has a Chinese homonym; if so, convert the current word into a corresponding homonym glyph and proceed to S3; otherwise, proceed to S4.
[0070] In the embodiment of the present invention, cognates are defined as words that appear in both Japanese and Chinese, that is, Chinese characters with the same glyphs in both languages. However, some Chinese characters with the same glyphs have glyph differences between Chinese and Japanese, so it is necessary to establish a mapping to mine those words that are essentially cognates but have glyph differences. The mining of cognates is divided into two steps: mapping of cognates to Chinese characters and mapping of cognates to words.
[0071] The homology dictionary construction process in S2 includes cognate word mining, and the cognate word mining is divided into two steps: cognate Chinese character mapping and cognate word mapping.
[0072] (1) The homologous Chinese character mapping includes: constructing a homologous Chinese character mapping dictionary, where Jian is a Japanese character and Value is a Chinese character.
[0073] As shown in Table 1, excluding Chinese characters that do not have a corresponding relationship, there are the following mapping relationships between Chinese and Japanese characters: one-to-one, one-to-many, and many-to-one.
[0074] Table 1
[0075]
[0076] The Chinese characters in Example 1 have the same shape, while those in Example 2 have different shapes.
[0077] In the first step of this patent, a homologous Chinese character mapping dictionary was constructed, where the key is a Japanese Chinese character and the value is a Chinese character. The following 4 pairs of mapping relationships are stored in the mapping dictionary as {"国": "国", "団": "团", "弁": "辨", "弁": "瓣", "弁": "辩", "個": "个", "箇": "个"}.
[0078] It can be seen that both one-to-many and many-to-one relationships are split into multiple one-to-one relationships for storage.
[0079] (2) The homologous word mapping includes:
[0080] First, segment the Japanese and Chinese sentences in the parallel corpus and count the word frequencies. Create monolingual dictionaries for Japanese and Chinese for medium and high-frequency words respectively;
[0081] According to the monolingual dictionaries of Japanese and Chinese, complete the homologous word mapping. The specific extraction rules include:
[0082] Rule 1: Only mine homologous word mapping for words containing only Chinese characters in the Japanese dictionary;
[0083] Rule 2: If the Japanese word e directly appears in the Chinese dictionary, then retain (e, e) in the homologous word mapping dictionary;
[0084] Rule 3: If the Japanese word e does not appear in the Chinese dictionary, then convert e into 0 to multiple candidate words f through the homologous character mapping; if f appears in the Chinese dictionary, then retain (e, f) in the homologous word mapping dictionary;
[0085] Rule 4: If there are multiple homologous word candidates f for the same Japanese word e, then only retain the f that co-occurs with e the most times in the parallel corpus.
[0086] When the homologous word dictionary is mined, perform homologous word replacement on the Japanese sentences in the parallel corpus, that is, if each Japanese word e in the source language sentence appears in the homologous word dictionary, then replace it with the corresponding target language homologous word f; then more shared words can be obtained in the shared dictionary, thus increasing the alignment relationship between the two languages.
[0087] It should be noted that the shared dictionary is a dictionary merged from the 30,000 most frequent words counted separately in the Japanese and Chinese corpora. Due to the existence of homographic words, the number of entries in the shared dictionary is less than 60,000.
[0088] Under the shared dictionary, the source language and the target language share the same word embedding matrix, so homographic words in Japanese and Chinese will get the same word vector representation, which is beneficial for modeling the common features between the two languages.
[0089] S3. Obtain the word vector representation of the cognate word shape in a shared dictionary, recorded as a public representation, and obtain the word vector representation of the current word in a Japanese dictionary, recorded as a private representation, and merge the public representation and the private representation as the final word vector representation of the current word; the shared dictionary means that the source language and the target language share the same word embedding matrix.
[0090] There is a problem with using only a shared dictionary for cognates, because cognates sharing the same feature vector representation only models their common features between the two languages, while ignoring the differences between the two. After a long period of evolution, cognates may have undergone semantic changes, so it is necessary to model this difference. Accordingly, the embodiment of the present invention proposes a public-private representation, where each Japanese word e that appears in the cognate dictionary is represented as the sum of two word vectors:
[0091]
[0092] α=sigmoid(WE share (e)+UE private (e)+b)
[0093] Among them, E share (e) is the shared word vector of Japanese and Chinese, i.e., the public representation; E private (e) is a Japanese private word vector, i.e., the private representation, used to represent the semantic shift of the cognate word in Japanese; is the element-wise multiplication, α is the weight vector used to weigh the importance of the public and private parts; W∈R n×n and U∈R n×n is the weight matrix parameter, b∈R n are bias items, all of which are learnable parameters, and n is the dimension of the word vector.
[0094] The weight vector α can adaptively learn the importance of the public and private parts, and the value of each dimension indicates the importance of the public and private parts on the current dimension.
[0095] S4. Obtain the word vector representation of the current word in the shared dictionary and use it as the final word vector representation of the current word.
[0096] S5. According to the final word vector representation of each word, obtain the complete word vector representation of the Japanese source sentence.
[0097] S6. Input the complete word vector representation of the Japanese source sentence into the Transformer model to obtain the corresponding Chinese target sentence; specifically including:
[0098] S61. Input the complete word vector representation of the Japanese source sentence into the encoder of the Transformer model, and obtain the context representation of each word through multiple layers of Transformer sub-layers;
[0099] S62. Input the context representation into the decoder of the Transformer model. The decoder combines the word vector representation of the translation output at the previous moment and the final word vector representation corresponding to the current word, obtains the translation output at the current moment, and connects the translation outputs at all moments to obtain the Chinese target sentence.
[0100] In particular, the model parameters of the Transformer model are obtained through end-to-end training based on the maximum likelihood estimation method.
[0101] In the embodiments of the present invention, the attention weights in the Transformer model are used to represent the word alignment relationship, that is, the weight distribution of the source language words "focused on" when generating each target language word during the decoding process.
[0102] Figure 2 A comparison of the attention weights between the baseline system (i.e., the Transformer system) and the embodiments of the present invention is made. Among them, the left sub-graph is the baseline system, and the right sub-graph is the method proposed in this patent. The darker the color, the greater the weight. It can be found that the method provided by the embodiments of the present invention can achieve a more accurate word alignment relationship. For example, "详细" gives a greater attention weight to its cognate word "詳細", and "推进" also gives a greater attention weight to its cognate word "推進".
[0103] After introducing cognate words and public-private representations in the embodiments of the present invention, the Japanese-Chinese translation effect is effectively improved, especially in the translation of Japanese sentences containing cognate Chinese characters. As shown in Table 2, the red part is where our proposed method gets better, and the blue part is where it gets worse.
[0104]
[0105] Table 2
[0106] In the first example, "評価" was wrongly translated as "评估" in the baseline system, while in the method provided by the embodiments of the present invention, it was correctly translated as "评价"; the same is true for the translation of "提案". This example can illustrate the effect after introducing cognate words.
[0107] The second example can illustrate the necessity and effect of introducing public-private representation; if only a shared vocabulary based on cognates is used, it can be seen that "morphology" was originally correctly translated as "form" in the baseline system, but when cognates were introduced, it was incorrectly translated as "morphology", and when public-private representation was introduced again, it was correctly translated as "form" again.
[0108] Second, as Figure 3 As shown, the embodiment of the present invention provides a Japanese-Chinese machine translation system using cognates, including:
[0109] The word segmentation module is used to execute: S1, obtaining and performing word segmentation processing on a Japanese source sentence, and obtaining a word sequence corresponding to the Japanese source sentence;
[0110] A judgment module is used to execute: S2, judging whether each word in the word sequence has a Chinese cognate word according to a pre-acquired cognate dictionary; if so, converting the current word into a corresponding cognate word shape and transferring to S3; otherwise, transferring to S4;
[0111] The first processing module is used to execute: S3, obtaining the word vector representation of the cognate word shape in the shared dictionary, recorded as the public representation, and obtaining the word vector representation of the current word in the Japanese dictionary, recorded as the private representation, and merging the public representation and the private representation as the final word vector representation of the current word; the shared dictionary refers to the source language and the target language sharing the same word embedding matrix;
[0112] The second processing module is used to execute: S4, obtaining a word vector representation of the current word in the shared dictionary and using it as the final word vector representation of the current word;
[0113] The first acquisition module is used to execute: S5, acquiring a complete word vector representation of the Japanese source sentence according to the final word vector representation of each word;
[0114] The second acquisition module is used to execute: S6, inputting the complete word vector representation of the Japanese source sentence into the Transformer model to obtain the corresponding Chinese target sentence.
[0115] In a third aspect, an embodiment of the present invention provides a storage medium storing a computer program for Japanese-Chinese machine translation using cognates, wherein the computer program enables a computer to execute the Japanese-Chinese machine translation method using cognates as described above.
[0116] In a fourth aspect, an embodiment of the present invention provides an electronic device, including:
[0117] one or more processors;
[0118] Memory; and
[0119] One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs including instructions for executing the Japanese-Chinese machine translation method using cognates as described above.
[0120] It can be understood that the Japanese-Chinese machine translation system using cognates, storage medium and electronic device provided in the embodiments of the present invention correspond to the Japanese-Chinese machine translation method using cognates provided in the embodiments of the present invention, and the explanations, examples and beneficial effects of the relevant contents can refer to the corresponding parts in the Japanese-Chinese machine translation method using cognates, which will not be repeated here.
[0121] In summary, compared with the prior art, the present invention has the following beneficial effects:
[0122] The embodiment of the present invention uses the same Chinese characters to obtain Chinese and Japanese cognates, thereby expanding the number of words shared between the two languages, and uses the shared word embedding method in neural machine translation to obtain more consistent bilingual semantic alignment, which is theoretically beneficial to the improvement of the final translation effect; in addition, Japanese words with Chinese cognates use a public-private representation method, which can model the linguistic phenomenon in which the semantics of cognates in Japanese deviate from their original semantics.
[0123] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0124] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A Japanese-Chinese machine translation method using cognates, characterized in that: include: S1, obtaining and segmenting a Japanese source sentence to obtain a word sequence corresponding to the Japanese source sentence; S2, judging whether each word in the word sequence has a Chinese cognate word according to the pre-acquired cognate dictionary; if so, converting the current word into a corresponding cognate word shape and proceeding to S3; otherwise, proceeding to S4; S3, obtaining the word vector representation of the cognate word shape in the shared dictionary, recorded as the public representation, and obtaining the word vector representation of the current word in the Japanese dictionary, recorded as the private representation, and merging the public representation and the private representation as the final word vector representation of the current word; the shared dictionary means that the source language and the target language share the same word embedding matrix; S4, obtaining the word vector representation of the current word in the shared dictionary and using it as the final word vector representation of the current word; S5. Obtain a complete word vector representation of the Japanese source sentence according to the final word vector representation of each word; S6. Input the complete word vector representation of the Japanese source sentence into the Transformer model to obtain the corresponding Chinese target sentence.
2. The Japanese-Chinese machine translation method using cognates as claimed in claim 1, characterized in that: The homology dictionary construction process in S2 includes cognate word mining, and the cognate word mining includes cognate Chinese character mapping and cognate word mapping.
3. The Japanese-Chinese machine translation method using cognates as claimed in claim 2, characterized in that: The homologous Chinese character mapping includes: constructing a homologous Chinese character mapping dictionary, where Jian is a Japanese Chinese character and Value is a Chinese Chinese character.
4. The Japanese-Chinese machine translation method using cognates as claimed in claim 3, characterized in that: The cognate word mapping includes: First, we segmented the Japanese and Chinese sentences in the parallel corpus, counted the word frequencies, and created monolingual dictionaries for Japanese and Chinese respectively for the medium and high frequency words. According to the monolingual dictionaries of Japanese and Chinese, the cognate word mapping is completed, and the specific extraction rules include: Rule 1: Only conduct cognate mapping mining on words in the Japanese dictionary that contain only Chinese characters; Rule 2: If the Japanese word e appears directly in the Chinese dictionary, then (e, e) is retained in the cognate mapping dictionary; Rule 3: If the Japanese word e does not appear in the Chinese dictionary, then e is converted into 0 or more candidate words f through the cognate mapping; if f appears in the Chinese dictionary, then (e, f) is retained in the cognate mapping dictionary; Rule 4: If there are multiple cognate candidates f for the same Japanese word e, only the f with the largest number of co-occurrences with e in the parallel corpus is retained.
5. The Japanese-Chinese machine translation method using cognates as claimed in claim 1, characterized in that: The final word vector representation of the current word in S3 specifically includes: α=Sigmoid(WE share (b)+EU private (e)+b) Among them, E share (e) is the shared word vector of Japanese and Chinese, i.e., the public representation; E private (e) is a Japanese private word vector, i.e., the private representation; is the element-wise multiplication, α is the weight vector; W∈R n×n and U∈R n×n is the weight matrix parameter, b∈R n are bias items, all of which are learnable parameters, and n is the dimension of the word vector.
6. The Japanese-Chinese machine translation method using cognates according to any one of claims 1 to 5, characterized in that: The S6 specifically includes: S61, inputting the complete word vector representation of the Japanese source sentence into the encoder of the Transformer model, and obtaining the context representation of each word through multiple layers of Transformer sublayers; S62. Input the context representation into the decoder of the Transformer model. The decoder combines the word vector representation of the translation output at the previous moment and the final word vector representation corresponding to the current word to obtain the translation output at the current moment, and connects the translation outputs at all moments to obtain the Chinese target sentence.
7. The Japanese-Chinese machine translation method using cognates as claimed in claim 6, characterized in that: The model parameters of the Transformer model are obtained by end-to-end training based on the maximum likelihood estimation method.
8. A Japanese-Chinese machine translation system using cognates, characterized in that: include: The word segmentation module is used to execute: S1, obtaining and performing word segmentation processing on a Japanese source sentence, and obtaining a word sequence corresponding to the Japanese source sentence; A judgment module is used to execute: S2, judging whether each word in the word sequence has a Chinese cognate word according to a pre-acquired cognate dictionary; if so, converting the current word into a corresponding cognate word shape and transferring to S3; otherwise, transferring to S4; The first processing module is used to execute: S3, obtaining the word vector representation of the cognate word shape in the shared dictionary, recorded as the public representation, and obtaining the word vector representation of the current word in the Japanese dictionary, recorded as the private representation, and merging the public representation and the private representation as the final word vector representation of the current word; the shared dictionary refers to the source language and the target language sharing the same word embedding matrix; The second processing module is used to execute: S4, obtaining a word vector representation of the current word in the shared dictionary and using it as the final word vector representation of the current word; The first acquisition module is used to execute: S5, acquiring a complete word vector representation of the Japanese source sentence according to the final word vector representation of each word; The second acquisition module is used to execute: S6, inputting the complete word vector representation of the Japanese source sentence into the Transformer model to obtain the corresponding Chinese target sentence.
9. A storage medium, characterized in that: The computer program for Japanese-Chinese machine translation using cognates is stored therein, wherein the computer program enables a computer to execute the Japanese-Chinese machine translation method using cognates according to any one of claims 1 to 7.
10. An electronic device, characterized in that: include: one or more processors; Memory; as well as One or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, the programs including instructions for executing the Japanese-Chinese machine translation method using cognates as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Chinese- Vietnamese unsupervised neural machine translation method fusing EMD minimized bilingual dictionary
CN111753557A
A bilingual dictionary-integrated unsupervised Chinese-Vietnamese neural machine translation method
CN112507732A