Text error correction method, device and program product, training method and ASR method

By training the neural network model to generate error correction text and attaching improvement indicator tags, the problem of the more you correct the error in text error correction is solved, the error correction effect is improved, and the calculation and human resources requirements are reduced.

CN120412562APending Publication Date: 2025-08-01NTT DOCOMO INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410142628.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-01
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

Existing text error correction technologies are prone to becoming more and more wrong, especially in the field of automatic speech recognition, which leads to a decline in text quality after error correction.

Method used

By training the neural network model, error correction text is generated and improvement indicator tags are attached, the optimal text output is selected to avoid the more corrected, the more errors it becomes, the dependence on a large amount of labeled data is reduced, and the autoregressive model is used for training and error correction.

Benefits of technology

Effectively avoid the more correcting, improve the more errors the text error correction effect, reduce human resource consumption and calculation complexity, and optimize the error correction model algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120412562A_ABST
    Figure CN120412562A_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method for text error correction, an apparatus, a computer program product, a non-transitory computer readable storage medium, a method for automatic speech recognition (ASR) using the text error correction method, and a method for training a neural network model for text error correction. The method for text error correction comprises the following steps: generating an error correction text and an error correction label of a to-be-processed text based on the to-be-processed text by using a first neural network model, wherein the error correction label indicates whether the error correction text is improved relative to the to-be-processed text; and selecting a method for outputting the error correction text or the to-be-processed text as a correction result based on the error correction label. The method and the device can avoid the situation that the error is more and more corrected under the scene of correcting the error of the text, and improve the error correction effect of the text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of text processing, and more particularly, to a method, an apparatus, a computer program product, a non-transitory computer-readable storage medium for text correction, a method for automatic speech recognition (ASR) using the text correction method, and a method for training a neural network model for text correction. Background Art

[0002] In the past, we needed to spend a lot of time and effort to find and correct errors such as grammar errors and spelling mistakes in the text. With the development of artificial intelligence technology, text correction tools have emerged, which can automatically identify and correct errors in the text by learning a large amount of language data.

[0003] With the progress of data processing technology and the rapid popularization of the mobile Internet, a large amount of data has been generated. In recent years, speech data has received more and more attention. The ASR technology is an automatic speech recognition technology based on artificial intelligence and speech signal processing technology, which is used to convert human speech into text. The automatic speech recognition technology supports many common services in life, such as the speech-to-text function on mobile phones, the automatic generation of subtitles on video websites, and so on. Summary of the Invention

[0004] The present disclosure relates to a method, an apparatus, a computer program product and a non-transitory computer-readable storage medium for text correction, and a method for automatic speech recognition. It is possible to indicate whether the corrected text is improved relative to the text to be processed, and then select the corrected text or the text to be processed as the correction result for output, so as to avoid the situation of getting worse after correction. In addition, a method for training a neural network model for text correction is also proposed, so that the neural network model can generate a corrected text and an indication of whether the corrected text is improved relative to the text to be processed.

[0005] According to an aspect of the present disclosure, there is provided a method for text correction. The method includes: using a first neural network model to generate a corrected text and a correction label of the text to be processed based on the text to be processed, the correction label indicating whether the corrected text is improved relative to the text to be processed; and a method for selecting and outputting the corrected text or the text to be processed as the correction result based on the correction label.

[0006] According to some embodiments of the present disclosure, the first neural network model is trained in the following manner: using a second neural network model, obtaining a set of output corrected texts based on a set of predetermined input texts, where a set of predetermined input texts corresponds to a set of predetermined standard texts; calculating training correction labels for each output corrected text in the set of output corrected texts based on the set of output corrected texts, the set of predetermined input texts, and the set of predetermined standard texts to obtain a set of training correction labels; and training the first neural network model using the set of predetermined input texts as the input of the first neural network model, and using the set of predetermined standard texts or the set of output corrected texts, and the set of training correction labels as the output of the first neural network model.

