METHODS AND APPARATUSES FOR
PROCESSING A BILINGUAL DATABASE
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. US 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 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, California. 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 US 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:
Figure 1 shows the hardware elements of a translation system embodying the invention;
Figure 2 shows the operational structure of the system of Figure 1;
Figure 3 shows a database structure including a pair of aligned corpora;
Figure 4 shows word frequency tables for the database of Figure 3; Figure 5 shows a pair frequency table for the database of Figure 3;
Figure 6 is a schematic flowchart illustrating the operation of a statistical analyser of the system;
Figure 7 is a flowchart illustrating part of the operation of an evaluation module in the system;
Figure 8 is a flowchart illustrating another part of the operation of the evaluation module;
Figure 9 is a flowchart illustrating the modification of the database using the evaluation module; Figure 10 is a flowchart illustrating translation of a text using the modified database; and
Figure 11 is a histogram of alignment scores in an example database.
An Appendix having parts A to G 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 Figure 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. Figure 2 shows the operational structure of the system of Figure 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 Figure 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 Figure 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. Figure 3 shows schematically the structure of the
bilingual database 206 insofar as it contains a pair of aligned corpora. The example of Figure 3 is small and presented schematically only, while a small but complete example will be described later, with reference to the Appendix.
In Figure 3, an English corpus CORPE comprises a plurality of portions of text, which are addressable by number and will be referred to as "chunks" CORPEfl], 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 CORPEfl] comprises a variable number of smaller elements referenced CORPE[I] [J] . These smaller elements are, in the present example, individual words of English text. Thus, for example, the chunk CORPEfl] comprises two words: CORPEfl] [1] is "Good" and CORPEfl] [2] is "day". CORPE[3]fl] is the word "No", while CORPE[6][l] is the word "Yes" . Words CORPEf5] [2] and CORPF[4] f3] are labelled in the Figure for further illustration.
On the other side of Figure 3 a second, French language corpus CORPF contains an identical number of chunks CORPFfI], each of which corresponds to the like- numbered chunk CORPEfl] of the English corpus. In particular, a relationship REL specifies that each English chunk CORPEfl] is, at least in some nominal
sense, a translation of the corresponding French chunk CORPFfI]. 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. Figures 4 and 5 illustrate the output of the statistical analyser 208, which in the present embodiment produces frequency tables as follows. Table FREQE
(Figure 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 (Figure 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, onjour} stores a number of times that those two words appear in corresponding chunks of the aligned corpora.
Shaded boxes in Figure 5 indicate entries
corresponding to the few words shown in the example corpora of Figure 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 CORPEfl] and CORPFfI]. 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 te 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_bonjour" can be treated as a single, one-dimensional item for associative addressing of the corresponding entry in the table
PAIRFREQ.
Figure 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 CORPEfl] and CORPFfI], 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 CORPEfl] [J] within the current chunk of the English corpus. Within the loop 604, a yet further loop 606 is executed once for each word CORPFfI] [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 CORPEfl] [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 CORPFfI]fK] within the French corpus. Within this loop the entry in the word frequency table FREQF is incremented to record the occurrence of the word CORPFfI] [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.
Figures 7 and 8 illustrate the operation of the
evaluation module 212 shown in Figure 1, in particular in that Figure 7 illustrates the calculation of a correlation measure or "score" for each word pair, and Figure 8 illustrates the calculation of a score for each aligned pair of chunks, using the pair scores of the word pairs contained therein.
In Figure 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 (Figure 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 Figure 8, the statistical database and the pair scoring method of Figure 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 Figure 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 CHUNKE[J] in the English language chunk of text received in step 800. The inner loop 806 is executed once for each word CHUNKF[K] 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(CHUNKE[J],CHUNKF[K] ) for each word pair considered. This pair score is calculated using the steps of Figure 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 Figures 6, 7 and 8 as the following examples will show.
Figure 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 Figure 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 CORPEfl] in the English corpus for which there is an aligned chunk CORPFfI] in the French corpus. Within the loop 902, step 904 reads the aligned chunk CORPFfI], and in step 906 the alignment score ALSCORE(CORPEfI],CORPFfI] ) is evaluated using the procedure of Figure 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 Figure 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 Figure 10.
In Figure 10 a new text ETEXT (216, Figure 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 CORPEfl] of the English aligned corpus is equal to the received chunk ECHUNK, control passes to step 1006 where the corresponding chunk CORPFfI] 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 US 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 Figure 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 Figure 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 Figure 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 CORPEfl] [J], only a limited "window" of words CORPF[I]fK] 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 Figure 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 Figure 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 the Appendix, which presents in parts A to G an actual example of two relatively small aligned corpora, and the evaluation thereof as performed by the system described above. The corpora of the Appendix 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 at A and B in the Appendix, 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 so include elsewhere correct alignments of chunks including the words "problemen" and "oplossen", namely "troubleshooting" (chunk pairs 23 and 27) .
At C in the Appendix, the word frequencies for the English corpora 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. At D in the Appendix, the word frequency table for the Dutch corpora 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-l to E-4 in the Appendix, 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 Appendix D 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 (A and B in the Appendix) 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-l to F-4 in the Appendix, 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 part D of the Appendix the pairs were arranged in pair frequency order, in part E 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 part A of the Appendix to verify the accuracy of any word-by-word translation.
In contrast, at G-l to G-2 in the Appendix 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 Figure 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. Figure 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 (logl=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 at G in the Appendix) .
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.
(THE APPENDIX FOLLOWS)
APPENDIX A THE ENGLISH CORPUS
1 Part 1 Before Starting
2 Part 2 Sending and Receiving Documents
3 Part 3 Using the Telephone and Copying Features
4 Part 4 Using the Memory and Network Features
5 Part 5 Reports and User Switches
6 Part 6 Maintenance and Troubleshooting
7 Installing Your FAX
8 A Look at the FAX-260E
9 Identifying the Documents You Send 0 Before Sending Documents 1 Sending Documents 2 Receiving Documents 3 Different Ways of Dialling 4 Using the Telephone with the FAX-260E 5 Sending at a Preset Time 6 Sending through a Relay Unit 7 Sending Confidential Documents 8 Polling (Requesting documents from other units) 9 Printing Reports and Registration Lists 0 Setting the Operating Guidelines 1 Caring for Your Fax 2 Error Messages and Codes 3 Troubleshooting 4 Specifications 5 Index 6 Error Messages and Codes 7 Troubleshooting 8 Index 9 Setting the Operating Guidelines 0 Sending Documents
APPENDIX B THE DUTCH CORPUS
1 Deel 1 Voordat u begint
2 Deel 2 Verzenden en ontvangen
3 Deel 3 De FAX-260E gebruiken als telefoonkiezer en copier
4 Deel 4 FAX-functies
5 Deel 5 Rapporten en gebruikersschakelaars
6 Deel 6 Onderhoud en problemen oplossen
7 Installatie van uw FAX-260E
8 De onderdelen van uw FAX-260E
9 Identificatie van uw verzonden documenten
10 Originelen
11 Verzenden
12 Ontvangen
13 Snel en eenvoudig kiezen
14 Gebruik van de FAX-260E als telefoonkiezer
15 Verzenden op ingesteld tijdstip
16 Verzenden via transit fax-apparaat
17 Vertrouweijk verzenden
18 Polling (op verzoek documenten van andere fax-apparaten ontvangen)
19 Afdrukken van rapporten en lijsten
20 Instellen van gebruikersschakelaars
21 Onderhoud
22 Foutmeldingen en codes
23 Problemen oplossen
24 Technische gegevens
25 Trefwoordenlijst
26 Foutmeldingen en codes
27 Problemen oplossen
28 Trefwoordenlijst
29 Vastleggen van gebruikersinstellingen 30 Problemen oplossen
(T0TAL=118)
APPENDIX E - WORD PAIR FREQUENCIES
(TOTAL=510)
1 and onderhoud
1 and ontvangen
1 and oplossen
1 and problemen
1 and telefoonkiezer
1 and van
1 and verzenden
1 at de
1 at faκ-260e
1 at ingesteld
1 at onderdelen
1 at op
1 at tijdstip
1 at uw
1 at van
1 at verzenden
1 before 1
1 before begint
1 before deel
1 before originelen
1 before u
1 before voordat
1 caring onderhoud
1 confidential vertrouweijk
1 confidential verzenden
1 copying 3
1 copying als
1 copying copier
1 copying de
1 copying deel
1 copying en
1 copying fax-260e
1 copying gebruiken
1 copying telefoonkiezer
1 dialling eenvoudig
1 dialling en
1 dialling kiezen
1 dialling snel
1 different eenvoudig
1 different en
1 different kiezen
1 different snel
1 documents 2
1 documents andere
1 documents deel
1 documents en
1 documents fax-apparaten
1 documents identificatie
1 documents op
1 documents oplossen
1 documents originelen
1 documents polling
1 documents problemen
1 documents uw
1 documents vertrouweijk
39 / 2
documents verzoek documents verzonden fax fax-260e fax installatie fax onderhoud fax uw fax van fax-260e als fax-260e gebruik fax-260e onderdelen fax-260e telefoonkiezer fax-260e uw features 3 features 4 features als features copier features de features en features fax-260e features fax-functies features gebruiken features telefoonkiezer for onderhoud from andere from documenten from fax-apparaten from ontvangen from op from polling from van from verzoek guidelines gebruikersinstellingen guidelines gebruikersschakelaars guidelines instellen guidelines vastleggen identifying documenten identifying identificatie identifying uw identifying van identifying verzonden installing fax-260e installing installatie installing uw installing van lists afdrukken lists en lists lijsten lists rapporten lists van look de look fax-260e look onderdelen look uw look van maintenance 6
40/1
polling polling polling van polling verzoek preset ingesteld preset op preset tijdstip preset verzenden printing afdrukken printing en printing lijsten printing rapporten printing van receiving 2 receiving deel receiving en receiving verzenden registration afdrukken registration en registration lijsten registration rapporten registration van relay fax-apparaat relay transit relay verzenden relay via reports 5 reports afdrukken reports deel reports gebruikersschakelaars reports lijsten reports van requesting andere requesting documenten requesting fax-apparaten requesting ontvangen requesting op requesting polling requesting van requesting verzoek send documenten send identificatie send uw send van send verzonden sending 2 sending deel sending en sending fax-apparaat sending ingesteld sending ontvangen sending op sending oplossen sending originelen sending problemen sending tijdstip
41/1
unit via units andere units documenten units fax-apparaten units ontvangen units op units polling uni s van units verzoek user 5 user deel user en user gebruikersschakelaars user rapporten using 3 using 4 using copier using en using fax-functies using gebruik using gebruiken using van ways eenvoudig ways en ways kiezen ways snel with als with de with fax-260e with gebruik with telefoonkiezer with van you documenten you identificatie you uw you van you verzonden your fax-260e your installatie your onderhoud your uw your van
42/1 APPENDIX F - WORD PAIR CORRELATION SCORES
12.262745 fax-260e gebruik
12.262745 fax-260e onderdelen
12.262745 features 3
12.262745 features 4
12.262745 features copier
12.262745 features fax-functies
12.262745 features gebruiken
12.262745 for onderhoud
12.262745 from documenten
12.262745 from op
12.262745 guidelines gebruikersinstellingen
12-262745 guidelines instellen
12-262745 guidelines vastleggen
12.262745 identifying documenten
12.262745 index trefwoordenlijst
12.262745 lists rapporten
12.262745 maintenance onderhoud
12-262745 messages codes
12.262745 messages foutmeldingen
12.262745 operating gebruikersinstellingen
12-262745 operating instellen
12-262745 operating vastleggen
12.262745 other documenten
12.262745 other op
12.262745 polling documenten
12-262745 polling op
12.262745 preset op
12.262745 printing rapporten
12.262745 receiving 2
12.262745 registration rapporten
12.262745 reports 5
12.262745 reports afdrukken
12.262745 reports lijsten
12.262745 reports rapporten
12.262745 requesting documenten
12.262745 requesting op
12-262745 send documenten
12-262745 setting gebruikersinstellingen
12.262745 setting instellen
12-262745 setting vastleggen
12.262745 switches gebruikersschakelaars
12.262745 switches rapporten
12.262745 telephone 3
12-262745 telephone als
12.262745 telephone copier
12.262745 ' telephone gebruik
12-262745 telephone gebruiken
12-262745 telephone telefoonkiezer
12.262745 time op
12.262745 units documenten
12-262745 units op
12.262745 user gebruikersschakelaars
12.262745 user rapporten
12.262745 with als
12-262745 with telefoonkiezer
43/ 2
i2.262745 you documenten
12.262745 your installatie
8-175163 2 ontvangen
S.175163 3 de
8-175163 a fax-apparaat
8.175163 a ingesteld
8.175163 a onderdelen
8-175163 a tijdstip
8.175163 a transit
8.175163 a via
8.175163 copying de
8.175163 ,fax-260e de
8.175163 from ontvangen
8.175163 identifying uw
8.175163 installing uw
8.175163 look de
8.175163 look uw
8.175163 other ontvangen
8.175163 polling ontvangen
8.175163 receiving ontvangen
8.175163 requesting ontvangen
8.175163 send uw
8.175163 telephone de
8.175163 troubleshooting 6
8.175163 units ontvangen
8.175163 using 3
8.175163 using 4
8.175163 using als
8.175163 using copier
8.175163 using fax-functies
8.175163 using gebruik
8.175163 using gebruiken
8.175163 using telefoonkiezer
8.175163 with de
8.175163 you uw
6.131373 3 fax-260e
6.131373 6 oplossen
6.131373 6 problemen
6.131373 at op
6.131373 copying fax-260e
6.131373 fax onderhoud
6.131373 fax-260e als
6.131373 fax-260e fax-260e
6.131373 fax-260e telefoonkiezer
6.131373 features als
6.131373 features telefoonkiezer
6.131373 guidelines gebruikersschakelaars
6.131373 installing fax-260e
6.131373 look fax-260e
6.131373 maintenance oplossen
6.131373 maintenance problemen
6.131373 operating gebruikersschakelaars
6.131373 reports gebruikersschakelaars
6.131373 setting gebruikersschakelaars
6.131373 telephone fax-260e
44/1
1.532843 at van
1.532843 documents op
1.532843 fax van
1.532843 features en
1.532843 receiving en
1.532843 reports van
1.532843 telephone en
1.532843 telephone van
1.532843 the documenten
1.532843 the gebruikersschakelaars
1.532843 your van
1.362527 part de
1.362527 part ontvangen
1.362527 troubleshooting deel
1.167880 sending ontvangen
1.021895 a van
1.021895 and de
1.021895 and ontvangen
1.021895 documents uw
1.021895 part fax-260e
1.021895 part oplossen
1.021895 part problemen
1.021895 the deel
1.021895 troubleshooting en
1.021895 using en
1.021895 using van
0.875910 sending oplossen
0.875910 sending problemen
0.817516 part verzenden
0.766422 and fax-260e
0.766422 and oplossen
0.766422 and problemen
0.766422 documents oplossen
0.766422 documents problemen
0.766422 documents van
0.613137 and verzenden
0.583940 sending deel
0.510948 documents deel
0.437955 sending en
0.383211 and van
0.383211 documents en
0.383211 the en
APPENDIX G-l SCORES FOR ALIGNED CHUNKS
Part 1 Before Starting Deel 1 Voordat u begint score = 10.071629
Part 2 Sending and Receiving Documents Deel 2 Verzenden en ontvangen score = 2.285732
Part 3 Using the Telephone and Copying Features
Deel 3 De FAX-260E gebruiken als telefoonkiezer en copier score = 4.727727
Part 4 Using the Memory and Network Features Deel 4 FAX-functies score = 6.443163
Part 5 Reports and User Switches
Deel 5 Rapporten en gebruikersschakelaars score = 5.372271
Part 6 Maintenance and Troubleshooting Deel 6 Onderhoud en problemen oplossen score = 3.598853
Installing Your FAX Installatie van uw FAX-260E score = 4.935864
A Look at the FAX-260E
De onderdelen van uw FAX-260E score = 4.253443
Identifying the Documents You Send Identificatie van uw verzonden documenten score = 5.746231
Before Sending Documents
Originelen score = 5.087975
Sending Documents
Verzenden score = 2.538629
Receiving Documents
Ontvangen score = 5.006244
Different Ways of Dialling Snel en eenvoudig kiezen score = 14.582943
Using the Telephone with the FAX-260E Gebruik van de FAX-260E als telefoonkiezer score = 5.621435
Sending at a Preset Time Verzenden op ingesteld tijdstip score = 7.327703
Sending through a Relay Unit Verzenden via transit fax-apparaat score = 10.009936
APPENDIX G-2
Sending Confidential Documents Vertrouweijk verzenden score = 4.502135
Polling (Requesting documents from other units)
Polling (op verzoek documenten van andere fax-apparaten ontvangen) score = 10.322900
Printing Reports and Registration Lists Afdrukken van rapporten en lijsten score = 6.270169
Setting the Operating Guidelines Instellen van gebruikersschakelaars score = 4.751194
Caring for Your Fax
Onderhoud score = 8.671070
Error Messages and Codes Foutmeldingen en codes score = 6.063523
Troubleshooting Problemen oplossen score = 6.131373
Specifications Technische gegevens score = 24.525490
Index
Trefwoordenlijst score = 12.262745
Error Messages and Codes Foutmeldingen en codes score = 6.063523
Troubleshooting Problemen oplossen score = 6.131373
Index
Trefwoordenlijst score = 12.262745
Setting the Operating Guidelines Vastleggen van gebruikersinstellingen score = 5.986130
Sending Documents Problemen oplossen score = 0.819339