Text error correction method and device, computer equipment and storage medium

By combining word segmentation and correction evaluation model, the word segmentation chunk is optimized, and the problem of inaccurate character-level error correction in the existing technology is solved, achieving more efficient text error correction effect.

CN119180283APending Publication Date: 2024-12-24PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411247759.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2024-12-24

AI Technical Summary

Technical Problem

The existing text error correction technology is mainly based on the character level and does not consider the coordinating relationship between characters, resulting in inaccurate error correction, especially when there are multiple typos in the input text, which affects the error correction effect.

Method used

By typing the original text word segmentation into word chunks, selecting selected word-level chunks from candidate word-level chunks based on word segmentation chunks, performing splicing processing to form preliminary corrected text, and evaluating the preliminary corrected text through the correction evaluation model, and updating Word-level chunking, gradually optimize the corrected text until the accurate target corrected text is formed.

Benefits of technology

The accuracy of text error correction is improved. By considering the contextual relationship of word segmentation chunks and multi-dimensional correction evaluation, word-level chunks are dynamically adjusted to output more accurate corrected text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119180283A_ABST
    Figure CN119180283A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a text error correction method and device, computer equipment and a storage medium, and belongs to the technical field of financial science and technology. The method comprises the steps of obtaining an original text; performing word segmentation processing on the original text to obtain original segmented word blocks; screening selected word-level chunks from preset candidate word-level chunks according to the original segmented word chunks; performing splicing processing on the selected word-level chunks to obtain a preliminary corrected text; performing correction evaluation processing on the preliminary correction text according to the original text to obtain correction evaluation data; wherein the correction evaluation data represents the correction accuracy degree of the preliminary correction text; updating the selected word-level chunk according to the correction evaluation data to obtain an updated word-level chunk; and splicing the updated word-level chunks to obtain a target corrected text. According to the embodiment of the invention, the accuracy of text error correction can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of financial technology, and in particular to a text error correction method and apparatus, computer equipment and storage medium. Background Art

[0002] In the financial field, the accuracy of text input affects the effectiveness of subsequent financial services. For example, in an insurance consulting service scenario, insurance business information will be output based on input text recognition. If there are errors in the text input by the user, it will affect the accuracy of the output of the insurance business information. Based on this, in the related technology, the input text will first be corrected, and after obtaining the corrected text, the insurance business information will be output based on the corrected text. However, in the text correction process, character-level features are usually used for correction. Since the correction method of character features does not take into account the matching relationship with other characters, and if there are multiple wrong characters in the input text, it is easy to affect the accuracy of the correction. Therefore, how to improve the accuracy of text correction has become a technical problem that needs to be solved urgently. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to propose a text error correction method and apparatus, a computer device and a storage medium, aiming to improve the accuracy of text error correction.

[0004] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a text error correction method, the method comprising:

[0005] Get the original text;

[0006] Performing word segmentation processing on the original text to obtain original word segmentation blocks;

[0007] Filtering out selected word-level chunks from preset candidate word-level chunks according to the original word-segmented chunks;

[0008] splicing the selected word-level chunks to obtain a preliminary corrected text;

[0009] Performing correction evaluation processing on the preliminary corrected text according to the original text to obtain correction evaluation data; wherein the correction evaluation data represents the correction accuracy of the preliminary corrected text;

[0010] Performing an update process on the selected word-level chunk according to the correction evaluation data to obtain an updated word-level chunk;

[0011] The updated word-level chunks are concatenated to obtain a target corrected text.

[0012] In some embodiments, performing correction evaluation processing on the preliminary corrected text according to the original text to obtain correction evaluation data includes:

[0013] Obtaining original phrase information of the original text through a preset original correction evaluation model; wherein the original phrase information includes: original word meaning information, original word form information and original word pronunciation information;

[0014] Acquire the corrected phrase information of the preliminary corrected text through the original correction evaluation model; wherein the corrected phrase information includes: corrected word meaning information, corrected word form information and corrected word pronunciation information;

[0015] Calculating the similarity between the original word meaning information and the corrected word meaning information by using the original correction evaluation model to obtain word meaning similarity;

[0016] Calculating the similarity between the original word form information and the corrected word form information by using the original correction evaluation model to obtain word form similarity;

[0017] Calculating the similarity between the original word pronunciation information and the corrected word pronunciation information by using the original correction evaluation model to obtain word pronunciation similarity;

[0018] The word meaning similarity, the word form similarity and the word pronunciation similarity are concatenated to obtain the correction evaluation data.

[0019] In some embodiments, after the update word-level chunks are concatenated to obtain a target corrected text, the method further includes:

[0020] Calculating the loss of the target correction text and the preset verification text to obtain correction loss data;

[0021] The model parameters of the original correction evaluation model are adjusted according to the correction loss data to obtain a target correction evaluation model.

[0022] In some embodiments, the updating process of the selected word-level chunk according to the correction evaluation data to obtain the updated word-level chunk includes:

[0023] Performing word segmentation adjustment on the original word segmentation block according to the correction evaluation data to obtain an updated word segmentation block;

[0024] Filtering out new word-level chunks from the candidate word-level chunks according to the updated word-level chunks;

[0025] The selected word-level chunks are updated according to the newly added word-level chunks to obtain the updated word-level chunks.

[0026] In some embodiments, the step of concatenating the selected word-level chunks to obtain a preliminary corrected text includes:

[0027] selecting a reference word-level chunk from the selected word-level chunks;

[0028] Filtering out a next word-level chunk from the selected word-level chunk according to the reference word-level chunk; wherein the next word-level chunk is the selected word-level chunk next to the reference word-level chunk;

[0029] Predicting the selection probability of the next word-level chunk according to the reference word-level chunk to obtain a selection prediction probability;

