Chinese power text error detection method and system based on ALBert model
Through the Chinese power text error detection method based on the ALBert model, errors in Chinese text in the power system are automatically identified and corrected, and the problem of inefficient traditional manual audits is solved, the detection efficiency and accuracy are improved, and the stability and safety of the power system are ensured.
Patent Information
- Application Number
- CN202411734210.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-07
AI Technical Summary
The traditional manual review method is inefficient and cannot detect potential errors in Chinese texts in the power system in a timely and comprehensive manner, affecting the stability and safety of the power system.
The Chinese power text error detection method based on the ALBert model is adopted, and the typos, term misuse and logical errors in the text are automatically identified and corrected through word segmentation processing, feature extraction, sequence modeling and correction suggestions generation modules.
It improves the efficiency and accuracy of text error detection, reduces the time cost of human review, reduces the system risks caused by text errors, and ensures the stable operation of the power system.
Smart Images

Figure CN119577622A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of natural language processing, and more specifically, relates to a Chinese electric power text error detection method and system based on an ALBert model. Background Art
[0002] In the daily operation and maintenance of power systems, massive amounts of Chinese text data, such as operation records, fault reports, and equipment logs, carry critical operating information. The accuracy of these text data is directly related to the stability and safety of the power system. However, due to the huge amount of text and the large number of professional terms and complex expressions, the traditional manual review method is inefficient and easily affected by human factors, and cannot detect potential text errors in a timely and comprehensive manner. In this case, how to improve the efficiency of Chinese text error detection in power systems has become an important task to ensure the safe operation of power systems.
[0003] To address this challenge, it is necessary to develop automated text error detection tools specifically for power systems with the help of advanced natural language processing (NLP) technology and machine learning algorithms. Such tools can quickly process and analyze large amounts of Chinese text, automatically identify typos, misused terms, and logical errors, and make correction suggestions. By increasing the degree of automation in text error detection, not only can the detection efficiency be greatly improved and the time cost of manual review be reduced, but the system risks caused by text errors can also be significantly reduced, thereby providing a more reliable guarantee for the stable operation of the power system. The application of this technology will promote the further development of the power industry towards intelligence and efficiency, and also provide a powerful reference for text processing and error detection in other industries. Summary of the invention
[0004] In order to solve the deficiencies in the prior art, the present invention provides a Chinese electric power text error detection method and system based on the ALBert model.
[0005] The present invention adopts the following technical solution.
[0006] The first aspect of the present invention provides a Chinese electric power text error detection method based on the ALBert model, comprising the following steps:
[0007] Step 1: Perform word segmentation on the power text. By analyzing the contextual dependencies of the phrases in the text, the phrases with fixed semantic associations are processed into inseparable units. At the same time, the word segmentation granularity is dynamically adjusted according to the length of the power text. The word segmentation results are input into the ALBert model embedding layer. By assigning character-level and word-level weights to optimize the capture of contextual information, a semantic vector containing character-level, word-level and contextual associations is generated.
[0008] Step 2: Input the semantic vector into the feature extraction module, dynamically adjust the convolution kernel width, step size and pooling window size according to the length, complexity and error distribution characteristics of the power text, count the character repetition frequency and phrase distribution density through window sliding, extract local features at the character level, word level and syntactic level by combining multi-layer convolution operations, and use multi-dimensional local features to weightedly fuse feature representations of different granularities to generate a global error feature vector containing character repetition, word association and syntactic structure information;
[0009] Step 3: extract error labels from the global error feature vector, input the global error feature vector into the sequence modeling module, dynamically adjust the dependency weights between error labels, generate a label sequence based on the feature distribution, perform contextual logic verification on the label sequence, remove labels that do not match the context information, and adjust the order and range of labels based on the feature association of the power text to optimize the error label sequence;
[0010] Step 4: According to the optimized error label sequence, classify the error types corresponding to the labels, analyze the contextual semantics and syntactic relationships of the labels, and generate correction suggestions based on the error types by comparing the semantic consistency and syntactic dependency between the error labels and the adjacent contexts. Output a structured detection result containing the error start position, end position, and error type. At the same time, generate an error distribution map and a correction suggestion list based on the application scenario.
[0011] Preferably, step 1 comprises:
[0012] Parse the context dependency of the input power text, identify phrases and power terminology expressions with fixed semantic associations, and mark phrases with fixed semantic associations as indivisible units; calculate the granularity range of word segmentation based on the length of the text, dynamically adjust the word segmentation granularity, and generate the word segmentation results;
[0013] The word segmentation results are input into the embedding layer of the ALBert model. By utilizing the parameter sharing of ALBert, weights are assigned according to the semantic requirements of the power text. With the minimum model parameters as the goal, each word segmentation unit can capture multi-level semantic information.
[0014] The embedding layer of the ALBert model is used to generate a semantic vector containing character-level, word-level and context-related information. The character-level information mainly focuses on the precise expression of power units, identification symbols and keywords in the text. The word-level information reflects the relationship between terms and the overall meaning of the phrase. The context-related information uses the global semantic pattern in the power text to capture the dependencies and contextual characteristics of the text through the attention mechanism. The semantic vector finally generated integrates different levels of information at the character level, word level and context-related level.
[0015] Preferably, the step of calculating the word segmentation granularity range according to the text length, dynamically adjusting the word segmentation granularity, and generating the word segmentation result includes:
[0016] By analyzing the character length of the input text, the text is divided into three categories: short text, medium length text and long text;
[0017] Set the text with a character length of less than 50 as short text, the text with a character length between 50 and 200 as medium text, and the text with a character length of more than 200 as long text;
[0018] Short text, medium-length text and long text adopt gradual segmentation, balanced segmentation and aggregated segmentation strategies respectively; short text adopts gradual segmentation strategy, and the length of segmentation unit is set to 1 to 2 words, which is used to capture the semantic information of characters and words; medium-length text adopts balanced segmentation strategy, and the length of segmentation unit is set to 2 to 4 words, which is used to take into account semantic association and overall expression on the basis of words and phrases; long text adopts aggregated segmentation strategy, integrating semantically related words into a single segmentation unit, and the length of segmentation unit is set to 3 to 5 words.
[0019] Preferably, step 2 comprises:
[0020] The semantic vector is input into the feature extraction module, wherein the semantic vector includes character-level, word-level and context-related information in the power text, and also includes the distribution relationship between term phrases and fixed phrases extracted during word segmentation of the text;
[0021] The feature extraction parameters are adjusted according to the length and complexity of the input text; the convolution kernel width is used to scan the character and word combinations in the text, and the corresponding convolution kernel width is set for texts of different lengths; the step size is adjusted according to the distribution of the error features, and the step size is selected for different distribution areas for feature extraction and processing; the pooling window size is set according to the complexity of the text, and the feature information is extracted and the data is compressed by adjusting the window;
[0022] Use sliding window technology to scan the text layer by layer, count the character repetition patterns and distribution at the character level, analyze the local concentration of words at the word level, and identify collocation errors and phrase usage problems;
[0023] The feature extraction is performed step by step through multi-layer convolutional neural networks. The first layer of convolution focuses on character-level features to capture character distribution and repetition features, the second layer of convolution focuses on word-level features to analyze the semantic combination relationship and phrase collocation pattern between words, and the third layer of convolution focuses on syntactic-level features to extract connection relationships and potential grammatical error areas in syntactic structures. Multi-granularity features are extracted progressively through multi-layer convolutions, covering text characteristics from local to global.
[0024] The character-level, word-level, and syntactic-level features extracted from the multi-layer convolutional neural network are weighted and fused. The weight ratio is set according to the text type or length. The weight of the character-level feature in the short text is set to 0.5, the word level is 0.3, and the syntactic level is 0.2; the weight of the character-level feature in the medium-length text is set to 0.3, the word level is 0.4, and the syntactic level is 0.3; the weight of the character-level feature in the long text is adjusted to 0.2, the word level is 0.3, and the syntactic level is 0.5; the features of different granularities are unified into a global feature vector through weight addition and feature splicing;
[0025] The fused global feature vector is converted into a global error feature vector containing character repetition information, word association features and syntactic structure features. The character repetition information is used to locate the spelling error area, the word association features are used to reflect the semantic correctness of phrases and collocation relationships, and the syntactic structure features are used to detect syntactic breaks and grammatical errors in the text.
[0026] Preferably, the feature extraction parameters are adjusted according to the length and complexity of the input text; the convolution kernel width is used to scan the character and word combination in the text, and the corresponding convolution kernel width is set for texts of different lengths; the step size is adjusted according to the distribution of the error features, and the step size is selected for different distribution areas to perform feature extraction and processing; the pooling window size is set according to the complexity of the text, and the feature information is extracted and the data is compressed by adjusting the window; including:
[0027] After the semantic vector is input into the feature extraction module, the parameters of feature extraction, including convolution kernel width, step size and pooling window size, are adjusted according to the length, complexity and error distribution characteristics of the text;
[0028] For the setting of convolution kernel width, when the length of short text is less than 50 characters, the convolution kernel width is fixed to 3 to capture the local features of characters and words; when the length of medium-length text is between 50 and 200 characters, the convolution kernel width is fixed to 5 to extract the associated features of phrases; when the length of long text exceeds 200 characters, the convolution kernel width is fixed to 7;
[0029] The step size is adjusted according to the error distribution characteristics. For text areas with dense error distribution, the step size is set to 1 with the goal of capturing details by crossing one character unit each time. For areas with sparse error distribution, the step size is set to 3 with the goal of maximizing efficiency. The pooling window size is set according to the complexity of the text.
[0030] The error-intensive area is comprehensively judged by the character repetition rate, word repetition rate and syntactic break rate in the sliding window, wherein when the character repetition rate exceeds 50% of the window length, the word repetition rate is higher than 40%, and the syntactic break rate exceeds 30%, it is marked as an error-intensive text area; the error-sparse area is judged by the character repetition rate less than 20% and the word repetition rate less than 10% in the sliding window. If the grammatical analysis generates a complete dependent structure without obvious breaks, it is marked as an error-sparse area.
[0031] Preferably, the operations within the convolutional neural network are represented by the following formula:
[0032]
[0033] Where:
[0034] is the output feature of the lth layer; is the input of the lth layer; and are the weight and bias of the convolution kernel respectively; f is the corresponding activation function; i and j are the row and column indices of the output matrix z respectively; l and h are the row and column indices in the pooling window respectively; r is the width of the pooling area.
[0035] Preferably, step 3 comprises:
[0036] Extracting character repetition distribution, word association information, and syntactic connection features from the global error feature vector, analyzing feature density and distribution pattern, mapping features to label space, and preliminarily generating error labels according to different feature types, the labels include spelling error labels, word collocation error labels, and syntactic error labels; when generating the error labels, the error labels are divided into types according to the significance of the features, including generating spelling error labels for character repetition-intensive areas, generating collocation error labels for word collocation conflict areas, and generating syntactic error labels for grammatical break areas;
[0037] The initially generated error labels are input into the sequence modeling module. The dependency relationship between the error labels is modeled, the dependency weight values between the error labels are calculated, and the order between the labels is optimized through conditional probability distribution. Labels with dependency weight values exceeding 0.6 are regarded as having strong logical associations and are prioritized to enter the label sequence to generate a preliminary label sequence. Labels with weight values below 0.3 are weakened, and finally a preliminary label sequence that is consistent with the feature distribution and text semantic logic is formed.
[0038] Perform context logic verification on the generated erroneous label sequence to check the matching degree between the label sequence and the text context information;
[0039] Based on context verification, the order and range of labels are optimized by analyzing text feature associations, including merging labels that intersect and overlap with each other in the label sequence, reordering labels that do not conform to grammatical logic, and finally generating an optimized error label sequence.
[0040] Preferably, the context logic verification of the generated erroneous label sequence is performed to check the matching degree between the label sequence and the text context information; including:
[0041] Spelling error labels match whether the upper and lower characters conform to the spelling pattern, collocation error labels verify whether they conform to the collocation rules with adjacent words, and syntactic error labels need to determine whether the syntactic structure they are in is complete;
[0042] For labels that do not conform to the context logic, they are removed by setting a confidence threshold. Labels with a confidence level lower than 0.5 are considered invalid and removed.
[0043] Preferably, step 4 comprises:
[0044] According to the optimized error label sequence, the labels are divided into three categories: spelling errors, word collocation errors and syntactic errors. By analyzing the context information of the error label annotation range, combined with the spelling replacement library, collocation optimization table and syntactic dependency analysis, correction suggestions are generated; spelling error labels generate replacement suggestions by comparing candidate spelling combinations, word collocation error labels retrieve phrase combinations that meet collocation rules through semantic matching, and syntactic error labels generate syntactic adjustment plans by adjusting word order, supplementing or deleting components, and marking the scope of the correction content;
[0045] Integrate correction suggestions into structured detection results, including the starting position, ending position, error type, and correction content of the error label. Generate an error distribution map by counting the distribution information of all error labels, and display the position of the error label in the text in the form of a heat map to mark the error concentration area. At the same time, summarize all correction suggestions and generate a correction suggestion list by error type classification.
[0046] Adjust the content and output format of the correction suggestions according to the requirements of different application scenarios.
[0047] The second aspect of the present invention provides a Chinese electric power text error detection system based on the ALBert model, comprising: a word segmentation processing module, a feature extraction module, a sequence modeling module and a correction suggestion generation module;
[0048] The word segmentation processing module is used to perform word segmentation on the power text. By analyzing the contextual dependency of phrases in the text, phrases with fixed semantic associations are processed into inseparable units, and the word segmentation granularity is dynamically adjusted according to the length of the text. The word segmentation results are input into the ALBert model embedding layer, and a semantic vector containing character-level, word-level and contextual associations is generated by assigning character-level and word-level weights.
[0049] The feature extraction module is used to receive the semantic vector generated by the word segmentation processing module, dynamically adjust the convolution kernel width, step size and pooling window size according to the length, complexity and error distribution characteristics of the text, count the character repetition frequency and word distribution density through window sliding, extract local features at the character level, word level and syntactic level by combining multi-layer convolution operations, and use multi-dimensional feature weighted fusion of feature representations of different granularities to generate a global error feature vector containing character repetition, word association and syntactic structure information;
[0050] The sequence modeling module is used to receive the global error feature vector generated by the feature extraction module, extract error labels from it, and generate a label sequence containing spelling errors, word collocation errors and syntactic errors according to the feature distribution by dynamically adjusting the dependency weights between the error labels. The label sequence is contextually logically verified, labels that do not match the context information are removed, and the order and range of labels are adjusted according to the feature association of the text to optimize the label sequence.
[0051] The correction suggestion generation module is used to receive the error label sequence optimized by the sequence modeling module, classify the error types corresponding to the error labels, generate correction suggestions based on the error types by analyzing the contextual semantics and syntactic relationships of the labels, and output structured detection results including the error start position, end position and error type, and at the same time generate an error distribution map and correction suggestion list that are suitable for the application scenario.
[0052] Compared with the prior art, the beneficial effects of the present invention include at least:
[0053] The present invention provides a Chinese electric power text error detection method based on the ALBert model, which can efficiently process spelling errors, word collocation errors and syntactic errors in electric power texts. The ALBert pre-trained language model is used to solve the limitations of traditional pre-trained language models in processing electric power texts, especially in dealing with complex context understanding and long text dependencies, and improves the accuracy of text segmentation and the ability to capture contextual semantics; through the multi-layer convolution operation and multi-dimensional feature weighted fusion of the feature extraction module, the character-level, word-level and syntactic-level features are accurately extracted; through the dependency modeling and context logic verification of the error labels by the sequence modeling module, the accuracy and consistency of the error label sequence are optimized; finally, in combination with the correction suggestion generation module, a structured detection result including the error position, type and correction content is output, which improves the adaptability and processing efficiency of text error detection, especially in the texts with specific terminology and complex syntactic structures in the electric power industry, it shows excellent error recognition and correction capabilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is a general structural diagram provided according to an embodiment of the present invention;
[0055] Figure 2 is a training flow chart of the ALBert pre-trained language model provided in accordance with an embodiment of the present invention;
[0056] Figure 3 It is a network structure diagram of a convolutional neural network provided according to an embodiment of the present invention;
[0057] Figure 4 It is a diagram of experimental results provided according to an embodiment of the present invention. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.
[0059] like Figure 1As shown in the figure, the overall architecture of the Chinese power text error detection method based on the ALBert model is presented, including text input and word segmentation processing module, ALBert embedding model, feature extraction module, sequence modeling and label generation module, and correction suggestion and result output module. First, the word segmentation processing module performs word segmentation and phrase extraction on the input text, and inputs the ALBert model to generate a semantic vector; then, the feature extraction module performs multi-granular feature extraction on the semantic vector through a convolutional neural network to form a global error feature vector; then, the sequence modeling module generates an optimized error label sequence by modeling the dependency relationship of the error label; finally, the correction suggestion module generates correction suggestions based on the error label, and outputs a structured detection result containing the error location, type, and correction content.
[0060] Example 1 of the present invention provides a Chinese electric power text error detection method based on the ALBert model, comprising the following steps:
[0061] Step 1: Perform word segmentation on the power text. By analyzing the contextual dependencies of the phrases in the text, the phrases with fixed semantic associations are processed into inseparable units. At the same time, the word segmentation granularity is dynamically adjusted according to the length of the power text. The word segmentation results are input into the ALBert model embedding layer. By assigning character-level and word-level weights to optimize the capture of contextual information, a semantic vector containing character-level, word-level and contextual associations is generated.
[0062] Preferably, step 1 comprises:
[0063] Parse the context dependency of the input power text, identify phrases and power terminology expressions with fixed semantic associations, and mark phrases with fixed semantic associations as indivisible units; calculate the granularity range of word segmentation based on the length of the text, dynamically adjust the word segmentation granularity, and generate the word segmentation results;
[0064] The word segmentation results are input into the embedding layer of the ALBert model. By utilizing the parameter sharing of ALBert, weights are assigned according to the semantic requirements of the power text. With the minimum model parameters as the goal, each word segmentation unit can capture multi-level semantic information.
[0065] The embedding layer of the ALBert model is used to generate a semantic vector containing character-level, word-level and context-related information. The character-level information mainly focuses on the precise expression of power units, identification symbols and keywords in the text. The word-level information reflects the relationship between terms and the overall meaning of the phrase. The context-related information uses the global semantic pattern in the power text to capture the dependencies and contextual characteristics of the text through the attention mechanism. The semantic vector finally generated integrates different levels of information at the character level, word level and context-related level.
[0066] Preferably, the step of calculating the word segmentation granularity range according to the text length, dynamically adjusting the word segmentation granularity, and generating the word segmentation result includes:
[0067] By analyzing the character length of the input text, the text is divided into three categories: short text, medium length text and long text;
[0068] Set the text with a character length of less than 50 as short text, the text with a character length between 50 and 200 as medium text, and the text with a character length of more than 200 as long text;
[0069] Short text, medium-length text and long text adopt gradual segmentation, balanced segmentation and aggregated segmentation strategies respectively; short text adopts gradual segmentation strategy, and the length of segmentation unit is set to 1 to 2 words, which is used to capture the semantic information of characters and words; medium-length text adopts balanced segmentation strategy, and the length of segmentation unit is set to 2 to 4 words, which is used to take into account semantic association and overall expression on the basis of words and phrases; long text adopts aggregated segmentation strategy, integrating semantically related words into a single segmentation unit, and the length of segmentation unit is set to 3 to 5 words.
[0070] like Figure 2 As shown in the figure, the pre-training process of the ALBert model includes: the input layer converts the segmented power text into a word embedding vector representation, and greatly reduces the number of model parameters through parameter sharing and embedding matrix decomposition technology, thereby improving computational efficiency. In the task optimization process, the sentence order prediction task is used to replace the traditional next sentence prediction task to enhance the ability to understand the context sentence relationship. Finally, the optimized ALBert model completes the semantic representation training through the output layer, providing efficient feature input for subsequent text error detection.
[0071] Step 2: Input the semantic vector into the feature extraction module, dynamically adjust the convolution kernel width, step size and pooling window size according to the length, complexity and error distribution characteristics of the power text, count the character repetition frequency and phrase distribution density through window sliding, extract local features at the character level, word level and syntactic level by combining multi-layer convolution operations, and use multi-dimensional local features to weightedly fuse feature representations of different granularities to generate a global error feature vector containing character repetition, word association and syntactic structure information;
[0072] Preferably, step 2 comprises:
[0073] The semantic vector is input into the feature extraction module, wherein the semantic vector includes character-level, word-level and context-related information in the power text, and also includes the distribution relationship between term phrases and fixed phrases extracted during word segmentation of the text;
[0074] The feature extraction parameters are adjusted according to the length and complexity of the input text; the convolution kernel width is used to scan the character and word combinations in the text, and the corresponding convolution kernel width is set for texts of different lengths; the step size is adjusted according to the distribution of the error features, and the step size is selected for different distribution areas for feature extraction and processing; the pooling window size is set according to the complexity of the text, and the feature information is extracted and the data is compressed by adjusting the window;
[0075] Use sliding window technology to scan the text layer by layer, count the character repetition patterns and distribution at the character level, analyze the local concentration of words at the word level, and identify collocation errors and phrase usage problems;
[0076] The feature extraction is performed step by step through multi-layer convolutional neural networks. The first layer of convolution focuses on character-level features to capture character distribution and repetition features, the second layer of convolution focuses on word-level features to analyze the semantic combination relationship and phrase collocation pattern between words, and the third layer of convolution focuses on syntactic-level features to extract connection relationships and potential grammatical error areas in syntactic structures. Multi-granularity features are extracted progressively through multi-layer convolutions, covering text characteristics from local to global.
[0077] The character-level, word-level, and syntactic-level features extracted from the multi-layer convolutional neural network are weighted and fused. The weight ratio is set according to the text type or length. The weight of the character-level feature in the short text is set to 0.5, the word level is 0.3, and the syntactic level is 0.2; the weight of the character-level feature in the medium-length text is set to 0.3, the word level is 0.4, and the syntactic level is 0.3; the weight of the character-level feature in the long text is adjusted to 0.2, the word level is 0.3, and the syntactic level is 0.5; the features of different granularities are unified into a global feature vector through weight addition and feature splicing;
[0078] like Figure 3 As shown in the figure, the structure and feature processing flow of the convolutional neural network include input layer, hidden layer and output layer. The input layer receives the semantic vector from the ALBert model as the basis for feature extraction. The hidden layer extracts local features at the character level, word level and syntactic level through multi-layer convolution, and reduces the dimension through pooling operation to retain key features. At the same time, the activation function enhances the nonlinear expression ability of the features. Finally, after being processed by the fully connected layer, the output layer inputs the features into the classifier to generate error labels and complete classification, providing accurate support for subsequent error detection and correction.
[0079] The fused global feature vector is converted into a global error feature vector containing character repetition information, word association features and syntactic structure features. The character repetition information is used to locate the spelling error area, the word association features are used to reflect the semantic correctness of phrases and collocation relationships, and the syntactic structure features are used to detect syntactic breaks and grammatical errors in the text.
[0080] Preferably, the feature extraction parameters are adjusted according to the length and complexity of the input text; the convolution kernel width is used to scan the character and word combination in the text, and the corresponding convolution kernel width is set for texts of different lengths; the step size is adjusted according to the distribution of the error features, and the step size is selected for different distribution areas to perform feature extraction and processing; the pooling window size is set according to the complexity of the text, and the feature information is extracted and the data is compressed by adjusting the window; including:
[0081] After the semantic vector is input into the feature extraction module, the parameters of feature extraction, including convolution kernel width, step size and pooling window size, are adjusted according to the length, complexity and error distribution characteristics of the text;
[0082] For the setting of convolution kernel width, when the length of short text is less than 50 characters, the convolution kernel width is fixed to 3 to capture the local features of characters and words; when the length of medium-length text is between 50 and 200 characters, the convolution kernel width is fixed to 5 to extract the associated features of phrases; when the length of long text exceeds 200 characters, the convolution kernel width is fixed to 7;
[0083] The step size is adjusted according to the error distribution characteristics. For text areas with dense error distribution, the step size is set to 1 with the goal of capturing details by crossing one character unit each time. For areas with sparse error distribution, the step size is set to 3 with the goal of maximizing efficiency. The pooling window size is set according to the complexity of the text.
[0084] The error-intensive area is comprehensively judged by the character repetition rate, word repetition rate and syntactic break rate in the sliding window, wherein when the character repetition rate exceeds 50% of the window length, the word repetition rate is higher than 40%, and the syntactic break rate exceeds 30%, it is marked as an error-intensive text area; the error-sparse area is judged by the character repetition rate less than 20% and the word repetition rate less than 10% in the sliding window. If the grammatical analysis generates a complete dependent structure without obvious breaks, it is marked as an error-sparse area.
[0085] Preferably, the operations within the convolutional neural network are represented by the following formula:
[0086]
[0087] Where:
[0088] is the output feature of the lth layer; is the input of the lth layer; and are the weight and bias of the convolution kernel respectively; f is the corresponding activation function; i and j are the row and column indices of the output matrix z respectively; l and h are the row and column indices in the pooling window respectively; r is the width of the pooling area.
[0089] Step 3: extract error labels from the global error feature vector, input the global error feature vector into the sequence modeling module, dynamically adjust the dependency weights between error labels, generate a label sequence based on the feature distribution, perform contextual logic verification on the label sequence, remove labels that do not match the context information, and adjust the order and range of labels based on the feature association of the power text to optimize the error label sequence;
[0090] Preferably, step 3 comprises:
[0091] Extracting character repetition distribution, word association information, and syntactic connection features from the global error feature vector, analyzing feature density and distribution pattern, mapping features to label space, and preliminarily generating error labels according to different feature types, the labels include spelling error labels, word collocation error labels, and syntactic error labels; when generating the error labels, the error labels are divided into types according to the significance of the features, including generating spelling error labels for character repetition-intensive areas, generating collocation error labels for word collocation conflict areas, and generating syntactic error labels for grammatical break areas;
[0092] The initially generated error labels are input into the sequence modeling module. The dependency relationship between the error labels is modeled, the dependency weight values between the error labels are calculated, and the order between the labels is optimized through conditional probability distribution. Labels with dependency weight values exceeding 0.6 are regarded as having strong logical associations and are prioritized to enter the label sequence to generate a preliminary label sequence. Labels with weight values below 0.3 are weakened, and finally a preliminary label sequence that is consistent with the feature distribution and text semantic logic is formed.
[0093] Perform context logic verification on the generated erroneous label sequence to check the matching degree between the label sequence and the text context information;
[0094] Based on context verification, the order and range of labels are optimized by analyzing text feature associations, including merging labels that intersect and overlap with each other in the label sequence, reordering labels that do not conform to grammatical logic, and finally generating an optimized error label sequence.
[0095] Preferably, the context logic verification of the generated erroneous label sequence is performed to check the matching degree between the label sequence and the text context information; including:
[0096] Spelling error labels match whether the upper and lower characters conform to the spelling pattern, collocation error labels verify whether they conform to the collocation rules with adjacent words, and syntactic error labels need to determine whether the syntactic structure they are in is complete;
[0097] For labels that do not conform to the context logic, they are removed by setting a confidence threshold. Labels with a confidence level lower than 0.5 are considered invalid and removed.
[0098] Step 4: According to the optimized error label sequence, classify the error types corresponding to the labels, analyze the contextual semantics and syntactic relationships of the labels, and generate correction suggestions based on the error types by comparing the semantic consistency and syntactic dependency between the error labels and the adjacent contexts. Output a structured detection result containing the error start position, end position, and error type. At the same time, generate an error distribution map and a correction suggestion list based on the application scenario.
[0099] Preferably, step 4 comprises:
[0100] According to the optimized error label sequence, the labels are divided into three categories: spelling errors, word collocation errors and syntactic errors. By analyzing the context information of the error label annotation range, combined with the spelling replacement library, collocation optimization table and syntactic dependency analysis, correction suggestions are generated; spelling error labels generate replacement suggestions by comparing candidate spelling combinations, word collocation error labels retrieve phrase combinations that meet collocation rules through semantic matching, and syntactic error labels generate syntactic adjustment plans by adjusting word order, supplementing or deleting components, and marking the scope of the correction content;
[0101] Specifically, spelling errors are confirmed by detecting the appearance pattern, character distribution and contextual spelling probability of the marked characters in the context. For example, the scope of influence of the spelling error can be identified by comparing whether the adjacent character combination of the incorrect character conforms to the common spelling pattern; word collocation errors are verified by the semantic consistency of the phrase, and the semantic logical relationship between the labeled phrase and the adjacent words is analyzed, including judging the rationality of the collocation of the verb-object structure and checking whether the modifier matches the modified object; syntactic errors are detected by syntactic dependency analysis, analyzing the coherence of the subject-predicate-object structure and the integrity of the dependency relationship between the modifier and the sentence, to ensure that the semantic logic and syntactic structure of each label are consistent with the context.
[0102] Integrate correction suggestions into structured detection results, including the starting position, ending position, error type, and correction content of the error label. Generate an error distribution map by counting the distribution information of all error labels, and display the position of the error label in the text in the form of a heat map to mark the error concentration area. At the same time, summarize all correction suggestions and generate a correction suggestion list by error type classification.
[0103] Specifically, for spelling errors, the spelling replacement library is combined to recommend replacement characters, and possible correct spelling combinations are provided by matching common spelling variation patterns in the context, including suggestions for correcting the spelling of common terms or unit symbols; for word collocation errors, the word collocation optimization table is queried to generate collocation suggestions, and phrase combinations that fit the context are recommended in priority by calculating the matching degree of phrases in the domain semantic library, including suggestions for replacing inconsistent collocations of verbs and objects; for syntactic errors, a syntactic correction plan is generated in combination with the results of syntactic dependency structure analysis, including restoring the syntactic structure by supplementing omitted subject and predicate words, adjusting the order of sentence components, or deleting redundant words, to ensure that the correction suggestions can clearly mark the scope of the error and the specific content after the correction.
[0104] Adjust the content and output format of the correction suggestions according to the requirements of different application scenarios.
[0105] Specifically, in power operation and maintenance scenarios, priority is given to providing correction suggestions that comply with power industry terminology and text specifications to ensure that spelling replacements, word collocations, and syntactic adjustments meet field needs; in language education or text correction scenarios, more emphasis is placed on standardized corrections of language expression and syntactic logic, and a variety of learning and standardization suggestions are generated for error types; correction reports or visual display content in a specific format are generated through the scenario configuration function to meet the actual needs of different users.
[0106] Example 2 of the present invention provides a Chinese electric power text error detection system based on the ALBert model, including: a word segmentation processing module, a feature extraction module, a sequence modeling module and a correction suggestion generation module;
[0107] The word segmentation processing module is used to perform word segmentation on the power text. By analyzing the contextual dependency of phrases in the text, phrases with fixed semantic associations are processed into inseparable units, and the word segmentation granularity is dynamically adjusted according to the length of the text. The word segmentation results are input into the ALBert model embedding layer, and a semantic vector containing character-level, word-level and contextual associations is generated by assigning character-level and word-level weights.
[0108] The feature extraction module is used to receive the semantic vector generated by the word segmentation processing module, dynamically adjust the convolution kernel width, step size and pooling window size according to the length, complexity and error distribution characteristics of the text, count the character repetition frequency and word distribution density through window sliding, extract local features at the character level, word level and syntactic level by combining multi-layer convolution operations, and use multi-dimensional feature weighted fusion of feature representations of different granularities to generate a global error feature vector containing character repetition, word association and syntactic structure information;
[0109] The sequence modeling module is used to receive the global error feature vector generated by the feature extraction module, extract error labels from it, and generate a label sequence containing spelling errors, word collocation errors and syntactic errors according to the feature distribution by dynamically adjusting the dependency weights between the error labels. The label sequence is contextually logically verified, labels that do not match the context information are removed, and the order and range of labels are adjusted according to the feature association of the text to optimize the label sequence.
[0110] The correction suggestion generation module is used to receive the error label sequence optimized by the sequence modeling module, classify the error types corresponding to the error labels, generate correction suggestions based on the error types by analyzing the contextual semantics and syntactic relationships of the labels, and output structured detection results including the error start position, end position and error type, and at the same time generate an error distribution map and correction suggestion list that are suitable for the application scenario.
[0111] In order to verify the effectiveness of the present invention, an experiment was conducted using an electric power text error detection dataset of a power grid in a city in Northeast China. The dataset is a manually annotated grammatical error dataset, which divides grammatical errors into four types: Pronunciation error (denoted as "P", i.e., pronunciation error), Spelling error (denoted as "S", i.e., spelling error), Grammatical error (denoted as "G", i.e., grammatical error), and Knowledge error (denoted as "K", i.e., knowledge error). In the output layer of the model, the present invention maps the features extracted by the model to the classification space of the four error types, and finally, selects the category with the highest probability as the prediction result. In the visualization part, the detection results are output according to (error string, error type). At the same time, if there is no grammatical error in the sentence, "None" is output. The data scale is shown in Table 1.
[0112] Table 1 Dataset size
[0113] type Training set Validation set Test Set sentence 15623 3926 730 character 709450 176839 27621 Pronunciation Errors 15211 3757 856 Spelling Errors 7462 1865 382 Syntax Error 10252 2586 433 Knowledge Error 2412 615 161
[0114] This embodiment uses accuracy and F1 value to evaluate model performance, where the hidden layer dimension is 512, the Transformer structure of the ALBert pre-training model is 24 layers, the number of heads of the multi-head attention mechanism is 16, the batch size is 32, the optimizer uses AdamW, the drop rate is 0.10, and the maximum number of iterations is 30. The learning rate of the conditional random field layer is set to 5×10^-4, and the learning rate of other parts is 2×10^-5. The convolution kernel width of the convolutional neural network layer is 5.
[0115] In this example, four groups of control experiments were set up under the same environment to verify the effectiveness of this method:
[0116] (1) ALBert-BiLSTM: Use the ALBert pre-trained language model and replace the convolutional neural network layer with a 2-layer BiLSTM neural network.
[0117] (2) StructBert-CNN: Uses the StructBert pre-trained model and convolutional neural network layers to enhance the utilization of structured semantic information.
[0118] (3) Bert-CNN: Uses the Bertbase pre-trained model and convolutional neural network layers as a performance benchmark.
[0119] (4) ALBert-CNN-CRF: The Chinese grammatical error detection method proposed in this paper combines the ALBert pre-trained model, convolutional neural network layer and random field layer to improve the accuracy and F1 value of grammatical error detection.
[0120] The experimental results are as follows Figure 4 As shown. The ALBert-based Chinese electricity text error detection model adopted by the present invention outperforms other models in terms of accuracy and F1 score, showing the significant advantages of ALBert in text error detection tasks. Compared with other pre-trained models, ALBert has a smaller size and also shows stronger capabilities in processing text feature extraction. Subsequently, the present invention combined convolutional neural networks and conditional fields to further improve the classification accuracy and generalization ability of the model, verifying the excellent performance of ALBert as a pre-trained model in text analysis.
[0121] The research results of using ALBert for error detection in Chinese texts in the power industry show that the ALBert model has significant advantages in handling the task of grammatical error detection in Chinese texts. By introducing the ALBert pre-training model, the present invention successfully improves the accuracy and robustness of error detection, while reducing the reliance on manual feature extraction. This method not only effectively solves the problem of data mismatch in the pre-training and fine-tuning stages, but also can accurately capture grammatical errors in the text, ultimately providing a more efficient and accurate solution for error detection in Chinese texts in the power industry, fully meeting the needs of practical applications.
[0122] Compared with the prior art, the beneficial effects of the present invention include at least:
[0123] The present invention provides a Chinese electric power text error detection method based on the ALBert model, which can efficiently process spelling errors, word collocation errors and syntactic errors in electric power texts. The ALBert pre-trained language model is used to solve the limitations of traditional pre-trained language models in processing electric power texts, especially in dealing with complex context understanding and long text dependencies, and improves the accuracy of text segmentation and the ability to capture contextual semantics; through the multi-layer convolution operation and multi-dimensional feature weighted fusion of the feature extraction module, the character-level, word-level and syntactic-level features are accurately extracted; through the dependency modeling and context logic verification of the error labels by the sequence modeling module, the accuracy and consistency of the error label sequence are optimized; finally, in combination with the correction suggestion generation module, a structured detection result including the error position, type and correction content is output, which improves the adaptability and processing efficiency of text error detection, especially in the texts with specific terminology and complex syntactic structures in the electric power industry, it shows excellent error recognition and correction capabilities.
[0124] The above is only a preferred implementation of the Chinese power text error detection method based on ALBert. The protection scope of the present invention is not limited to the above embodiments, and all solutions belonging to this technical idea belong to the protection scope of the present invention. It should be pointed out that for those skilled in the art, several improvements and changes made without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
[0125] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A Chinese power text error detection method based on the ALBert model, characterized in that: The following steps are involved: Step 1: Perform word segmentation on the power text. By analyzing the contextual dependencies of the phrases in the text, the phrases with fixed semantic associations are processed into inseparable units. At the same time, the word segmentation granularity is dynamically adjusted according to the length of the power text. The word segmentation results are input into the ALBert model embedding layer. By assigning character-level and word-level weights to optimize the capture of contextual information, a semantic vector containing character-level, word-level and contextual associations is generated. Step 2: Input the semantic vector into the feature extraction module, dynamically adjust the convolution kernel width, step size and pooling window size according to the length, complexity and error distribution characteristics of the power text, count the character repetition frequency and phrase distribution density through window sliding, extract local features at the character level, word level and syntactic level by combining multi-layer convolution operations, and use multi-dimensional local features to weightedly fuse feature representations of different granularities to generate a global error feature vector containing character repetition, word association and syntactic structure information; Step 3: extract error labels from the global error feature vector, input the global error feature vector into the sequence modeling module, dynamically adjust the dependency weights between error labels, generate a label sequence based on the feature distribution, perform contextual logic verification on the label sequence, remove labels that do not match the context information, and adjust the order and range of labels based on the feature association of the power text to optimize the error label sequence; Step 4: According to the optimized error label sequence, classify the error types corresponding to the labels, analyze the contextual semantics and syntactic relationships of the labels, and generate correction suggestions based on the error types by comparing the semantic consistency and syntactic dependency between the error labels and the adjacent contexts. Output a structured detection result containing the error start position, end position, and error type. At the same time, generate an error distribution map and a correction suggestion list based on the application scenario.
2. The Chinese electric power text error detection method based on the ALBert model according to claim 1 is characterized by: Step 1 includes: Parse the context dependency of the input power text, identify phrases and power terminology expressions with fixed semantic associations, and mark phrases with fixed semantic associations as indivisible units; calculate the granularity range of word segmentation based on the length of the text, dynamically adjust the word segmentation granularity, and generate the word segmentation results; The word segmentation results are input into the embedding layer of the ALBert model. By utilizing the parameter sharing of ALBert, weights are assigned according to the semantic requirements of the power text. With the minimum model parameters as the goal, each word segmentation unit can capture multi-level semantic information. The embedding layer of the ALBert model is used to generate a semantic vector containing character-level, word-level and context-related information. The character-level information mainly focuses on the precise expression of power units, identification symbols and keywords in the text. The word-level information reflects the relationship between terms and the overall meaning of the phrase. The context-related information uses the global semantic pattern in the power text to capture the dependencies and contextual characteristics of the text through the attention mechanism. The semantic vector finally generated integrates different levels of information at the character level, word level and context-related level.
3. The Chinese electric power text error detection method based on the ALBert model according to claim 2 is characterized by: The step of calculating the word segmentation granularity range according to the text length, dynamically adjusting the word segmentation granularity, and generating the word segmentation result includes: By analyzing the character length of the input text, the text is divided into three categories: short text, medium length text and long text; Set the text with a character length of less than 50 as short text, the text with a character length between 50 and 200 as medium text, and the text with a character length of more than 200 as long text; Short text, medium-length text and long text adopt gradual segmentation, balanced segmentation and aggregated segmentation strategies respectively; short text adopts gradual segmentation strategy, and the length of segmentation unit is set to 1 to 2 words, which is used to capture the semantic information of characters and words; medium-length text adopts balanced segmentation strategy, and the length of segmentation unit is set to 2 to 4 words, which is used to take into account semantic association and overall expression on the basis of words and phrases; long text adopts aggregated segmentation strategy, integrating semantically related words into a single segmentation unit, and the length of segmentation unit is set to 3 to 5 words.
4. The Chinese electric power text error detection method based on the ALBert model according to claim 1 is characterized by: Step 2 includes: The semantic vector is input into the feature extraction module, wherein the semantic vector includes character-level, word-level and context-related information in the power text, and also includes the distribution relationship between term phrases and fixed phrases extracted during word segmentation of the text; The feature extraction parameters are adjusted according to the length and complexity of the input text; the convolution kernel width is used to scan the character and word combinations in the text, and the corresponding convolution kernel width is set for texts of different lengths; the step size is adjusted according to the distribution of the error features, and the step size is selected for different distribution areas for feature extraction and processing; the pooling window size is set according to the complexity of the text, and the feature information is extracted and the data is compressed by adjusting the window; Use sliding window technology to scan the text layer by layer, count the character repetition patterns and distribution at the character level, analyze the local concentration of words at the word level, and identify collocation errors and phrase usage problems; The feature extraction is performed step by step through multi-layer convolutional neural networks. The first layer of convolution focuses on character-level features to capture character distribution and repetition features, the second layer of convolution focuses on word-level features to analyze the semantic combination relationship and phrase collocation pattern between words, and the third layer of convolution focuses on syntactic-level features to extract connection relationships and potential grammatical error areas in syntactic structures. Multi-granularity features are extracted progressively through multi-layer convolutions, covering text characteristics from local to global. The character-level, word-level, and syntactic-level features extracted from the multi-layer convolutional neural network are weighted and fused. The weight ratio is set according to the text type or length. The weight of the character-level feature in the short text is set to 0.5, the word level is 0.3, and the syntactic level is 0.2; the weight of the character-level feature in the medium-length text is set to 0.3, the word level is 0.4, and the syntactic level is 0.3; the weight of the character-level feature in the long text is adjusted to 0.2, the word level is 0.3, and the syntactic level is 0.5; the features of different granularities are unified into a global feature vector through weight addition and feature splicing; The fused global feature vector is converted into a global error feature vector containing character repetition information, word association features and syntactic structure features. The character repetition information is used to locate the spelling error area, the word association features are used to reflect the semantic correctness of phrases and collocation relationships, and the syntactic structure features are used to detect syntactic breaks and grammatical errors in the text.
5. The Chinese electric power text error detection method based on the ALBert model according to claim 4 is characterized by: The feature extraction parameters are adjusted according to the length and complexity of the input text; the convolution kernel width is used to scan the character and word combination in the text, and the corresponding convolution kernel width is set for texts of different lengths; the step size is adjusted according to the distribution of the error features, and the step size is selected for different distribution areas for feature extraction and processing; The pooling window size is set according to the complexity of the text, and feature information is extracted and data is compressed by adjusting the window; including: After the semantic vector is input into the feature extraction module, the parameters of feature extraction, including convolution kernel width, step size and pooling window size, are adjusted according to the length, complexity and error distribution characteristics of the text; For the setting of convolution kernel width, when the length of short text is less than 50 characters, the convolution kernel width is fixed to 3 to capture the local features of characters and words; when the length of medium-length text is between 50 and 200 characters, the convolution kernel width is fixed to 5 to extract the associated features of phrases; when the length of long text exceeds 200 characters, the convolution kernel width is fixed to 7; The step size is adjusted according to the error distribution characteristics. For text areas with dense error distribution, the step size is set to 1 with the goal of capturing details by crossing one character unit each time. For areas with sparse error distribution, the step size is set to 3 with the goal of maximizing efficiency. The pooling window size is set according to the complexity of the text. The error-intensive area is comprehensively judged by the character repetition rate, word repetition rate and syntactic break rate in the sliding window, wherein when the character repetition rate exceeds 50% of the window length, the word repetition rate is higher than 40%, and the syntactic break rate exceeds 30%, it is marked as an error-intensive text area; the error-sparse area is judged by the character repetition rate less than 20% and the word repetition rate less than 10% in the sliding window. If the grammatical analysis generates a complete dependent structure without obvious breaks, it is marked as an error-sparse area.
6. The Chinese electric power text error detection method based on the ALBert model according to claim 4 is characterized by: The operations within the convolutional neural network are represented by the following formula: Where: is the output feature of the lth layer; is the input of the lth layer; and are the weight and bias of the convolution kernel respectively; f is the corresponding activation function; i and j are the row and column indices of the output matrix z respectively; l and h are the row and column indices in the pooling window respectively; r is the width of the pooling area.
7. The Chinese electric power text error detection method based on the ALBert model according to claim 1 is characterized by: Step 3 includes: Extracting character repetition distribution, word association information, and syntactic connection features from the global error feature vector, analyzing feature density and distribution pattern, mapping features to label space, and preliminarily generating error labels according to different feature types, the labels include spelling error labels, word collocation error labels, and syntactic error labels; when generating the error labels, the error labels are divided into types according to the significance of the features, including generating spelling error labels for character repetition-intensive areas, generating collocation error labels for word collocation conflict areas, and generating syntactic error labels for grammatical break areas; The initially generated error labels are input into the sequence modeling module. The dependency relationship between the error labels is modeled, the dependency weight values between the error labels are calculated, and the order between the labels is optimized through conditional probability distribution. Labels with dependency weight values exceeding 0.6 are regarded as having strong logical associations and are prioritized to enter the label sequence to generate a preliminary label sequence. Labels with weight values below 0.3 are weakened, and finally a preliminary label sequence that is consistent with the feature distribution and text semantic logic is formed. Perform context logic verification on the generated erroneous label sequence to check the matching degree between the label sequence and the text context information; Based on context verification, the order and range of labels are optimized by analyzing text feature associations, including merging labels that intersect and overlap with each other in the label sequence, reordering labels that do not conform to grammatical logic, and finally generating an optimized error label sequence.
8. The Chinese electric power text error detection method based on the ALBert model according to claim 7 is characterized by: The context logic verification of the generated erroneous label sequence is performed to check the matching degree between the label sequence and the text context information; including: Spelling error labels match whether the upper and lower characters conform to the spelling pattern, collocation error labels verify whether they conform to the collocation rules with adjacent words, and syntactic error labels need to determine whether the syntactic structure they are in is complete; For labels that do not conform to the context logic, they are removed by setting a confidence threshold. Labels with a confidence level lower than 0.5 are considered invalid and removed.
9. The Chinese electric power text error detection method based on the ALBert model according to claim 1 is characterized by: Step 4 includes: According to the optimized error label sequence, the labels are divided into three categories: spelling errors, word collocation errors and syntactic errors. By analyzing the context information of the error label annotation range, combined with the spelling replacement library, collocation optimization table and syntactic dependency analysis, correction suggestions are generated; spelling error labels generate replacement suggestions by comparing candidate spelling combinations, word collocation error labels retrieve phrase combinations that meet collocation rules through semantic matching, and syntactic error labels generate syntactic adjustment plans by adjusting word order, supplementing or deleting components, and marking the scope of the correction content; Integrate correction suggestions into structured detection results, including the starting position, ending position, error type, and correction content of the error label. Generate an error distribution map by counting the distribution information of all error labels, and display the position of the error label in the text in the form of a heat map to mark the error concentration area. At the same time, summarize all correction suggestions and generate a correction suggestion list by error type classification. Adjust the content and output format of the correction suggestions according to the requirements of different application scenarios.
10. A Chinese power text error detection system based on the ALBert model, comprising: Word segmentation processing module, feature extraction module, sequence modeling module and correction suggestion generation module; characterized by: The word segmentation processing module is used to perform word segmentation on the power text. By analyzing the contextual dependency of phrases in the text, phrases with fixed semantic associations are processed into inseparable units, and the word segmentation granularity is dynamically adjusted according to the length of the text. The word segmentation results are input into the ALBert model embedding layer, and a semantic vector containing character-level, word-level and contextual associations is generated by assigning character-level and word-level weights. The feature extraction module is used to receive the semantic vector generated by the word segmentation processing module, dynamically adjust the convolution kernel width, step size and pooling window size according to the length, complexity and error distribution characteristics of the text, count the character repetition frequency and word distribution density through window sliding, extract local features at the character level, word level and syntactic level by combining multi-layer convolution operations, and use multi-dimensional feature weighted fusion of feature representations of different granularities to generate a global error feature vector containing character repetition, word association and syntactic structure information; The sequence modeling module is used to receive the global error feature vector generated by the feature extraction module, extract error labels from it, and generate a label sequence containing spelling errors, word collocation errors and syntactic errors according to the feature distribution by dynamically adjusting the dependency weights between the error labels. The label sequence is contextually logically verified, labels that do not match the context information are removed, and the order and range of labels are adjusted according to the feature association of the text to optimize the label sequence. The correction suggestion generation module is used to receive the error label sequence optimized by the sequence modeling module, classify the error types corresponding to the error labels, generate correction suggestions based on the error types by analyzing the contextual semantics and syntactic relationships of the labels, and output structured detection results including the error start position, end position and error type, and at the same time generate an error distribution map and correction suggestion list that are suitable for the application scenario.
Citation Information
Cited By
Electric energy metering error correction method and system based on data fusion
CN120234767A