Text simplification method and device, medium and electronic equipment
By guiding the process through multi-level simplification paths and target simplification examples, the problems of inaccurate levels and semantic deviations in text simplification are solved, achieving an accurate and semantically consistent simplification process.
Patent Information
- Application Number
- CN202511043916.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2025-11-14
AI Technical Summary
Existing technologies suffer from inaccurate simplification levels or semantic deviations when simplifying complex text, especially in simplification tasks with large scope, where maintaining semantic consistency is difficult.
By determining the multi-level simplification path of the text to be simplified, and using the reward matrix and semantic similarity to filter target simplification examples, the text simplification model is guided to perform multi-level simplification, generating a simplification inference chain and results.
Ensuring that text is accurately simplified to the target level improves the semantic accuracy of the simplification results and enhances the user's control over the simplification process.
Smart Images

Figure CN120950682A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of natural language processing technology, and more particularly relates to text simplification methods, devices, media, and electronic devices. Background Technology
[0002] Controlled Readability Text Simplification (RCTS) is a task that rewrites text into a specified, less readable version while preserving the original meaning. This technique is significant for improving information accessibility, such as simplifying educational materials for children, adapting medical information to a wider patient population, and ensuring content is comprehensible across different language and literacy levels.
[0003] While related technologies have shown potential in single-step simplification tasks, they face challenges in handling larger simplification ranges and maintaining semantic consistency, limiting their application in complex scenarios. In other words, current methods for simplifying natural language are prone to inaccurate simplification levels or semantic deviations when dealing with complex texts or large simplification ranges.
[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] The purpose of this invention is to provide a text simplification method, apparatus, medium, and electronic device to solve the problems of inaccurate simplification levels or semantic deviations in related technologies.
[0006] According to one aspect of the embodiments of this application, a text simplification method is provided, the method comprising: Get the text to be simplified, the initial level and the target level of the text to be simplified, and the level span between the initial level and the target level; When the level span exceeds a preset threshold, determine the multi-level simplification path of the text to be simplified. Select target simplified examples from the simplified example set that correspond to the level jumps of the multi-level simplified path; Based on the multi-level simplification path and target simplification examples, the text simplification model is guided to simplify the text to be simplified, and outputs the simplification inference chain and simplification result of the text to be simplified.
[0007] In one embodiment of this application, when the level span is greater than a preset threshold, determining the multi-level simplification path of the text to be simplified includes: when the level span is greater than the preset threshold, converting the simplification process from the initial level to the target level into multiple simplifications to obtain multiple intermediate level sequences; performing level detection on each intermediate output of each intermediate level sequence to obtain the level evaluation result of each intermediate output; and determining the multi-level simplification path of the text to be simplified based on the level evaluation result of each intermediate output.
[0008] In one embodiment of this application, determining the multi-level simplification path of the text to be simplified based on the level evaluation results of each intermediate output includes: constructing a reward matrix for each intermediate level sequence based on the level evaluation results of each intermediate output; and selecting the intermediate level sequence corresponding to the reward matrix with the largest reward value as the multi-level simplification path of the text to be simplified.
[0009] In one embodiment of this application, constructing a reward matrix for each intermediate level sequence based on the level evaluation results of each intermediate output includes: determining the simplified reward parameter for each step in each intermediate level sequence based on the level evaluation results of each intermediate output; and constructing a reward matrix for each intermediate level sequence based on the simplified reward parameter for each step in each intermediate level sequence.
[0010] In one embodiment of this application, selecting a target simplified example corresponding to the level jump of a multi-level simplified path from a simplified example set includes: filtering a successful simplified set that has the same level jump as the multi-level simplified path from the simplified example set; sorting the successful simplified set according to semantic similarity; and selecting multiple sets of simplified examples with high semantic similarity as target simplified examples.
[0011] In one embodiment of this application, the method provided by this application further includes: performing level detection on the simplification result to obtain the level to be verified of the simplification result; determining the level reward of this simplification process based on the level to be verified and the target level; and determining the semantic reward of this simplification process based on the semantic similarity between the simplification result and the text to be simplified.
[0012] In one embodiment of this application, the method provided by this application further includes: obtaining a first weight of the level reward and a second weight of the semantic reward; determining the total reward of the simplification result based on the level reward, the semantic reward, the first weight and the second weight; and updating the model weights of the text simplification model based on the simplification result, the text to be simplified and the total reward.
[0013] According to one aspect of the embodiments of this application, a text simplification apparatus is provided, the apparatus comprising: The acquisition module is used to acquire the text to be simplified, the initial level and the target level of the text to be simplified, and the level span between the initial level and the target level; The path determination module is used to determine the multi-level simplification path of the text to be simplified when the level span is greater than a preset threshold. The example acquisition module is used to select target simplified examples from the simplified example set that correspond to the level jump of the multi-level simplification path; The simplified output module guides the text simplification model to simplify the text to be simplified based on multi-level simplification paths and target simplification examples, and outputs the simplification inference chain and simplification result of the text to be simplified.
[0014] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the text simplification method provided in any embodiment of this application.
[0015] According to one aspect of the embodiments of this application, an electronic device is provided, including: a processor; a memory for storing executable instructions of the processor; the processor executes the executable instructions to enable the electronic device to implement the text simplification method provided in any embodiment of this application.
[0016] In the technical solution of this application, the text to be simplified, its initial level, and target level are obtained, and the level span between them is calculated. When the span exceeds a preset threshold, a multi-level simplification path is determined, and a target simplification example corresponding to the level jump of that path is selected from the simplification example set. Based on the multi-level simplification path and the target simplification example, the text simplification model is guided to simplify, and finally, a simplification inference chain and a simplification result are output. This process ensures that the text is accurately simplified to the target level, while the target simplification example provides an accurate reference for the model, making the semantics of the simplification result more accurate. In addition, the generated simplification inference chain makes it easier for users to understand the simplification process and make adjustments, thereby improving the accuracy of simplification while enhancing the user's control over the simplification result.
[0017] It should be understood in this application that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0019] Figure 1 The illustration shows a flowchart of a text simplification method provided in an embodiment of this application.
[0020] Figure 2The illustration shows a flowchart of a text simplification method provided in an embodiment of this application.
[0021] Figure 3 The diagram illustrates the structure of a text simplification device provided in one embodiment of this application.
[0022] Figure 4 The diagram illustrates the structure of an electronic device provided in one embodiment of this application.
[0023] Figure 5 A schematic block diagram of a computer system architecture for implementing an electronic device according to embodiments of the present application is shown. Detailed Implementation
[0024] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.
[0025] Furthermore, the features, structures, or characteristics described in this application can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, units, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0026] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0027] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0028] like Figure 1 As shown, this application provides a text simplification method, which includes steps S110 to S140, and the specific process is as follows.
[0029] S110. Obtain the text to be simplified, the initial level and target level of the text to be simplified, and the level span between the initial level and the target level.
[0030] Specifically, the text simplification mentioned in this application refers to rewriting text into a version with a specified lower readability while retaining the original meaning. The text to be simplified is the text before simplification. This application can evaluate the level of the text using specified natural language proficiency assessment standards. An initial level is obtained by evaluating the level of the text to be simplified according to these standards, and the target level is the text level that the user expects the text to reach after the simplification process. These natural language proficiency assessment standards include the Common European Framework of Reference for Languages (CEFR), the Canadian Language Benchmarks (CLB), and the International Chinese Language Education Chinese Proficiency Level Standards. Taking the CEFR as an example, it is divided into six levels, from lowest to highest: A1, A2 (basic level), B1, B2 (independent level), C1, and C2 (proficient level). The level span is the difference between two levels; for example, the level span between A1 and A2 is 1, between A2 and B2 is 2, and between A1 and C2 is 5. The relevant technologies can achieve level accuracy and language consistency when the span is single level (such as simplifying text from A2 to A1) and some medium span (such as simplifying text from C2 to B1). However, when the span is multiple levels, especially when simplifying from C2 to A1, the simplified text level is prone to inconsistency with the target level, or semantic inconsistency and content distortion.
[0031] S120. When the level span is greater than the preset threshold, determine the multi-level simplification path of the text to be simplified.
[0032] Specifically, the preset threshold is set in advance based on the simplification capability of the text simplification model. For example, if the simplification accuracy of the text simplification model (hereinafter referred to as the model) is statistically analyzed across different level spans, and if inaccurate simplification is likely to occur when the level span is greater than 2, then the preset threshold can be set to 2. A multi-level simplification path refers to the path obtained by simplifying the text to be simplified multiple times. For example, to simplify from C2 to A1, the text can first be simplified from C2 to B2, and then from B2 to A1, involving multiple level jumps. This step, by first determining the multi-level simplification path, provides a basis for the subsequent simplification process, enabling step-by-step and hierarchical simplification of the text to be simplified. This improves upon the semantic loss or inadequate simplification that may occur with one-step simplification, thereby ensuring that the text is accurately simplified to the target level.
[0033] In one embodiment of this application, such as Figure 2 As shown, S120 may include S1210 to S1230, and the specific process is as follows.
[0034] S1210. When the level span is greater than the preset threshold, the simplification process from the initial level to the target level will be transformed into multiple simplifications to obtain multiple intermediate level sequences.
[0035] Specifically, the simplification process from the initial level to the target level is transformed into multiple simplifications, allowing for step-by-step, hierarchical simplification of the text, rather than a one-step simplification. For example, the simplification process from C2 to A1 is transformed into multiple simplifications, that is, adding one or more intermediate levels between C2 and A1. Therefore, the resulting sequence of intermediate levels includes: {C2,C1,A1}, {C2,B2,A1}, {C2,B1,A1}, {C2,A2,A1}, {C2,C1,B2,A1}, {C2,C1,B1,A1}, {C2,C1,A2,A1}, { The text is divided into several sequences: {C2,B2,B1,A1}, {C2,B2,A2,A1}, {C2,B1,A2,A1}, {C2,C1,B2,B1,A1}, {C2,C1,B2,A2,A1}, {C2,C1,B1,A2,A1}, {C2,B2,B1,A2,A1}, and {C2,C1,B2,B1,A2,A1}. From these sequences, a multi-level simplification path is determined for the text to be simplified. This step comprehensively identifies multiple intermediate level sequences resulting from multiple simplifications, even when the level span exceeds a preset threshold. This reduces the possibility of missing simplification paths and increases the accuracy of multiple simplification paths.
[0036] S1220. Perform level detection on each intermediate output of each intermediate level sequence to obtain the level evaluation result of each intermediate output.
[0037] Specifically, when a model performs text simplification, the simplification accuracy may vary depending on the text domain, text type, text level, or other factors. For example, when simplifying texts a and b from C2 to A1, for text a, simplifying it from C2 to C1 and then from C1 to A1 yields higher accuracy; while for text b, simplification from C2 to C1, from C1 to B2, from B2 to A2, and from A2 to A1 might also yield higher accuracy. Furthermore, the intermediate level sequence {C2, B2, A1} for text b includes intermediate outputs from C2 to B2. The intermediate output simplified from B2 to A1 Integrated intermediate output Intermediate output The level accuracy and semantic accuracy are used to determine the level evaluation results of each intermediate output of the intermediate level sequence {C2,B2,A1}. Therefore, by performing level detection on each intermediate output of each intermediate level sequence and obtaining the level evaluation results of each intermediate output, it is possible to understand in real time whether each step in the simplification process has achieved the expected simplification effect. The level evaluation results include level accuracy (or readability evaluation).
[0038] The accuracy of intermediate output levels can be determined using a preset readability estimation function. Testing was conducted, among which This function represents a sentence and can convert sentences into sentences. This is mapped to a readability level, which can be a discrete natural language proficiency rating scale label or a continuous score related to reading difficulty. In practical applications, the readability estimation function... It can be implemented as a classifier or regression model trained on a corpus with level labels that include natural language rating criteria.
[0039] S1230. Based on the level evaluation results of each intermediate output, determine the multi-level simplification path of the text to be simplified.
[0040] Specifically, the evaluation results of each intermediate output are statistically analyzed to obtain a comprehensive evaluation result of the intermediate level sequence. The intermediate level sequence with the best comprehensive evaluation result is selected as the multi-level simplification path. In this way, the level accuracy of multiple intermediate outputs can be combined to more comprehensively reflect the reliability of the model in simplifying the text to be simplified from the initial level to the target level, and a more accurate multi-level simplification path can be obtained.
[0041] In one embodiment of this application, S1230 may include: constructing a reward matrix for each intermediate level sequence based on the level evaluation results of each intermediate output; and selecting the intermediate level sequence corresponding to the reward matrix with the largest reward value as the multi-level simplification path of the text to be simplified.
[0042] Specifically, in one embodiment of this application, constructing a reward matrix for each intermediate level sequence based on the level evaluation results of each intermediate output includes: determining the simplified reward parameter for each step in each intermediate level sequence based on the level evaluation results of each intermediate output; and constructing the reward matrix for each intermediate level sequence based on the simplified reward parameter for each step in each intermediate level sequence. For example, a preset value or flag can be used to represent whether the evaluation results of each level meet a preset standard, and a reward matrix can be defined. The values of each reward parameter are taken from the following formula 1:
[0043] In Formula 1, Indicates the initial level of the text to be simplified. Indicates the target level of the text to be simplified. This represents the level evaluation result of the intermediate output. Formula 1 above indicates that if the level evaluation result of the intermediate output equals the target level... Then the reward corresponding to the intermediate output. =1; if the intermediate output level evaluation result is consistent with the target level If the difference is 1, then the reward corresponding to the intermediate output is... The reward is 0.5; otherwise, the reward corresponding to this intermediate output is... The value is -1. Thus, for each intermediate output in the intermediate level sequence, a preset value can be used to represent its difference from the target level, reflecting the accuracy of level simplification corresponding to different simplification steps. It should be understood that the specific value of the reward parameter in Formula 1 above is only one example and does not mean that the reward parameter can only be set to 1, 0.5, or -1; its specific value only needs to reflect the accuracy of level simplification.
[0044] After constructing the reward matrix, dynamic programming can be used to find the reward matrix that maximizes the reward value. The model is configured so that after each simplification, it must produce simplified text at a lower level than the original text to be simplified, in order to reduce the possibility of cyclical simplification. ,in To indicate the level of the simplified text, a multi-level simplification path is needed. This can be expressed as the following formula 2: ; in, Indicates the initial level. Indicates the target level. This indicates the level of the text before simplification. This indicates the level of the text to be simplified after simplification. Then set... Indicates in Reaching the first step The maximum cumulative reward value can be obtained at certain levels. Therefore, the Bellman recursive formula can be obtained as follows: Formula 3: ; In the text to be simplified (Without simplification) gradually increase (Simplify the number of times) until it reaches Optimal reward Indicates inclusion The reward value of the second-simplified optimal path, and how to recover the multi-level simplified path by preserving the backtracking pointer. It should be understood that, in addition to assessing the level accuracy of intermediate level sequences by constructing a reward matrix, the comprehensive evaluation result of intermediate level sequences can also be determined through other calculation methods, such as quantifying the level accuracy of each intermediate output by using scores, and finally calculating the total score to determine the comprehensive evaluation result of the intermediate level sequences.
[0045] S130. Select the target simplified example from the simplified example set that corresponds to the level jump of the multi-level simplified path.
[0046] Specifically, the simplified example set is a collection of pre-trained simplified examples. If the level jump of a multi-level simplification path is C1→A1, then simplified examples with the same level jump of C1→A1 are selected from the simplified example set as target simplified examples. Furthermore, an inference chain format can be pre-set for the examples in the simplified example set so that subsequent simplification processes can generate corresponding simplified inference chains based on this format. This inference chain format may include: Input: (Original sentence) With specified target level (Explanation) Inference chain: (i.e., a stepwise reasoning process for text simplification, where the model can break down a sentence into smaller parts, restate complex expressions in simpler terms, or list important facts to maintain the semantic accuracy of the sentence). Simplified output: (Level evaluation is) The final sentence ).
[0047] In one embodiment of this application, selecting a target simplified example corresponding to the level jump of a multi-level simplified path from a simplified example set includes: filtering a successful simplified set that has the same level jump as the multi-level simplified path from the simplified example set; sorting the successful simplified set according to semantic similarity; and selecting multiple sets of simplified examples with high semantic similarity as target simplified examples.
[0048] Specifically, a set of candidate simplification pairs was collected by simplifying sentences at different levels to lower levels using a cue-based language model (LLM). Then, a readability estimation function ∅(s) was used to filter these candidate pairs, retaining only those whose simplified level reached the target level. The candidate pairs are taken as the successful simplification set. Let... To start from the initial level To the target level The successful simplification of the set, that is, for each ,have and Then, semantic detection is performed on the simplified examples in the successfully simplified set, specifically through semantic similarity or semantic fidelity functions. To measure the semantic equivalence of two sentences, among which This refers to the sentence before simplification. This indicates a simplified sentence. Also, may be and The cosine similarity score ranges from 0 (completely unrelated) to 1 (semantically identical), and can also be converted into a percentage or a score within a preset range (5-point, 10-point, or 100-point scale). For example, the score with the highest semantic similarity can be selected from these. The former Yes, then the simplified leap is as follows: → The target example set is as follows: Formula 4: ; Among them, according to semantic similarity score Sort in descending order to obtain the top results from highest to lowest semantic similarity. Simplify the candidate pairs and then... Simplifying candidate pairs as ( → A simplified example of the target () for subsequent steps from () → This provides a simplified reference for the text simplification process.
[0049] S140. Based on the multi-level simplification path and target simplification example, guide the text simplification model to simplify the text to be simplified, and output the simplification inference chain and simplification result of the text to be simplified.
[0050] Specifically, the multi-level simplification path is the optimal simplification path from the initial level to the target level for the text to be simplified. Simplifying the text according to this path can improve the accuracy of the simplification level. The target simplification examples are a selected set of examples; simplifying the text according to these examples can improve the semantic accuracy of the simplification. Therefore, guiding the model's text simplification process with multi-level simplification paths and target simplification examples yields more accurate simplification results. Furthermore, the target simplification examples have a corresponding simplification inference chain format. Generating the simplification inference chain for the text to be simplified according to the target simplification example's inference chain format allows users to access the model's simplification logic and adjust the simplification process independently.
[0051] In the technical solution of this application, the text to be simplified, its initial level, and target level are obtained, and the level span between them is calculated. When the span exceeds a preset threshold, a multi-level simplification path is determined, and a target simplification example corresponding to the level jump of that path is selected from the simplification example set. Based on the multi-level simplification path and the target simplification example, the text simplification model is guided to simplify, and finally, a simplification inference chain and a simplification result are output. This process ensures that the text is accurately simplified to the target level, while the target simplification example provides an accurate reference for the model, making the semantics of the simplification result more accurate. In addition, the generated simplification inference chain makes it easier for users to understand the simplification process and make adjustments, thereby improving the accuracy of simplification while enhancing the user's control over the simplification result.
[0052] In one embodiment of this application, the method provided by this application further includes: performing level detection on the simplification result to obtain the level to be verified of the simplification result; determining the level reward of this simplification process based on the level to be verified and the target level; and determining the semantic reward of this simplification process based on the semantic similarity between the simplification result and the text to be simplified.
[0053] Specifically, the level of the simplified result is detected by the readability estimation function ∅(s) of the level evaluator to obtain the simplified result. Level to be verified Set up tiered rewards. The values of each reward parameter are taken from the following formula:
[0054] In Formula 5, if the level to be verified equal to target level Then the level reward The value is 1; if the level to be verified is 1. and target level If the difference is 1, then the level reward... It is 0.5; in all other cases, the level reward is... The value is -1. It should be understood that the specific value of the reward parameter in Formula 5 above is just one example, and does not mean that the reward parameter can only be set to 1, 0.5 or -1. Its specific value can reflect the accuracy of the level simplification.
[0055] In some embodiments, semantic rewards can be set. This allows us to use semantic similarity to represent the degree of semantic equivalence between the simplified result and the text to be simplified.
[0056] In one embodiment of this application, the method provided by this application further includes: obtaining a first weight of the level reward and a second weight of the semantic reward; determining the total reward of the simplification result based on the level reward, the semantic reward, the first weight and the second weight; and updating the model weights of the text simplification model based on the simplification result, the text to be simplified and the total reward.
[0057] Specifically, this application can ensure that the model outputs simplified results with high accuracy even with zero or a small number of samples. This embodiment further provides a method for fine-tuning the model through reinforcement learning. The goal of the reinforcement learning phase is to directly optimize the model to improve readability control accuracy and semantic preservation, rather than simply relying on the example set to guide the simplification results. The level reward has a preset first weight, and the semantic reward has a preset second weight. Users can directly adjust the specific values of the first and second weights, or they can be automatically adjusted through the reinforcement learning process. The level reward is based on the simplification result. Semantic reward First weight Second weight The total reward for the simplified result is determined by the following formula 6: ; Based on the above simplified results, the total reward is... The REINFORCE algorithm is used to adjust the model weights of the text simplification model. Update the model weights. The calculation formula is as follows: Formula 7: ; in Total reward , ( The benchmark (or baseline) indicates whether the value of the model's current action or state is better than the average level. This represents the original weights of the model. Represents the generated inference chain, This is the final output sentence. This represents the input sentence. This represents the target level after the input sentence has been simplified. The strategy for continuously optimizing the model using the above algorithm is as follows. To maximize the model's expected reward. .
[0058] This embodiment adjusts the weights of the level accuracy and semantic accuracy results of the simplification results according to specific needs to obtain a comprehensive evaluation result that matches the user's expectations. For example, if the user considers the level accuracy result to be more important and the semantic accuracy result to be secondary, the first weight of the level accuracy result can be increased and the second weight of the semantic accuracy result can be decreased, so that the comprehensive evaluation result can better reflect the level accuracy of the intermediate level sequence and the level accuracy of the determined multi-level simplification path is higher.
[0059] The following describes an embodiment of the device described in this application, such as... Figure 3 As shown, the text simplification device provided in this application includes the following modules.
[0060] The acquisition module 310 is used to acquire the text to be simplified, the initial level and the target level of the text to be simplified, and the level span between the initial level and the target level.
[0061] The path determination module 320 is used to determine the multi-level simplification path of the text to be simplified when the level span is greater than a preset threshold.
[0062] Example acquisition module 330 is used to select target simplified examples from the simplified example set that correspond to the level jump of the multi-level simplified path.
[0063] The simplified output module 340 is used to guide the text simplification model to simplify the text to be simplified based on the multi-level simplification path and the target simplification example, and output the simplification inference chain and simplification result of the text to be simplified.
[0064] In one embodiment of this application, the path determination module 320 includes: a multiple simplification unit, used to convert the simplification process from the initial level to the target level into multiple simplifications when the level span is greater than a preset threshold, to obtain multiple intermediate level sequences; a level detection unit, used to perform level detection on each intermediate output of each intermediate level sequence to obtain the level evaluation result of each intermediate output; and a path determination unit, used to determine the multi-level simplification path of the text to be simplified based on the level evaluation results of each intermediate output.
[0065] In one embodiment of this application, the path determination unit is further configured to construct a reward matrix for each intermediate level sequence based on the level evaluation results of each intermediate output; and select the intermediate level sequence corresponding to the reward matrix with the largest reward value as the multi-level simplification path of the text to be simplified.
[0066] In one embodiment of this application, the path determination unit is further configured to determine the simplified reward parameter for each intermediate level sequence based on the level evaluation results of each intermediate output; and to construct the reward matrix for each intermediate level sequence based on the simplified reward parameter for each intermediate level sequence.
[0067] In one embodiment of this application, the example acquisition module 330 includes: a level filtering unit, used to filter successful simplification sets from the simplified example set that have the same level jump as the multi-level simplification path; a semantic sorting unit, used to sort the successful simplification sets according to semantic similarity; and a semantic selection unit, used to select multiple sets of simplified examples with high semantic similarity as target simplified examples.
[0068] In one embodiment of this application, the apparatus provided by this application further includes: a first detection module, used to perform level detection on the simplification result to obtain the level to be verified of the simplification result; a first reward module, used to determine the level reward of this simplification process based on the level to be verified and the target level; and a second reward module, used to determine the semantic reward of this simplification process based on the semantic similarity between the simplification result and the text to be simplified.
[0069] In one embodiment of this application, the apparatus provided by this application further includes: a weight acquisition module, used to acquire a first weight for level reward and a second weight for semantic reward; a total reward calculation module, used to determine the total reward of the simplification result based on the level reward, readability reward, first weight and second weight; and a weight update module, used to update the model weights of the text simplification model based on the simplification result, the text to be simplified and the total reward.
[0070] It should be understood that the specific implementation details of the text simplification device in this application have been explained in detail in the corresponding method embodiments, and will not be repeated here.
[0071] The following describes the electronic device of this application, such as... Figure 4 As shown, this application provides an electronic device 400, which includes a processor 410 and a memory 420. The memory 420 is used to store executable instructions of the processor. The processor 410 executes the executable instructions to enable the electronic device to implement the text simplification method provided in any embodiment of this application.
[0072] Specifically, the text simplification method provided in this application is stored in the memory 420 of the electronic device, and the processor 410 executes the following method: obtain the text to be simplified and its initial level and target level, and calculate the level span between the two. When the span is greater than a preset threshold, determine a multi-level simplification path, select a target simplification example corresponding to the level span of the path from the simplification example set; guide the text simplification model to simplify based on the multi-level simplification path and the target simplification example, and finally output the simplification inference chain and simplification result.
[0073] This ensures that electronic devices can accurately simplify text to the target level, while the simplified examples provide accurate references for the model, making the simplified results semantically more accurate. Furthermore, the generated simplification inference chain facilitates user understanding and adjustments to the simplification process, thereby improving simplification accuracy while enhancing user control over the simplification results.
[0074] It should be understood that the specific implementation details of the electronic device in this application have been explained in detail in the corresponding method embodiments, and will not be repeated here.
[0075] Figure 5 A schematic block diagram of a computer system architecture for implementing an electronic device according to embodiments of the present application is shown.
[0076] It should be noted that, Figure 5 The computer system 500 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0077] like Figure 5 As shown, the computer system 500 includes a processor 501, which can be a CPU (Central Processing Unit) or an MCU (Microcontroller Unit). The processor 501 performs various appropriate actions and processes based on programs stored in read-only memory (ROM) 502 or programs loaded from storage section 508 into random access memory (RAM). The random access memory 503 also stores various programs and data required for system operation. The processor 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output interface 505 (I / O interface) is also connected to the bus 504.
[0078] The following components are connected to the input / output interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a local area network card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 510 as needed so that computer programs read from it can be installed into the storage section 508 as needed.
[0079] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by processor 501, it performs various functions defined in the system of this application.
[0080] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0081] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0082] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0083] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the specific embodiments provided in this application.
[0084] Other embodiments of this application will readily conceive of by those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0085] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A text simplification method, characterized in that, include: Obtain the text to be simplified, the initial level and the target level of the text to be simplified, and the level span between the initial level and the target level; When the level span is greater than a preset threshold, a multi-level simplification path for the text to be simplified is determined. Select target simplified examples from the simplified example set that correspond to the level jump of the multi-level simplified path; Based on the multi-level simplification path and the target simplification example, the text simplification model is guided to simplify the text to be simplified, and the simplification inference chain and simplification result of the text to be simplified are output.
2. The text simplification method as described in claim 1, characterized in that, When the level span is greater than a preset threshold, determining the multi-level simplification path of the text to be simplified includes: When the level span is greater than a preset threshold, the simplification process from the initial level to the target level is transformed into multiple simplifications to obtain multiple intermediate level sequences. Level detection is performed on each intermediate output of each intermediate level sequence to obtain the level evaluation result of each intermediate output; Based on the level evaluation results of each intermediate output, the multi-level simplification path of the text to be simplified is determined.
3. The text simplification method as described in claim 2, characterized in that, The step of determining the multi-level simplification path of the text to be simplified based on the level evaluation results of each intermediate output includes: Based on the evaluation results of each intermediate level, construct the reward matrix for each intermediate level sequence; The intermediate level sequence corresponding to the reward matrix with the largest reward value is selected as the multi-level simplification path of the text to be simplified.
4. The text simplification method as described in claim 3, characterized in that, The step of constructing a reward matrix for each intermediate level sequence based on the level evaluation results of each intermediate output includes: Based on the evaluation results of each intermediate level, determine the simplified reward parameters for each intermediate level sequence; Based on the simplified reward parameters for each intermediate level sequence, a reward matrix for each intermediate level sequence is constructed.
5. The text simplification method as described in claim 1, characterized in that, The step of selecting a target simplified example from the simplified example set that corresponds to the level jump of the multi-level simplified path includes: Select a set of successful simplifications from the set of simplified examples that have the same level jump as the multi-level simplification path; The successful simplified set is sorted according to semantic similarity; Multiple simplified examples with high semantic similarity are selected as the target simplified examples.
6. The text simplification method as described in claim 1, characterized in that, The method further includes: The simplified result is subjected to level detection to obtain the level to be verified of the simplified result; Based on the level to be verified and the target level, determine the level reward for this simplification process; Based on the semantic similarity between the simplification result and the text to be simplified, the semantic reward for this simplification process is determined.
7. The text simplification method as described in claim 6, characterized in that, The method further includes: Obtain the first weight of the level reward and the second weight of the semantic reward; The total reward for the simplification result is determined based on the level reward, the semantic reward, the first weight, and the second weight. Based on the simplification result, the text to be simplified, and the total reward, the model weights of the text simplification model are updated.
8. A text simplification device, characterized in that, include: The acquisition module is used to acquire the text to be simplified, the initial level and the target level of the text to be simplified, and the level span between the initial level and the target level; The path determination module is used to determine the multi-level simplification path of the text to be simplified when the level span is greater than a preset threshold. The example acquisition module is used to select target simplified examples from the simplified example set that correspond to the level jump of the multi-level simplification path; The simplified output module is used to guide the text simplification model to simplify the text to be simplified based on the multi-level simplification path and the target simplification example, and output the simplification inference chain and simplification result of the text to be simplified.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the text simplification method according to any one of claims 1 to 7.
10. An electronic device, characterized in that, include: processor; Memory for storing the executable instructions of the processor; The processor executes the executable instructions to cause the electronic device to implement the text simplification method as described in any one of claims 1 to 7 above.