Text error correction method and device, equipment and storage medium

By adopting a fine-tuned error correction large language model and a dividing and conquer process in text error correction, combined with external knowledge base and error correction workflow, the problem of limited text error correction efficiency and effect in the existing technology is solved, and efficient and stable error correction effects and real-time human-computer interaction are achieved.

CN119808731AInactive Publication Date: 2025-04-11CHONGQING INSPUR GOVERNMENT CLOUD MANAGEMENT & OPERATION CO LTD

Patent Information

Application Number
CN202411979482.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art has limited efficiency and effectiveness in text error correction, and it is difficult to provide efficient and collaborative error correction solutions in human-computer interaction.

Method used

Using a fine-tuned error correction large language model, combined with external knowledge base and error correction workflow, a dividing and controversial text error correction process is designed, including title correction, text segmentation, error classification, sentence and title error correction, term proofreading, context proofing, word segmentation comparison and streaming result output.

Benefits of technology

Through this method, the efficiency and effect of text error correction are significantly improved, stable and efficient error correction can be achieved in ultra-long text, and real-time and user experience in human-computer interaction are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808731A_ABST
    Figure CN119808731A_ABST
Patent Text Reader

Abstract

The invention relates to a text error correction method. The method comprises the following steps: S1, correcting a title; s2, text segmentation; s3, carrying out error classification; s4, sentence and title error correction; s5, term proofreading; s6, performing context proofreading; s7, performing word segmentation comparison; and S8, obtaining a streaming result. The method has the advantages of improving the error correction efficiency and improving the error correction effect. In addition, the embodiment of the invention further discloses a text error correction device and equipment and a storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information processing technology, and in particular to a text error correction method, device, equipment and storage medium. Background Art

[0002] Text error correction is a common natural language processing task. Traditional NLP techniques and regular matching techniques have limited effects in text error correction. The present invention establishes an Agent system based on a fine-tuned error correction large language model, which integrates external knowledge bases, error correction workflows, result post-processing and other steps, greatly improving the efficiency and effectiveness of the text error correction model. Summary of the invention

[0003] In view of the above-mentioned deficiencies in the prior art, the technical problem to be solved by this patent application is how to provide a text correction method, device, equipment and storage medium that improves error correction efficiency, error correction effect and human-computer interaction collaboration efficiency.

[0004] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0005] A text error correction method comprises the following steps: S1: title correction; S2: text segmentation; S3: error classification; S4: sentence and title error correction; S5: terminology proofreading; S6: context proofreading; S7: word segmentation comparison; S8: streaming results.

[0006] As an optimization, in step S1, if the input text exceeds 300 characters, the first 300 characters are extracted to sort the title, and the sorted result is used to replace the original paragraph.

[0007] As an optimization, in step S2, the input text is first segmented based on periods and then based on line breaks, and divided into three categories: sentences, titles, and line breaks. The prefix of the sentence is extracted according to the rules. If the prefix exists and is less than 25 characters in length, it is judged as a title.

[0008] Specifically, the length threshold needs to be adjusted according to the input text scenario.

[0009] As an optimization, in step S3, for the title and sentence in step 2, the classification model is input to determine whether there are any errors, and the correct and error type probabilities are output at the same time. According to the correct text threshold and the error text threshold, it is determined whether the segmented text needs to be processed in the next step; all sentences are traversed and compared with the standard terms in the knowledge base, and the related terms are filtered according to the set term threshold. If the threshold is below the threshold, there is no term problem.

[0010] As an optimization, in step S4, the result of step 3 is input into the error correction model to give a result; the output result is in the form of 1, error description; 2, error type; 3, correct sentence.

[0011] Specifically, the incorrect descriptions include using the wrong words, not distinguishing between "de", "de", "di", "de", typos, multiple missing words, incorrect usage of numbers, improper punctuation, incorrect units, incomplete components, redundant components, mixed sentences, improper word order, improper collocation, illogicality, unclear semantics, and inappropriate rhetoric.

