Chinese text intelligent correction method fusing spelling and semantics

By using a multi-agent parallel generation of candidate correction sets and a multi-dimensional evaluation mechanism, the rigidity of existing Chinese text intelligent error correction methods is solved, achieving accurate and diverse error correction effects to meet users' personalized needs.

CN120930635BActive Publication Date: 2025-12-26YICHUANG JINGYUN DIGITAL TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511445457.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-11
Publication Date
2025-12-26
Estimated Expiration
2045-10-11

AI Technical Summary

Technical Problem

Existing intelligent text correction methods for Chinese text ignore the richness of natural language expression and the personalized needs of users during the correction process, resulting in rigid output results that cannot meet the personalized needs of different scenarios.

Method used

A multi-agent parallel generation of candidate correction sets is adopted. Combined with conflict resolution and multi-dimensional evaluation mechanisms, the combination of spelling agents, grammar agents, semantic agents and style agents is dynamically called according to the error correction strictness level of the user's instructions to carry out diversified error correction processing.

Benefits of technology

It achieves accurate error correction and diverse expressions, meets personalized needs in different scenarios, and improves the system's practicality and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120930635B_ABST
    Figure CN120930635B_ABST
Patent Text Reader

Abstract

The application discloses a kind of Chinese text intelligent correction methods of fusing spelling and semantics, it is related to data processing technical field. Including have: S1: according to the original Chinese text to be corrected and correction intention instruction, through the parallel operation of each intelligent agent, obtain each intelligent agent's original candidate correction set;S2: according to the correction intention instruction, the original candidate correction set is handled, and the score size of each original candidate correction item is obtained;S3: through diversity optimization screening algorithm, the original candidate correction item with the comprehensive evaluation score is compared, and the final candidate correction item set is determined.The application generates candidate correction set in parallel through multiple intelligent agents, and combines it with conflict resolution and multidimensional evaluation mechanism, which can not only ensure the accuracy of correction, but also provide diversified expression selection, thereby avoiding the problem of single and rigid output of traditional correction system.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a Chinese text intelligent correction method fusing spelling and semantics. BACKGROUND

[0002] With the rapid development of information technology and the widespread popularity of Internet applications, the use frequency of Chinese text in social media, online education, e-commerce, intelligent customer service, office automation and other scenarios has increased dramatically. However, due to input errors, homophonic character confusion, homograph misuse, improper grammar and other reasons, various errors are common in user-generated Chinese text, which seriously affects the accurate transmission of information and user experience. Therefore, as an important research direction in the field of natural language processing (NLP), Chinese text intelligent correction technology has received widespread attention from academia and industry.

[0003] Current mainstream Chinese text correction methods can be divided into rule-based methods, statistical-based methods and deep learning-based methods. Early correction systems rely heavily on manually constructed language rule libraries and dictionary matching, such as using homophone tables, homograph tables or grammar templates to identify and correct errors. This method has high accuracy in specific fields, but its rule coverage is limited, maintenance cost is high, and it is difficult to cope with the dynamic evolution and diversified expression of language.

[0004] Chinese patent application CN118426600A discloses an intelligent input method system based on large language model technology. By training and optimizing the large language model, it has the ability to understand natural language, and combines user input habits and context information to accurately understand the user's input intent, improving the intelligence and accuracy of the input method. It aims to provide users with a more efficient, intelligent and personalized input experience.

[0005] The above technical solution can improve the intelligence and accuracy of the text through input prediction and intent recognition, but it uses a one-way and black-box decision mechanism to find a single optimal correction as the goal, completely ignoring the inherent richness of natural language expression and the individual needs of users for correction style, tone and applicable scenarios, resulting in output results that are often mechanically correct but situationally inappropriate and rigid. SUMMARY

[0006] The present application aims to provide a Chinese text intelligent correction method fusing spelling and semantics to solve the problems raised in the background art.

[0007] To achieve the above-mentioned purpose, the present application provides the following technical solution: a Chinese text intelligent correction method fusing spelling and semantics, comprising:

[0008] S1: candidate generation: according to the original Chinese text to be corrected and the correction intention instruction, through the parallel running of each agent, the original candidate correction set of each agent is obtained;

