A text error correction method based on multi-dimensional dynamic candidate sets

Through the text error correction method of multidimensional dynamic candidate sets, the character error probability is calculated using the BERT and Transformer modules, and combined with the soft masking and feature fusion modules, the glyph similar candidate set is dynamically generated, solving the problem of low-frequency errors and glyph constraint correlation unutilized , achieving more efficient text error correction performance.

CN118673908BActive Publication Date: 2024-11-22HANGZHOU DIANZI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411147467.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-11-22
Estimated Expiration
2044-08-21

AI Technical Summary

Technical Problem

Existing text error correction methods lack sensitivity in dealing with low-frequency character errors in domain text, and do not fully utilize the correlation between character fine-grained features and glyph constraints, resulting in error correction bias.

Method used

Using text error correction method based on multidimensional dynamic candidate sets, character error probability is calculated through BERT pre-trained model and Transformer module, combined with soft mask encoding and feature fusion modules, glyph similarity candidate sets are dynamically generated, and character similarity and dispersion detection are used. The algorithm performs error correction.

Benefits of technology

Improve the accuracy and efficiency of text error correction, especially in dealing with low-frequency errors and natural language ambiguity, and significantly improve error correction performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118673908B_ABST
    Figure CN118673908B_ABST
Patent Text Reader

Abstract

The present invention discloses a text error correction method based on a multidimensional dynamic candidate set, comprising the following steps: Step 1, obtaining input text from the SIGHAN series data set for Chinese character recognition text error correction S ; Step 2, for input text S , token embedding, segment embedding, position embedding, and part-of-speech embedding are combined through vector addition through text encoder encoding to obtain the final embedding representation of the input text and the corresponding embedding sequence E ; Step 3: embed the obtained sequence E , input to the error detection network, and use the attention mechanism to detect possible wrong characters, and output the error sequence L and error sequence L The probability of error P ; Step 4: Set the error sequence L and embedding sequence E Input to the language model, and the two are combined using soft masking encoding SOFT ' Encoding; Step 5, SOFT ' The code is taken as input, and the error correction network composed of the pre-trained BERT language error correction module and the feature fusion module is used to correct the erroneous characters and finally output the correct characters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of text error correction, and in particular to a text error correction method based on a multi-dimensional dynamic candidate set. Background Art

[0002] Text error correction is usually a follow-up task of character recognition and speech recognition, aiming to automatically identify and correct recognition, spelling, grammar and semantic errors, thereby improving text quality and readability. At present, the task of Chinese text error correction is limited by the lack of data sets, and the performance of the model is often limited by the quality of the training data. Therefore, in order to reduce the dependence on annotated data sets, the current mainstream text error correction models usually use a large amount of general error correction data for pre-training, and then fine-tune in the corresponding application field to make up for the lack of data sets. However, in practical applications, for some low-frequency error types, the model may find it difficult to learn effective error correction strategies due to insufficient samples. Therefore, solving the low-frequency error types of Chinese text has become a new research direction. In addition, text error correction also faces the problem of natural language ambiguity. At the same time, meeting the real-time and efficiency of error correction while ensuring the quality of error correction is also a problem worth studying.

[0003] At present, there are many methods for Chinese text error correction. Traditional text error correction methods mostly rely on statistical language models and rules. Although the rule-based method is intuitive and effective, it requires the participation of professionals to establish rules and cannot be applied on a large scale. The statistical learning method predicts errors by counting the probability of word sequences in the corpus, which solves the problem of large-scale processing of text data, but cannot solve the problem of error diversity. Subsequently, deep learning began to be applied to the field of text error correction. Subsequent researchers introduced sequence annotation methods into Chinese grammatical error detection, which improved the detection performance. The PLOME model uses semantic confusion sets in the training stage, which alleviates the problem of insufficient training sets to a certain extent. The DCN model solves the problem of semantic incoherence by strengthening the upper and lower information. Dingmin et al. proposed an end-to-end confusion set-guided encoder-decoder model to improve the error correction performance. The REALISE model will integrate multimodal features. The Soft-Masked BERT model proposes a soft masking strategy, which can alleviate the ambiguity of natural language error correction and improve the accuracy of recognition by retaining some original character features and pre-training with a large amount of data. The SpellGCN model uses a graph neural network to perform graph embedding encoding operations on similar pronunciations and similar glyphs, constraining the output range to be selected from similar glyphs and similar pronunciations. The BERT model is only used to calculate word vectors, and the calculation results are used for error correction, with a low error probability.