[0012] Specifically, the error correction idea is to check the following in the sentence in order: words, numbers and units, punctuation, structure, scene, and overall semantics; this ensures that the words are accurate, the numbers and units, punctuation meet the standards, the sentence structure is rigorous, and the overall semantic expression is consistent with the scene.

[0013] As an optimization, in step S5, for the segmented text associated with existing terms, the model is used to identify terminology problems and correct them; in step S6, the model is input based on the set context range, that is, the number of previous and following texts of the segmented text, and the current number of segmented texts, to check for context-related errors.

[0014] As an optimization, in step S7, the original text and the revised text are segmented according to the results of the model correction, and then compared and divided into three categories: unmodified text, deleted text, and added text; in step S8, the proofreading results of the segmented text and the context proofreading are streamed back respectively to improve the real-time perception of the results by the user.

[0015] As an optimization, the device includes a receiving unit for acquiring the text to be corrected; a segmentation unit for segmenting the text; a correction unit for inputting the text to be corrected into a model to obtain the text correction result and identify it; a proofreading unit for proofreading the semantics of terms and context; and an output unit for displaying the results and interacting.

[0016] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the text error correction method according to any one of claims 1 to 7 when executing the computer program.

[0017] A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the text error correction method according to any one of claims 1 to 7 is implemented.

[0018] The present invention has the following advantages:

[0019] The present invention adopts a divide-and-conquer error correction process and designs various parameters that can be adjusted by users: title correction examples, correct text threshold, incorrect text threshold, term threshold, number of previous texts, number of following texts, and number of current texts. By gradually scanning the text, a stable and efficient error correction effect is achieved for ultra-long texts. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 The present invention is a flowchart of a text error correction method.

[0021] Figure 2 This is a logical diagram of the text segmentation described in the present invention. DETAILED DESCRIPTION

[0022] The present invention is further described in detail below in conjunction with the accompanying drawings. In the description of the present invention, it should be understood that the directions or positional relationships indicated by directional words such as "upper, lower" and "top, bottom" are usually based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description. Unless otherwise stated, these directional words do not indicate or imply that the devices or components referred to must have a specific direction or be constructed and operated in a specific direction, and therefore cannot be understood as limiting the scope of protection of the present invention; the directional words "inside and outside" refer to the inside and outside relative to the contours of each component itself.

[0023] like Figure 1-2 As shown, a text correction method includes the following steps: S1: title correction; S2: text segmentation; S3: error classification; S4: sentence and title correction; S5: term proofreading; S6: context proofreading; S7: word segmentation comparison; S8: streaming results.

[0024] In this example, in step S1, if the input text exceeds 300 characters, the first 300 characters are extracted to sort the title, and the sorted result is used to replace the original paragraph.

[0025] In this example, in step S2, the input text is first segmented based on periods and then based on line breaks, and is divided into three categories: sentences, titles, and line breaks. A prefix is ​​extracted from the sentence according to the rules. If the prefix exists and is less than 25 characters in length, it is judged to be a title.

[0026] Specifically, the length threshold needs to be adjusted according to the input text scenario.

[0027] In this example, in step S3, for the title and sentence in step 2, the classification model is input to determine whether there are any errors, and the correct and error type probabilities are output at the same time. According to the correct text threshold and the error text threshold, it is determined whether the segmented text needs to be processed in the next step; all sentences are traversed and compared with the standard terms in the knowledge base, and the related terms are filtered according to the set term threshold. If the term threshold is below the threshold, there is no term problem.

[0028] In this example, in step S4, the result of step 3 is input into the error correction model to give a result; the output result is in the form of 1, error description; 2, error type; 3, correct sentence.

[0029] Specifically, the incorrect descriptions include using the wrong words, not distinguishing between "de", "de", "di", "de", typos, multiple missing words, incorrect usage of numbers, improper punctuation, incorrect units, incomplete components, redundant components, mixed sentences, improper word order, improper collocation, illogicality, unclear semantics, and inappropriate rhetoric.