[0030] Filtering a selected word-level chunk from the next word-level chunk according to the selection prediction probability;

[0031] The reference word-level chunks and the selected word-level chunks are concatenated to obtain the preliminary corrected text.

[0032] In some embodiments, the selecting the selected word-level chunk from preset candidate word-level chunks according to the original word-segmentation chunks includes:

[0033] Acquire original character information of the original word segmentation block; wherein the original character information includes original pronunciation information, original character shape information and original character meaning information;

[0034] Filtering out preliminary word-level chunks from the candidate word-level chunks according to the original pronunciation information;

[0035] The selected word-level chunks are selected from the preliminary word-level chunks according to the original character shape information and the original character meaning information.

[0036] In some embodiments, performing word segmentation processing on the original text to obtain original word segmentation blocks includes:

[0037] Encoding the original text to obtain original encoded data;

[0038] Performing word segmentation prediction on the original coded data to obtain word segmentation order information; wherein the word segmentation order information represents the word division order in the original text;

[0039] The original text is segmented according to the segmentation order information to obtain the original segmentation blocks.

[0040] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a text error correction device, the device comprising:

[0041] A text acquisition module is used to acquire the original text;

[0042] A word segmentation module, used for performing word segmentation processing on the original text to obtain original word segmentation blocks;

[0043] A chunk screening module, configured to screen out selected word-level chunks from preset candidate word-level chunks according to the original word-segmentation chunks;

[0044] A chunk splicing module, used for splicing the selected word-level chunks to obtain a preliminary corrected text;

[0045] A correction evaluation module, configured to perform correction evaluation processing on the preliminary corrected text according to the original text to obtain correction evaluation data; wherein the correction evaluation data represents the correction accuracy of the preliminary corrected text;

[0046] A chunk updating module, configured to update the selected word-level chunk according to the correction evaluation data to obtain an updated word-level chunk;

[0047] The corrected text output module is used to splice the updated word-level blocks to obtain a target corrected text.

[0048] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes a computer device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the method described in the first aspect when executing the computer program.

[0049] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0050] The text error correction method and device, computer equipment and storage medium proposed in the present application, which segments the original text into original word segmentation blocks, and then selects selected word-level blocks that can replace the original word segmentation blocks from the candidate word-level blocks based on the original word segmentation blocks, so as to splice the selected word-level blocks into a preliminary corrected text. In order to judge the degree of correction of the preliminary corrected text, it is necessary to make a correction evaluation on the preliminary corrected text according to the original text to obtain correction evaluation data, so as to adjust the selected word-level blocks according to the correction evaluation data to obtain updated word-level blocks, and then splice the updated word-level blocks into the target corrected text to output a more accurate corrected text. Therefore, in the process of text error correction, the word-level blocks will be continuously optimized to achieve the optimization of the corrected text, so as to output a more accurate corrected text and improve the accuracy of text error correction. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 is a flowchart of a text error correction method provided by an embodiment of the present application;

[0052] Figure 2 yes Figure 1 Flow chart of step S102 in FIG.

[0053] Figure 3 yes Figure 1 Flow chart of step S103 in FIG.

[0054] Figure 4 It is a schematic diagram of generating a preliminary corrected text in the text error correction method provided in an embodiment of the present application;

[0055] Figure 5 yes Figure 1 Flow chart of step S104 in FIG.

[0056] Figure 6 yes Figure 1 Flow chart of step S105 in FIG.

[0057] Figure 7 yes Figure 1 Flow chart of step S106 in FIG.

[0058] Figure 8 It is a schematic diagram of generating a target corrected text in the text error correction method provided in an embodiment of the present application;

[0059] Fig. 9 is a flowchart of a text error correction method provided by another embodiment of the present application;

[0060] Fig.10 is a structural schematic diagram of a text error correction device provided in an embodiment of the present application;

[0061] Fig.11 It is a schematic diagram of the hardware structure of the computer device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0063] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0064] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0065] First, some nouns involved in this application are analyzed:

[0066] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robots, language recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0067] Natural language processing (NLP): NLP uses computers to process, understand and apply human languages ​​(such as Chinese and English). NLP is a branch of artificial intelligence and an interdisciplinary subject between computer science and linguistics. It is often referred to as computational linguistics. Natural language processing includes grammatical analysis, semantic analysis, and text understanding. Natural language processing is often used in technical fields such as machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, information intent recognition, information extraction and filtering, text classification and clustering, public opinion analysis and opinion mining. It involves data mining related to language processing, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, and linguistic research related to language computing.

[0068] Automatic Speech Recognition (ASR): is a technology that converts human speech into text. This technology enables computers to understand human spoken language, thus achieving human-computer interaction.

[0069] BERT (Bidirectional Encoder Representations from Transformers): is a pre-trained language representation model. The core idea of ​​BERT is to use a large amount of text data for pre-training, learn general language representations, and then apply these representations to various natural language processing (NLP) tasks.

[0070] Global Optimization: It is a concept in the field of mathematical optimization, which refers to finding the global optimal solution in a given optimization problem, that is, finding the solution that minimizes the objective function value in the entire solution space. In contrast, local optimization only guarantees to find the optimal solution in a certain neighborhood, which is not necessarily the global optimal solution.

[0071] Word Segmentation Network: Generally refers to a model or algorithm used to segment continuous text strings into meaningful words or vocabulary units in the field of natural language processing (NLP). Word segmentation is particularly important in languages ​​without obvious word boundaries, such as Chinese, because the writing systems of these languages ​​do not use spaces to separate words.