[0004] However, there are still two problems with current text correction methods, which limit the accuracy of text correction:

[0005] (1) In actual application scenarios, the text correction algorithm lacks sensitivity in dealing with low-frequency character errors in domain texts, which limits the application capability of text error correction in specific scenarios.

[0006] (2) The correlation between fine-grained character features and glyph constraints has not been fully utilized. Text error correction is often closely related to the glyph features of characters. The current method still uses a simple random deletion strategy for character replacement during training, which loses the original glyph features and deviates from the original characters. This makes the subsequent error correction process inevitably have error correction deviations. Summary of the invention

[0007] In view of the deficiencies in the prior art, the present invention proposes a text error correction method based on a multi-dimensional dynamic candidate set.

[0008] In order to solve the above technical problems, the technical solution of the present invention is:

[0009] Step 1: Obtain the SIGHAN series of datasets for Chinese character recognition text error correction and obtain the input text S.

[0010] We use the SIGHAN series of public general datasets for text error correction tasks to divide the dataset into training sets, validation sets, and test sets to provide basic data support for subsequent experiments.

[0011] Step 2: Use the BERT pre-trained model as the text encoder to encode the given input text sequence S = {s1, s2, ..., s n}, before inputting into the text error detection model, the token embedding, segment embedding, position embedding, and part-of-speech embedding are merged through vector addition to obtain the final embedding representation of the input text, and the corresponding embedding sequence E = (e1, e2, e3..., e n ). Assuming the input character is xi, then embedding e i The representation can be represented using character embedding, position embedding, and segmentation embedding. The embedded sequence E input is then passed to the text error detection model for further processing and analysis.

[0012] Step 3: Input the obtained embedding sequence E into the error detection network composed of multiple Transformer modules, use the attention mechanism of the Transformer module to detect the characters that may be wrong, and output the result in the form of probability P. The error probability of the i-th character in the output error sequence L is p i In which, p i It can be calculated by the following formula:

[0013]

[0014] Where P d (g i =1|X) represents the probability that the detection network outputs the i-th character as an incorrect label under the given input (X). Here σ represents the Sigmoid function, which is used to map the output of the linear combination to the interval [0,1], thereby representing the probability. represents the hidden state of the i-th character in the character sequence, W d represents the weights that are constantly adjusted during training, b d is the bias value used by the model in the linear change process. Step 4: Input the error sequence L and the text sequence E into the language model, and use soft masking coding to combine the two into SOFT' coding.

[0015] Step 5: Take the SOFT′ code as input, and use the error correction network composed of the BERT language error correction module and the feature fusion module to correct the erroneous characters, and finally output the correct characters Y=(y1, y2, y3, ..., yn).

[0016] Preferably, the specific steps of step 4 include:

[0017] Step 4.1: First, calculate the soft-masked embedding code by combining the weighted sum of the character embedding code E and the error probability P. For example, the i-th soft code of the character is i Defined as:

[0018] soft i =p i ·e mask +(1-p i )·e i

[0019] In the formula, e mask It is a mask embedding used to provide replacement information when a character is considered to be an error; i is the input embedding, representing the encoding of the original character. i As the error rate increases and approaches e mask On the contrary, when the error rate is low, it is close to e i This soft mask encoding allows the model to flexibly account for potential character errors while preserving the original character information.

[0020] Step 4.2: Input the obtained soft mask mark SOFT′=(soft1, soft2, soft3, ..., softn) into the character error correction network.

[0021] Preferably, the specific method of step 5 is: inputting the error correction results and error sequences obtained by the BERT language error correction module as well as the radicals, characters and key stroke features into the feature fusion module, and matching the candidate characters with similar shapes and domain characters through the character similarity algorithm. The algorithm calculation process of the Chinese character similarity is as follows:

[0022]

[0023] In the formula, Sim(M1, M2) represents the similarity between M1 and M2, n represents the total number of features, including the number of strokes, the number of Chinese character structures, radicals and key stroke shapes, and f i (M1, M2) represents the character similarity in the i-th feature space, and Wi represents the weight of the i-th feature;

[0024] The obtained results are summed up for similarity probability and then normalized. Then, the character discreteness is calculated. If the discreteness algorithm does not change, it is output; otherwise, the obtained results are input into the language model for multiple iterations until the character discreteness detection algorithm determines that it does not change and outputs the results.

[0025] Preferably, the specific steps of step 5 include:

[0026] Step 5.1: First, the obtained soft mask SOFT′ is input into the BERT language error correction module for text error correction. In this case, a multi-head attention mechanism is used to execute multiple attention functions in parallel to capture information at different positions in the input sequence and output the error correction result.

[0027] Step 5.2: The network also includes a feed-forward neural network (FFN), which performs nonlinear transformation on the output of the BERT language error correction module to enhance the expressiveness of the model. The calculation formula is as follows:

[0028] FFN(X)=max(0,XW1+b1)W2+b2

[0029] Where W1, W2 are weight matrices, and b1 and b2 are bias values.

[0030] Step 5.3: The error correction probability of each position in the sequence is normalized by the model using the softmax function to obtain the error probability P of the corresponding character. The error correction probability calculation formula for each position is as follows:

[0031] P c (y i = j | X) = softmax(Wh′ i +b2)[j]

[0032] Where P c (y i=j|X) represents the probability that the i-th character is corrected to the j-th character in the candidate character list under the condition of a given input sequence (X), h′ i is the hidden state output by the encoding module, and W and b2 are model parameters.

[0033] Step 5.4: The input of the feature fusion module is the correction text of the BERT language correction module. The correction results and error sequences, as well as characters, radicals and key stroke features are input into the feature fusion module together, and the character similarity algorithm is used to match the confusion set of candidate characters with similar glyphs and the confusion set of domain characters. The obtained results are summed up for similarity probability and then normalized. Then, the character discreteness is calculated. If the discreteness algorithm does not change, it is output; otherwise, the normalized result is input into the language model for multiple iterations until the character discreteness algorithm determines that it does not change, and the result is output.

[0034] As a preferred method, in order to effectively evaluate the similarity of multiple dimensional features of characters, a character discreteness detection algorithm is designed. The algorithm calculates the discreteness of each character to identify characters that may have errors. The following formula is used to calculate the discreteness of each character:

[0035]

[0036] F i =sqrt(T i ÷4)

[0037] Where, T i is the variance of discrete character detection, F i represents the discreteness of the character at the ith position, μ i Represents the average probability of the character at the i-th position in multiple dimensions. Here, based on the fusion result, the multidimensional discreteness of the character is calculated. At the same time, the discreteness of the character results generated by the detection in three dimensions is also calculated. When the discreteness of a character is less than 0.5, it is regarded as an untrustworthy character and marked as having an incorrect position. In this way, it can be judged whether the character iterative error correction process effectively corrects the wrong character.

[0038] Preferably, the error detection loss and the character error correction loss are optimized using cross entropy so that the network converges.

[0039] In order to accurately calculate the loss of the model, the cross entropy is used to optimize the error detection loss and character error correction loss so that the network converges. In the experiment, the loss of the model training process can be expressed as:

[0040]

[0041]

[0042] Among them, L d is the target loss for the detection network training, L c is the training loss of the text error correction network. The overall loss function is calculated using linear combination.

[0043] Loss = λL d +(1-λ)L c

[0044] Among them, λ∈[0,1] is the coefficient.

[0045] The present invention has the following characteristics and beneficial effects:

[0046] By adopting the above technical scheme, the present invention proposes a text error correction model based on a multi-dimensional dynamic candidate set, which adopts a two-stage error correction. In the error detection stage, the attention mechanism is used to calculate the character error probability, and this probability is summed and embedded with the character features. Subsequently, the embedded features are input into the language model for error correction. At the same time, through the character similarity detection algorithm, similar glyphs and domain knowledge candidate sets of the current erroneous character are dynamically generated. The character similarity algorithm is used to select the most similar characters from the candidate set for summation and normalization to generate the result, and then the language model is used for iterative error correction, and the character discreteness algorithm supervises the error correction, and the final result is output. Experiments were conducted on the SIGHAN series data sets and domain texts to verify the effectiveness of the method. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0048] Figure 1 The overall architecture diagram of the model of the present invention;

[0049] Figure 2 The structural diagram of the Chinese character error correction module of the present invention;

[0050] Figure 3 A schematic structural diagram of a Chinese character candidate character set dynamic generation module of the present invention. DETAILED DESCRIPTION

[0051] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0052] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings.

[0053] On the contrary, the present invention covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present invention as defined by the claims. Further, in order to make the public have a better understanding of the present invention, some specific details are described in detail in the detailed description of the present invention below. Those skilled in the art can fully understand the present invention without the description of these details.