[0030] Specifically, the error correction idea is to check the following in the sentence in order: words, numbers and units, punctuation, structure, scene, and overall semantics; this ensures that the words are accurate, the numbers and units, punctuation meet the standards, the sentence structure is rigorous, and the overall semantic expression is consistent with the scene.

[0031] In this example, in step S5, the model is used to identify terminology problems in the segmented text associated with existing terms and correct them; in step S6, the model is input based on the set context range, that is, the number of previous and following texts of the segmented text, and the current number of segmented texts, to check for context-related errors.

[0032] In this example, in step S7, the original text and the revised text are segmented according to the results of the model correction, and then compared and divided into three categories: unmodified text, deleted text, and added text; in step S8, the proofreading results of the segmented text and the context proofreading are streamed back respectively to improve the real-time perception of the results by the user.

[0033] A text correction device comprises a receiving unit for acquiring a text to be corrected; a segmentation unit for segmenting the text; a correction unit for inputting the text to be corrected into a model to obtain the text correction result and identify it; a proofreading unit for proofreading the semantics of terms and context; and an output unit for displaying the result and interacting.

[0034] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the text error correction method according to any one of claims 1 to 7 when executing the computer program.

[0035] A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the text error correction method according to any one of claims 1 to 7 is implemented.

[0036] Finally, it should be noted that those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A text error correction method, characterized in that: The following steps are involved: S1: Title correction; S2: text segmentation; S3: Misclassification; S4: Sentences, title corrections; S5: Terminology review; S6: contextual proofreading; S7: word segmentation comparison; S8: Streaming results.

2. A text error correction method according to claim 1, characterized in that: In step S1, if the input text is longer than 300 characters, the first 300 characters are extracted to sort the title, and the sorted result is used to replace the original paragraph.

3. A text error correction method according to claim 2, characterized in that: In step S2, the input text is first segmented based on periods and then based on line breaks, and is divided into three categories: sentences, titles, and line breaks. A prefix is ​​extracted from the sentences according to the rules. If the prefix exists and is less than 25 characters in length, it is judged to be a title.

4. A text error correction method according to claim 3, characterized in that: In step S3, for the title and sentence in step 2, the classification model is input to determine whether there are any errors, and the correct and error type probabilities are output at the same time. According to the correct text threshold and the error text threshold, it is determined whether the segmented text needs to be processed in the next step; all sentences are traversed and compared with the standard terms in the knowledge base, and the related terms are filtered according to the set term threshold. If the threshold is below the threshold, there is no term problem.

5. A text error correction method according to claim 4, characterized in that: In step S4, the result of step 3 is input into the error correction model to give a result; the output result is in the form of 1, error description; 2, error type; 3, correct sentence.

6. A text error correction method according to claim 5, characterized in that: In step S5, for the segmented text associated with existing terms, the model is used to identify terminology problems and correct them; in step S6, the model is input based on the set context range, that is, the number of previous and following texts of the segmented text, and the current number of segmented texts, to check for context-related errors.

7. A text error correction method according to claim 6, characterized in that: In step S7, according to the results of model correction, the original text and the revised text are segmented and then compared, and divided into three categories: unmodified text, deleted text, and added text; in step S8, the proofreading results of the segmented text and the context proofreading are streamed back respectively to improve the real-time perception of the results by the user.

8. A text error correction device, characterized in that: The device comprises a receiving unit for acquiring a text to be corrected; a segmentation unit for segmenting the text; a correction unit for inputting the text to be corrected into a model to obtain the text correction result and identify it; and a proofreading unit for proofreading the semantics of terms and context. Output unit, used to display results and interact.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the text error correction method according to any one of claims 1 to 7 are implemented.

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

Citation Information

Patent Citations

  • Text proofreading method and device, computer readable storage medium and electronic equipment

    CN110929514A

  • Title correction method and device for multimedia information, electronic equipment and storage medium

    CN111626049A

  • Text checking method

    CN116702758A

  • Webpage text verification method and device, equipment and storage medium

    CN117454880A

  • Text security detection method and device, storage medium and electronic equipment

    CN119003731A

Cited By

  • Article error sequence number automatic correction method, system and device and storage medium

    CN122242487A