[0007] According to some embodiments of the present disclosure, calculating training correction labels for each output corrected text in the set of output corrected texts based on the set of output corrected texts, the set of predetermined input texts, and the set of predetermined standard texts to obtain a set of training correction labels includes: obtaining a first predetermined input text in the set of predetermined input texts, a first output corrected text corresponding to the first predetermined input text, and a first predetermined standard text; calculating a first character error rate (CER) between the first predetermined input text and the first predetermined standard text and a second CER between the first output corrected text and the first predetermined standard text; and comparing the first CER and the second CER to obtain a first training correction label corresponding to the first output corrected text.

[0008] According to some embodiments of the present disclosure, comparing the first CER and the second CER to obtain a first training correction label corresponding to the first output corrected text includes: in response to the first CER being greater than the second CER, setting the first training correction label to indicate that the first output corrected text is improved relative to the first predetermined input text; and in response to the first CER being less than or equal to the second CER, setting the first training correction label to indicate that the first output corrected text is not improved relative to the first predetermined input text.

[0009] According to some embodiments of the present disclosure, the first neural network model and the second neural network model are implemented using the same neural network.

[0010] According to some embodiments of the present disclosure, the first neural network model includes an autoregressive model.

[0011] According to another aspect of the present disclosure, there is provided a device for text correction. The device includes: a processor; and a memory storing one or more computer programs; wherein, when the one or more computer programs are run by the processor, the processor is caused to execute any of the above methods.

[0012] According to another aspect of the present disclosure, there is provided a computer program product including a computer program which, when executed by a processor, implements any of the above methods.

[0013] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium having computer program instructions stored thereon. The computer program instructions, when executed by a processor, cause the processor to execute any of the above methods.

[0014] According to another aspect of the present disclosure, there is provided a method for automatic speech recognition (ASR), including: converting speech into text to be processed using an ASR model; generating error-corrected text and error-correction labels for the text to be processed based on the text to be processed using a first neural network model, where the error-correction labels indicate whether the error-corrected text improves relative to the text to be processed; and based on the error-correction labels, selecting to output the error-corrected text or the text to be processed as the ASR result.

[0015] According to another aspect of the present disclosure, there is provided a method for training a first neural network model for text error correction, including: using a second neural network model to obtain a set of output error-corrected texts based on a set of predetermined input texts, where a set of predetermined input texts corresponds to a set of predetermined standard texts; calculating training error-correction labels for each output error-corrected text in the set of output error-corrected texts based on the set of output error-corrected texts, the set of predetermined input texts, and the set of predetermined standard texts to obtain a set of training error-correction labels; using the set of predetermined input texts as the input of the first neural network model, and using the set of predetermined standard texts or the set of output error-corrected texts, and the set of training error-correction labels as the output of the first neural network model to train the first neural network model.

[0016] According to an embodiment of the present disclosure, it is possible to indicate whether the error-corrected text improves relative to the text to be processed, and then select to output the error-corrected text or the text to be processed as the correction result, thereby avoiding the situation of getting worse after correction and improving the text processing level. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Through the following description of the embodiments in conjunction with the drawings, aspects, features, and advantages of the present disclosure will become clearer and easier to understand, where:

[0018] Figure 1 Schematically shows the overall technical concept of the present disclosure;

[0019] Figure 2 Shows a flowchart of a method for text error correction according to an embodiment of the present disclosure;

[0020] Figure 3 Shows a training method of a first neural network according to an embodiment of the present disclosure;

[0021] Figure 4 shows Figure 2 the details of the training method;

[0022] Figure 5 shows a schematic diagram of a device for text correction according to an embodiment of the present disclosure;

[0023] Figure 6 shows a flowchart of a method for automatic speech recognition according to an embodiment of the present disclosure. Detailed implementation manners

[0024] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.

[0025] It should be understood that the various steps recited in the method embodiments of the present disclosure can be executed in a different order and / or in parallel. In addition, method embodiments may include other steps and / or omit certain steps.