[0072] Text error correction technology can improve the accuracy of input text, reduce erroneous text input, and achieve accurate information search. In the financial field, if there are errors in the input text, it will affect the quality of financial services. For example, in the insurance business scenario, the user enters the query text, and if there are errors in the query text, it will affect the accuracy of the insurance information query. In order to overcome the problem of insufficient accuracy in information search, the related technology integrates text error correction technology into the financial field, and improves the quality of financial services by correcting the input query text. However, the text error correction technology in the related technology is mainly based on character-level error correction, but the character-level error correction does not take into account the collocation relationship between characters, which affects the accuracy of text error correction. At the same time, when there are multiple typos in the input query text, it will affect the contextual understanding during the error correction process and affect the error correction effect.

[0073] Based on this, the embodiments of the present application provide a text error correction method and apparatus, a computer device and a storage medium, aiming to improve the accuracy of text error correction.

[0074] The text error correction method and apparatus, computer equipment and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the text error correction method in the embodiments of the present application is described.

[0075] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0076] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0077] The text error correction method provided in the embodiment of the present application relates to the field of financial technology technology. The text error correction method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the text error correction method, etc., but is not limited to the above forms.

[0078] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer computer devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0079] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.

[0080] Figure 1 is an optional flowchart of the text error correction method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S107.

[0081] Step S101, obtaining the original text;

[0082] Step S102, performing word segmentation processing on the original text to obtain original word segmentation blocks;

[0083] Step S103, selecting a selected word-level chunk from preset candidate word-level chunks according to the original word-segmentation chunks;

[0084] Step S104, concatenating the selected word-level blocks to obtain a preliminary corrected text;

[0085] Step S105, performing correction evaluation processing on the preliminary corrected text according to the original text to obtain correction evaluation data; wherein the correction evaluation data represents the correction accuracy of the preliminary corrected text;

[0086] Step S106, updating the selected word-level chunk according to the correction evaluation data to obtain an updated word-level chunk;

[0087] Step S107, concatenating the updated word-level chunks to obtain a target corrected text.

[0088] Steps S101 to S107 shown in the embodiment of the present application are obtained by obtaining the original text, performing word segmentation processing on the original text to obtain the original word segmentation blocks, selecting the selected word level blocks from the candidate word level blocks according to the original word segmentation blocks, and splicing the selected word level blocks into a preliminary corrected text. Therefore, according to the word segmentation blocks, the word level blocks that can replace the original word segmentation blocks are selected from other word level blocks to complete the preliminary error correction of the text. However, the error correction effect of the formed preliminary corrected text may not be accurate, so the preliminary corrected text is corrected and evaluated according to the original text to obtain correction evaluation data, and the selected word level blocks are updated according to the correction evaluation data to obtain updated word level blocks, and then the updated word level blocks are spliced ​​into the target corrected text to obtain a more accurate corrected text, thereby improving the accuracy of text error correction.

[0089] In step S101 of some embodiments, the original text is a text with errors, and the errors are specifically at least one of grammatical errors, spelling errors, punctuation errors, and format errors. In this embodiment, the original text can be directly input, or it can be obtained by performing voice recognition on input voice data through automatic voice recognition technology, or it can be obtained by performing content recognition on input pictures through OCR recognition technology, and this embodiment does not specifically limit the input method of the original text.

[0090] For example, if in an insurance business scenario, the user will use the insurance service software to make insurance business inquiries. The user can directly enter the original text to complete the query, or can ask and answer questions with the intelligent voice assistant through voice. In order to improve the fluency of the question and answer, the user's voice data needs to be recognized. Therefore, this embodiment recognizes the voice data through automatic speech recognition technology to obtain the original text, and performs text error correction processing on the original text, so that the intelligent voice assistant receives more accurate text and makes more accurate and fluent questions and answers.

[0091] See also Figure 2 In some embodiments, step S102 may include but is not limited to steps S201 to S203:

[0092] Step S201, encoding the original text to obtain original encoded data;

[0093] Step S202, performing word segmentation prediction on the original coded data to obtain word segmentation sequence information; wherein the word segmentation sequence information represents the word division sequence in the original text;

[0094] Step S203, performing word segmentation processing on the original text according to the word segmentation order information to obtain original word segmentation blocks.

[0095] In step S201 of some embodiments, the original text is encoded by a pre-trained language representation model to obtain original encoded data, and the original encoded data is represented by a vector. By converting the original text into a computer-readable language, subsequent word segmentation processing is facilitated.

[0096] It should be noted that the pre-trained language representation model is BERT, and the original text is encoded by BERT to obtain the original encoded data.

[0097] In step S202 of some embodiments, the word segmentation order information is the word segmentation order of the original text, and is also the division boundary of the original text. The word segmentation order information can be used to clearly identify where the original text needs to be divided. It should be noted that in this embodiment, the word segmentation order information representing the division order of the original text is obtained by performing word segmentation prediction on the original encoded data through the word segmentation network.

[0098] For example, if the original text is "He is a person who is both gentle and humorous", the word segmentation order information determined by the word segmentation network is "11110110111", where the word boundaries are represented by 0 and 1, 1 means that the word needs to be segmented before the current character, and 0 means that the word does not need to be segmented before the current character. Therefore, through the word segmentation order information, it can be known that "he", "is", and "a" are all independent words, while "warm and generous" and "youmo" are combined words.

[0099] In step S203 of some embodiments, as disclosed above, the word segmentation order information represents the division order of the original text, and the original text is directly segmented according to the word segmentation order information to obtain original word segmentation blocks, and the divided words are represented in the form of blocks.

[0100] For example, as disclosed above, the word segmentation order information is "11110110111", and the original word segmentation blocks are determined to be "he", "is", "one", "both", "warm spear", "again", "youmo", "of", and "people".

[0101] In steps S201 to S203 shown in this embodiment, the original text is encoded into original encoded data, and then the original encoded data is predicted by the word segmentation network to obtain the word segmentation order information, so that the original text is segmented according to the word segmentation order information to obtain the original word segmentation blocks, so that the word segmentation operation of the original text is simple and accurate.