[0009] S2: evaluation determination: according to the correction intention instruction, the original candidate correction set is processed to obtain the score of each original candidate correction item in the original candidate correction set, including:

[0010] S2.1: conflict resolution: through the set arbitration rule, all original candidate correction items are classified, and the joint candidate set without conflict is reserved, and the candidate set with conflict is directly screened;

[0011] S2.2: multi-dimensional evaluation: according to the reserved and screened original candidate correction item, the comprehensive evaluation score corresponding to each original candidate correction item is determined through the basic correctness score, the style matching degree score, the diversity contribution score and the user historical preference matching degree score;

[0012] S3: screening determination: through the diversity optimization screening algorithm, the original candidate correction item with the comprehensive evaluation score is compared to determine the final candidate correction item set.

[0013] Further, the original candidate correction set of each agent is obtained, including:

[0014] S1.1: data acquisition: through the user interface module and the intention analysis engine, the original Chinese text to be corrected and the correction intention instruction are obtained;

[0015] S1.2: level determination: compare the correction intention instruction with the set strategy table to determine the corresponding correction strictness level, and determine the called agent combination according to the correction strictness level, the agent including spelling agent, syntax agent, semantic agent and style agent;

[0016] S1.3: agent generation: according to the called agent combination, the original Chinese text to be corrected is processed to obtain the corresponding candidate correction item of each agent.

[0017] Further, the correction strictness level includes only correcting wrong words, optimizing expression and rewriting completely, when the correction strictness level is only correcting wrong words, the corresponding called agent combination is spelling agent, when the correction strictness level is optimizing expression, the corresponding called agent combination is spelling agent, syntax agent and semantic agent, when the correction strictness level is rewriting completely, the corresponding called agent combination is spelling agent, syntax agent, semantic agent and style agent.

[0018] Further, the spelling agent identifies the shape / sound similar wrong characters through the character-level Transformer and the Chinese character structure knowledge graph, and is used for checking the writing correctness of the characters and words in the original Chinese text.

[0019] The syntax agent detects the syntax structure errors through the dependency syntax analysis and the CCG model, and is used for detecting the syntax compliance of the original Chinese text.

[0020] The semantic agent identifies the semantic contradiction and the reference ambiguity through the pre-trained language model, and is used for detecting the sentence representation and the sentence logic of the original Chinese text.

[0021] The style agent identifies the expression style through the fine-grained style control vector, and is used for adding the sentence style to the original Chinese text according to the user instruction.

[0022] Further, the non-conflict joint candidate set is reserved, and the conflicting candidate set is directly screened, including:

[0023] S2.1.1: identification processing: according to the content of the original Chinese text, the modification position of each candidate correction item is determined, and the candidate correction items with the same modification position are divided into the same category, and according to the modification scheme content corresponding to the candidate correction items in each category, the modification content conflicting modification scheme is taken as the conflicting candidate set, and the modification content non-conflicting modification scheme is taken as the non-conflict joint candidate set;

[0024] S2.1.2: initial decision processing: according to the correction intention instruction, the corresponding error correction strictness is determined, and according to the error correction strictness, the agent priority is set, and according to the agent priority and the corresponding agent of each candidate correction item in the conflicting candidate set, the candidate correction item corresponding to the agent with the highest priority is reserved;

[0025] S2.1.3: re-decision processing: the style agent is set as the highest priority through the coordinator, the candidate correction item corresponding to the style agent is reserved, and through the word fusion strategy, the new candidate correction item is obtained according to the word combination corresponding to all candidate correction items in the category which has not been deleted.

[0026] Further, when the error correction strictness level is only wrong word correction, the spelling agent is set as the highest priority, when the error correction strictness level is optimization expression, the semantic agent is set as the highest priority, and when the error correction strictness level is comprehensive rewriting, the style agent is set as the highest priority.

[0027] Further, the basic correctness score of the original candidate correction item is obtained through the set correctness review process and the basic agent, and the basic agent includes a syntax agent and a semantic agent.

[0028] According to the style requirement of the user instruction, a target style vector is set, the original candidate correction item is taken as the input of the style analysis model, an actual style vector is output, and the style matching degree score of the original candidate correction item is obtained through the cosine similarity between the target style vector and the actual style vector.

