Text error correction result display method and device, equipment and storage medium
By constructing word segmentation examples and generating prompt word instructions with controllable word segmentation granularity, outputting and analyzing text error correction results, the problem of poor results presentation in the prior art is solved, and semantic comparison and improved human-computer interaction collaborative efficiency are achieved.
Patent Information
- Application Number
- CN202411979514.6
- 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
The existing text error correction technology lacks optimization in the presentation of results, poor customer experience, low human-computer interaction coordination efficiency, especially in semantic comparison.
By constructing word segmentation examples, generate prompt word instructions with controllable word segmentation granularity, output wrong sentences and correct sentence word segmentation results, and call commercial or open source models to generate parsable results for display.
The semantic comparison results are presented, which improves the efficiency of human-computer interaction and enhances the customer experience.
Smart Images

Figure CN119808775A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and in particular to a method, device, equipment and storage medium for displaying text error correction results. Background Art
[0002] Text error correction is a common natural language processing task. Text understanding and generation are one of the representative capabilities of large language models. Models that have been fine-tuned for text error correction can achieve good results, but the presentation of results is rarely optimized. The current text comparison library only compares at the word level and lacks semantic comparison between the original text and the modified text. This also affects the customer experience, making it inconvenient to quickly judge the model error correction results, and the efficiency of human-computer interaction is not high. 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 method, device, equipment and storage medium for displaying text correction results that improve the efficiency of human-computer interaction collaboration.
[0004] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0005] A method for displaying text error correction results, comprising the following steps: S1: constructing a word segmentation example using a correct sentence; S2: generating a prompt word instruction with controllable word segmentation granularity according to step 1; S3: inputting a text error correction result, and outputting an incorrect sentence word segmentation result and a correct sentence word segmentation result under the prompt word instruction with controllable word segmentation granularity generated in step S2; S4: calling a commercial or open source model to generate and display a parseable result according to the prompt word.
[0006] As an optimization, in step S1, word segmentation examples are manually constructed, and the same manual input sentence is divided into fine-grained examples and coarse-grained examples, and at least 3 or more fine-grained examples or coarse-grained examples are selected and listed.
[0007] Specifically, according to needs, other granular examples can also be included to enrich the correct sentence examples and ensure the efficiency of error correction display.
[0008] Specifically, referring to the example, the correct sentence is "The implementation of this project is conducive to the construction of a national comprehensive railway hub", and the fine-grained example is: "the" "project" "the" "implementation" "is conducive to" the" construction" of" the" national" comprehensive" railway" hub"; the coarse-grained example is: "the" "implementation" of" the project "is conducive to" the" construction" of" the national" comprehensive" railway" hub".
[0009] As an optimization, in step S2, the prompt word instruction of the controllable word segmentation granularity is defined as "semantic word segmentation expert", and the semantic block is a "small semantic unit of the context word", which is segmented and displayed as "chunk".
[0010] As an optimization, in step S4, the word segmentation results are parsed, the open source comparison library is used to generate standard results, the results generated by the regular expression parsing model are used, and then processed into List format, that is,
[0011] [{"text":xxx,"label":xxx},...],
[0012] Among them, label is [None,"-","+"], and different formats are displayed in different colors.
[0013] A text error correction device comprises an input unit for manually constructing an analysis example, a receiving unit for acquiring a text to be corrected and a prompt word instruction, a comparison processing unit for comparing the received error-corrected text with a comparison library; and a display unit for presenting error correction results in different colors.
[0014] 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 in the method for displaying text error correction results as claimed in any one of claims 1 to 4 when executing the computer program.
[0015] A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for displaying text error correction results as described in any one of claims 1 to 4 is implemented.
[0016] The present invention has the following advantages:
[0017] The present invention presents semantic comparison results to solve the problem of presenting error correction results of large language models, thereby improving the efficiency of human-computer interaction and collaboration. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 The present invention is a flowchart of a method for displaying text error correction results. DETAILED DESCRIPTION
[0019] 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.
[0020] like Figure 1 As shown, a method for displaying text error correction results includes the following steps: S1: constructing a word segmentation example using a correct sentence; S2: generating a prompt word instruction with controllable word segmentation granularity according to step 1; S3: inputting a text error correction result, and outputting an incorrect sentence word segmentation result and a correct sentence word segmentation result under the prompt word instruction with controllable word segmentation granularity generated in step S2; S4: calling a commercial or open source model to generate and display a parseable result according to the prompt word.
[0021] In this example, in step S1, word segmentation examples are manually constructed, and the same manual input sentence is divided into fine-grained examples and coarse-grained examples, and at least 3 or more examples of fine-grained or coarse-grained examples are selected.
[0022] Specifically, according to needs, other granular examples can also be included to enrich the correct sentence examples and ensure the efficiency of error correction display.
[0023] Specifically, referring to the example, the correct sentence is "The implementation of this project is conducive to the construction of a national comprehensive railway hub", and the fine-grained example is: "the" "project" "the" "implementation" "is conducive to" the" construction" of" the" national" comprehensive" railway" hub"; the coarse-grained example is: "the" "implementation" of" the project "is conducive to" the" construction" of" the national" comprehensive" railway" hub".
[0024] In this example, in step S2, the prompt word instruction of the controllable word segmentation granularity is defined as "semantic word segmentation expert", and the semantic block is a "small semantic unit of the context word", which is segmented and displayed as "chunk".
[0025] In this example, in step S4, the word segmentation results are parsed, the open source comparison library is used to generate the standard results, the results generated by the regular expression parsing model are used, and then processed into a List format, that is,
[0026] [{"text":xxx,"label":xxx},...],
[0027] Among them, label is [None,"-","+"], and different formats are displayed in different colors.
[0028] A text error correction device comprises an input unit for manually constructing an analysis example, a receiving unit for acquiring a text to be corrected and a prompt word instruction, a comparison processing unit for comparing the received error-corrected text with a comparison library; and a display unit for presenting error correction results in different colors.
[0029] 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 in the method for displaying text error correction results as claimed in any one of claims 1 to 4 when executing the computer program.
[0030] A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for displaying text error correction results as described in any one of claims 1 to 4 is implemented.
[0031] A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for displaying text error correction results as described in any one of claims 1 to 7 is implemented.
[0032] 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 method for displaying text error correction results, characterized in that: The following steps are involved: S1: Use correct sentences to construct participle examples; S2: Generate a prompt word instruction with controllable word segmentation granularity according to step 1; S3: Input text error correction results, and output incorrect sentence segmentation results and correct sentence segmentation results under the prompt word instruction with controllable segmentation granularity generated in step S2; S4: Call commercial or open source models to generate and display parseable results based on prompt words.
2. The method for displaying text error correction results according to claim 1, characterized in that: In step S1, word segmentation examples are manually constructed, and the same manual input sentence is divided into fine-grained examples and coarse-grained examples, and at least three or more fine-grained examples or coarse-grained examples are selected.
3. The method for displaying text error correction results according to claim 2, characterized in that: In step S2, the prompt word instruction of the controllable word segmentation granularity is defined as "semantic word segmentation expert", and the semantic block is a "small semantic unit of context words", which is segmented and displayed as "chunk".
4. The method for displaying text error correction results according to claim 3, characterized in that: In step S4, the word segmentation results are parsed, the open source comparison library is used to generate the standard results, the results generated by the regular expression parsing model are processed into a List format, that is, [{"text":xxx,"label":xxx},...] Among them, label is [None,"-","+"], and different formats are displayed in different colors.
5. A text error correction device, characterized in that: The device includes an input unit for manually constructing an analysis example, a receiving unit for obtaining a text to be corrected and a prompt word instruction, a comparison processing unit for comparing the received text with corrections with a comparison library; and a display unit for presenting correction results in different colors.
6. 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 in the method for displaying text error correction results according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for displaying text error correction results as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Chinese text error correction method and device, equipment and medium
CN115169344A
Text processing method and device, storage medium and equipment
CN117112764A
Multi-granularity fusion model-based intelligent semantic chinese sentence matching method, and device
WO2021164199A1