[0054] This embodiment discloses a text error correction method based on a multi-dimensional dynamic candidate set. The present invention is further described below in conjunction with the accompanying drawings. Figure 1 It is the overall architecture diagram of the model of the present invention, which includes the following steps:

[0055] Step 1: Obtain the SIGHAN series of datasets for Chinese character recognition text error correction and obtain the input text S.

[0056] Specifically, we use the SIGHAN series of public general datasets for text error correction tasks and divide the dataset into training sets, validation sets, and test sets to provide basic data support for subsequent experiments.

[0057] Step 2: For the input text S, assuming the input character is xi, then embed e i The representation can be represented using character embedding, position embedding, and segmentation embedding. Calculate the sum of these three embeddings, the embedding sequence E = (e1, e2, e3..., e n ) is then passed as input to the text error detection model for further processing and analysis.

[0058] Specifically, the BERT pre-trained model is used as the text encoder to encode the given input text sequence S = {s1, s2, ..., s n}, before inputting into the text error detection model, the token embedding, segment embedding, position embedding, and part-of-speech embedding are merged through vector addition to obtain the final embedding representation of the input text, and the corresponding embedding sequence E = (e1, e2, e3..., e n )express.

[0059] Step 3: Input the obtained embedded sequence E into the error detection network. The output of the detection network is a character label sequence (L), which consists of a series of character labels. The value of each label represents the probability of the corresponding character error.

[0060] Specifically, the embedded sequence E is input into the error detection network of this paper composed of multiple Transformer modules, and the attention mechanism is used to detect text errors, where the error probability p of the i-th character in the output sequence L is i It can be calculated by the following formula:

[0061]

[0062] Where P d (g i =1|X) represents the probability that the detection network outputs the i-th character as an incorrect label under the given input (X). Here σ represents the Sigmoid function, which is used to map the output of the linear combination to the [0,1] interval to represent the probability. W represents the hidden state of the i-th character in the character sequence. d Represents the weights that are constantly adjusted during training. b d is the bias value used by the model during the linear change process.

[0063] Step 4: Input the error sequence L and the text sequence E into the language model. The error correction network aims to correct the erroneous characters of the error detection network into correct characters Y = (y1, y2, y3, ..., yn).

[0064] Furthermore, the specific steps of step 4 include:

[0065] Step 4.1: First, calculate the soft-masked embedding code by combining the weighted sum of the character embedding code E and the error probability P. For example, the i-th soft code of the character is i Defined as:

[0066] soft i =p i ·e mask +(1-p i )·e i

[0067] In the formula, e mask It is a mask embedding used to provide replacement information when a character is considered to be an error; i is the input embedding, representing the encoding of the original character. i As the error rate increases and approaches e mask On the contrary, when the error rate is low, it is close to e i This soft mask encoding allows the model to flexibly account for potential character errors while preserving the original character information.

[0068] Step 4.2: Input the obtained soft mask mark SOFT′=(soft1, soft2, soft3, ..., softn) into the character error correction network.

[0069] Step 5: Figure 2 As shown in the figure, the error correction network consists of two parts, the BERT language error correction module and the feature fusion module. First, the obtained soft mask SOFT′ is input into the BERT language model for text error correction. The obtained error correction results and error sequences as well as radicals, characters and key stroke features are input into the feature fusion module, and the character similarity algorithm is used to match the candidate characters and domain characters with similar shapes. The obtained results are summed up for similarity probability and then normalized. The obtained results are input into the language model for multiple iterations until the character discreteness detection algorithm determines that it will no longer change, and the results are output.

[0070] Furthermore, the specific steps of step 5 include:

[0071] Step 5.1. First, the obtained soft mask SOFT′ is input into the BERT language model for text error correction. The error correction network is a multi-class annotation model based on BERT. The model consists of 12 encoder modules, each of which is tightly stacked to build its core architecture. The multi-head attention mechanism is used to execute multiple attention functions in parallel to capture information at different positions in the input sequence. The calculation formula is as follows:

[0072] MultiHead(Q,K,V)=Concat(head1;...;head h )W o

[0073] Among them, the attention head can be expressed as:

[0074]

[0075] In these expressions, Q, K, and V represent query, key, and value matrices, respectively, which are derived from the input sequence and the output of the previous encoding module. Each matrix is ​​weighted by a corresponding weight parameter W. i Q , and Represents a conversion.

[0076] Step 5.2: The error detection network also includes a feedforward neural network (FFN), which performs nonlinear transformation on the module output results to enhance the expression ability of the model. The calculation formula is as follows:

[0077] FFN(X)=max(0,XW1+b1)W2+b2

[0078] Where W1, W2 are weight matrices, and b1 and b2 are bias values.

[0079] Step 5.3: The error correction probability of each position in the sequence is normalized by the softmax function, and the calculation formula is as follows:

[0080] P c (y i = j | X) = softmax(Wh′ i +b2)[j]

[0081] Where P c (y i =j|X) represents the probability that the i-th character is corrected to the j-th character in the candidate character list under the condition of a given input sequence (X). h′ i is the hidden state output by the encoding module, and W and b2 are model parameters.

[0082] Step 5.4: Figure 3 As shown in FIG, the input of the feature fusion module is the error correction text of the BERT language model. The error correction text and the error detection feature, i.e., the feature containing the character error position information, are input into the feature fusion module together, and the character similarity algorithm is used to match the confusion set of candidate characters with similar glyphs and the confusion set of domain characters.

[0083] Specifically, the character similarity algorithm calculation process is as follows:

[0084]

[0085] In the formula, Sim(M1,M2) represents the similarity between M1 and M2, n represents the total number of features, including the number of strokes, the number of Chinese character structures, radicals and key stroke shapes, and f i (M1, M2) represents the character similarity in the i-th feature space, and Wi represents the weight of the i-th feature.

[0086] The obtained results are summed up for similarity probability and then normalized. Then, the character discreteness is calculated. If the discreteness algorithm does not change, it is output; otherwise, the normalized result is input into the language model for multiple iterations until the character discreteness algorithm determines that it does not change, and the result is output.

[0087] Step 5.5: In order to effectively evaluate the similarity of multiple dimensional features of characters, a character discreteness detection algorithm is designed. The algorithm calculates the discreteness of each character to identify characters that may have errors. The following formula is used to calculate the discreteness of each character:

[0088]

[0089] Fi =sqrt(T i ÷4)

[0090] Where, T i is the variance of discrete character detection, F i represents the discreteness of the character at the ith position, μ i Represents the average probability of the character at the i-th position in multiple dimensions.

[0091] In this embodiment, the multi-dimensional discreteness of the character is calculated based on the fusion result. At the same time, the discreteness of the character result generated by the detection in three dimensions is also calculated. When the discreteness of a character is less than 0.5, it is regarded as an untrustworthy character and marked as having an erroneous position. In this way, it can be determined whether the character iterative error correction process effectively corrects the erroneous character.

[0092] Step 6: Use cross entropy to optimize the error detection loss and character error correction loss so that the network converges.

[0093] Furthermore, the specific steps of step 6 include:

[0094] Step 6.1: In order to accurately calculate the loss of the model, the error detection loss and character error correction loss are optimized using cross entropy to make the network converge. In the experiment, the loss of the model training process can be expressed as:

[0095]

[0096] Among them, L d is the target loss for the detection network training, L c is the training loss of the text error correction network. The overall loss function is calculated using linear combination.

[0097] Loss = λL d +(1-λ)L c

[0098] Among them, λ∈[0,1] is the coefficient.

[0099] In addition, the present invention uses precision, recall and F1 score to evaluate the effectiveness of the method.

[0100] The experimental results of the comparison between the method of the present invention and existing methods such as Hybrid, FASPell, Confusionsnet, etc. on the SIGNHA series datasets are shown in Table 1.

[0101] Table 1 Performance comparison of different methods on the SIGNHA13 dataset

[0102]

[0103]

[0104] Table 2 Performance comparison of different methods on the SIGNHA14 dataset

[0105]

[0106] Table 3 Performance comparison of different methods on the SIGNHA15 dataset

[0107]

[0108]

[0109] It can be seen from Table 1, Table 2 and Table 3 that the method proposed in the present invention can effectively improve the text error correction effect, and the P, R and F1 indicators are significantly improved, which are better than other benchmark models. The experimental data show the effectiveness of the model proposed in the present invention for Chinese character recognition in complex scenes.

[0110] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions and variations of these embodiments including components are made without departing from the principles and spirit of the present invention, and still fall within the scope of protection of the present invention.

Claims

