Translation result evaluation method, device, equipment and storage medium
By integrating semantic similarity and language quality characteristics in the evaluation of translation results and using deep neural network models for evaluation, the problem of inaccurate evaluation of translation results in the prior art is solved, which improves translation efficiency and simplifies the evaluation process.
Patent Information
- Application Number
- CN202210363800.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-07
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2042-04-07
AI Technical Summary
The prior art cannot accurately evaluate translation results, resulting in inefficient translation.
By obtaining source language data and translated target language data, semantic similarity and language quality features are calculated, and these features are input into the deep neural network model for evaluation to filter out translation results that do not require correction.
Accurate evaluation of translation results is achieved, translation efficiency is improved, time cost of manual correction is saved, complex end-to-end network structure is avoided, and evaluation speed is fast.
Smart Images

Figure CN114707521B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of machine translation, and in particular to a method, apparatus, device, and storage medium for evaluating translation results. Background Art
[0002] Machine translation, also known as automatic translation, is the process of using a computer to convert one natural language (source language) into another natural language (target language). However, the results of machine translation are often unstable, and the machine translation results need to be manually edited before use. This process is called post-editing (post-editing or post-processing). For example, in actual applications, if you want to broadcast a video globally, you need to translate the subtitles. However, if all subtitles are translated manually, the cost is high and the time is long. If all machine translation is used, machine translation errors may occur, such as omissions and mistranslations. Therefore, it is necessary to combine the two, first perform machine translation, and then manually correct them.
[0003] In reality, some machine translation results do not require revision. If these uncorrected parts can be identified, the efficiency of manual editing can be greatly improved. Therefore, accurately evaluating translation results and, based on these evaluations, accurately identifying these uncorrected parts is crucial for improving translation efficiency. Summary of the Invention
[0004] The present application provides a translation result evaluation method, apparatus, device and storage medium to solve the technical problem in the prior art that the translation results cannot be accurately evaluated, resulting in low translation efficiency.
[0005] In a first aspect, the present application provides a method for evaluating translation results, comprising:
[0006] Obtain source language data and translated target language data;
[0007] determining a first statistical feature of the source language data and determining a second statistical feature of the target language data;
[0008] Calculating semantic similarity between the source language data and the target language data;
[0009] Calculating a language quality feature of the target language data; wherein the language quality feature is used to indicate whether the target language data is grammatically correct;
[0010] The first statistical feature, the second statistical feature, the semantic similarity and the language quality feature are input into a deep neural network model to obtain an evaluation result.
[0011] Optionally, determining the first statistical feature of the source language data includes:
[0012] Obtaining a first corpus scoring dictionary; wherein the first corpus scoring dictionary includes: a first score of each of at least one specified text, and / or second scores of a plurality of segmentations;
[0013] extracting at least one target specified text from the source language data;
[0014] querying the first corpus scoring dictionary to determine a target first score corresponding to each of the target specified texts;
[0015] and / or,
[0016] Segmenting the source language data to obtain a plurality of target segmentations; querying the first corpus scoring dictionary to determine a target second score for each of the target segmentations;
[0017] The first score of each target and / or the second score of each target are used as the first statistical feature.
[0018] Optionally, obtaining the first corpus scoring dictionary includes:
[0019] Obtain source language training data;
[0020] Counting the frequency of occurrence of at least one specified text in the source language training data;
[0021] For each of the designated texts, calculating the first score of the designated text according to the frequency; and storing the designated texts and the first scores in correspondence to obtain a first correspondence relationship;
[0022] Perform n-gram segmentation on the source language training data to obtain a plurality of segmented words; wherein the value of n ranges from 1 to 3;
[0023] Counting the word frequency of each of the word segments;
[0024] Scoring each of the segmented words according to their respective word frequencies to obtain a second score for each of the segmented words, and correspondingly storing each of the segmented words and the second score corresponding to the segmented word to obtain a second correspondence;
[0025] The first corresponding relationship and the second corresponding relationship are saved to obtain the first corpus scoring dictionary.
[0026] Optionally, calculating the first score of the specified text according to the frequency includes:
[0027] Counting the total number of occurrences of all texts belonging to the same corpus category as the specified text in the source language training data;
[0028] Taking the logarithm of the frequency to obtain a first intermediate result;
[0029] Taking the logarithm of the total number of times to obtain a second intermediate result;
[0030] The first intermediate result is divided by the second intermediate result to obtain the first score.
[0031] Optionally, scoring the segmented words according to their respective word frequencies to obtain respective second scores for the segmented words includes:
[0032] Sort the word segments in order of frequency from low to high to obtain a sorting result;
[0033] Divide the ranking result into at least two equal intervals; and each interval corresponds to a score;
[0034] For each of the segmented words, the interval corresponding to the word frequency is determined, and the score of the interval corresponding to the word frequency is used as the second score of the segmented word.
[0035] Optionally, determining the second statistical feature of the target language data includes:
[0036] Obtaining a second corpus scoring dictionary; wherein the second corpus scoring dictionary includes: the number of times a plurality of groups of bilingual aligned words are translated in the bilingual training data;
[0037] Aligning the source language data with the target language data to obtain a plurality of target aligned word pairs;
[0038] The number of times each of the target aligned word pairs corresponds to is determined from the second corpus scoring dictionary, and each of the numbers is used as a second statistical feature of the target language data.
[0039] Optionally, obtaining the second corpus scoring dictionary includes:
[0040] Obtaining source language training data and target language training data;
[0041] Aligning the source language training data and the target language training data to obtain an alignment result;
[0042] Counting the number of times each group of bilingual aligned word pairs is aligned in the alignment results;
[0043] The bilingual aligned word pairs and the times are stored accordingly to obtain the second corpus scoring dictionary.
[0044] Optionally, calculating the semantic similarity between the source language data and the target language data includes:
[0045] Obtaining a similarity scoring model; wherein the similarity scoring model is used to calculate the semantic similarity between the source language data and the target language data;
[0046] The source language data and the target language data are input into the similarity scoring model to obtain the semantic similarity.
[0047] Optionally, the calculating the language quality features of the target language data includes:
[0048] Acquire a grammar evaluation model; wherein the grammar evaluation model is used to determine whether the target language data conforms to grammar;
[0049] The target language data is input into the grammar evaluation model to obtain the language quality features.
[0050] In a second aspect, the present application provides a translation result scoring device, comprising:
[0051] An acquisition module, used to acquire source language data and translated target language data;
[0052] a determination module, configured to determine a first statistical feature of the source language data and a second statistical feature of the target language data;
[0053] A first calculation module, configured to calculate the semantic similarity between the source language data and the target language data;
[0054] A second calculation module calculates a language quality feature of the target language data; wherein the language quality feature is used to indicate whether the target language data is grammatical;
[0055] An evaluation module is used to input the first statistical feature, the second statistical feature, the semantic similarity and the language quality feature into a deep neural network model to obtain an evaluation result.
[0056] In a third aspect, the present application provides an electronic device comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; the memory is used to store computer programs; and the processor is used to execute the programs stored in the memory to implement the translation result evaluation method described in the first aspect.
[0057] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the method for evaluating the translation result described in the first aspect is implemented.
[0058] The above technical solution provided by the embodiment of the present application has the following advantages over the existing technology: the method provided by the embodiment of the present application, when evaluating the translation results, integrates the first statistical features of the source language data, the second statistical features of the target language data, the semantic similarity features between the source language data and the target language data, and the language quality features of the target language data, and inputs these features into the deep neural network model for evaluation, so that the obtained evaluation results are more accurate, and thus can accurately screen out translation results that do not require correction, greatly saving the time cost of manual post-editing in the later stage, improving translation efficiency, and at the same time, avoiding the complexity of the end-to-end network and achieving a fast evaluation speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0060] Figure 1 A flowchart of a translation result evaluation method provided in an embodiment of the present application;
[0061] Figure 2 A flowchart illustrating the technical concept of a translation result evaluation method provided in an embodiment of the present application;
[0062] Figure 3 A schematic diagram of the structure of a translation result evaluation device provided in an embodiment of the present application;
[0063] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0065] The term "and / or" in this document simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. Additionally, the character " / " in this document generally indicates that the related objects are in an "or" relationship.
[0066] In order to solve the technical problem in the prior art that the translation results cannot be accurately evaluated, resulting in low translation efficiency, the embodiment of the present application provides a method for evaluating translation results, such as Figure 1 As shown in FIG, the evaluation method of the translation result mainly includes the following steps:
[0067] Step 101: Acquire source language data and translated target language data;
[0068] Target language data is the data translated from the source language data. The source language refers to the language before translation, and the target language refers to the language after translation. Source language data refers to the text in the language before translation, such as Chinese subtitles; target language data refers to the text in the language after translation, such as English subtitles.
[0069] For ease of understanding, let's take an example: if a video with Chinese subtitles is played on a Chinese video website and you want to play it in Country M, you need to translate the Chinese subtitles into Country M's language. Chinese is the source language, and Country M's language is the target language.
[0070] Step 102, determining a first statistical feature of the source language data and determining a second statistical feature of the target language data;
[0071] First, a process of determining a first statistical feature of source language data is introduced. The process mainly includes: obtaining a first corpus scoring dictionary; wherein the first corpus scoring dictionary includes: a first score of each of at least one specified text; and second scores of multiple word segments; extracting at least one target specified text from the source language data; querying the first corpus scoring dictionary to determine a target first score corresponding to each target specified text; segmenting the source language data to obtain multiple target word segments; querying the first corpus scoring dictionary to determine a target second score for each target word segment; and using each target first score and each target second score as the first statistical feature.
[0072] The specified text can be poetry, idioms, slang, etc.; the word segmentation can specifically be n-gram word segmentation, where n ranges from 1 to 3. This means that n-gram word segmentation includes 1-gram (unigram), 2-gram (bigram), and 3-gram (trigram). 1-gram word segmentation divides each character in a text into a word, 2-gram word segmentation divides every two characters in a text into a word, and so on. 3-gram word segmentation divides every three characters in a text into a word. For ease of understanding, let's take 2-gram word segmentation as an example. For example, if the sentence "I am Chinese" is segmented using 2-gram, the resulting 2-gram words are "I am", "I am Chinese", "China", and "Chinese".
[0073] From the above method for determining the first statistical feature of source language data, it can be seen that the key is to query the score of the target specified text and / or the score of a certain word from the first corpus scoring dictionary to obtain the first statistical feature.
[0074] The method for obtaining the first corpus scoring dictionary is further described below, wherein the first corpus scoring dictionary mainly includes two parts: a first score of at least one specified text and a second score of each segmented word.
[0075] First, we introduce the method of obtaining the first score of each specified text, which includes:
[0076] Source language training data is obtained; the frequency of occurrence of at least one specified text in the source language training data is counted; for each specified text, a first score of the specified text is calculated based on the frequency; and the specified text and the first score are stored in correspondence to obtain a first corresponding relationship.
[0077] Calculating the first score of a specified text based on frequency includes: counting the total number of occurrences of all texts belonging to the same corpus category as the specified text in the source language training data; taking the logarithm of the frequency to obtain a first intermediate result; taking the logarithm of the total number of times to obtain a second intermediate result; and dividing the first intermediate result by the second intermediate result to obtain a first score.
[0078] Among them, in order to facilitate understanding of the same corpus category, an example is given here: if the specified text is a poem, then all the poems in the training data belong to the same corpus category as the specified text; if the specified text is an idiom, then all the idioms in the training data belong to the same corpus category as the specified text.
[0079] For ease of understanding, let's take an example: For example, in a large amount of training data, a certain poem (specified text) appears count times, for example, 100 times. In all the training data, the total number of times all poems appear is total_count times, for example, 10,000 times. Then, based on the frequency calculation, the first score of the poem is: score = log(count) / log(total_count), that is, score = log(100) / log(10,000) = 0.5, so the first score of the poem is 0.5. In the same way, the first score of each specified text can be obtained.
[0080] The following describes a method for obtaining the second score of each word, specifically including:
[0081] Acquire source language training data; perform n-gram segmentation on the source language training data to obtain multiple segmentations; wherein the value range of n is 1 to 3; count the word frequency of each segmentation; score the segmentations according to their respective word frequencies to obtain a second score for each segmentation, store each segmentation and the second score corresponding to the segmentation to obtain a second correspondence; save the first correspondence and the second correspondence to obtain a first corpus scoring dictionary.
[0082] Among them, according to the word frequency of each participle, each participle is scored respectively to obtain the second score of each participle, including: sorting the participles in order from low to high according to the word frequency to obtain the sorting result; dividing the sorting result into at least two intervals; and each interval corresponds to a score; for each participle, determining the interval corresponding to the word frequency, and using the score of the interval corresponding to the word frequency as the second score of the participle.
[0083] Preferably, the sorting results are divided into four intervals. The score of each interval is pre-set and can be set according to experience. For example, the training data is segmented into 2-grams to obtain multiple segmentation results. The number of times each segmentation word appears in all segmentation results, that is, the frequency, is counted and sorted from low to high according to the frequency, and divided into four intervals, wherein the first interval is scored as a, the second interval is scored as b, the third interval is scored as c, and the fourth interval is scored as d. If the word frequency of a certain segmentation word is S, determine which interval of the four intervals S falls in. For example, if it is determined that S falls in the third interval of the four intervals, then the score c of the third interval is the second score of the segmentation word.
[0084] The above is a specific method for determining the first statistical feature of the source language data. The following describes a method for determining the second statistical feature of the target language data, which specifically includes:
[0085] A second corpus scoring dictionary is obtained; wherein the second corpus scoring dictionary includes: the number of times a plurality of groups of bilingual alignment words correspond to translations in the bilingual training data; the source language data and the target language data are aligned to obtain a plurality of target alignment word pairs; and the number of times each target alignment word pair corresponds to is determined from the second corpus scoring dictionary, and each number is used as a second statistical feature of the target language data.
[0086] The step of obtaining the second corpus scoring dictionary includes: obtaining source language training data and target language training data; aligning the source language training data and the target language training data to obtain an alignment result; counting the number of times each group of bilingual aligned word pairs is aligned in the alignment result; and storing the bilingual aligned word pairs and the number of times to obtain the second corpus scoring dictionary.
[0087] In specific implementation, when aligning the source language training data and the target language training data, an existing bilingual alignment tool can be used for alignment, or any bilingual alignment method can be adopted. Among all the alignment results, count the number of times a pair of bilingual aligned word pairs are aligned in all the training data. For example: in all the training data, the number of times the Chinese word "人" is aligned with the English word "person" is J times, and the number of times the Chinese word "人" is aligned with the English word "people" is K times. Then, correspondingly store the Chinese word "人", the English word "person", and J; and correspondingly store the Chinese word "人", the English word "people", and K. By this method, the corresponding counts of all bilingual aligned word pairs can be obtained, and the second corpus scoring dictionary is obtained.
[0088] After obtaining the second corpus scoring dictionary, for the actual application process, if in a paragraph, the target aligned word pair before and after translation is the Chinese word "人" and the English word "people", then query from the second corpus scoring dictionary the corresponding count of the Chinese word "人" and the English word "people" as K, and this count K is the second statistical feature.
[0089] Step 103, calculate the semantic similarity between the source language data and the target language data;
[0090] In specific implementation, first obtain a similarity scoring model; where the similarity scoring model is used to calculate the semantic similarity between the source language data and the target language data; then, input the source language data and the target language data into the similarity scoring model to obtain the semantic similarity.
[0091] Among them, the similarity scoring model can adopt the Bert model, the full English name of which is Bidirectional Encoder Representation from Transformers, and it is a pre-trained language representation model.
[0092] Before actually calculating the semantic similarity, first train to obtain the similarity scoring model. During training, use the bilingual corpus to construct a similarity training corpus, and the basic format of the corpus is: source language - target language - label, where the label is used to represent the semantic similarity between the source language and the target language text. For example: Chinese - foreign language - label, where label is 1 or 0, 1 represents similar, and 0 represents dissimilar.
[0093] Input the source language data before translation and the target language data after translation into the semantic similarity model, and output the semantic similarity of each corpus in these two segments of data. The range of the semantic similarity is between 0 and 1, and the similarity of the semantics before and after translation is represented by the value between 0 and 1.
[0094] In addition, it should be noted that in practical applications, other deep neural network models can also be used for the similarity scoring model, which is not limited here.
[0095] Step 104: Calculate language quality features of the target language data; wherein the language quality features are used to indicate whether the target language data is grammatical.
[0096] In a specific implementation, a grammar evaluation model is first obtained; wherein the grammar evaluation model is used to determine whether the target language data conforms to the grammar; the target language data is input into the grammar evaluation model to obtain language quality features.
[0097] The grammar evaluation model can be the GPT model (Gererate Pre-Training Model), which is essentially an unsupervised learning model. During training, unsupervised methods, such as crawlers, are used to collect monolingual data in the target language, resulting in 120 million pieces of monolingual data. This monolingual data is then used to train a language model. The trained GPT model can then be used to determine whether a sentence conforms to common grammar, thereby generating a grammar evaluation model.
[0098] It should be noted that, in practical applications, other neural network models may also be used for the grammar evaluation model, which is not limited here.
[0099] In addition, it should be noted that the execution order of steps 102 to 104 is not limited, as long as they are performed after step 101 and before step 105.
[0100] Step 105: Input the first statistical feature, the second statistical feature, the semantic similarity, and the language quality feature into a deep neural network model to obtain an evaluation result.
[0101] In its implementation, a three-layer deep neural network is designed to fit multi-source features. This task is a supervised learning task. First, a training set is constructed, consisting of multiple sentences. Each sentence has known statistical bilingual features, semantic scores, and monolingual scores. These three features are used as model inputs to train the DNN model. The training set scores different sentences, with a maximum score of 5 and a minimum score of 0. This task is modeled as a binary classification task, with positive samples consisting of data with scores of 4 and 5, and negative samples consisting of data with scores of 1-3. The DNN model uses the three features of the sentences in the training set as input and outputs a binary classification result. A higher score indicates a more accurate translation.
[0102] In an embodiment of the present application, when evaluating the translation results, the first statistical features of the source language data, the second statistical features of the target language data, the semantic similarity features between the source language data and the target language data, and the language quality features of the target language data are integrated, and these features are input into a deep neural network model for evaluation, so that the obtained evaluation results are more accurate, and translation results that do not require correction can be accurately screened out, which greatly saves the time cost of manual post-editing in the later stage and improves translation efficiency. At the same time, it also avoids the complexity of the end-to-end network and the evaluation speed is fast.
[0103] like Figure 2 In order to further understand the technical concept of the embodiment of the present application, Figure 2 A translation result evaluation method provided in an embodiment of the present application is further described.
[0104] First, bilingual data (source and target language data) before and after translation is collected. The statistical features of the bilingual data are then tallied, and a semantic score (i.e., semantic similarity) is calculated for the bilingual data. The higher the similarity between the target and source languages, the more accurate the semantics of the target language (machine translation result) are. A monolingual score (i.e., a linguistic quality characteristic of the target language data) is then calculated. The bilingual statistical features, semantic score, and monolingual score are then input into the DNN model to generate an evaluation score for the translation result. During actual screening, target language data with scores greater than or equal to a preset value can be selected, assuming no correction is necessary. Alternatively, target language data with scores less than a preset value can be selected for correction.
[0105] The translation result evaluation method provided in the embodiments of the present application achieved an accuracy rate of 95% and a recall rate of 63% on a manually constructed evaluation set, which can greatly save the time cost of manual post-editing and improve translation efficiency.
[0106] Based on the same concept, a translation result evaluation device is provided in the embodiment of the present application. The specific implementation of the device can be found in the description of the method embodiment part, and the repeated parts will not be repeated. Figure 3 As shown, the device mainly includes:
[0107] An acquisition module 301 is used to acquire source language data and translated target language data;
[0108] A determination module 302 is configured to determine a first statistical feature of the source language data and a second statistical feature of the target language data;
[0109] A first calculation module 303 is used to calculate the semantic similarity between the source language data and the target language data;
[0110] The second calculation module 304 calculates the language quality feature of the target language data; wherein the language quality feature is used to indicate whether the target language data is grammatical;
[0111] The evaluation module 305 is used to input the first statistical feature, the second statistical feature, the semantic similarity and the language quality feature into a deep neural network model to obtain an evaluation result.
[0112] In a specific embodiment, the determination module 302 is used to obtain a first corpus scoring dictionary; wherein the first corpus scoring dictionary includes: a first score of each of at least one specified text, and / or a second score of multiple word segments; extracting at least one target specified text from the source language data; querying the first corpus scoring dictionary to determine a target first score corresponding to each of the target specified texts; and / or segmenting the source language data to obtain multiple target word segments; querying the first corpus scoring dictionary to determine a target second score for each of the target word segments; and using each of the target first scores and / or each of the target second scores as the first statistical feature.
[0113] In a specific embodiment, the determination module 302 is used to obtain source language training data; count the frequency of occurrence of at least one specified text in the source language training data; for each specified text, calculate the first score of the specified text based on the frequency; store the specified text and the first score accordingly to obtain a first corresponding relationship; perform n-gram word segmentation on the source language training data to obtain multiple word segments, wherein the value range of n is 1 to 3; count the word frequency of each word segment; score the word segment according to the word frequency of each word segment to obtain a second score for each word segment, store each word segment and the second score corresponding to the word segment to obtain a second corresponding relationship; save the first corresponding relationship and the second corresponding relationship to obtain the first corpus scoring dictionary.
[0114] In a specific embodiment, the determination module 302 is used to count the total number of occurrences of all texts belonging to the same corpus category as the specified text in the source language training data; take the logarithm of the frequency to obtain a first intermediate result; take the logarithm of the total number of times to obtain a second intermediate result; and divide the first intermediate result by the second intermediate result to obtain the first score.
[0115] In a specific embodiment, the determination module 302 is used to sort each of the segmented words in order from low to high according to the word frequency to obtain a sorting result; divide the sorting result into at least two intervals; and each of the intervals corresponds to a score; for each segmented word, determine the interval corresponding to the word frequency, and use the score of the interval corresponding to the word frequency as the second score of the segmented word.
[0116] In a specific embodiment, the determination module 302 is configured to obtain a second corpus scoring dictionary; wherein the second corpus scoring dictionary includes: the number of times a plurality of groups of bilingual alignment words are translated in the bilingual training data; aligning the source language data and the target language data to obtain a plurality of target alignment word pairs; and determining the number of times each of the target alignment word pairs corresponds to in the second corpus scoring dictionary, and using each of the numbers as a second statistical feature of the target language data.
[0117] In a specific embodiment, the determination module 302 is configured to obtain source language training data and target language training data; align the source language training data and the target language training data to obtain an alignment result; count the number of times each group of bilingual aligned word pairs is aligned in the alignment result; and store the bilingual aligned word pairs and the number of times accordingly to obtain the second corpus scoring dictionary.
[0118] In a specific embodiment, the first calculation module 303 is used to obtain a similarity scoring model; wherein the similarity scoring model is used to calculate the semantic similarity between the source language data and the target language data; the source language data and the target language data are input into the similarity scoring model to obtain the semantic similarity.
[0119] In a specific embodiment, the second calculation module 304 is configured to obtain a grammar evaluation model, wherein the grammar evaluation model is used to determine whether the target language data is grammatically correct; and the target language data is input into the grammar evaluation model to obtain the language quality features.
[0120] Based on the same concept, an electronic device is also provided in the embodiment of the present application, such as Figure 4 As shown, the electronic device mainly includes: a processor 401, a memory 402 and a communication bus 403, wherein the processor 401 and the memory 402 communicate with each other via the communication bus 403. The memory 402 stores a program that can be executed by the processor 401, and the processor 401 executes the program stored in the memory 402 to implement the following steps:
[0121] Obtain source language data and translated target language data;
[0122] determining a first statistical feature of the source language data and determining a second statistical feature of the target language data;
[0123] Calculating semantic similarity between the source language data and the target language data;
[0124] Calculating a language quality feature of the target language data; wherein the language quality feature is used to indicate whether the target language data is grammatically correct;
[0125] The first statistical feature, the second statistical feature, the semantic similarity and the language quality feature are input into a deep neural network model to obtain an evaluation result.
[0126] The communication bus 403 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 403 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0127] The memory 402 may include a random access memory (RAM) or a non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor 401.
[0128] The above-mentioned processor 401 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc., and can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0129] In another embodiment of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program. When the computer program is executed on a computer, the computer executes the translation result scoring method described in the above embodiment.
[0130] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instruction is transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (such as a floppy disk, hard disk, tape, etc.), an optical medium (such as a DVD) or a semiconductor medium (such as a solid-state hard disk), etc.
[0131] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0132] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is intended to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for evaluating translation results, characterized in that: include: Obtain source language data and translated target language data; Determine a first statistical feature of the source language data and determine a second statistical feature of the target language data; wherein the first statistical feature is obtained by querying a first corpus scoring dictionary, the first corpus scoring dictionary including: a first score of at least one designated text and / or a second score of a plurality of segmented words; the obtaining of the first corpus scoring dictionary includes: obtaining source language training data; counting the frequency of occurrence of at least one designated text in the source language training data; for each designated text, calculating the first score of the designated text according to the frequency; storing the designated text and the first score accordingly to obtain a first corresponding relationship; performing n-gram segmentation on the source language training data to obtain a plurality of segmented words; wherein the value range of n is 1 to 3; counting the word frequency of each segmented word; scoring the segmented words according to their word frequencies to obtain their respective second scores, and storing each segmented word and the second score corresponding to the segmented word accordingly. The method comprises: calculating the first score of the designated text according to the frequency, including: counting the total number of occurrences of all texts belonging to the same corpus category as the designated text in the source language training data; taking the logarithm of the frequency to obtain a first intermediate result; taking the logarithm of the total number of occurrences to obtain a second intermediate result; dividing the first intermediate result by the second intermediate result to obtain the first score; determining the second statistical feature of the target language data, including: obtaining a second corpus scoring dictionary; wherein the second corpus scoring dictionary includes: the number of corresponding translations of multiple groups of bilingual alignment words in the bilingual training data; aligning the source language data and the target language data to obtain multiple target alignment word pairs; determining the number of corresponding occurrences of each target alignment word pair from the second corpus scoring dictionary, and using each of the numbers as the second statistical feature of the target language data; Calculating semantic similarity between the source language data and the target language data; Calculating a language quality feature of the target language data; wherein the language quality feature is used to indicate whether the target language data is grammatical; The first statistical feature, the second statistical feature, the semantic similarity and the language quality feature are input into a deep neural network model to obtain an evaluation result.
2. The translation result evaluation method according to claim 1, characterized in that: The determining the first statistical feature of the source language data includes: Get the first corpus scoring dictionary; Extracting at least one target specified text from the source language data; Querying the first corpus scoring dictionary to determine the target first score corresponding to each of the target specified texts; and / or, Segmenting the source language data to obtain a plurality of target segmented words; querying the first corpus scoring dictionary to determine a target second score for each of the target segmented words; The first score of each target and / or the second score of each target are used as the first statistical feature.
3. The translation result evaluation method according to claim 1, characterized in that: Scoring the participles according to their respective word frequencies to obtain respective second scores for the participles includes: Sort the word segments in order from low to high frequency to obtain a sorting result; Divide the ranking result into at least two intervals; and each interval corresponds to a score; For each of the word segments, the interval corresponding to the word frequency is determined, and the score of the interval corresponding to the word frequency is used as the second score of the word segment.
4. The method for evaluating translation results according to claim 1, characterized in that: The step of obtaining a second corpus scoring dictionary includes: Obtaining source language training data and target language training data; Aligning the source language training data with the target language training data to obtain an alignment result; Counting the number of times each group of bilingual aligned word pairs is aligned in the alignment results; The bilingual aligned word pairs and the times are stored accordingly to obtain the second corpus scoring dictionary.
5. The method for evaluating translation results according to claim 1, characterized in that: The calculating the semantic similarity between the source language data and the target language data includes: Acquire a similarity scoring model; wherein the similarity scoring model is used to calculate the semantic similarity between the source language data and the target language data; The source language data and the target language data are input into the similarity scoring model to obtain the semantic similarity.
6. The method for evaluating translation results according to claim 1, characterized in that: The calculating of the language quality features of the target language data includes: Acquire a grammar evaluation model; wherein the grammar evaluation model is used to determine whether the target language data is grammatically correct; The target language data is input into the grammar evaluation model to obtain the language quality features.
7. A translation result scoring device, characterized in that: include: An acquisition module, used for acquiring source language data and translated target language data; A determination module is used to determine a first statistical feature of the source language data and a second statistical feature of the target language data; wherein the first statistical feature is obtained by querying a first corpus scoring dictionary, and the first corpus scoring dictionary includes: a first score of at least one specified text and / or a second score of a plurality of segmented words; the obtaining of the first corpus scoring dictionary includes: obtaining source language training data; counting the frequency of occurrence of at least one specified text in the source language training data; for each specified text, calculating the first score of the specified text according to the frequency; storing the specified text and the first score accordingly to obtain a first corresponding relationship; performing n-gram segmentation on the source language training data to obtain a plurality of segmented words; wherein the value range of n is 1 to 3; counting the word frequency of each segmented word; scoring the segmented words according to the word frequency of each segmented word to obtain the second score of each segmented word, and storing each segmented word and the corresponding segmented word accordingly. The method further comprises: calculating the first score of the designated text according to the frequency, comprising: counting the total number of occurrences of all texts belonging to the same corpus category as the designated text in the source language training data; taking the logarithm of the frequency to obtain a first intermediate result; taking the logarithm of the total number of occurrences to obtain a second intermediate result; dividing the first intermediate result by the second intermediate result to obtain the first score; determining the second statistical feature of the target language data comprises: obtaining a second corpus scoring dictionary; wherein the second corpus scoring dictionary includes: the number of corresponding translations of multiple groups of bilingual alignment words in the bilingual training data; aligning the source language data and the target language data to obtain multiple target alignment word pairs; determining the number of corresponding occurrences of each target alignment word pair from the second corpus scoring dictionary, and using each number as the second statistical feature of the target language data; A first calculation module, used to calculate the semantic similarity between the source language data and the target language data; A second calculation module is used to calculate the language quality feature of the target language data; wherein the language quality feature is used to indicate whether the target language data is grammatical; An evaluation module is used to input the first statistical feature, the second statistical feature, the semantic similarity and the language quality feature into a deep neural network model to obtain an evaluation result.
8. An electronic device comprising: A processor, a memory and a communication bus, wherein the processor and the memory communicate with each other via the communication bus; the memory is used to store computer programs; and the processor is used to execute the programs stored in the memory to implement the translation result evaluation method according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the translation result evaluation method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method and device for generating candidate translation, and electronic equipment
CN106484681A
Translation quality evaluation method, system and device based on unsupervised learning and medium
CN111859992A
Training corpus processing method and device of translation model, equipment and storage medium
CN113761944A