[0102] It should be noted that, because the original text is an erroneous text, there are also erroneous words in the original word segmentation blocks. In order to implement the error correction operation of the original text, it is necessary to filter out the correct word-level blocks based on the original word segmentation blocks to implement the error correction operation of the original text.

[0103] See also Figure 3In some embodiments, step S103 may include but is not limited to steps S301 to S303:

[0104] Step S301, obtaining original character information of an original word segmentation block; wherein the original character information includes original pronunciation information, original character shape information and original character meaning information;

[0105] Step S302, selecting preliminary word-level chunks from the candidate word-level chunks according to the original pronunciation information;

[0106] Step S303, selecting a selected word-level chunk from the preliminary word-level chunks according to the original character shape information and the original character meaning information.

[0107] In step S301 of some embodiments, the original word segmentation block can be a block of one character or a block composed of at least two characters. In order to achieve more accurate selection of word-level block screening, it is necessary to obtain the original character information of each original word segmentation block. The original character information includes original pronunciation information, original character shape information and original meaning information. The word-level block screening is performed in the candidate word-level blocks based on the three aspects of pronunciation, character shape and meaning, which can not only reduce the computing resources of the screening process, but also improve the accuracy of the screening, so as to screen out the correct selected word-level block.

[0108] In steps S302 to S303 of some embodiments, in the process of screening candidate word-level chunks, preliminary word-level chunks with similar pronunciation are first screened out from the candidate word-level chunks based on the original pronunciation information. It should be noted that in the preliminary word-level chunk screening process, the candidate word-level chunks are included in the word-level chunk data set, and each candidate word-level chunk carries candidate pronunciation information, candidate glyph information, and candidate meaning information. The similarity between the original pronunciation information and the candidate pronunciation information is first calculated to obtain a first similarity, and the candidate word-level chunks whose first similarity is within a preset similarity range are used as preliminary word-level chunks.

[0109] Specifically, the present embodiment mainly uses the pinyin fuzzy matching method to determine the screening of preliminary word-level chunks, so as to recall more candidate word-level chunks with similar sounds caused by front and back nasal sounds or flat and curled tongue. For example, if the original text is "the new machine sound shadow is a little less", the original word segmentation chunk is "sound shadow", and the original pronunciation information of the original word segmentation chunk is determined to be "sheng yi ng" through the pinyin library. Through the pinyin fuzzy matching method, the corresponding candidate pronunciation information is obtained as "shen yi ng", "shenyi n", "seng yi n", "seng yi ng", "sen yi ng", "sen yi n", "sheng yi n" and "sheng ying", and the candidate word-level chunks corresponding to the candidate pronunciation information are used as preliminary word-level chunks.

[0110] In step S303 of some embodiments, because there are multiple preliminary word-level chunks selected by the fuzzy matching of pronunciation in this embodiment, it is necessary to further screen out more accurate word-level chunks. After the pronunciation screening, the preliminary word-level chunks are screened according to the original character shape information and the original character meaning information to screen out preliminary word-level chunks with closer character shape and meaning as selected word-level chunks, thereby obtaining selected word-level chunks with a higher degree of error correction.

[0111] For example, as disclosed above, after the preliminary word-level chunks are screened out, they are further screened in the preliminary word-level chunks through bidirectional matching, that is, according to the glyphs and meanings of the characters before and after the original word-segmented chunks. If "sound" is the correct character, the selected word-level chunk is screened out as "sound", and if "shadow" is the correct character, the selected word-level chunk is screened out as "sound-shadow". It can be seen from this that the selected word-level chunks with more accurate meanings and glyphs will be further screened out in the preliminary word-level chunks, but there is also a problem. The selected word-level chunks screened out are not suitable for the sentence structure of the original text, so they need to be further optimized to achieve more accurate text error correction.

[0112] In steps S301 to S303 shown in the present embodiment, the candidate word-level blocks are gradually screened by using the original pronunciation information, original glyph information and original meaning information of the original word segmentation blocks. Preliminary word-level blocks are first screened out from the candidate word-level blocks according to the original pronunciation information, and then selected word-level blocks are screened out from the preliminary word-level blocks according to the original glyph information and the original meaning information. This makes the screening operation of the selected word-level blocks more efficient, saves screening resources, and can also screen out word-level blocks with a high degree of error correction.

[0113] like Figure 4 As shown, if the input original text is "He is a man who is both gentle and humorous", and there are multiple selected word-level blocks, not all of the selected word-level blocks can be directly spliced ​​into a preliminary corrected text, and the best combination of the selected word-level blocks needs to be selected as the preliminary corrected text.

[0114] See also Figure 5 In some embodiments, step S104 may include but is not limited to steps S501 to S505:

[0115] Step S501, selecting a reference word-level chunk from the selected word-level chunks;

[0116] Step S502, filtering out the next word-level chunk from the selected word-level chunks according to the reference word-level chunk; wherein the next word-level chunk is the selected word-level chunk next to the reference word-level chunk;

[0117] Step S503: Predict the selection probability of the next word-level chunk based on the reference word-level chunk to obtain the selection prediction probability.

[0118] Step S504: Screen out the selected word-level chunks from the next word-level chunks according to the selection prediction probability.

[0119] Step S505: Concatenate the reference word-level chunk and the selected word-level chunk to obtain the preliminary corrected text.