1. A text error correction method based on a multidimensional dynamic candidate set, characterized in that: The steps include: Step 1: Get the input text S from the SIGHAN series of Chinese character recognition text error correction datasets; Step 2: For the input text S, the token embedding, segment embedding, position embedding, and part-of-speech embedding are combined by vector addition through text encoder encoding to obtain the final embedding representation of the input text and the corresponding embedding sequence E = (e1, e2, e3..., e n )express; Step 3: Input the obtained embedding sequence E into the error detection network composed of several Transformer modules, and use the attention mechanism of the Transformer module to detect possible wrong characters, and output the error sequence L and the error probability P of the error sequence L; Step 4: Input the error sequence L and the embedded sequence E into the language model, and combine the two into SOFT′ encoding using soft masking encoding; Step 5: Take the SOFT′ code as input and use the error correction network composed of the pre-trained BERT language error correction module and feature fusion module to correct the erroneous characters. Specifically: The multi-head attention mechanism in the pre-trained BERT language error correction module executes multiple attention functions to capture information at different positions in the input sequence and output the error correction result. Then, the feedforward neural network in the pre-trained BERT language error correction module performs a nonlinear transformation on the output error correction result to enhance the expression ability of the model. The calculation formula is as follows: FFN(X)=max(0,XW1+b1)W2+b2 Where X is the input text sequence, W1, W2 are weight matrices, b1 and b2 are bias values; Finally, the error correction probability of each position is normalized using the softmax function to obtain the corresponding character probability; The error correction probability calculation method for each position is as follows: P c (y i =j|X)=softmax(Wh′ i +b2)[j] Where P c (y i =j|X) represents the probability that the i-th character is corrected to the j-th character in the candidate character list under the condition of a given input sequence X, h′ i is the hidden state output by the encoding module, W and b2 are model parameters; The error correction results and error sequences, as well as the characters, radicals and key stroke features are input into the feature fusion module together. The character similarity algorithm is used to match the confusion set of candidate characters with similar shapes and the confusion set of domain characters to obtain the similarity matching results. The similarity matching results are then summed up for similarity probability and normalized. Then, the character discreteness is calculated. If the discreteness algorithm does not change, it is output. On the contrary, the normalized result is input into the pre-trained BERT language model for multiple iterations until the character discreteness algorithm determines that it no longer changes, and finally outputs the correct character.

2. A text error correction method based on a multidimensional dynamic candidate set according to claim 1, characterized in that: The text encoder adopts the BERT pre-training model.

3. A text error correction method based on a multidimensional dynamic candidate set according to claim 1, characterized in that: The error probability of the i-th character in the error sequence L is p i The expression is as follows: Where P d (g i =1|X) represents the probability that the detection network outputs the i-th character as an incorrect label under the condition of a given input X. Here σ represents the Sigmoid function, which is used to map the output of the linear combination to the interval [0,1], thereby representing the probability. represents the hidden state of the i-th character in the character sequence, W d represents the weights that are constantly adjusted during training, b d is the bias value used by the model during the linear change process.

4. A text error correction method based on a multidimensional dynamic candidate set according to claim 3, characterized in that: In step 4, the soft masking coding method is to convert the i-th soft code of the character into i Defined as: soft i =p i ·e mask +(1-p i )·e i Then we get the soft mask mark SOFT′=(soft1, soft2, soft3, ..., softn), In the formula, e mask It is a mask embedding used to provide replacement information when a character is considered to be an error; i is the input embedding, representing the encoding of the original character, soft i As the error rate increases and approaches e mask On the contrary, when the error rate is low, it is close to e i .

5. A text error correction method based on a multidimensional dynamic candidate set according to claim 1, characterized in that: The character similarity algorithm calculation process is as follows: In the formula, Sim(M1,M2) represents the similarity between M1 and M2, n represents the total number of features, including the number of strokes, the number of Chinese character structures, radicals and key stroke shapes, and f i (M1, M2) represents the character similarity in the i-th feature space, and Wi represents the weight of the i-th feature.

6. A text error correction method based on a multidimensional dynamic candidate set according to claim 5, characterized in that: The character dispersion algorithm is as follows: F i =sqrt(T i ÷4) Where, T i is the variance of discrete character detection, F i represents the discreteness of the character at the ith position, μ i Represents the average probability of the character at the i-th position in multiple dimensions.

7. A text error correction method based on a multidimensional dynamic candidate set according to any one of claims 1 to 6, characterized in that: The error detection loss and character error correction loss are optimized using cross entropy to make the network converge. The loss expression during training is as follows: Among them, L d is the target loss for the detection network training, L c is the training loss of the text error correction network; The overall loss function is calculated using linear combination: Loss=λL d +(1-λ)L c Among them, λ∈[0,1] is the coefficient.