[0029] According to the words, syntax, semantics and style in each candidate correction item, the lexical overlap degree, the syntactic structure similarity, the semantic equivalence and the style tendency are set, and the diversity contribution score of the original candidate correction item is determined.

[0030] According to the context content of the original Chinese text, scene features are set, and the scene features are taken as the input of the user intention evolution model, a prediction probability is output, and the user historical preference matching degree score of the original candidate correction item is determined.

[0031] Further, the final candidate correction item set is determined, including:

[0032] S3.1: determining an initial candidate: comparing all comprehensive evaluation scores according to the original candidate correction item with the comprehensive evaluation score, determining the maximum comprehensive evaluation score, and the candidate correction item corresponding to the comprehensive evaluation score is the initial candidate correction item;

[0033] S3.2: determining a remaining candidate: obtaining the difference degree between the initial candidate correction item and the remaining candidate correction item through the coordinator, combining the difference degree and the comprehensive evaluation score corresponding to each remaining candidate correction item, determining the final score corresponding to each remaining candidate correction item, comparing all final scores, determining the maximum final score, and the candidate correction item corresponding to the maximum final score is the remaining candidate.

[0034] Further, according to the modified text content corresponding to the initial candidate correction item and the remaining candidate, the length, the formality and the emotional intensity of the modified text content are determined, the description label is set, and the description label and the modification reason corresponding to the candidate scheme are combined to construct a scheme comparison table, and the description label includes the brevity degree, the spoken language degree and the emotion degree.

[0035] Compared with the prior art, the beneficial effects of the present application are:

[0036] One: the application can ensure the accuracy of error correction and provide diversified expression selection by combining the multi-agent parallel generation of the candidate correction set with the conflict resolution and multi-dimensional evaluation mechanism, thereby avoiding the problem of single and rigid output of the traditional error correction system;

[0037] Secondly, the application can determine the priority level of the intelligent agent according to the error correction strictness level of the user instruction, and set the intelligent agent combination according to the error correction strictness level of the error correction text, so that the error correction result can meet the individualized needs in different scenarios;

[0038] Thirdly, the application can perform efficient error correction through a deep learning model such as Transformer, dependency syntax analysis and style control vector, and combine arbitration rules and diversity optimization algorithm, thereby not only reducing manual intervention, but also improving the practicability and scalability of the system. BRIEF DESCRIPTION OF DRAWINGS

[0039] Figure 1 is the flowchart of the Chinese text intelligent error correction method in the application;

[0040] Figure 2 is the screening flowchart of the contradictory candidate set in the application;

[0041] Figure 3 is the multi-dimensional scoring radar effect diagram in the application;

[0042] Figure 4 is the user selection preference statistical chart in the application. DETAILED DESCRIPTION

[0043] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, not all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the application.

[0044] Current deep learning-based text correction systems usually use a one-way and black-box decision mechanism to find a single optimal correction when generating correction suggestions, completely ignoring the inherent richness of natural language expression and the user's individual needs for correction style, tone, and applicable scenarios, resulting in output results that often exhibit mechanical correctness but are not contextually appropriate. However, the technical solution of the present application dynamically calls spelling agents, syntax agents, semantic agents, and style agents through the error correction strictness level of user instructions, and obtains the corresponding candidate correction set. At the same time, the candidate correction set obtained is subjected to conflict resolution processing and dimension evaluation processing to obtain the comprehensive score of each candidate correction item, and through a diversity optimization algorithm, the final candidate correction item set is determined.

[0045] Embodiment 1

[0046] Reference Figures 1-4 The present embodiment provides a Chinese text intelligent correction method fusing spelling and semantics, which specifically includes the following steps:

[0047] Step S1: Candidate generation. That is, according to the original Chinese text to be corrected and the correction intention instruction displayed by the user, the agents are worked in parallel to obtain the original candidate correction set of each agent. Specifically as follows:

[0048] Step S1.1: Data acquisition. That is, through the set user interface module and intention analysis engine, the original Chinese text to be corrected and the correction intention instruction displayed by the user are obtained. Specifically, the graphical user interface / natural language command line interface / API interface can be used to set the interactive interface to receive the original Chinese text and intention instruction input by the user.