[0120] In steps S501 to S502 of some embodiments, the generation of the preliminary corrected text does not directly concatenate the selected word-level chunks. During the concatenation process, the context relationship needs to be considered to screen out the preliminary corrected text with smooth context. Specifically, first select the reference word-level chunk from the selected word-level chunks, and then select the next word-level chunk from the selected word-level chunks according to the reference word-level chunk. The next word-level chunk is the word-level chunk to be concatenated after the reference word-level chunk. As Figure 4 shown, if the selected reference word-level chunk is "他" (he), it is determined that the next word-level chunk can be "這個" (this), "是" (is); if the reference word-level chunk is "个" (a), it is determined that the next word-level chunk can be "歌姬" (goddess of song), "祭文" (funeral oration), "既" (already). Thus, it can be seen that first determine the reference word-level chunk, then determine the next word-level chunk, and after partial concatenation, the reference word-level chunk and the next word-level chunk will be updated.

[0121] In step S503 of some embodiments, as previously disclosed, there are multiple next word-level chunks, so it is necessary to predict the selection probability of the next word-level chunk based on the reference word-level chunk to obtain the selection prediction probability, and the selection prediction probability represents the probability that the next word-level chunk can be used as the word-level chunk to be concatenated with the reference word-level chunk. Specifically, the selection prediction probability can be determined according to the smoothness of the context between the reference word-level chunk and the next word-level chunk, and the higher the selection prediction probability, the higher the smoothness of the context. For example, if the reference word-level chunk is "他" (he), the selection prediction probability of determining the next word-level chunk as "是" (is) is the highest, indicating that it is more suitable to select the next word-level chunk as "是" (is) to participate in the concatenation of the preliminary corrected text.

[0122] In steps S504 to S505 of some embodiments, the next word-level chunk with the maximum selection prediction probability is used as the selected word-level chunk, and then the reference word-level chunk and the selected word-level chunk are concatenated. It should be noted that after the first round of concatenation of the reference word-level chunk and the selected word-level chunk, the selected word-level chunk is used as the reference word-level chunk for the next round, and continue to select the next word-level chunk for concatenation until the last word-level chunk is concatenated and the preliminary corrected text is output.

[0123] For example, as Figure 4As shown, first determine the reference word-level block as "he", then determine the selected word-level block as "yes", then update the reference word-level block as "yes", and continue to determine the updated selected word-level block as "individual", thereby gradually updating and splicing to determine the preliminary corrected text as "He is a warm and humorous person".

[0124] In steps S501 to S505 shown in this embodiment, reference word-level chunks are gradually selected, and then selection probability prediction is performed on each next word-level chunk based on each reference word-level chunk to obtain selection prediction probability, and a selected word-level chunk is screened out from the next word-level chunk according to the selection prediction probability. Thus, accurate word-level chunks are gradually updated and screened, and spliced ​​to obtain a more accurate preliminary corrected text.

[0125] As disclosed above, because the selected word-level chunks are affected by erroneous characters in the original text, the selected word-level chunks are not very accurate, so the accuracy of the formed preliminary corrected text may not be high. Therefore, it is necessary to perform a correction evaluation on the preliminary corrected text to analyze whether the preliminary corrected text can be output as a correct corrected text.

[0126] See also Figure 6 In some embodiments, step S105 may include but is not limited to steps S601 to S606:

[0127] Step S601, obtaining original phrase information of the original text through a preset original correction evaluation model; wherein the original phrase information includes: original word meaning information, original word form information and original word pronunciation information;

[0128] Step S602, obtaining corrected phrase information of the preliminary corrected text through the original correction evaluation model; wherein the corrected phrase information includes: corrected word meaning information, corrected word form information and corrected word pronunciation information;

[0129] Step S603, calculating the similarity between the original word meaning information and the corrected word meaning information by using the original correction evaluation model to obtain the word meaning similarity;

[0130] Step S604, calculating the similarity between the original word form information and the corrected word form information by using the original correction evaluation model to obtain the word form similarity;

[0131] Step S605, calculating the similarity between the original word pronunciation information and the corrected word pronunciation information by using the original correction evaluation model to obtain the word pronunciation similarity;

[0132] Step S606, concatenating the word meaning similarity, word form similarity and word pronunciation similarity to obtain correction evaluation data.

[0133] In steps S601 to S602 of some embodiments, when correcting and evaluating the preliminary corrected text, the original phrase information of the original text and the corrected phrase information of the preliminary corrected text can be obtained. The original phrase information includes: original word meaning information, original word form information and original word pronunciation information, and the corrected phrase information includes: corrected word meaning information, corrected word form information and corrected word pronunciation information. It can be seen that correcting and evaluating the preliminary corrected text from the three aspects of word pronunciation, word form and word meaning, and using the phrase level to perform the correction evaluation, can efficiently and accurately complete the correction evaluation.

[0134] In some embodiments, in step S603 to step S605, the word meaning similarity is obtained by calculating the similarity between the original word meaning information and the corrected word meaning information, and the word form similarity is obtained by calculating the similarity between the original word form information and the corrected word form information, and then the word pronunciation similarity is obtained by calculating the similarity between the original word pronunciation information and the corrected word pronunciation information, so as to use the similarity of word meaning, word form and word pronunciation as the correction evaluation of the preliminary correction text. For example, if the character composition of the original text is [c i ;···;c j ], the character composition of the initial corrected text is The probability of replacing the original text with the preliminary corrected text is determined by calculating the similarity of word meaning, word form and word pronunciation. Replace c k The probability of . Where c is the character in the original text, To make preliminary corrections to the characters in the text, i, j, k are the character numbering sequences.

[0135] In step S606 of some embodiments, in this embodiment, the word meaning similarity, word form similarity and word pronunciation similarity can be spliced ​​by any one of weighted summation, summation and average value, and this embodiment does not specifically limit the splicing method of word meaning similarity, word form similarity and word pronunciation similarity. Specifically, the original correction evaluation model is a scoring function, and the scoring function is:

[0136]

[0137] In the formula, cem is the error correction evaluation data, i, j, k are the character numbering sequence, s is the original text, Given the input original text s, the characters in the initial correction text are used Replace the character c of the original text k The probability, p(c k ∣c k ,s) is the preset initial evaluation probability.

