1. Field of the Invention
The present invention relates to a machine translation apparatus and, more specifically, to a statistical machine translation apparatus capable of performing highly accurate translation taking advantage of example-based translation.
2. Description of the Background Art
The framework of statistical machine translation formulates the problem of translating a sentence in a language (J) into another language (E) as the maximization problem of the following conditional probability.
According to the Bayes' Rule, É may be written as:
In this equation, É may be computed independent of the term P(J). Therefore,
The first term P(E) on the right side is called a language model, representing the likelihood of sentence E. The second term P(J|E) is called a translation model, representing the probability of generating sentence J from sentence E.
Under this concept, a translation model has been proposed where a sentence of a first language (referred to as a channel target sentence) is mapped to a sentence of a second language (referred to as a channel source sentence) with the notion of word alignment (finding correspondence between words). This translation model has been successfully applied to similar language pairs, such as French-English and German-English.
The translation model, however, achieved little success when applied to drastically different language pairs, such as Japanese-English. The problem lies in the huge search space caused by the frequent insertions/deletions of words, the larger numbers of fertility for each word and the complicated word alignment, experienced in mapping between languages of different structures. Due to search complexity, a beam search decoding algorithm would result in mere sub-optimal (limited/local) solutions.
Word alignment based statistical translation expresses bilingual correspondence by the notion of word alignment A, allowing one-to-many correspondence of words. Word alignment A is an array describing which word of a channel target sentence corresponds to which word of a channel source sentence, using indexes to the words of the channel source sentence. In this array, correspondence to the words of the channel source sentence is denoted by the indexes added to the words of channel source sentence, and the indexes are arranged in accordance with the order of words of the channel target sentence.
Under this word alignment assumption of such mapping, the translation model P(J|E) can be further decomposed as:
The term P(J,A|E) on the right side is further decomposed into four components. These four components constitute the prior art process of transferring a channel source sentence E into channel target sentence J having alignment A. The four components are as follows.
(1) Choose the number of words to generate for each word of the channel source sentence according to the Fertility Model. Two translation words may be generated from one word, or a translation word may not be generated at all.
(2) Insert NULLs at appropriate positions of the channel source sentence by the NULL Generation Model.
(3) Translate word-by-word for each generated word by looking up the Lexicon Model.
(4) Reorder the translated words by referring to the Distortion Model. Positioning is determined by the previous word's alignment to capture phrasal constraints.
In this manner, a translation model based on the idea of word alignment is obtained.
A method has been proposed, in which each word of a channel target sentence is translated to a channel source language, the resulting translated words are positioned in the order of the channel target sentence, and various operators are applied to the resulting sentence to generate a number of sentences. (Ulrich Germann, Michael Jahr, Kevin Knight, Daniel Marcu, and Kenji Yamada, “Fast decoding and optimal decoding for machine translation,” (2001) in Proc. of ACL2001, Toulouse, France.) In this proposed method, the sentence having the highest likelihood among the thus generated sentences is selected as the translation.
The word alignment based statistical translation model was originally intended for similar language pairs, such as French and English. When applied to Japanese and English, for instance, which have drastically different structures, this model results in very complicated word alignments, as seen in
Both the intricate alignments and the insertion/deletion of words lead to a computationally expensive process when a word-by-word beam search is applied. Some pruning strategies have to be introduced, so that the search system can output results in a reasonable time. However, search errors become inevitable under the restricted search space. Though there exist some correlations between translation quality and the probabilities assigned by the translation model, the beam search was often unable to find good translations.
The method proposed by Germann et al. is problematic as the search often reaches a local optimal solution, and it is not the case that highly accurate solution is stably obtained.
Therefore, an object of the present invention is to provide method and apparatus of machine translation utilizing statistical machine translation, capable of providing high quality translation regardless of language combinations.
Another object of the present invention is to provide method and apparatus of machine translation utilizing statistical machine translation, capable of providing, in a reasonable time, high quality translation regardless of language combinations.
A still further object of the present invention is to provide method and apparatus of machine translation utilizing statistical machine translation, capable of stably providing high quality translation regardless of language combinations.
According to a first aspect, the present invention provides a method of machine translation, using a bilingual corpus containing a plurality of translation pairs each consisting of a sentence of a first language and a sentence of a second language, for translating an input sentence of the first language to the second language, including the steps of: receiving the input sentence of the first language and extracting, from the bilingual corpus, a sentence of the second language forming a pair with a sentence of the first language satisfying a prescribed relation with the input sentence; applying an arbitrary modification among a plurality of predetermined modifications to the extracted sentence of the second language, and computing likelihood of sentences resulting from the modification; selecting sentences having the likelihood satisfying a prescribed condition from among the sentences resulting from the modification; repeating, on each of the sentences selected in the step of selecting, the steps of extracting, computing and selecting, until a predetermined termination condition is satisfied; and outputting, as a translation of the input sentence, a sentence having the likelihood satisfying a predetermined selection condition among the sentences of the second language left at the end of the step of repeating.
From the bilingual corpus, a sentence of a second language paired with a first language and satisfying a prescribed relation with an input sentence is extracted. The sentence of the second language is modified in various manners, and from the resulting sentences, a sentence having a likelihood satisfying a prescribed condition is selected, and these operations are repeated. The sentence finally found to satisfy the selection condition is output as a translation of the input sentence. As the translation pairs in the bilingual corpus are good translations of the counterpart, and therefore, it is highly likely that the extracted sentence of the second language is similar to an ideal translation of the input sentence. The translation selected based on the likelihood among sentences obtained by repeating various modification of the sentence extracted in such a manner would be, with high probability, an ideal translation of the input sentence. As the sentence extracted at first is already close to the ideal translation, it is not likely that the repetition results in a local optimal solution.
Preferably, the extracting step includes the step of receiving the input sentence of the first language, and reading a sentence of the second language forming a pair with a sentence of the first language having a prescribed score representing similarity to the input sentence satisfying a predetermined condition, from the bilingual corpus.
More preferably, the reading step includes the step of receiving the input sentence of the first language, and computing the score between the input sentence and each sentence of the first language contained in the bilingual corpus, identifying one or a plurality of sentences of the first language having the highest score computed in the step of computing the score, and reading, from the bilingual corpus, one or a plurality of sentences of the second language each forming a pair with each of the one or a plurality of sentences of the first language identified in the step of identifying.
In extracting the sentence of the second language, one or a plurality of sentences in the first language having the highest score representing similarity to the input sentence are specified, and sentence or sentences of the second language forming a pair or pairs therewith are read from the bilingual corpus. Using the read sentences of the second language as seeds, modification and computation of likelihood are repeated, and a sentence satisfying a prescribed condition among the resulting sentences is taken as a translation of the input sentence. It is highly possible that the obtained sentences of the second language are similar to the ideal translation of the input sentence, and therefore, it is also highly possible that the final translation is the ideal translation of the input sentence.
The step of computing the score includes the steps of computing a prescribed measure of similarity, using document frequency defined on the input sentence regarding a sentence of the first language contained in the bilingual corpus as a document, between the input sentence and each of the sentences of the first language contained in the bilingual corpus, computing edit distance between the input sentence and each of the sentences of the first language contained in the bilingual corpus, and computing the score based on the measure of similarity computed in the step of computing similarity and on the edit distance computed in the step of computing edit distance.
Preferably, the step of computing similarity includes the step of computing a tf/idf criteria Ptf/idf in accordance with the following equation, between each sentence of the first language contained in the bilingual corpus and the input sentence:
where J0 is the input sentence, J0,i is the i-th word of input sentence J0, df(J0,i) is the document frequency for the word J0,i, Jk is a k-th sentence of the first language (1≦k≦N) and N is the total number of translation pairs in the bilingual corpus.
Further, the step of computing edit distance includes the step of computing the edit distance dis(Jk, J0) by performing DP (Dynamic Programming) matching between the input sentence J0 and a sentence Jk of the first language, and the edit distance dis(Jk, J0) is determined by the following equation
dis(Jk,J0)=I(Jk,J0)+D(Jk,J0)+S(Jk,J0)
where k is an integer satisfying 1≦k≦N, and I(Jk, J0), D(Jk, J0) and S(Jk, J0) are the number of insertions, deletions and substitutions respectively, necessary for modifying the sentence J0 to sentence Jk.
The step of computing the score of a sentence Jk of the first language in accordance with the equation below, based on the tf/idf criteria Ptf/idf computed in the step of computing the similarity measure and on the edit distance computed in the step of computing edit distance
where α is a tuning parameter, and selecting, as the initial candidate, a predetermined number of translations in order from one having the highest score computed in the step of computing the score.
The method may further include the steps of: determining whether a sentence having the score of 1 exists among the sentences of the first language read in the step of reading; and in response to a determination in the step of determining that a sentence having the score of 1 exists, outputting the sentence of the first language having the score of 1 as a translation of the input sentence.
The score being 1 means that a sentence of the first language identical with the input sentence exists in the bilingual corpus. Therefore, by selecting a sentence of the second language paired with that sentence of the first language, a good translation can be obtained.
The step of repeating may include the step of repeating, on each of the sentences selected in the step of selecting, the steps of extracting, computing and selecting on each of the sentences selected in the step of selecting, until likelihood of the sentence selected in the step of selecting no longer improves.
Preferably, the step of outputting includes the step of outputting as a translation of the input sentence, a sentence having the highest likelihood among the sentences of the second language left at the end of the step of repeating.
As the sentence having the highest likelihood is output as the translation of the input sentence, the possibility of finding a translation closest to the ideal translation of the input language can be increased.
According to a second aspect, the present invention provides a recording medium recording a machine translation computer program causing, when executed by a computer, the computer to perform a method of machine translation using a bilingual corpus containing a plurality of translation pairs each consisting of a sentence of a first language and a sentence of a second language, for translating an input sentence of the first language to the second language, the method including the steps of: receiving the input sentence of the first language and extracting, from the bilingual corpus, a sentence of the second language forming a pair with a sentence of the first language satisfying a prescribed relation with the input sentence; applying an arbitrary modification among a plurality of predetermined modifications to the extracted sentence of the second language, and computing likelihood of sentences resulting from the modification; selecting sentences having the likelihood satisfying a prescribed condition from among the sentences resulting from the modification; repeating, on each of the sentences selected in the step of selecting, the steps of extracting, computing and selecting, until a predetermined termination condition is satisfied; and outputting, as a translation of the input sentence, a sentence having the likelihood satisfying a predetermined selection condition among the sentences of the second language left at the end of the step of repeating.
When the program recorded on the recording medium is executed by a computer, it is possible to cause the computer to perform the method of machine translation described above.
The foregoing and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.
An example-based translation has been known as a machine translation system different from the word-by-word translation system such as seen in beam search strategies. The example-based translation is one of the translation methods based on bilingual corpus. The bilingual corpus contains a large number of translation pairs consisting of sentences of a first language and their translations of a second language. Given an input sentence of the first language, a sentence of the first language similar to the input sentence is searched out from the bilingual corpus, and based on the translation (second language) of the thus searched out sentence of the first language, an output sentence is formed.
The machine translation system in accordance with the present embodiment provides a new framework combining the example-based translation system and the statistical machine translation system.
Configuration
Machine translation system 20 further includes a language model (P(E)) 38 of the second language and a translation model (P(J|E)) 40, and a candidate modification unit 36, for modifying, while searching, translation of the second language of each of the plurality of sentences of the first language selected by initial candidate selecting unit 32, and outputting, as an output sentence 42, a translation having highest likelihood that is computed by using language model 38 and translation model 40.
Initial candidate selecting unit 32 further includes an edit distance computing unit 52 for computing an edit distance dis(Jk, J0) by performing DP (Dynamic Programming) matching between a sentence Jk of the first language in each translation pair (Jk, Ek) contained in bilingual corpus 34 and the input sentence J0, and a score computing unit 54 for computing the score of each sentence in accordance with the equation below, based on the tf/idf criteria Ptf/df computed by tf/idf computing unit 50 and on the edit distance computed by edit distance computing unit 52.
The edit distance dis(Jk, J0) computed by edit distance computing unit 52 is represented by the following equation.
dis(Jk,J0)=I(Jk,J0)+D(Jk,J0)+S(Jk,J0)
where k is an integer satisfying 1≦k≦N, and I(Jk, J0), D(Jk, J0) and S(Jk, J0) are the number of insertions/deletions/substitutions respectively, from sentence J0 to sentence Jk.
The score computed by score computing unit 54 is represented by the following equation.
where α is a tuning parameter, and is set to α=0.2 in the present embodiment.
Referring to
Candidate modification unit 36 further includes: a match detecting unit 72 determining whether an alignment completed candidate translation pair (J0, Ak, Ek) having the score of 1 exists among the alignment completed candidate translation pairs with the alignment Ak computed by Viterbi alignment unit 70, outputting a match detecting signal 73 that assumes a first value when there is a match and a second value when not, and outputting, when there exists a candidate translation pair having the score of 1, the candidate translation pair 75 together with its alignment; and an alignment searching unit 74 performing a modification as will be described later on the alignment Ak and translation Ek of an alignment completed candidate translation pair (J0, Ak, Ek) applied from Viterbi alignment unit 70, when a match is not detected by match detecting unit 72, and finally outputting a translation pair 77 having the highest likelihood as a translation of input 30 together with its alignment. Alignment searching unit 74 uses language model 38 and translation model 40, which will be described later, in this search. When a match is detected, match detecting unit 72 stops execution of the alignment search by alignment searching unit 74.
Candidate modification unit 36 further includes a translation selecting unit 76 responsive to match detecting signal 73 output from match detecting unit 72, for selecting either the translation 75 output from match detecting unit 72 or translation 77 output from alignment searching unit 74 dependent on whether the match detecting signal is of the first value or the second value, and outputting the selected translation as an output sentence 42.
Operator application units 81A, 81B, . . . of alignment searching unit 74 also performs the operation described above on candidate translation pairs 88A, . . . , 88N included in group 86A of candidate translation pairs, to form new groups of candidate translation pairs 90A, . . . , 90N. Likelihood-based selection processing units 84A, 84B, . . . again leave candidate translation pairs 96A, . . . , 96N having higher likelihood computed by using language model 38 and translation model 40, and form new groups of candidate translation pairs 94A, . . . , 94N.
In this manner, alignment searching unit 74 apply operators successively on the alignments of translation pairs, using candidate translation pairs 80A, . . . , 80N included in the first candidate translation pair 58 as seeds, to form new candidate translation pairs. Alignment searching unit 74 stops the repetitive operation described above when it is determined that the likelihood computed for candidate translation pairs is no longer improved, when the candidate translation pairs are selected by likelihood-based selection processing units 84A, 84B, . . . (hill climbing method).
In this manner, alignment searching unit 74 searches for and modifies alignments of translation pairs, and a translation having the highest likelihood among the candidate translation pairs and alignments found through the searching process in accordance with the hill climbing method is output as an output sentence 42.
The operators used by operator application units 81A, 81B, . . . to be applied to the alignment completed candidate translation pairs (J0, Ak, Ek) are approximately the same as those described in the article of Germann et al. mentioned above, and details of the operators are as follows.
(1) Translate words
Modify the output word EAj to a word e aligned from J0,j. If e=NULL, then J0,j is aligned to NULL and Aj=0. When the fertility of EAj becomes 0, then the word EAj is removed. The word e is selected from among the candidates, computed from the inverse of the Lexicon Model.
(2) Translate and insert words
Perform the translation of a word, and insert a sequence of zero fertility words at appropriate positions. The candidate sequence of zero fertility words is selected from the Viterbi alignment of the training corpus.
(3) Translate and align words
Move the j-th word Ej of the alignment to i, and modify the i-th word Ei to word e.
(4) Move alignment
This operator does not alter the output word sequence, but modify the alignment A through moving/swapping.
(5) Swap segments
Swap non-overlapping subsets of translation E, by swapping a segment from i0 to i1 and from i2 to i3 (where i1<i2).
(6) Remove words
Remove a sequence of zero fertility words from translation E.
(7) Join words
Join the words of translations Ei and Ei′ when the fertility of both of the words is more than or equal to 1.
Among these seven operators, five operators other than (3) and (4) are approximately the same as those proposed by Germann et al. The operators (3) and (4) are newly added in the present embodiment. At the first Viterbi alignment performed by Viterbi alignment unit 70, if there exists a word in a sentence of the first language whose translation do not exist in the sentence of the second language, the word will sometimes be aligned with NULL or with an irrelevant word by raising the fertility. Here, by the translate-and-align-words operator (3), it becomes possible to find the right word-by-word translation using the Lexicon Model, with the alignment forced to move to another word. Further, by the move-alignment operator (4), similar effect can be attained by moving the existing alignments.
Operation
Machine translation system 20 operates as follows. A number of translation pairs consisting of sentences of the first language and translations of the second language are prepared in bilingual corpus 34. It is assumed that language model 38 and translation model 40 have also been prepared by some means or another.
Referring to
Score computing unit 54 computes the score described above in accordance with the following equation, using the tf/idf criteria Ptf/idf computed by tf/idf computing unit 50 and edit distance dis(Jk, J0) computed by edit distance computing unit 52.
Translation pair selecting unit 56 selects a prescribed number of translation pairs starting from the one having the highest score from among the translation pairs in bilingual corpus 34, and applies the selected pairs to Viterbi alignment unit 70 of
Referring to
Match detecting unit 72 determines whether there exists a translation pair having the score of one (score=1) among the translation pairs applied from Viterbi alignment unit 70. Specifically, match detecting unit 72 determines whether there exists a sentence of the first language that is identical with the input sentence 30, among the candidate translation pairs. When there exists such a sentence, match detecting unit 72 sets the match detecting signal 73 to a first value, and otherwise, match detecting unit 72 sets the match detecting signal 73 to a second value. Further, when there exists such a sentence, match detecting unit 72 applies the translation pair as a translation pair 75 to translation selecting unit 76.
Alignment searching unit 74 performs the searching operation as described above with reference to language model 38 and translation model 40, using the alignment completed candidate translation pair (J0, Ak, Ek) applied from Viterbi alignment unit 70 as a seed, and continues searching until highest likelihood is attained, in accordance with the hill climbing method. In the process of searching, alignment searching unit 74 generates, for every candidate translation pair, new candidate translation pairs (and alignment thereof) by applying all possible parameters. Further, alignment searching unit 74 leaves candidate translation pairs that satisfy a prescribed condition (a prescribed number of translation pairs having high scores, starting from the one having the highest score) among the candidate translations (and alignment thereof) generated in this manner, and removes others. Further, alignment searching unit 74 repeats similar processing using the rest of the candidate translation pairs as seeds. When likelihood computed for the generated candidate translations cannot be further improved, the search along that path is terminated (hill climbing method).
In this manner, a translation pair providing the highest likelihood at the end of searching along every path is given as a final output. Alignment searching unit 74 applies the translation pair 77 to translation selecting unit 76. When the match detecting signal 73 is at the first value, translation selecting unit 76 selects the translation 75, that is an output of match detecting unit 72, and when the match detecting signal 73 is at the second value, translation selecting unit 76 selects translation 77, that is the output of alignment searching unit 74, and outputs the selected translation as an output sentence 42.
Evaluation
Translation accuracy of the system in accordance with the embodiment described above was evaluated. A travel expression corpus prepared by the applicant was used as the corpus. The corpus contained translation pairs of Japanese, English, Korean and Chinese. Statistical information of the corpus is as shown in the table below.
The entire corpus was split into three parts. Specifically, 152,169 sentences were used for training of the translation model and language model, 4,849 sentences were used for testing, and the remaining 10,148 sentences were used for parameter tuning, such as the termination criteria for the training iteration and the parameter tuning for decoders.
Tri-gram language models for the four languages were trained and evaluated by the perplexity measure as shown in Table 1. For all the combinations of the four languages, 12 translation models were trained in bi-directional translation.
The table below shows translation results among the four languages attained by the system in accordance with the present embodiment. Abbreviations used in the table stand for the following.
<WER> Word-error-rate, which penalizes the edit distance (insertion/deletion/substitution) against reference translations.
<PER> Position independent WER, which penalizes only by insertion/deletion without considering positional disfluencies.
<BLEU> BLEU score, which computes the ratio of the n-gram for the translation results found in reference translations. Contrary to the above error merits WER and PER, the higher scores indicate better translations.
<SE> Subjective evaluation ranks ranging from A to D (A perfect, B fair, C acceptable and D nonsense), judged by a native speaker. The scores are evaluated by the ratio of A ranked sentences, A+B for either A or B ranks, and A+B+C for either A, B or C ranks. In the present experiment, only a language to English translation and a language to Japanese translation were evaluated among the four languages, assuming that they were translations for Japanese-to-English and English-to-Japanese, respectively. In the table, values in thin font represent results of translation by a machine translation apparatus based on beam search system, and values in bold font represent results of translation by the machine translation apparatus in accordance with the present embodiment.
As is apparent from the table, for all the language pairs and directions, better results are obtained by the machine translation apparatus in accordance with the present embodiment than the machine translation apparatus based on beam search system. The difference is substantial, and it has been clear that the machine translation apparatus in accordance with the present embodiment has far better performance than the beam-search based one. Further, the result of translation in accordance with the present invention is stable, and hardly results in local optimal solution. The reason for this may be that a sentence close to an input sentence is searched as a first solution, and using this as a starting point, searching combined with the hill climbing method is employed, so that the possibility of attaining the optimal translation in global aspect becomes higher.
As for the selection of the initial candidate by initial candidate selecting unit 32, if it is possible to find a translation pair having a sentence of the first language close to the input sentence 30 by some reference, a unit having a scheme different from that of initial candidate selecting unit 32 used in the embodiment above may be employed. There may be a case that a translation for an input sentence cannot be searched by the unit of a sentence from bilingual corpus 34. If the search on sentence unit is impossible, the input sentence may be divided into a smaller unit, such as a clause or a phrase, translation thereof may be searched out on the divided unit from bilingual corpus 34, and an initial candidate may be formed by the combination of such search results.
In place of the selection of the initial candidate by initial candidate selecting unit 32, the input sentence may be translated by using a translation machine in accordance with some other mechanism, and the resulting translation may be used as the initial candidate. By way of example, an example-based translation machine may be used as the translation machine and the result of example-based translation may be used as the initial candidate. In that case, the bilingual corpus used in the example-based translation may be bilingual corpus 34, or may be a different corpus.
Though an algorithm similar to a breadth first search was used in the hill climbing method executed by alignment searching unit 74, the present invention is not limited to such an embodiment, and theoretically, use of the depth first search algorithm is possible.
Computer Implementation
The machine translation apparatus in accordance with the present embodiment may be implemented by a computer hardware, a program executed on the computer hardware, and the bilingual corpus, translation model and language model stored in a storage of the computer. Particularly, the search by alignment searching unit 74 shown in
Such a program may be readily realized by a person skilled in the art from the description of the embodiment above.
Referring to
Referring to
Though it is not shown the drawings, computer 340 may further include a network adapter board providing a connection to a local area network (LAN).
A computer program to cause computer system 330 to operate as a machine translation apparatus is stored on a CD-ROM 362 or an FD 364 that is mounted to CD-ROM drive 350 or FD drive 352, and transferred to a hard disk 354. Alternatively, the program may be transmitted through a network, not shown, and stored in hard disk 354. The program is loaded to RAM 360 at the time of execution. The program may be directly loaded to RAM 360 from CD-ROM 362, FD 364 or through the network.
The program includes a plurality of instructions that cause computer 340 to execute operations as the machine translation apparatus in accordance with the present embodiment. Because some of the basic functions needed to perform the present method will be provided by the operating system (OS) running on computer 340 or a third party program, or modules of various tool kits installed on computer 340, the program does not necessarily contain all of the basic functions needed to the system and method of the present embodiment. The program may need to contain only those parts of instructions that will realize the machine translation apparatus by calling appropriate functions or “tools” in a controlled manner such that the desired result will be obtained. How the computer system 330 operates is well known, and therefore, it is not described here.
The embodiments as have been described here are mere examples and should not be interpreted as restrictive. The scope of the present invention is determined by each of the claims with appropriate consideration of the written description of the embodiments and embraces modifications within the meaning of, and equivalent to, the languages in the claims.
Number | Date | Country | Kind |
---|---|---|---|
2003-308409 (P) | Sep 2003 | JP | national |
2004-151965 (P) | May 2004 | JP | national |