The invention relates to methods and apparatuses for processing a bilingual or multi-lingual database comprising aligned corpora, methods and apparatuses for automatic translation using such databases.
Aligned corpora are two (or more) bodies of text divided into aligned portions, such that each portion in a first language corpus is mapped onto a corresponding portion in a second language corpus. Each portion may typically comprise a single sentence or phrase, but can also comprise one word or perhaps a whole paragraph. The aligned corpora can be used as a database in automated translation systems in which, given a word, phrase or sentence in a first language, a corresponding translation in a second language may be obtained automatically, provided it matches or in some way resembles a portion already present in the database. This principle may be extended, such that more than two corpora are aligned to allow translation into several languages.
In the 1950s and 60s it was a common belief that the development of an all-purpose translating system would be possible in the near future. It was later realised, however, that such a system was much further in the future and possibly it would never be implemented, due to the vast quantity of background information and "intelligence" required. But it was also appreciated that aligned corpora could be used to automate translation within small, specialised fields. This follows, for example, because "problem words" which have many different meanings, would tend to have a much limited range of meanings within the confines of a specialist field of activity.
In creating such specialised translation systems, however, the problem remains of generating high quality aligned corpora in the first place, given in particular that the database generated for one field of activity should ideally be based upon a large volume of previously translated documents, and would probably not be suitable for application in another field. First, it would be necessary for users working in each field to generate their own databases and this has tended to negate the use of such automated systems, so that reliance continues to be made upon human translators. U.S. Pat. No. 5,140,522 for example, describes a machine translation system in which a database of previously translated sentences is built-up during use, but does not disclose any method of obtaining such a database without the initial effort of a human translator.
To address the above problem, a copending United Kingdom patent application now published as GB-A-2272091 describes an automated system for generating aligned corpora. The contents of GB-A-2272091 are incorporated herein by reference. The automated system responds to the formatting codes that are inserted by word processing apparatus in most documents, for example to indicate a new chapter heading or new entries in a table. For many types of text, including for example instruction manuals for electronic apparatus, the portions of text between such formatting codes are small enough to be used as the aligned portions in aligned corpora. Thus, the system described in the prior application is relatively simple, in that it is not required to judge the meanings of the words, nor parse the text into sentences or smaller units. On the other hand, for a variety of reasons, the resulting alignment will not be perfect, such that the database includes "noise" in the form of incorrect alignments.
Alternative methods of automating the generation of aligned corpora have been described for example by W A Gale and K W Church in "A Program for Aligning Sentences in Bilingual Corpora", and by P F Brown et al in "Aligning Sentences in Parallel Corpora", both in the Proceedings of the 29th Annual Meeting of the Association for Computational Linguistics, Berkeley, Calif. The system proposed by Brown et al is described more fully in European patent application EP A-0525470. In these systems, the portions used correspond to sentences, and alignment is performed by comparing the lengths of sentences, either in the number of words (Brown et al) or the number of characters (Gale and Church). Of course, the aligned corpora resulting from these methods will also include erroneous alignments, to a level of at least a few percent, according to the references.
The reference by Brown et al describes a random check performed by manual effort on a small sample of automatically generated aligned corpora (1000 out of 1000000 pairs of sentences). This effort revealed that there are errors with a certain observed probability, but, given that it would be impractical to check the entire database by human effort, it does not suggest any practical method of detecting and correcting any significant proportion of the errors. Moreover, large sections (about 10 percent of the corpora) had already been discarded, because a comparison of "anchor points" revelaed mismatch between sections. Since the method of automatic alignments proposed by Gale and Church is based on probable correlations of sentence lengths, those authors suggest that many erroneous alignments can be eliminated by simply ignoring the least probable alignments. This option may be valuable, but the quality of the database remains limited by the assumption that correlation of sentence lengths is the only key to alignment.
The translation system of Brown et al (EP-A-0525470) employs relatively complex statistical models of the source and target languages and of translations between them, such that a low level of "noise" in the database can be tolerated. For simpler, memory-based systems of the type described in U.S. Pat. No. 5,140,522 and GB-A-2272091, however, each incorrect alignment can result in a wholly incorrect translation being output for a given sentence.
The invention employs statistical techniques to detect probable errors in aligned text portions. It may be used for removing erroneous alignments from the database before use, and/or for rejecting erroneous translations which have been obtained using a "noisy" database or in some other way. In particular embodiments the invention allows a score to be derived to measure the correlation of bilingual word pairs. Word pair scores can then be combined to derive a score for any proposed pair of aligned portions. The portions may be received externally, or may be aligned portions from the database itself. Alignments which appear to be erroneous, in comparison with the statistics of the database as a whole, can be removed from the database.
The invention therefore allows improvement of databases comprising aligned corpora, with minimal human intervention and processing requirement. In particular, even when the processes implemented remain statistically based and the processor remains oblivious to the semantics and syntax of the corpora, it has been found in practice that the generation of high quality aligned corpora can be performed quickly by relatively inexpensive processing equipment.
Because the technique can be implemented independently of whatever technique was used to generate the aligned corpora from previously translated documents, it can be used to improve existing databases, and will detect errors not suggested by the apparatus which performed the original alignment.
It is noted that EP-A-0499366 (The British and Foreign Bible Society) describes a process for checking a bilingual corpus that has been produced by translation. This process calculates scores for pairs of words and, by an iterative process, builds up a "dictionary" of translations. This is then used to highlight possible inconsistencies in the translation of certain words.
The invention further provides translation methods and apparatuses, processed databases and the like, as set forth in the dependent claims.
Embodiments of the invention will now be described, by way of example, with reference to the accompanying drawings in which:
FIG. 1 shows the hardware elements of a translation system embodying the invention;
FIG. 2 shows the operational structure of the system of FIG. 1;
FIG. 3 shows a database structure including a pair of aligned corpora;
FIG. 4 shows word frequency tables for the database of FIG. 3;
FIG. 5 shows a pair frequency table for the database of FIG. 3;
FIG. 6 is a schematic flowchart illustrating the operation of a statistical analyser of the system;
FIG. 7 is a flowchart illustrating part of the operation of an evaluation module in the system;
FIG. 8 is a flowchart illustrating another part of the operation of the evaluation module;
FIG. 9 is a flowchart illustrating the modification of the database using the evaluation module;
FIG. 10 is a flowchart illustrating translation of a text using the modified database; and
FIG. 11 is a histogram of alignment scores in an example database.
Tables 1-8 presents an example of aligned corpora in English and Dutch, and the results of operation of the analyser and evaluation module for that example.
In the system of FIG. 1, user interaction is by means of a keyboard 10 and display screen 12. A processor unit 14 comprises a central processor (CPU), semiconductor memory (RAM and ROM) and interface circuitry, all of conventional construction. A magnetic and/or optical disc memory 16 provides mass storage for storing multi-lingual databases, texts to be translated, and programs for controlling the operation of the system as a whole. A removable disc memory 18 is provided for the communication of new data and programs to and from the system.
It is an advantage of the present embodiment that the above mentioned hardware elements of the system may be commercially available already, in the form of a personal computer or workstation-type computer. FIG. 2 shows the operational structure of the system of FIG. 1. The system stores source data including one or more reference texts which already exist in two or more languages. For example a text REFTEXT1E shown at 200 in FIG. 2 is an English translation of a French document REFTEXT1F stored at 202. An alignment module 204 is provided which can read such pairs of texts and generate corresponding aligned pair of corpora, shown at 206 in FIG. 2. The aligned corpora 206 form the major part of a bilingual database to be used for a translation of a new document.
An analyser module 208 is provided which generates for the aligned corpora 206 a statistical database 210. An evaluation module 212 is provided which uses the information in the statistical database 210 to measure a quality of alignment in the aligned corpora, or in other texts. A translation module 214 is provided which reads an input text (for example via the magnetic disc drive 18), to generate an output text file 218. Interaction with a human operator is possible for any of the modules, for example so that the translation module 214 can consult with a skilled human translator.
It will be appreciated that a variety of structures are possible in practice, for example, the translation module and the analysis and evaluation modules 204, 208 and 212 may be provided in separate apparatuses, with the database information 206 and/or 210 being generated in one apparatus and communicated to a second apparatus for use in translation. This is useful in practice, in that the aligned corpora can be generated and evaluated and maintained centrally and then distributed with documents for translation to skilled translators and editors, who tend to work remotely, for example, with the translation module 214, at their homes or small offices, with personal computers and the like.
As mentioned above, the aligned corpora generator 204 may be of known design, for example as described in prior application GB-A-2272091 or as described in the papers by Gale and Church or Brown et al. Moreover, the method by which the original aligned corpora are generated is not relevant for an understanding of the present invention and will not be described in detail. FIG. 3 shows schematically the structure of the bilingual database 206 insofar as it contains a pair of aligned corpora. The example of FIG. 3 is small and presented schematically only, while a small but complete example will be described later, with reference to the Tables.
In FIG. 3, an English corpus CORPE comprises a plurality of portions of text, which are addressable by number and will be referred to as "chunks" CORPEI!, where I equals 1, 2, 3 etc. Depending on the method by which the aligned corpora were generated, each chunk may correspond approximately to a sentence of an original source document, or to a longer or shorter portion of text. Either way, each chunk CORPEI! comprises a variable number of smaller elements referenced CORPEI!J!. These smaller elements are, in the present example, individual words of English text. Thus, for example, the chunk CORPE1! comprises two words: CORPE1!1! is "Good" and CORPE1!2! is "day". CORPE3!1! is the word "No", while CORPE6!1! is the word "Yes". Words CORPE5!2! and CORPF4!3! are labelled in the Figure for further illustration.
On the other side of FIG. 3 a second, French language corpus CORPF contains an identical number of chunks CORPFI!, each of which corresponds to the like-numbered chunk CORPEI! of the English corpus. In particular, a relationship REL specifies that each English chunk CORPEI! is, at least in some nominal sense, a translation of the corresponding French chunk CORPFI!. While each chunk is aligned with exactly one chunk in the opposite corpus, the number of words within aligned chunks need not be the same. For example, the first chunk in the French corpus comprises the single word "Bonjour", while the first chunk in the English corpus comprises the two words "Good" and "Day", as shown. The references also describe examples where a portion comprising one sentence is aligned with a portion containing two sentences.
It should be appreciated that the alignment of chunks in the aligned corpora CORPE and CORPF is nothing more than that. The alignments have not been verified individually by a skilled human translator, and are only the "guesswork" of an automated comparison of the type described in the references. Clearly, the alignment does not prove that the two chunks are translations of one another, and does not even begin to represent any particular relationship between individual words of the aligned chunks. Thus, for example there is no suggestion in the database that the words "Yes" and "Oui" are translations of one another, merely that they both happen to appear as the first words in corresponding chunks of the aligned corpora.
FIGS. 4 and 5 illustrate the output of the statistical analyser 208, which in the present embodiment produces frequency tables as follows. Table FREQE (FIG. 4) is a table of word frequencies for the English corpus CORPE. The index to an entry in table FREQE is a single word from the English corpus, and the entry stored under that word is the number of occurrences of that word in the corpus. Several conventional programming languages are known which provide for such so-called "associative addressing". These languages include Lisp, POP-11, PERL, AWK. Of course, in environments where associative addressing is not provided, it can be implemented explicitly by the system designer.
A second word frequency table FREQF contains the word frequencies for the French corpus CORPF. The tables are not case-sensitive in the present embodiment so that "Yes" and "yes" are treated as the same word. The associative addressing is indicated herein by use of "braces" or curly brackets { }.
A third table PAIRFREQ (FIG. 5) stores the word pair frequencies for the aligned corpora. This is a conceptually two-dimensional table, of which each entry is associatively addressable by a word pair; one word from the English corpus CORPE and another word from the French corpus CORPF. For a given word pair, for example "good" and "bonjour", the table entry PAIRFREQ{good,bonjour} stores a number of times that those two words appear in corresponding chunks of the aligned corpora.
Shaded boxes in FIG. 5 indicate entries corresponding to the few words shown in the example corpora of FIG. 3. Thus the entry PAIRFREQ{good,bonjour} includes a value of at least 1, since these two words occur in the first pair of aligned chunks CORPE1! and CORPF1!. Similarly, PAIRFREQ{day,bonjour} contains a value of at least 1, since this word pair also occurs in the first pair of aligned chunks.
For each corpus, the total number of words is stored, which will equal the sum of all entries in table FREQE or FREQF as the case may be. Similarly a total of all word pairs is recorded, which is naturally the sum of all entries in the two dimensional pair frequency table PAIRFREQ.
The person skilled in the art will appreciate that, to implement the table PAIRFREQ actually as a two-dimensional table would result in a very sparse array. A more efficient implementation may be adopted in which the table PAIRFREQ is a one-dimensional associative array, similar to the arrays FREQE and FREQF. This can be achieved very simply by concatenating the words of a pair into a single string to index the table. Thus, for example, instead of "good" and "bonjour" being independent components of a two-dimensional address {good, bonjour}, the entire string "good.sub.-- bonjour" can be treated as a single, one-dimensional item for associative addressing of the corresponding entry in the table PAIRFREQ.
FIG. 6 illustrates in schematic flowchart form the operations of the statistical analyser 208, as it generates the statistical database 210 from the aligned corpora CORPE and CORPF. In an initialisation step 600 space is reserved for the pair frequency table PAIRFREQ, and all entries thereof are zeroed. Similarly space is reserved for the word frequency tables FREQE and FREQF, and the entries of these are zeroed also. A pair counting variable PAIRTOTAL is established and set to 0, as are word counting variables ETOTAL and FTOTAL.
The remainder of the process comprises a series of nested loops. A main loop 602 is executed once for each aligned pair of chunks CORPEI! and CORPFI!, where I is incremented each time through the loop from one upwards, until every aligned pair of chunks has been considered. Within the main loop 602 a further loop 604 is executed once for each word CORPEI!J! within the current chunk of the English corpus. Within the loop 604, a yet further loop 606 is executed once for each word CORPFI!K! of the corresponding chunk in the French corpus CORPF. Within this inner loop 606, an entry corresponding to the current word pair in the pair frequency table PAIRFREQ is incremented by 1. As noted above, the array PAIRFREQ is addressable associatively by reference to an English-French word pair. Also within the loop 606, the counter variable PAIRTOTAL is incremented.
Outside the loops 604 and 606, but still within the main loop 602, a further loop 608 is executed once for each word CORPEI!J! in the current chunk of the English corpus. An entry in the word frequency table FREQE is incremented by 1, and the total word count ETOTAL for the English corpus is incremented also. After completion of the loop 608, a further loop 610 within the main loop 602 is executed once for each word CORPFI!K! within the French corpus. Within this loop the entry in the word frequency table FREQF is incremented to record the occurrence of the word CORPFI!K!, and the total word count FTOTAL for the French corpus is also incremented.
Therefore, once the main loop 602 has been executed for every aligned pair of chunks in the aligned corpora CORPE and CORPF, the table PAIRFREQ contains a record of the number of occurrences of every unique word pair in aligned chunks, table FREQE records the number of occurrences of each unique word in the English corpus, and table FREQF records the number of occurrences for each unique word in the French corpus. At the same time the total number of word pairs is recorded in variable PAIRTOTAL, the total number of words in the English corpus is recorded in variable ETOTAL and the total number of words in the French corpus CORPF is recorded in the variable FTOTAL.
FIGS. 7 and 8 illustrate the operation of the evaluation module 212 shown in FIG. 1, in particular in that FIG. 7 illustrates the calculation of a correlation measure or "score" for each word pair, and FIG. 8 illustrates the calculation of a score for each aligned pair of chunks, using the pair scores of the word pairs contained therein.
In FIG. 7, the operations begin with the step 700, in which a pair of words WORDE and WORDF are received. In step 702, three probability values are calculated, using the tables of the statistical database 210. A pair probability value PAIRPROB is calculated for the word pair by dividing a word pair frequency PAIRFREQ{WORDE,WORDF} recorded in the pair frequency table (FIG. 5) by the total number PAIRTOTAL of word pairs recorded in that table. PAIRPROB thus measures the observed probability of the received word pair occurring in any two aligned chunks in the aligned corpora of the database.
A value EPROB is calculated by dividing the frequency of occurrence of the English word WORDE alone in the English corpus by the total number of words in the English corpus. That is to say, the table entry FREQE{WORDE} is divided by the value ETOTAL. The value EPROB thus measures the probability of the English word of the received pair occurring on its own in the English corpus. Similarly for the French word WORDF of the received word pair, probability value FPROB is calculated by dividing a table entry FREQF{WORDF} by the total number FTOTAL of words in the French corpus. Value FPROB measures the probability of the word WORDF occurring, based on the contents of the French corpus CORPF.
Finally, in step 704, a scoring value PAIRSCORE for the received word pair WORDE, WORDF is calculated by dividing the pair probability value PAIRPROB by the individual word probability values EPROB and FPROB. A value PAIRSCORE equal to unity would indicate that a frequency of occurrence of this word pair in aligned chunks is no more than would be expected by random chance based on the observed probabilities of the individual words occurring in their respective corpora. On the other hand, a value PAIRSCORE greater than unity will indicate that the frequency of occurrence of this pair of words is greater than would be expected from the individual word frequencies. Thus the pair score is a measure of correlation between the two words of the pair.
Turning to FIG. 8, the statistical database and the pair scoring method of FIG. 7 can be used to measure the quality of alignment of two chunks of text each comprising one or more words in a respective language for example, English and French. The operations of FIG. 8 begin in step 800 where two chunks of text CHUNKE and CHUNKF are received for the module 212 to evaluate their alignment score. In an initialisation step 802 a score variable S is set to 1, and a counting variable N is set to 0.
Once the initial values are established for S and N, these variables are modified by a nested pair of loops 804 and 806. The outer loop 804 is executed once for each word CHUNKEJ! in the English language chunk of text received in step 800. The inner loop 806 is executed once for each word CHUNKFK! in the French language chunk received in step 800. Within the nested loops 806 and 804, therefore, every word of the English chunk is considered together with every word of the French chunk. The value of S is multiplied by the pair score PAIRSCORE(CHUNKEJ!,CHUNKFK!) for each word pair considered. This pair score is calculated using the steps of FIG. 7. At the same time, the counting variable N is incremented by 1 to maintain a count of the number of scores which are combined in the variable S.
After each word pair in the two received chunks has been considered and its pair score combined into the product S, an alignment score ALSCORE is calculated in step 808 by taking the Nth root of the product S. In mathematical language, the alignment score ALSCORE is the "geometric mean" of the pair scores PAIRSCORE of all word pairs in the received chunks. Thus, the alignment score ALSCORE for a pair of chunks of text is a "likelihood" measure combining the pair scores of all the possible word pairs between the two chunks. Since the geometric mean is taken in step 808, the values ALSCORE are normalised in a manner similar to the pair scores, such that a value ALSCORE of unity indicates that, based on the word frequencies and word pair frequencies recorded in the statistical database 210, that the two chunks received in 800 are only as likely as to correspond would be expected from the individual word probabilities. On the other hand, an alignment score greater than unity suggests that there is on average a degree of correlation between the words of the two chunks, more than would be suggested by random chance and the observed word frequencies alone.
The product S may attain large values, and the calculation of many multiplications and divisions is generally cumbersome in an automatic processing apparatus. It may be advantageous in practice for the geometric mean calculation in step 808 to be performed by calculating the arithmetic mean of the logarithms of the pair scores. Logarithms can be added and subtracted to effect multiplication and division. The logarithm of S can be divided by N to obtain the logarithm of the Nth root of S.
It should be noted that, while the frequency tables and count values of the statistical database 210 are derived from the source corpora 200 and 202 and the alignments indicated between them, the word pairs received in step 700, and the chunk pairs received in step 800 can be derived from the aligned corpora themselves, or alternatively from any pair of texts whose alignments are being evaluated. Thus, for example, the received chunk CHUNKE might be the result of a human translator translating the received CHUNKF, and this compared with the statistical database of the existing aligned corpora CORPE and CORPF by means of the alignment score ALSCORE. A value greater than 1 indicates that the human translator is broadly in agreement with the existing aligned corpora, while a score much less than unity would indicate disagreement, for example because of errors in the alignment of the corpora, errors in the human translation, or simply a difference in the two fields of subject matter being considered in the existing database and in the mind of the translator. There are many applications for the evaluation module 212 and the techniques of FIGS. 6, 7 and 8 as the following examples will show.
FIG. 9 shows a method of using the evaluation module 212 to improve or "filter" the existing database, that is the aligned corpora 206 and the statistical database 210. Such a process represents a form of feedback, and is indicated by the broken arrows 230 and 232 in FIG. 2. In step 900, a threshold is set for comparison with alignment score values. Many possible ways of choosing the threshold are possible, as will be described below. For the present description, simply setting the threshold to unity will be sufficient, but in general, the best threshold will be dependent on the actual data. The process next executes a loop 902, once for each chunk CORPEI! in the English corpus for which there is an aligned chunk CORPFI! in the French corpus. Within the loop 902, step 904 reads the aligned chunk CORPFI!, and in step 906 the alignment score ALSCORE(CORPEI!,CORPFI!) is evaluated using the procedure of FIG. 8 for the present pair of chunks.
In step 908 this alignment score is compared with the threshold set in step 900. If the alignment score exceeds the threshold, control continues to 912 whereupon the loop 902 is executed for the next value of I, that is to say for the next pair of aligned chunks in the aligned corpora 206. If the alignment score is below the threshold in step 908, control passes to step 910, and the current pair of aligned chunks is deleted from the aligned corpora, or at least marked as being suspect for deletion later. This latter option may be convenient in a given implementation, and would also allow dialogue with a human translator, before a decision is finally taken.
After step 910 is completed, control again passes to point 912, where I is incremented and the loop 902 is executed for the next pair of aligned chunks. When all aligned chunks in the aligned corpora 206 have been considered in the loop 902, control passes to step 914, where the statistical database 210 is updated to take account of the deletions (if any) performed in step 910.
Note that the method of FIG. 9 can be repeated on the database any number of times, gradually to filter out the "noise" which exists in the inaccurate alignment of certain chunks. The sources of noise are many, but are generally the result of the fact that the automated process implemented in module 204 to generate the aligned corpora 206 has no knowledge of the languages which it is processing, and pays no regard to syntax and semantics when choosing which chunks of text to align. Also, even for properly aligned chunks, the original translations will not always be literal translations, and certainly there may be several ways of translating even a short sentence into a given language.
In the case of corpora derived from operating manuals for electronic equipment such as photocopiers and facsimile machines, for example, there are often parts of text which do not correspond at all, for example, because the legal requirements in different countries require different safety messages to be presented. Another common source of noise is where part of each corpus is a list of items arranged in alphabetical order. The order of these items will not be the same in two different languages, even though the number of items and their general appearance may be indistinguishable to the alignment module 204.
Provided these problems are confined to relatively small parts of the source documents, however, it has been found that the statistical database remains useful, and that the alignment scores generated by the evaluation module 212 will successfully identify the problem areas.
In addition to filtering the aligned corpora, the alignment scores for a pair of chunks can be used during the translation of a new text using the aligned corpora, as shown in FIG. 10.
In FIG. 10 a new text ETEXT (216, FIG. 2) to be translated by translation module 214 from English to French is received at step 1000. A first chunk ECHUNK of the English text is identified at step 1002 and at step 1004 the existing aligned English corpus CORPE is searched for any occurrence of this chunk. If it is found that for some value I the chunk CORPEI! of the English aligned corpus is equal to the received chunk ECHUNK, control passes to step 1006 where the corresponding chunk CORPFI! of the French corpus is read. In step 1010 this chunk is saved as a corresponding chunk FCHUNK of the desired French translation (output text 218).
If the search in step 1004 does not find an equivalent of the current chunk ECHUNK, control passes to a user dialogue step 1008. Here a human translator is asked to supply a translation for the English chunk ECHUNK, which translation is then saved in step 1010 as a translation FCHUNK. At step 1012 a next English language chunk is identified in the received text ETEXT, and control returns to the search step 1004. When the entire input text ETEXT has been translated, the concatenation of all the chunks FCHUNK saved in step 1010 is output as a translated, French language text FTEXT in step 1014.
Note that the translations supplied by the user in step 1008 may also be used to augment the existing database, by adding the unfamiliar English language chunk CHUNKE and the user-supplied French translation to the aligned corpora 206. Such behaviour is described in U.S. Pat. No. 5,140,522, for example. The statistical database 210 can also be updated at this stage. Note also that, as an alternative to performing user dialogue "live" during execution of the method of FIG. 10, the output file FTEXT may simply contain questions for a human translator to consider at a later date. Further, the step 1010 of saving the translated chunk FCHUNK may for example include a step of evaluating an alignment score for the chunks ECHUNK and FCHUNK, to verify that this is indeed a likely translation. In the event that the alignment score falls below a predetermined threshold, user dialogue may be entered into, either "live" or by entering suitable questions in the output file FTEXT. This may serve to correct erroneous alignments not removed by the filtering process of FIG. 9.
The skilled reader will be able to identify many variations on the above embodiments, and many other applications of the analysis and evaluation apparatus suggested in the present disclosure.
One such variation, appropriate in the case of large databases (particularly where the chunks contain a relatively large number of words) limits processing effort by considering less than all of the possible word pairs. This can be done in a number of ways, but a simple step is to limit the range of K in the innermost loop 606 in the flowchart of FIG. 6, for example such that K varies from J-d to J+d, for some integer d.
Then, instead of counting every word of the French chunk as a pair with the current English word CORPEI!J!, only a limited "window" of words CORPFI!K! will be considered and counted. As the current English word index J advances with each iteration of the outer loop 604, so the "window" of French words advances with it. Of course, this implementation will be most suitable for pairs of languages where the word order in typical sentences follows similar rules. For languages where the number of words in aligned portions is significantly different, the window (range of K values) can be arranged to advance at an appropriate rate, so that its position relative to the maximum value of K matches roughly the value of J, relative to the maximum value of J.
A further technique to reduce the number of pairs considered is to ignore very common words such as "the", "and" and so on. The less frequent words are assumed to carry a greater burden of information. As an example, the English sentence: "The man killed a big dog" can be reduced to "man killed big dog" with little loss of meaning.
To implement this variation in the flowchart of FIG. 6, it may be convenient to generate the word frequency tables (FREQE,FREQF) for the two corpora (steps 602, 608, 610) before the word pair frequency table (PAIRFREQ, steps 602, 604, 606). These tables can then be used to identify the most common words to be ignored in the generation of the pair frequency table. Alternatively, pre-existing word frequency tables may be available, either for the same corpora or for the relevant language in general.
Both of these (and other) variations can be combined if desired. Corresponding techniques can be implemented in the inner loop 806 of FIG. 8, to reduce the effort of combining word pair scores to obtain an alignment score for a pair of text chunks.
This description will now conclude with a consideration of Tables 1-8 an actual example of two relatively small aligned corpora, and the evaluation thereof as performed by the system described above. The corpora of Tables 1-8 comprise the contents listing of an operating manual for a facsimile apparatus, the first in the English language and the second in the Dutch language. These corpora are presented in Tables 1 and 2 respectively, with line numbers 1 to 30 indicating the aligned pairs of chunks 1 to 30 in the two corpora. An incorrect alignment is present in line 30, in that "sending documents" is not an English translation of the Dutch phrase "problemen oplossen". As will generally be the case, the aligned corpora do include elsewhere correct alignments of chunks including the words "problemen" and "oplossen", namely "troubleshooting" (chunk pairs 23 and 27).
In Table 3, the word frequencies for the English corpus are presented. It will be seen for example that there are seven occurrences of the word "sending" and only one occurrence of the word "confidential". The total number of words in the English corpus is 118. Thus, for example, the probability of occurrence of the word "sending" in the English corpus is 7 divided by 118, or 0.059322.
In Table 4, the word frequency table for the Dutch corpus is presented. In the Dutch corpus there is a total of 106 words. Thus, for example, the word "problemen", with a frequency of 4 out of 106 words, has an observed probability of 0.037736. Note also that in the example system the statistical database is not case-sensitive. That is, there is no distinction between "Problemen" in chunk 23 of the corpus and "problemen" in chunk 6.
At E-1 to E-4 in the Tables, there is presented the table of word pair frequencies for the aligned corpora, in which there are a total of 427 unique word pairs. The total of all word pair frequencies is 510. Note that in cases where the corpora employ a larger vocabulary, as will normally be the case, the number of word pairs present will escalate dramatically.
The word pair frequency table of Tables 4 shows for example that there are four pairs of chunks in which the English chunk contains the word "part" while the corresponding Dutch chunk contains the word "en". A quick inspection of the two corpora (Tables 1 and 2) shows that this pair of words occurs in the aligned chunks 2, 3, 5 and 6. Note, however, that the database makes no representation that the words "part" and "en" are translations of one another. It happens that both words are common in their respective corpora, so that there is a reasonable probability of both words occurring purely at random in any pair of chunks.
At F-1 to F-4 in the Tables, the word pair scores, measuring correlation between two words, are calculated and shown for the 427 different word pairs in the example corpora. Whereas in Table 4 the pairs were arranged in pair frequency order, in Table 5 they are arranged in descending order of pair score. Compared with the frequency table, it may be noted that there is a much greater tendency for words which are actually translations of one another to attain a high score. The scores range from 24.525490 down to 0.383211. There is, however, no possibility of using individual word pair scores from Table 1 to verify the accuracy of any word-by-word translation.
In contrast, in Tables 7 and 8 the aligned chunks are presented separately, together with an alignment score for each chunk. These chunk alignment scores have been obtained in the manner of FIG. 8, by accumulating the pair scores for all the word pairs in each pair of chunks. Chunk 1, has a score of 10.071629 which indicates that, compared with the statistics of the database a whole, it seems likely that the two aligned chunks are indeed useful as translations of one another. It will be noted that all of the aligned chunk pairs except the last one have scores well in excess of 1. On the other hand, the chunk pair number 30 which is known to the reader as an error, has a score of only 0.819339. Thus, even from this very small database, which contains at least one incorrectly aligned pair of chunks, the evaluation techniques and apparatuses proposed herein have provided a clear highlighting of the incorrect translation.
FIG. 11 is a histogram showing graphically the distribution of alignment scores for the 30 chunks of the example corpora. The vertical axis plots frequency, while the horizontal axis for convenience plots the logarithm (base 2) of the alignment score. For example a range 3 to 4 in the logarithm of the alignment score (horizontal axis) corresponds to the range 8 to 16 in the alignment score itself. A vertical dashed line 1100 indicates a threshold value of 0 in the logarithm of the alignment score, which corresponds to a unity value threshold of the alignment score itself mentioned above (log1=0). To the right of the threshold line 1100, a main body of the frequency distribution is clearly separated from a smaller peak 1102 to the left of the threshold, which marks the low alignment score of the chunk pair number 30.
Those skilled in the art will appreciate that alternative thresholds may be desirable or necessary, depending on the contents of the statistical database. In many cases, it should be possible to distinguish, as in the present example, between a main body of the distribution of alignment scores in the aligned corpora, and a secondary distribution which is due to erroneous alignments. In the event that these two populations are clearly separated, as in the present example, it is a simple matter to set the threshold between the two.
In other cases, a more subtle approach to setting the threshold may be necessary. One such approach would be to set a percentile threshold, for example, by choosing that the most improbable five percent of alignments should be rejected. The alignment score threshold can then be set accordingly, or may simply be implicit in the action of deleting the worst five percent of alignments.
It may even be desirable in some cases not to set a rigid threshold at all, but to employ dialogue with a human translator to decide which alignments are correct. The system then might operate by presenting pairs of aligned chunks to the human translator starting with the chunks having the lowest alignment score. Typically, the first pair presented will be readily rejected as erroneous. Then, as the alignment score for the presented chunk reaches higher values, the human translator will begin to be presented with pairs which, are correct, but happen to have a relatively low alignment score (for example pair number 2 in the example in Tables 7 and 8).
Further on in the process, the majority of pairs being presented to the user will be correct, and it is a matter of choice for the system designer and/or operator, at what point a cut-off is made and the remaining alignments are deemed to be correct. In any event, the proportion of the database that actually has to be verified by a human translator has, by use of the invention, been reduced to a small, manageable fraction whereas to verify the whole database would be impracticably expensive or time-consuming.
For those errors that remain, another iteration using the modified corpora and an updated statistical database may be a more efficient way to eliminate these than would forcing the operator to verify many more pairs in the search for a few more errors. Also, after a few errors are removed, and the statistical database has been updated, the alignment scores for pairs which are correct but scored lowly at first may improve at subsequent iterations, because the statistical database itself is now the product of a less noisy database. Thus, on a second iteration, the human translator is less likely to be presented with pairs which are in fact correctly aligned.
Again, many variations on the above implementations are with the capabilities and imagination of the person skilled in the art. For example, as an alternative to the method embodied in FIGS. 6 and 7 for obtaining word pair scores, a method such as that used in EP-A-0499366 might be used to similar effect. Depending on the exact method used to obtain the word pair scores, the method of combining word pair scores to obtain scores for aligned sentences may also need to be adapted, for example as mentioned above in relation to logarithms. Similarly, pre-processing techniques to identify words having a common "stem", on the basis of statistics or morphological knowledge, could also be employed, as described in the vairous references. The above examples are presented by way of illustration only.