[0138] Specifically, a concatenated value is obtained by concatenating word meaning similarity, word form similarity and word pronunciation similarity, and then input into a scoring function to obtain corrected evaluation data.

[0139] In steps S601 to S606 shown in the present embodiment, by using the similarity between the original text and the preliminary corrected text in terms of word meaning, word shape and word pronunciation as correction evaluation data for the preliminary corrected text, the degree of error correction of the preliminary corrected text can be represented more numerically, so as to determine whether to use the preliminary corrected text as the target corrected text based on the correction evaluation data.

[0140] As disclosed above, the degree of correction accuracy of the preliminary corrected text is determined by correcting the evaluation data. If the correction evaluation data is greater than the preset evaluation threshold, indicating that the preliminary corrected text is correct, the preliminary corrected text can be directly output as the target corrected text to complete the error correction of the original text. If the correction evaluation data is less than or equal to the evaluation threshold, indicating that there are still erroneous characters in the preliminary corrected text, the preliminary corrected text still needs to be further updated and continuously optimized until the updated correction evaluation data is greater than the evaluation threshold, and then the target corrected text is determined. It can be seen from this that the present application will dynamically adjust the corrected text, continuously optimize the corrected text, and improve the accuracy of text error correction.

[0141] See also Figure 7 In some embodiments, step S106 includes but is not limited to steps S701 to S703:

[0142] Step S701, adjusting the original word segmentation block according to the correction evaluation data to obtain an updated word segmentation block;

[0143] Step S702, filtering out new word-level chunks from candidate word-level chunks according to the updated word-level chunks;

[0144] Step S703: updating the selected word-level chunks according to the newly added word-level chunks to obtain updated word-level chunks.

[0145] In step S701 of some embodiments, the original word segmentation block is adjusted according to the corrected evaluation data, that is, the corrected evaluation data is compared with the evaluation threshold. If the corrected evaluation data is less than or equal to the evaluation threshold, the original word segmentation block needs to be corrected, that is, the original text is segmented again according to the word segmentation network to obtain an updated word segmentation block, and the updated word segmentation block is not completely consistent with the original word segmentation block. Therefore, the word segmentation is first adjusted dynamically to further update the selected word-level block according to the dynamically adjusted word segmentation block, so as to realize the dynamic adjustment of the corrected text.

[0146] In step S702 of some embodiments, after the word segmentation block is updated, a new word-level block is simultaneously selected from the candidate word-level blocks based on the updated word segmentation block, and the selection of the new word-level block is also based on the pronunciation, shape and meaning of the updated word segmentation block from the candidate word-level blocks. The whole process is the same as the selection process of the selected word-level block, and will not be repeated here.

[0147] In step S703 of some embodiments, the selected word-level blocks are updated according to the newly added word-level blocks, that is, the newly added word-level blocks and the selected word-level blocks are combined into updated word-level blocks to obtain a larger number of word-level blocks, so that more word-level blocks can be selected in the text splicing process and a more accurate corrected text can be spliced ​​out.

[0148] It should be noted that after the updated word-level chunks are obtained, word-level chunks are dynamically generated as corrected word-level chunks for text concatenation, so as to screen out the best combination from the corrected word-level chunks and obtain a more accurate corrected text.

[0149] In steps S701 to S703 shown in the present embodiment, the original word segmentation blocks are adjusted to obtain updated word segmentation blocks, and then updated word-level blocks are screened out from the candidate word-level blocks based on the updated word segmentation blocks, so that the updated word-level blocks and the selected word-level blocks are combined into updated word-level blocks, thereby realizing dynamic adjustment of the updated word-level blocks, so as to facilitate dynamic adjustment of the corrected text and obtain more accurate corrected text.

[0150] In step S107 of some embodiments, after the updated word-level chunks are generated, the updated word-level chunks need to be spliced ​​into a target corrected text, and the generation process of the target corrected text is the same as the generation process of the preliminary corrected text. Specifically, the generation process of the preliminary corrected text and the target corrected text can also be implemented by a modified greedy search algorithm, and the modified greedy search algorithm is to set the starting point of the search and determine the initial candidate path of the search, and the starting point is also the selected word-level chunk, and the word-level chunks are gradually spliced, and finally the target corrected text is output.

[0151] For example, Figure 8 As shown, through Figure 8 It can be seen that the number of updated word-level chunks is greater than that of selected word-level chunks, and there are also correct updated word-level chunks corresponding to updated word-level chunks. Therefore, in the process of generating the target correction text, "he" and "is" are gradually selected, and the target correction text generated at the end is "he is a gentle and humorous person" to obtain a more accurate correction text and improve the accuracy of text correction.

[0152] See also Fig. 9 In some embodiments, after step S106, the text correction method may further include but is not limited to steps S901 to S902:

[0153] Step S901, calculating the loss of the target correction text and the preset verification text to obtain correction loss data;

[0154] Step S902: adjusting the model parameters of the original correction evaluation model according to the correction loss data to obtain a target correction evaluation model.

[0155] In step S901 of some embodiments, the verification text is a text that corresponds to the correct original text, which is used to verify the correction accuracy of the target correction text, and also to verify the correction evaluation accuracy of the original correction evaluation model. Therefore, the correction loss data is obtained by calculating the loss of the target correction text and the verification text, so as to judge the correction evaluation accuracy of the original correction evaluation model through the correction loss data.

[0156] Specifically, the correction loss data between the target correction text and the verification text can be calculated by loss functions such as mean square error, cross entropy, absolute error and logarithmic error. This embodiment does not impose specific restrictions on the loss function used to calculate the correction loss data. For example, if the cross entropy loss function is used to calculate the correction loss data, then the correction loss data is:

[0157]