[0026] As used herein, the term "including" and its variations are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0027] It should be understood that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependent relationships.

[0028] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise clearly specified in the context, it should be understood as "one or more".

[0029] There are many scenarios where text correction is needed. For example, when users search, they may enter search requests that include spelling mistakes, word order mistakes, grammar mistakes, etc. By using a correction model, the search request can be automatically corrected and the user can be prompted, so as to give search results that better meet the user's needs. However, depending on the size of the dataset used to train the correction model and the fields involved in the training data, the correction results output by the correction model may not always be satisfactory, and it is possible that the more corrections are made, the more mistakes occur. Another example is in the field of automatic speech recognition (ASR). Existing ASR models can receive speech signals as input and convert them into text for output. However, there are still some mistakes that are very obvious to humans in the ASR conversion results. Therefore, an ASR correction model for the ASR model is needed to correct the recognized incorrect text. ASR models are usually obtained by training with a large amount of audio and text data, and they are relatively stable in terms of generality and versatility. However, the amount of data used to train the ASR correction model is relatively small. Therefore, in actual use, it is possible that the ASR correction model makes more mistakes instead of fewer. For example, the following situations may occur: the text result output by the ASR model is correct, but after being corrected by the ASR correction model, the correct text is modified to be incorrect; or, there are a small number of mistakes in the text output by the ASR model, but after being corrected by the ASR correction model, the number of mistakes in the text increases.

[0030] The present disclosure is made in view of the above problems. The method, device, computer program product, and non-transitory computer-readable storage medium for text correction according to the embodiments of the present disclosure, as well as the method for automatic speech recognition, can indicate whether the corrected text (i.e., the text after correction) is improved compared to the text to be processed (i.e., the text before correction), and then select the corrected text or the text to be processed as the correction result, so as to avoid the situation of making more mistakes instead of fewer. In addition, a method for training a neural network model for text correction is also proposed, so that the first neural network model can generate the corrected text and an indication of whether the corrected text is improved compared to the text to be processed.

[0031] The concept of the present disclosure is to decide whether to correct and output the text to be processed or directly output the text to be processed by obtaining a label indicating whether the corrected text is improved compared to the text to be processed, so as to avoid the situation of making more mistakes instead of fewer. Figure 1 Schematically shows the overall technical concept of the present disclosure. The solution of the present disclosure relies on artificial intelligence. Specifically, it relies on various neural network models. The neural network model involves two stages: training and data generation. Figure 1 Part (a) shows the training stage, Figure 1 Part (b) shows the data generation stage.

[0032] As shown Figure 1 in part (a) of, during the training phase, a first neural network model can be trained using a set of data pairs of {predetermined input text, predetermined standard text} that are known or labeled. For example, the predetermined input text can correspond to the recognized text output by an ASR model as a speech recognition result, and the predetermined standard text can correspond to the correct text corresponding to the recognized text, that is, the correct text corresponding to the speech corresponding to the recognized text. The predetermined standard text can be generated through manual annotation. As shown Figure 1 in part (a) of, the training data of the first neural network model can also include a set of training error correction labels and a set of output error correction texts. The set of output error correction texts is generated by a second neural network model based on the above set of predetermined input texts. For example, the second neural network model can be an ASR error correction model, which can correct a set of recognized texts (i.e., predetermined input texts) output by the above ASR model to generate a corresponding set of output error correction texts. The set of output error correction texts and the set of predetermined standard texts respectively correspond to the set of predetermined input texts, where the set of predetermined input texts corresponds to the text before error correction, and the set of output error correction texts corresponds to the text after error correction. After obtaining the set of output error correction texts, calculations can be performed based on the set of output error correction texts, the set of predetermined input texts, and the set of predetermined standard texts to obtain a set of training error correction labels. Figure 1 In part (a) of, it is schematically shown that this calculation is completed by a calculation unit. It can be understood that the calculation unit can be implemented using any computer, processor, central processing unit (CPU), microcontroller unit (MCU), etc. Each training error correction label can indicate whether an output error correction text (i.e., the text after error correction) is improved relative to its corresponding predetermined input text (i.e., the text before error correction). After that, the set of predetermined input texts can be used as the input of the first neural network model, and the set of predetermined standard texts and the set of training error correction labels can be used as the output of the first neural network model to train the first neural network model. Alternatively, the set of predetermined input texts can also be used as the input of the first neural network model, and the set of output error correction texts and the set of training error correction labels can be used as the output of the first neural network model to train the first neural network model. The first neural network model and the second neural network model can be implemented using various existing generative models, including, for example, autoregressive models and non-autoregressive models (such as transformers), etc.