[0049] Further, according to the original Chinese text and intention instruction input by the user, the intention analysis engine is set to analyze and standardize it into a corresponding structured instruction object. It is worth noting that the intention analysis engine set in the present embodiment includes but is not limited to simple mapping relationship and intention recognition model (such as rule-based intention recognition model, lightweight machine learning model.

[0050] Step S1.2: Level determination. That is, according to the intention instruction obtained in step S1.1, the corresponding instruction command is extracted, and according to the extracted instruction command and the set strategy table, the corresponding error correction strictness level is determined. At the same time, according to the determined error correction strictness level, the corresponding modification operation and the called agent combination are determined. Specifically, the agents in the present embodiment include spelling agents, syntax agents, semantic agents, and style agents.

[0051] In this embodiment, the strategy table set is shown in Table 1 below, specifically:

[0052] Table 1: Strategy table

[0053] Error correction rigor level Modification operation Invoked agent Only error correction Only replace misspelled words, misuse punctuation. Do not adjust word order, do not change sentence structure, do not replace vocabulary. Spelling agent Optimize expression Correctable errors, optimized vocabulary, adjusted awkward sentence structure, corrected minor grammatical issues. Spelling agent, grammar agent, and semantic agent Full rewrite Allow changes in sentence structure, replacement of large amounts of vocabulary, restructuring of semantic expression, to achieve advanced goals such as style conversion. Spelling agent, grammar agent, semantic agent, and style agent

[0054] Step S1.3: Agent generation. That is, according to the calling agent determined in step 1.2, the original Chinese text obtained in step S1.1 is processed to obtain the corresponding candidate correction items. That is, through the spelling agent, syntax agent, semantic agent and style agent, a plurality of candidate correction items are obtained.

[0055] In this embodiment, the spelling agent is used to check the writing correctness of the characters and words in the original Chinese text to ensure the writing correctness of the characters and words in the original Chinese text. That is, through the character-level Transformer and the Chinese character structure knowledge graph, the similar / similarly confused characters are identified to provide at least one compliant replacement item for each incorrect word. Specifically, through the similar / similarly confused character dictionary knowledge base and the similar / similarly confused character graph knowledge base set in the spelling agent, the original Chinese text is checked word by word to see if there are similar / similarly confused problems. And when there are confusion problems, according to the similar / similarly confused character dictionary knowledge base and the similar / similarly confused character graph knowledge base set, a plurality of correct options are provided, that is, a plurality of candidate correction items corresponding to the spelling agent.

[0056] Further, the syntax agent is used to detect the syntax compliance of the original Chinese text to ensure that the sentence structure of the original Chinese text conforms to the syntax rules and the sentence is smooth and fluent. That is, through the dependency syntax analyzer and the CCG model, the syntax structure error is detected to provide a plurality of compliant rewriting schemes for each error structure. Specifically, according to the sentence composition architecture of the original Chinese text, the syntax of the original Chinese text is analyzed to obtain the sentence structure distribution of the original Chinese text, that is, the subject, predicate, object, attribute, adverbial and complement of the sentence, to determine the mutual relationship between the components. Specifically, according to the obtained sentence structure distribution, the syntax compliance of the original Chinese text is judged to determine the corresponding syntax problem, and a plurality of correct sentence structures corresponding to the syntax problem are provided, that is, a plurality of candidate correction items corresponding to the syntax agent.

[0057] Further, the semantic agent is used to detect the sentence representation and logic of the original Chinese text to ensure that the sentences of the original Chinese text have no ambiguity. That is, through the pre-trained language model, semantic contradictions and reference ambiguities are identified, and multiple semantic consistent but different wording or sentence modification suggestions are generated through conditional generation technology. Specifically, through the set language model, the semantics of the original Chinese text are detected to determine the semantic problems corresponding to the original Chinese text. And according to the determined semantic problems, a plurality of different wording but same meaning sentences are generated through conditional generation algorithm, that is, a plurality of candidate modification items corresponding to the semantic agent.

[0058] Further, the style agent is used to add corresponding sentence style to the original Chinese text according to the user instruction. That is, through the fine-grained style control vector, inconsistent expressions are identified, and multiple style modification suggestions within the continuous spectrum in the formal degree, emotional intensity and complexity dimensions that meet the user instruction are generated. Specifically, according to the user instruction, the corresponding style control parameters are determined, including but not limited to formal degree parameters, emotional intensity parameters and oralization parameters. At the same time, according to the content of the original Chinese text, the corresponding style attributes are determined, that is, according to the style attributes of the original Chinese text and the style control parameters corresponding to the user instruction, the corresponding multiple sentences meeting the target style are generated through the processing of the deep generation model, that is, a plurality of candidate modification items corresponding to the style agent.

[0059] Step S2: evaluation and determination. That is, according to the user intention instruction in step S1.1, the candidate modification items of each agent obtained in step S1.3 are processed to score each candidate modification item to obtain a scored candidate set. Specifically as follows:

[0060] Step S2.1: conflict resolution. That is, according to the set arbitration rule, the candidate modification items corresponding to each agent are processed to determine the contradictory candidate set and the conflict-free joint candidate set from them, and the conflict-free joint candidate set is retained and scored, and the contradictory candidate set is directly deleted. Specifically as follows:

[0061] Step S2.1.1: identification and processing. That is, through the coordinator, the candidate modification items corresponding to each agent are collected and classified according to the content of the original Chinese text obtained in step S1.1. Specifically, according to the content of the original Chinese text, the modification position corresponding to each candidate modification item is determined. At the same time, according to the modification position corresponding to each candidate modification item, the candidate modification items with the same modification position are classified into a category.

[0062] Further, according to all the candidate correction items in each category, the modification schemes corresponding to all the candidate correction items in the category are uniformly compared to determine the modification schemes that conflict with each other, i.e., the opposite candidate correction items that conflict with each other.

[0063] Step S2.1.2: Processing the first decision. That is, according to the user intention instruction obtained in step S1.1, the corresponding error correction strictness and applicable scenario are determined, and the corresponding agent priority is determined according to the error correction strictness and applicable scenario. Specifically, when the error correction strictness level corresponding to the user intention instruction is only to correct errors, the priority of the spelling agent is the highest. When the error correction strictness level corresponding to the user intention instruction is to optimize expression, the priority of the semantic agent is the highest. When the error correction strictness level corresponding to the user intention instruction is to rewrite comprehensively, the priority of the style agent is the highest.

[0064] Further, according to the determined agent priority, the mutually conflicting modification schemes in each category determined in step S2.1.1 are selected. That is, when the priority of the spelling agent is the highest, and the spelling agent exists in the agents corresponding to the mutually conflicting modification schemes, the modification scheme corresponding to the spelling agent is retained, and the other modification schemes are deleted. Similarly, when the priority of the semantic agent is the highest, and the semantic agent exists in the agents corresponding to the mutually conflicting modification schemes, the modification scheme corresponding to the semantic agent is retained, and the other modification schemes are deleted. Similarly, when the priority of the style agent is the highest, and the style agent exists in the agents corresponding to the mutually conflicting modification schemes, the modification scheme corresponding to the style agent is retained, and the other modification schemes are deleted.

[0065] Step S2.1.3: Processing the second decision. That is, all the candidate correction items in the category that have not been deleted in step S2.1.2 are selected by the coordinator setting the style agent as the highest priority. Specifically, when the style agent exists in the agents corresponding to all the candidate correction items in the category that have not been deleted, the modification scheme corresponding to the style agent is retained, and the other modification schemes are deleted.

[0066] Further, when the style agent does not exist in the agents corresponding to all the candidate correction items in the category that have not been deleted, the coordinator obtains new candidate correction items corresponding to the word combinations of all the candidate correction items in the category that have not been deleted by using the word fusion strategy.

[0067] Step S2.2: Multi-dimension evaluation. That is, according to the candidate correction items obtained in step S2.1.2 and step S2.1.3, the corresponding basic correctness, the matching degree with the user's intention style, the difference degree with other candidates and the user's historical preference degree of conformity are determined to determine the comprehensive evaluation score of each candidate correction item.

[0068] In this embodiment, according to the agent corresponding to each candidate correction item, the basic agent, i.e. the syntax agent and the semantic agent, is determined. Specifically, when the agent corresponding to the candidate correction item is the syntax agent and the semantic agent, the basic correctness score corresponding to the syntax agent and the semantic agent is determined according to the confidence degree corresponding to the syntax agent and the semantic agent. Conversely, when the agent corresponding to the candidate correction item is the spelling agent and the style agent, the correctness review process is set, such as through the fast grammar checker or the language model calculation to obtain the sentence fluency of the candidate correction item, so as to determine the basic correctness score corresponding to the candidate correction item according to the sentence fluency.

[0069] Further, according to the style requirement corresponding to the user instruction, the target style vector including the formality, the emotional intensity and the complexity is decomposed. At the same time, each candidate correction item is taken as the input of the style analysis model (such as the embedding vector model based on the pre-trained language model), and the corresponding actual style vector is output. That is, according to the cosine similarity between the target style vector and the actual style vector, the style matching degree score corresponding to each candidate correction item is determined.

[0070] Further, according to the words, syntax, semantics and style in each candidate correction item, the lexical overlap, the syntactic structure similarity, the semantic equivalence and the style tendency of each candidate correction item relative to other candidate correction items are determined. That is, according to the number of the same core words used in each candidate correction item, the corresponding lexical overlap is determined. According to the degree of similarity of the sentence length and the sentence structure in each candidate correction item, the corresponding syntactic structure similarity is determined. According to the semantic content expressed by each candidate correction item, the corresponding semantic equivalence is determined. According to the style to which each candidate correction item is inclined, the corresponding style tendency is determined. At the same time, according to the lexical overlap, the syntactic structure similarity, the semantic equivalence and the style tendency obtained, the diversity contribution score corresponding to each candidate correction item is determined.

[0071] Further, according to the context content corresponding to the original Chinese text, the scene features corresponding to the current text are determined, including the user ID, the scene, the user instruction and the candidate scheme features, and the scene features obtained are taken as the input of the user intention evolution model (such as the recurrent neural network model based on sequence modeling), and the corresponding prediction probability is output, i.e. the user historical preference matching degree score corresponding to each candidate correction item is obtained.

[0072] In this embodiment, according to the basic correctness score, the style matching degree score, the diversity contribution score and the user historical preference matching degree score corresponding to each candidate revision item obtained, the comprehensive evaluation score corresponding to each candidate revision item is obtained by matching the corresponding score weight, specifically:

[0073]

[0074] Wherein: is the comprehensive evaluation score, is the score weight of the basic correctness score, is the basic correctness score, is the score weight of the style matching degree score, is the style matching degree score, is the score weight of the diversity contribution score, is the diversity contribution score, is the score weight of the user historical preference matching degree score, is the user historical preference matching degree score.

[0075] Step S3: screening and determining. That is, according to the candidate revision item with the comprehensive evaluation score obtained in step S2.2, the final candidate revision item set is determined by the diversity optimization screening algorithm. Specifically as follows:

[0076] Step S3.1: determine the initial candidate. That is, according to the candidate revision item with the comprehensive evaluation score obtained in step S2.2, the comprehensive evaluation score corresponding to each candidate revision item is compared to determine the maximum comprehensive evaluation score. That is, the candidate revision item corresponding to the maximum comprehensive evaluation score is the initial candidate revision item.

[0077] Step S3.2: determine the remaining candidate. That is, according to the initial candidate revision item determined in step S3.1, the difference degree size between the remaining candidate revision item and the initial candidate revision item is obtained by the coordinator. At the same time, the difference degree size and the comprehensive evaluation score of each remaining candidate revision item are combined to determine the final score corresponding to each remaining candidate revision item.

[0078] Further, the final score corresponding to each remaining candidate revision item is compared to determine the maximum final score. That is, the candidate revision item corresponding to the maximum final score is the remaining candidate.

[0079] That is, according to the initial candidate revision item determined in step S3.1 and the remaining candidate determined in step S3.2, the corresponding final candidate revision item set can be obtained.

[0080] Reference Figure 3 The style matching degree of scheme A is 0.9, the basic correctness is 0.8, the user historical preference is 0.7, but the diversity contribution is only 0.3. The style matching degree of scheme B is 0.5, the basic correctness is 0.6, the user historical preference is 0.4, but the diversity contribution is 0.8. The style matching degree of the recommended scheme obtained at the same time is 0.8, the basic correctness is 0.9, the user historical preference is 0.8, and the diversity contribution is 0.6. Compared with scheme A and scheme B, the comprehensive score of the recommended scheme obtained is improved by 25%.

[0081] Reference Figure 4 After providing diversified options, the user's satisfaction with the correction result is improved from 65% to 85%. The introduction of the style intelligent agent makes the text acceptance rate increased by 30%.

[0082] Embodiment 2

[0083] The embodiment provides a Chinese text intelligent correction method fusing spelling and semantics, and the specific implementation method is same as that of embodiment 1, and the difference is that a correction comparison table corresponding to the final candidate correction item set is determined according to the final candidate correction item set obtained, and the final candidate correction item is determined according to the correction comparison table. The application is illustrated by combining the specific implementation of the embodiment.

[0084] In the embodiment, the final candidate correction item set is converted into a corresponding scheme comparison table, so that the user can directly determine the final candidate correction item. Specifically, according to the candidate scheme of each candidate correction item in the final candidate correction item set, the modified text content corresponding to each candidate scheme is determined, and according to the length, formality and emotional intensity of the modified text content of each candidate scheme, the corresponding description label is determined. That is, according to the length of the modified text content, the corresponding brevity degree is determined, according to the formality of the modified text content, the corresponding colloquial degree is determined, and according to the emotional intensity of the modified text content, the corresponding emotional degree is determined.

[0085] Further, according to the brevity degree, formality and emotional degree obtained, and combining the modification reason corresponding to the candidate scheme, each candidate scheme is compared to construct a corresponding scheme comparison table, as shown in Table Two below, specifically:

[0086] Table Two: Scheme Comparison Table

[0087] Scheme content Label Modification reason Our company will hold a large-scale market activity next week Most formal, most detailed Original sentence "Gao" is too colloquial and does not match the business scene Our company will hold an activity next week Standard Replace "Gao" with "hold" to make it more standard Our company has a big event next week Most colloquial, most concise The style has been adjusted to a more relaxed colloquial expression

[0088] That is, according to the set scheme comparison table, the user can directly determine the corresponding final candidate correction item according to the demand. That is, according to the set scheme comparison table, the user can directly determine the corresponding final candidate correction item according to the demand.

[0089] While embodiments of the application have been shown and described, it is to be understood that the application is not limited to the details of the embodiments described, since various modifications can be made by those skilled in the art, without departing from the spirit and scope of the application, which are defined by the appended claims and their equivalents.

Claims

1. A method for intelligent correction of Chinese text spelling and semantics, characterized in that, Comprise: S1: candidate generation: according to the original Chinese text to be corrected and correction intention instruction, through the parallel operation of each agent, obtain the original candidate correction set of each agent; S2: evaluation and determination: according to the correction intention instruction, the original candidate correction set is processed to obtain the score of each original candidate correction item in the original candidate correction set, comprising: S2.1: conflict resolution: through the setting of arbitration rules, all original candidate correction items are classified, and the conflict-free joint candidate set is reserved, and the contradictory candidate set is directly screened, comprising: S2.1.1: identification and processing: according to the content of the original Chinese text, the modification position of each candidate correction item is determined, and the candidate correction items with the same modification position are divided into the same category, and according to the modification scheme content corresponding to each category of candidate correction items, the modification scheme with conflicting modification content is regarded as the contradictory candidate set, and the modification scheme with non conflicting modification content is regarded as the non conflicting joint candidate set; S2.1.2: processing initial decision: according to the correction intention instruction, the corresponding correction strictness is determined, and the agent priority is set according to the correction strictness, and according to the agent priority and the corresponding agent of each candidate correction item in the contradictory candidate set, the candidate correction item corresponding to the agent with the highest priority is reserved; S2.1.3: processing re decision: through the coordinator, the style agent is set as the highest priority, the candidate correction item corresponding to the style agent is reserved, and through the word fusion strategy, the new candidate correction item is obtained according to the word combination corresponding to all candidate correction items in the category which has not been deleted; S2.2: multi-dimensional evaluation: according to the reserved and screened original candidate correction item, the comprehensive evaluation score corresponding to each original candidate correction item is determined through the basic correctness score, the style matching degree score, the diversity contribution score and the user historical preference matching degree score; S3: screening and determination: through the diversity optimization screening algorithm, the original candidate correction item with the comprehensive evaluation score is compared to determine the final candidate correction item set.

2. The method according to claim 1, wherein, Obtain the original candidate correction set of each agent, comprising: S1.1: data acquisition: through the user interface module and the intention analysis engine, the original Chinese text to be corrected and the correction intention instruction are obtained; S1.2: grade determination: compare the correction intention instruction with the set strategy table to determine the corresponding correction strictness level, and determine the called agent combination according to the correction strictness level, the agent comprising spelling agent, syntax agent, semantic agent and style agent; S1.3: agent generation: according to the called agent combination, the original Chinese text to be corrected is processed to obtain the candidate correction item corresponding to each agent.

3. The method according to claim 2, wherein, The error correction strictness level includes only correcting errors, optimizing expression, and full rewriting, when the error correction strictness level is only correcting errors, the corresponding calling intelligent agent combination is a spelling intelligent agent, when the error correction strictness level is optimizing expression, the corresponding calling intelligent agent combination is a spelling intelligent agent, a syntax intelligent agent, and a semantic intelligent agent, and when the error correction strictness level is full rewriting, the corresponding calling intelligent agent combination is a spelling intelligent agent, a syntax intelligent agent, a semantic intelligent agent, and a style intelligent agent.

4. The method according to claim 2 or 3, characterized in that, The spelling intelligent agent identifies homophonic and homographic errors through a character-level Transformer and a Chinese character structure knowledge graph, and is used to check the correctness of characters and words in the original Chinese text; The syntax intelligent agent detects syntax structure errors through dependency syntax analysis and a CCG model, and is used to detect the grammatical compliance of the original Chinese text; The semantic intelligent agent identifies semantic contradictions and reference ambiguity through a pre-trained language model, and is used to detect the sentence representation and sentence logic of the original Chinese text; The style intelligent agent identifies expression style through a fine-grained style control vector, and is used to add sentence style to the original Chinese text according to user instructions.

5. The method according to claim 4, wherein, When the error correction strictness level is only correcting errors, the spelling intelligent agent is set to the highest priority, when the error correction strictness level is optimizing expression, the semantic intelligent agent is set to the highest priority, and when the error correction strictness level is full rewriting, the style intelligent agent is set to the highest priority.

6. The method according to claim 1, wherein, Through the set correctness review process and the basic intelligent agent, the basic correctness score of the original candidate correction item is obtained, the basic intelligent agent includes a syntax intelligent agent and a semantic intelligent agent; According to the style requirement of the user instruction, a target style vector is set, and the original candidate correction item is input into a style analysis model, and an actual style vector is output, and the style matching degree score of the original candidate correction item is obtained through the cosine similarity between the target style vector and the actual style vector; According to the words, syntax, semantics, and style in each candidate correction item, the lexical overlap degree, the syntax structure similarity, the semantic equivalence, and the style tendency are set to determine the diversity contribution score of the original candidate correction item; According to the context content of the original Chinese text, a scene feature is set, and the scene feature is input into a user intention evolution model to output a prediction probability to determine the user historical preference matching degree score of the original candidate correction item.

7. The method according to claim 1, wherein, The final candidate correction item set is determined, including: S3.1: Determine the initial candidate: compare all comprehensive evaluation scores according to the original candidate correction item with the comprehensive evaluation score, determine the maximum comprehensive evaluation score, and the candidate correction item corresponding to the comprehensive evaluation score is the initial candidate correction item; S3.2: determining the remaining candidate: through the coordinator, obtaining the difference between the initial candidate revision and the remaining candidate revision, combining the difference corresponding to each of the remaining candidate revision and the comprehensive evaluation score, determining the final score corresponding to each of the remaining candidate revision, comparing all final scores, determining the maximum final score, and the candidate revision corresponding to the maximum final score is the remaining candidate.

8. The method according to claim 7, wherein, According to the modified text content corresponding to the initial candidate revision and the remaining candidate, the length, formality and emotional intensity of the modified text content are determined, the description label is set, and the description label is combined with the modification reason corresponding to the candidate scheme to construct a scheme comparison table. The description label includes brevity, colloquialism and emotion.

Citation Information

Patent Citations

  • Intelligent input method system based on large language model technology

    CN118426600A

  • Text error correction method and device based on finite state converter

    CN114398876A

  • Activity scheme generation method and system based on artificial intelligence

    CN118537044A