[0158] in, To correct the loss data, p() is the cross entropy function, Y i is the verification text, and X is the target correction text.

[0159] In step S902 of some embodiments, the correction evaluation accuracy of the original correction evaluation model is characterized by correction loss data, so the model parameters of the original correction evaluation model are adjusted according to the correction loss data, and the correction loss data is a dynamically updated loss data. After the correction loss data converges, the correction evaluation model corresponding to the final parameter adjustment is used as the target correction evaluation model to obtain a target correction evaluation model with more accurate correction evaluation, thereby improving the accuracy of text error correction.

[0160] In step S901 to step S902 shown in this embodiment, the correction loss data between the target correction text and the verification text is calculated to determine the correction evaluation accuracy of the original correction evaluation model. Then, the original correction evaluation model is adjusted according to the correction loss data to obtain a target correction evaluation model with a more accurate correction evaluation. Subsequently, the target correction evaluation model is involved in text correction to improve the accuracy of text correction.

[0161] like Figure 4 and Figure 8As shown, if the input original text of the embodiment of the present application is "He is a person who is both gentle and humorous", the original text is first encoded by the pre-trained language representation model, that is, the encoder to obtain the original encoded data, and then the original encoded data is segmented by the word segmentation network to obtain the word segmentation order information of "11110110111", and 1 represents the need to be segmented before the current character. Therefore, the original text is segmented according to the word segmentation order information to obtain the original word segmentation blocks, and the original word segmentation blocks are "he", "is", "individual", "both", "gentle", "again", "humorous", "of", and "people". Then, the original pronunciation information, original glyph information and original meaning information of the original word segmentation blocks are obtained, and the preliminary word level blocks are first screened out from the candidate word level blocks according to the original pronunciation information, and then the selected word level blocks are screened out from the preliminary word level blocks according to the original glyph information and the original meaning information, so as to screen out the selected word level blocks that can correct the errors in the original word segmentation blocks from the three aspects of pronunciation, glyph and meaning. In the process of splicing the selected word-level chunks into the preliminary corrected text, first select a reference word-level chunk from the selected word-level chunks, and then select the next selected word-level chunk of the reference word-level chunk as the next word-level chunk. Select and evaluate the next word-level chunk based on the reference word-level chunk to select the next word-level chunk with a more fluent context as the selected word-level chunk, and then gradually splice the reference word-level chunk and the selected word-level chunk to generate the preliminary corrected text. Figure 4 It can be seen that the generated preliminary corrected text is "He is a warm and humorous person", so it is necessary to perform correction evaluation processing on the preliminary corrected text based on the original text to determine the accuracy of the error correction of the preliminary corrected text. By obtaining the corrected word meaning information, corrected word form information and corrected word pronunciation information of the preliminary corrected text, and then obtaining the original word meaning information, original word form information and original word pronunciation information of the original text, the word meaning similarity between the original word meaning information and the corrected word meaning information is calculated, the word form similarity between the original word form information and the corrected word form information is calculated, and then the word pronunciation similarity between the original word pronunciation information and the corrected word pronunciation information is calculated, so as to determine the correction evaluation data of the preliminary corrected text through the word meaning similarity, word form similarity and word pronunciation similarity. Therefore, the error correction accuracy of the preliminary corrected text is evaluated by the similarity between the word meaning, word form and word pronunciation, and the correction evaluation data that more accurately represents the error correction accuracy is obtained. By comparing the correction evaluation data with a preset evaluation threshold, if the correction evaluation data is less than or equal to the evaluation threshold, the original word segmentation block needs to be adjusted to an updated word segmentation block, and then the newly added word level block is screened out from the candidate word level block through the updated word segmentation block, so as to add the newly added word level block to the selected word level block to obtain the updated word level block, and then the updated word level block is spliced ​​into the target corrected text. Therefore, the embodiment of the present application continuously optimizes the word segmentation and word level blocks to optimize the corrected text, obtain a more accurate corrected text, and improve the accuracy of text error correction.

[0162] See also Fig.10 The present application also provides a text error correction device, which can implement the above text error correction method, and the device includes:

[0163] The text acquisition module 1001 is used to acquire the original text;

[0164] The word segmentation module 1002 is used to perform word segmentation processing on the original text to obtain original word segmentation blocks;

[0165] The chunk filtering module 1003 is used to filter out selected word-level chunks from preset candidate word-level chunks according to the original word-segmented chunks;

[0166] The chunk concatenation module 1004 is used to concatenate the selected word-level chunks to obtain a preliminary corrected text;

[0167] The correction evaluation module 1005 is used to perform correction evaluation processing on the preliminary correction text according to the original text to obtain correction evaluation data; wherein the correction evaluation data represents the correction accuracy of the preliminary correction text;

[0168] A chunk updating module 1006, configured to update the selected word-level chunk according to the correction evaluation data to obtain an updated word-level chunk;

[0169] The corrected text output module 1007 is used to splice the updated word-level chunks to obtain a target corrected text.

[0170] The specific implementation of the text correction device is basically the same as the specific implementation of the above-mentioned text correction method, and will not be repeated here.

[0171] The embodiment of the present application also provides a computer device, the computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the above text error correction method when executing the computer program. The computer device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0172] See also Fig.11 , Fig.11 The hardware structure of a computer device according to another embodiment is shown, and the computer device includes:

[0173] The processor 1101 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0174] The memory 1102 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1102 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1102, and the processor 1101 calls and executes the text error correction method of the embodiment of this application;

[0175] Input / output interface 1103, used to implement information input and output;

[0176] The communication interface 1104 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WI FI, Bluetooth, etc.);

[0177] A bus 1105 that transmits information between various components of the device (e.g., the processor 1101, the memory 1102, the input / output interface 1103, and the communication interface 1104);