[0033] As shown Figure 1As shown in part (b), in the data generation stage, a first neural network model is used to correct errors in the text to be processed. The text to be processed can be, for example, the recognized text as the speech recognition result output by an ASR model, and this text may contain errors. For example, the text to be processed can be a sentence that may contain errors such as extra characters, missing characters, misspelled words, and homophones. Using the trained first neural network model, a corresponding corrected text and a correction label associated with the corrected text can be generated based on the text to be processed. The correction label indicates whether the corrected text improves relative to the text to be processed. Based on the correction label, the output unit can select to output the corrected text or the text to be processed, that is, select to output the text after correction or the text before correction, as the correction result of the text to be processed. The output unit mentioned here can be implemented using a common I / O module.

[0034] When the correction label indicates that the corrected text does not improve relative to the text to be processed, it shows that the error correction effect of the model is not good. Therefore, it is possible to choose not to use the corrected text but directly output the original text without error correction (that is, the text to be processed), so as to avoid the situation of getting worse after correction and improve the text error correction effect. In addition, the solution proposed in the present disclosure reduces the need for data pairs of {predetermined input text, predetermined standard text} with more annotations to train the error correction model and optimize the algorithm of the error correction model, thereby reducing the consumption of human resources and reducing the algorithm complexity of the error correction model, thus reducing the requirements for the computing power and storage space of the processor.

[0035] Figure 2 FIG. shows a flowchart of a method 200 for text error correction according to an embodiment of the present disclosure. The method 200 may correspond to the above data generation stage. As Figure 2 shown, the method 200 according to an embodiment of the present disclosure may include steps S210 to S220.

[0036] In step S210, the first neural network model can be used to generate a corrected text and a correction label for the text to be processed based on the text to be processed. By using the first neural network model, for each text to be processed, a corresponding corrected text can be generated to attempt to correct the errors in the text to be processed. At the same time, the first neural network can also generate a correction label corresponding to the corrected text and the text to be processed, and the correction label can indicate the correction effect of the corrected text, that is, whether the corrected text is improved relative to the text to be processed. Such improvement can include, for example, reducing typos, redundant words, etc. in the text. For example, the correction label can be in the form of a numerical value, such as "0" or "1", where the numerical value "0" can indicate that the corrected text is not improved relative to the text to be processed, and the numerical value "1" can indicate that the corrected text is improved relative to the text to be processed. It can be understood that the correction label can also use other numerical values to indicate whether there is improvement, and can also use other representation forms, as long as it can indicate whether the corrected text is improved relative to the text to be processed.

[0037] In step S220, based on the correction label generated in S210, the corrected text or the text to be processed generated in step S210 is selected as the correction result for output. It can be understood that when the correction label indicates that the corrected text is improved relative to the text to be processed, the corrected text can be used as the correction result, that is, the text to be processed is corrected. When the correction label indicates that the corrected text is not improved relative to the text to be processed, the text to be processed can be directly used as the correction result, that is, the text to be processed is not corrected. Thus, it can be ensured that the output correction result is the one with relatively better quality or fewer errors between the corrected text and the text to be processed, thereby avoiding the situation of making the errors worse and improving the text correction effect.