[0178] The processor 1101 , the memory 1102 , the input / output interface 1103 and the communication interface 1104 are connected to each other in communication within the device via the bus 1105 .

[0179] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the above-mentioned text error correction method is implemented.

[0180] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0181] The text error correction method and apparatus, computer equipment and storage medium provided in the embodiments of the present application obtain original word segmentation blocks by segmenting the original text, and then select the correct selected word segmentation blocks as the original word segmentation blocks from the candidate word-level blocks, and splice the selected word segmentation blocks into a preliminary corrected text. In order to determine whether the preliminary corrected text is correct, the preliminary corrected text is corrected and evaluated according to the original text to obtain correction evaluation data, so as to determine the degree of correction of the preliminary corrected text according to the correction evaluation data. Then, the selected word-level blocks are further optimized according to the correction evaluation data to achieve the optimization of the preliminary corrected text, so as to output a target corrected text with higher correction accuracy, thereby improving the accuracy of text error correction.

[0182] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0183] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0184] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0185] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0186] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0187] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0188] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0189] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0190] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0191] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0192] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A text error correction method, characterized in that: The method comprises: Get the original text; Performing word segmentation processing on the original text to obtain original word segmentation blocks; Filtering out selected word-level chunks from preset candidate word-level chunks according to the original word-segmented chunks; splicing the selected word-level chunks to obtain a preliminary corrected text; Performing correction evaluation processing on the preliminary corrected text according to the original text to obtain correction evaluation data; wherein the correction evaluation data represents the correction accuracy of the preliminary corrected text; Performing an update process on the selected word-level chunk according to the correction evaluation data to obtain an updated word-level chunk; The updated word-level chunks are concatenated to obtain a target corrected text.

2. The method according to claim 1, characterized in that The step of performing correction evaluation processing on the preliminary corrected text according to the original text to obtain correction evaluation data includes: Obtaining original phrase information of the original text through a preset original correction evaluation model; wherein the original phrase information includes: original word meaning information, original word form information and original word pronunciation information; Acquire the corrected phrase information of the preliminary corrected text through the original correction evaluation model; wherein the corrected phrase information includes: corrected word meaning information, corrected word form information and corrected word pronunciation information; Calculating the similarity between the original word meaning information and the corrected word meaning information by using the original correction evaluation model to obtain word meaning similarity; Calculating the similarity between the original word form information and the corrected word form information by using the original correction evaluation model to obtain word form similarity; Calculating the similarity between the original word pronunciation information and the corrected word pronunciation information by using the original correction evaluation model to obtain word pronunciation similarity; The word meaning similarity, the word form similarity and the word pronunciation similarity are concatenated to obtain the correction evaluation data.

3. The method according to claim 2, characterized in that After the updated word-level chunks are concatenated to obtain a target corrected text, the method further includes: Calculating the loss of the target correction text and the preset verification text to obtain correction loss data; The model parameters of the original correction evaluation model are adjusted according to the correction loss data to obtain a target correction evaluation model.

4. The method according to any one of claims 1 to 3, characterized in that: The updating process of the selected word-level chunk according to the correction evaluation data to obtain the updated word-level chunk comprises: Performing word segmentation adjustment on the original word segmentation block according to the correction evaluation data to obtain an updated word segmentation block; Filtering out new word-level chunks from the candidate word-level chunks according to the updated word-level chunks; The selected word-level chunks are updated according to the newly added word-level chunks to obtain the updated word-level chunks.

5. The method according to any one of claims 1 to 3, characterized in that: The step of splicing the selected word-level chunks to obtain a preliminary corrected text includes: selecting a reference word-level chunk from the selected word-level chunks; Filtering out a next word-level chunk from the selected word-level chunk according to the reference word-level chunk; wherein the next word-level chunk is the selected word-level chunk next to the reference word-level chunk; Predicting the selection probability of the next word-level chunk according to the reference word-level chunk to obtain a selection prediction probability; Filtering a selected word-level chunk from the next word-level chunk according to the selection prediction probability; The reference word-level chunks and the selected word-level chunks are concatenated to obtain the preliminary corrected text.

6. The method according to any one of claims 1 to 3, characterized in that: The selecting word-level chunks from preset candidate word-level chunks according to the original word-segmented chunks includes: Acquire original character information of the original word segmentation block; wherein the original character information includes original pronunciation information, original character shape information and original character meaning information; Filtering out preliminary word-level chunks from the candidate word-level chunks according to the original pronunciation information; The selected word-level chunks are selected from the preliminary word-level chunks according to the original character shape information and the original character meaning information.

7. The method according to any one of claims 1 to 3, characterized in that: The word segmentation processing is performed on the original text to obtain the original word segmentation blocks, including: Encoding the original text to obtain original encoded data; Performing word segmentation prediction on the original coded data to obtain word segmentation order information; wherein the word segmentation order information represents the word division order in the original text; The original text is segmented according to the segmentation order information to obtain the original segmentation blocks.

8. A text error correction device, characterized in that: The device comprises: A text acquisition module is used to acquire the original text; A word segmentation module, used for performing word segmentation processing on the original text to obtain original word segmentation blocks; A chunk screening module, used to screen out selected word-level chunks from preset candidate word-level chunks according to the original word-segmentation chunks; A chunk splicing module, used for splicing the selected word-level chunks to obtain a preliminary corrected text; A correction evaluation module, configured to perform correction evaluation processing on the preliminary corrected text according to the original text to obtain correction evaluation data; wherein the correction evaluation data represents the correction accuracy of the preliminary corrected text; A chunk updating module, configured to update the selected word-level chunk according to the correction evaluation data to obtain an updated word-level chunk; The corrected text output module is used to splice the updated word-level blocks to obtain a target corrected text.

9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the text error correction method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the text error correction method according to any one of claims 1 to 7 is implemented.