[0038] As described above, the first neural network model is a model trained by the training process of part (a) of the above Figure 1 above. Figure 3 The training method of the first neural network according to an embodiment of the present disclosure is shown. In one embodiment, the first neural network model used in method 200 can be trained by Figure 3 the method 300 shown. As Figure 3 shown, the method 300 according to an embodiment of the present disclosure can include steps S310 to S330.

[0039] In order to enable the first neural network model to generate a correction label and a corrected text based on the input text to be processed during the data generation stage, relevant training data is needed to train the first neural network model. In an embodiment of the present disclosure, a second neural network model can be used to generate a training corrected text corresponding to the training input text. As Figure 3As shown, in step S310, a second neural network model can be used to obtain a set of output corrected texts based on a set of predetermined input texts. For example, the second neural network model can be a trained correction model that can generate a corresponding set of output corrected texts according to a set of predetermined input texts. Additionally, the set of predetermined input texts can have a corresponding set of predetermined standard texts. For example, the set of predetermined input texts can be a set of texts containing errors such as extra characters, missing characters, misspelled characters, and homophones, while the set of predetermined standard texts can be the correct texts that eliminate the above-mentioned errors in the set of predetermined input texts. In the field of ASR applications, the predetermined input texts can correspond to the recognized texts output by the ASR model as speech recognition results, and the predetermined standard texts can correspond to the correct texts corresponding to the recognized texts, that is, the correct texts corresponding to the speech corresponding to the recognized texts. The set of predetermined standard texts can be generated through manual annotation. The set of output corrected texts and the set of predetermined standard texts can respectively correspond to the set of predetermined input texts, where the set of predetermined input texts can correspond to the text before correction, the set of output corrected texts can correspond to the text after correction, and the set of predetermined standard texts can correspond to the expected corrected result text, that is, the correct text.

[0040] After obtaining the set of output corrected texts, in step S320, based on the set of output corrected texts, the set of predetermined input texts, and the set of predetermined standard texts, the training correction labels for each output corrected text in the set of output corrected texts can be calculated to obtain a set of training correction labels. Each training correction label can indicate whether an output corrected text (i.e., the text after correction) is improved relative to its corresponding predetermined input text (i.e., the text before correction). For example, the training correction labels can be in numerical form, such as "0" or "1", where the numerical value "0" can indicate that the training corrected text is not improved relative to the predetermined input text, and the numerical value "1" can indicate that the training corrected text is improved relative to the predetermined input text. It can be understood that the training correction labels can also use other numerical values to indicate whether there is improvement, and can also use other representation forms, as long as it can indicate whether the training corrected text is improved relative to the predetermined input text.

[0041] The training error correction labels can be calculated in many ways. For example, the calculation of the training error correction labels can be based on metrics such as ROUGE (Recall-Oriented Understudy for Gisting Evaluation), BLEU (Bilingual Evaluation Understudy), Character Error Rate (CER), Word Error Rate (WER), and so on. It can be understood that the above metrics are merely examples, and the present disclosure is not limited to using these metrics to calculate the training error correction labels. In fact, in order to calculate the training error correction labels, any method that can compare the differences between texts can be adopted. For the sake of brevity, the following will illustrate by taking the calculation of the training error correction labels based on the Character Error Rate (CER) as an example.

[0042] In one embodiment, the training error correction labels can be calculated based on CER. In this case, the above step S320 may include sub-steps S321 to S323. Figure 4 These sub-steps of step S320 are shown.

[0043] In step S321, the first predetermined input text (corresponding to the text before error correction), the first output error correction text (corresponding to the text after error correction), and the first predetermined standard text (corresponding to the correct text) involved in step S310 in the group of predetermined input texts can be obtained. The "first" here is not intended to represent any preference, order, or interdependence, and the "first predetermined input text" can be any text in the group of predetermined input texts. The operations described here for the first predetermined input text are performed on any predetermined input text in the group of predetermined input texts.

[0044] In step S322, the first CER between the first predetermined input text and the first predetermined standard text and the second CER between the first output error correction text and the first predetermined standard text can be calculated. CER is a text quality evaluation metric that can indicate the degree of difference between texts. Its calculation method is to find the number of different characters in the two texts to be compared, and then divide this number by the total number of characters in the text to obtain the error rate. Thus, CER can indicate the proximity of the two texts. The lower the CER, the closer the two texts are. Therefore, the first CER can indicate the proximity of the first predetermined input text to the first predetermined standard text, and the second CER can indicate the proximity of the first output error correction text to the first predetermined standard text.

[0045] In step S323, the first CER and the second CER can be compared to obtain a first training error correction label corresponding to the first output error correction text. As described above, the first CER can indicate the proximity of the first predetermined input text to the first predetermined standard text, the second CER can indicate the proximity of the first output error correction text to the first predetermined standard text, and the lower the CER, the closer it is to the first predetermined standard text. Therefore, the first training error correction label corresponding to the first output error correction text (and also corresponding to the first predetermined input text and the first predetermined standard text) can be determined based on the comparison of the first CER and the second CER. In one aspect, if the first CER is greater than the second CER, it means that the first output error correction text is closer to the first predetermined standard text relative to the first predetermined input text. Therefore, the first training error correction label can be set to indicate that the first output error correction text has improved relative to the first predetermined input text. On the other hand, if the first CER is less than or equal to the second CER, it means that the first predetermined input text is closer to the first predetermined standard text relative to the first output error correction text. Therefore, the first training error correction label can be set to indicate that the first output error correction text has not improved relative to the first predetermined input text.

[0046] For each predetermined input text in the set of predetermined input texts, the operations for the first predetermined input text described in conjunction with steps S321 to S323 here can be performed in combination with the corresponding output error correction text in the set of output error correction texts and the corresponding predetermined standard text in the set of predetermined standard texts, thereby obtaining a set of training error correction labels.

[0047] After step S320, the data for training the first neural network model is ready. Therefore, in step S330, the first neural network model can be trained using the set of predetermined input texts as the input of the first neural network model, and using the set of predetermined standard texts or the set of output error-corrected texts, and the set of training error-correction labels as the output of the first neural network model. Here, for the training of the first neural network model, the set of predetermined standard texts and the set of training error-correction labels can be used as the output of the first neural network model, or the set of output error-corrected texts and the set of training error-correction labels can be used as the output of the first neural network model. As described above, each predetermined input text has a corresponding output error-corrected text, and each output error-corrected text corresponds to a training error-correction label. Therefore, on the one hand, the first neural network model can be trained using the set of predetermined input texts as the input of the first neural network model, and using the set of output error-corrected texts and the set of training error-correction labels as the output of the first neural network model. Further, as described above, each predetermined input text has a corresponding predetermined standard text, and each predetermined standard text can also correspond to a training error-correction label. Since the predetermined standard text corresponds to the desired error-corrected result text, that is, the correct text, therefore, in training, using the predetermined standard text instead of the output error-corrected text may obtain better training and learning effects. Therefore, on the other hand, the first neural network model can be trained using the set of predetermined input texts as the input of the first neural network model, and using the set of predetermined standard texts and the set of training error-correction labels as the output of the first neural network model.

[0048] In one embodiment, the first neural network model and the second neural network model can be implemented using the same neural network. For example, both can be implemented using an autoregressive neural network. The second neural network model can be an existing error-correction model, so the neural network it uses is predetermined. The first neural network model can be trained and implemented using the same neural network as the second neural network model, so that the same model framework can be used without modifying the network architecture.

[0049] In the method for text error correction according to an embodiment of the present disclosure, it can be indicated whether the error-corrected text is improved relative to the text to be processed, and then the output error-corrected text or the text to be processed can be selected as the correction result, so as to avoid the situation of getting worse after correction and improve the text error-correction effect.

[0050] Embodiments of the present disclosure also provide a device for text error correction. Figure 5 A schematic diagram of a device 500 for text error correction according to an embodiment of the present disclosure is shown.

[0051] As Figure 5As shown, a device 500 for text error correction according to an embodiment of the present disclosure includes a processor 510 and a memory 520. The memory 520 stores one or more computer programs.

[0052] The processor 510 is a program control device such as a microprocessor. For example, it operates according to the program installed in the memory 520. The memory 520 is a storage element such as ROM or RAM, etc. The program to be executed by the processor 510 and the like is stored in the memory 520. Figure 5 The shown device 500 for text error correction can be used to implement the method for text error correction disclosed in the present application.

[0053] In the device according to an embodiment of the present disclosure, it can be indicated whether the corrected text is improved relative to the text to be processed, and then select to output the corrected text or the text to be processed as the correction result, so as to avoid the situation of getting worse after correction and improve the text error correction effect.

[0054] An embodiment of the present disclosure also provides a computer program product. The computer program product includes a computer program, and the computer program can implement the method for text error correction disclosed in the present application when executed by a processor.

[0055] An embodiment of the present disclosure also provides a non - transitory computer - readable storage medium. Computer program instructions are stored on the computer - readable storage medium. The computer program instructions cause the processor to execute the method for text error correction disclosed in the present application when executed by the processor.

[0056] An embodiment of the present disclosure also provides a method for training a first neural network model for text error correction. The method may include steps S310 to S330 described above in combination with Figure 3 For the sake of brevity, the details are not described herein again.

[0057] The above - mentioned method for text error correction according to an embodiment of the present disclosure can be applied to the field of automatic speech recognition (ASR). In this scenario, the above - mentioned text to be processed can be the output text of an ASR model. Figure 6 A flowchart of a method 600 for ASR according to an embodiment of the present disclosure is shown. The method 600 may include steps S610 to S630.

[0058] In step S610, an ASR model is used to convert speech into text to be processed. As described above, ASR can receive a speech signal as input and convert it into text for output. This text may be incorrect, so it needs to be further processed for error correction.

[0059] In step S620, a first neural network model is used to generate a corrected text and a correction label for the text to be processed, where the correction label indicates whether the corrected text is an improvement over the text to be processed. In step S630, based on the correction label, either the corrected text or the text to be processed is selected as the ASR result. For example, the text to be processed can be a sentence that may contain errors such as extra characters, missing characters, misspelled words, or homophones. Through the above steps S620 and S630, a sentence with at least some of the errors in the sentence reduced and the semantic expression quality improved can be output, or if a sentence with improved quality cannot be obtained, the original sentence itself is output. Steps S620 and S630 respectively correspond to steps S210 and S220 described above in connection with Figure 2 The details are not repeated here for the sake of brevity.

[0060] In the method for ASR according to an embodiment of the present disclosure, it is possible to indicate whether the corrected text is an improvement over the text to be processed, and then select either the corrected text or the text to be processed as the correction result, thereby avoiding the situation of getting worse after correction and improving the text correction effect in the ASR scenario.

[0061] It can be understood that although the present disclosure has been explained and illustrated by way of examples in the context of ASR applications in many places, the solution of the present disclosure is applicable to any other fields and scenarios that require text correction in addition to ASR.

[0062] The whole or parts of the hardware computing devices described in the present disclosure can be implemented by various suitable hardware means, including but not limited to FPGA, ASIC, SoC, discrete gate or transistor logic, discrete hardware components, or any combination thereof. The devices, equipment, methods, and systems involved in the present disclosure are not limited to any specific hardware architecture or configuration. The components in the disclosed devices, equipment, and systems can be separate or integrated, and can be combined in different ways and / or replaced or supplemented by other components. It should be understood that the teachings of the present disclosure can be implemented in various forms of hardware, software, firmware, dedicated processors, or combinations thereof.

[0063] The block diagrams of the devices, equipment, methods, and systems involved in the present disclosure are only exemplary and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these circuits, devices, equipment, and systems can be connected, arranged, and configured in any way as long as the desired purpose can be achieved.

[0064] In the above description, the present invention has been described based on embodiments. These embodiments are merely illustrative, and those skilled in the art should understand that the combinations of the constituent elements and processes of these embodiments can be modified in various ways, and such modifications are also within the scope of the present invention.

Claims

1. A method for text error correction, comprising: Using a first neural network model to generate an error-corrected text and an error-correction label for the text to be processed based on the text to be processed, where the error-correction label indicates whether the error-corrected text improves relative to the text to be processed; And Based on the error-correction label, selecting to output the error-corrected text or the text to be processed as the correction result.

2. The method according to claim 1, wherein The first neural network model is trained in the following manner: Using a second neural network model to obtain a set of output error-corrected texts based on a set of predetermined input texts, where the set of predetermined input texts corresponds to a set of predetermined standard texts; Based on the set of output error-corrected texts, the set of predetermined input texts, and the set of predetermined standard texts, calculating a training error-correction label for each output error-corrected text in the set of output error-corrected texts to obtain a set of training error-correction labels; And Using the set of predetermined input texts as the input of the first neural network model, and using the set of predetermined standard texts or the set of output error-corrected texts, and the set of training error-correction labels as the output of the first neural network model to train the first neural network model.

3. The method according to claim 2, wherein Based on the set of output error-corrected texts, the set of predetermined input texts, and the set of predetermined standard texts, calculating a training error-correction label for each output error-corrected text in the set of output error-corrected texts to obtain a set of training error-correction labels, including: Obtaining a first predetermined input text in the set of predetermined input texts, and a first output error-corrected text and a first predetermined standard text corresponding to the first predetermined input text; Calculating a first character error rate CER between the first predetermined input text and the first predetermined standard text, and a second character error rate CER between the first output error-corrected text and the first predetermined standard text; and Comparing the first CER and the second CER to obtain a first training error-correction label corresponding to the first output error-corrected text.

4. The method according to claim 3, wherein Comparing the first CER and the second CER to obtain a first training error-correction label corresponding to the first output error-corrected text, including: In response to the first CER being greater than the second CER, setting the first training error-correction label to indicate that the first output error-corrected text improves relative to the first predetermined input text; and In response to the first CER being less than or equal to the second CER, setting the first training error-correction label to indicate that the first output error-corrected text does not improve relative to the first predetermined input text.

5. The method according to any one of claims 2-4, wherein The first neural network model and the second neural network model are implemented using the same neural network.

6. The method according to any one of claims 1-4, wherein The first neural network model includes an autoregressive model.

7. A method for automatic speech recognition ASR, comprising: Using an ASR model to convert speech into text to be processed; Using a first neural network model to generate an error-corrected text and an error-correction label for the text to be processed based on the text to be processed, where the error-correction label indicates whether the error-corrected text improves relative to the text to be processed; And Based on the error-correction label, selecting to output the error-corrected text or the text to be processed as the ASR result.

8. A method for training a first neural network model for text error correction, comprising: Using a second neural network model to obtain a set of output corrected texts based on a set of predetermined input texts, wherein the set of predetermined input texts corresponds to a set of predetermined standard texts; Based on the set of output corrected texts, the set of predetermined input texts, and the set of predetermined standard texts, calculating a training correction label for each output corrected text in the set of output corrected texts to obtain a set of training correction labels; Using the set of predetermined input texts as the input of the first neural network model, and using the set of predetermined standard texts or the set of output corrected texts, and the set of training correction labels as the output of the first neural network model to train the first neural network model.

9. A device for text error correction, comprising: A processor; And A memory storing one or more computer programs; Wherein, when the one or more computer programs are run by the processor, the processor is caused to execute the method according to any one of claims 1-6.

10. A computer program product, comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-6.