Text evaluation generation methods, systems, electronic devices, and readable storage media
By generating prompt text that matches the source text, and using an intelligent analysis model for text adjustment and evaluation, the problems of flexibility and comprehensiveness in text evaluation are solved, achieving flexible and diverse text adjustments and detailed evaluation results.
Patent Information
- Application Number
- CN202410034630.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-09
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2044-01-09
AI Technical Summary
The existing text evaluation technology lacks flexibility and comprehensiveness, resulting in evaluation results that are not flexible and detailed enough.
By generating a first prompt text that matches the source text, adjusting it using an intelligent analysis model, obtaining clause pairs between the source and target texts, determining the correspondence between characters, and generating a second prompt text for evaluation, including evaluation methods of explanation and inquiry.
It improves the flexibility and comprehensiveness of text evaluation, enabling flexible and diverse error correction and polishing, and providing comprehensive and detailed evaluation results.
Smart Images

Figure CN118051605B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data analysis technology, and in particular to a text evaluation generation method, system, electronic device, and readable storage medium. Background Technology
[0002] With the diversified development of education, the evaluation of student-written texts has become increasingly important. However, text evaluation is a repetitive and tedious task for teachers, and requires parents to have a high level of education. Therefore, data analysis has been applied to the text evaluation process to save time and effort for both teachers and parents. In current technologies, when analyzing texts and providing corresponding evaluations, pre-defined algorithms and fixed templates are typically used, resulting in a lack of flexibility and comprehensiveness in text evaluation. Therefore, improving the flexibility and comprehensiveness of text evaluation has become an urgent problem to be solved. Summary of the Invention
[0003] The main technical problem addressed by this application is to provide a text evaluation generation method, system, electronic device, and readable storage medium that can improve the flexibility and comprehensiveness of text evaluation.
[0004] To address the aforementioned technical problems, this application provides a text evaluation generation method in its first aspect. The method includes: in response to obtaining source text, generating a first prompt text matching the source text; inputting the first prompt text into an intelligent analysis model to obtain a target text corresponding to the source text; wherein the first prompt text at least includes an adjustment requirement for adjusting the source text; obtaining mutually matching clause pairs in the source text and the target text, and determining the correspondence between adjusted characters in the clause pairs; wherein the clause pairs include clauses in the source text and clauses in the target text; generating a second prompt text matching the correspondence; inputting the second prompt text into the intelligent analysis model to obtain a text evaluation result; wherein the second prompt text at least includes an evaluation requirement for evaluating characters with the correspondence, and the evaluation method corresponding to the evaluation requirement includes at least one of explanation and inquiry.
[0005] To address the aforementioned technical problems, a second aspect of this application provides a text evaluation generation system. This system includes: a text generation module, a character alignment module, and an evaluation generation module. The text generation module, in response to receiving source text, generates a first prompt text matching the source text, inputs the first prompt text into an intelligent analysis model, and obtains a target text corresponding to the source text. The first prompt text at least includes an adjustment requirement for adjusting the source text. The character alignment module is used to obtain matching clause pairs in the source text and the target text, and determine the correspondence between adjusted characters in the clause pairs. The clause pairs include clauses in the source text and clauses in the target text. The evaluation generation module generates a second prompt text matching the correspondence, inputs the second prompt text into the intelligent analysis model, and obtains a text evaluation result. The second prompt text at least includes an evaluation requirement for evaluating characters with the correspondence, and the evaluation method corresponding to the evaluation requirement includes at least one of explanation and inquiry.
[0006] To address the aforementioned technical problems, a third aspect of this application provides an electronic device comprising a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor executes the program instructions to implement the text evaluation generation method described in the first aspect.
[0007] To address the aforementioned technical problems, a fourth aspect of this application provides a computer-readable storage medium storing program instructions thereon, which, when executed by a processor, implement the text evaluation generation method described in the first aspect.
[0008] The above scheme, upon obtaining the source text, generates a first prompt text matching the source text. This first prompt text includes at least the adjustment requirements for the source text. The first prompt text is input into an intelligent analysis model, which outputs the adjusted target text corresponding to the source text. By generating the adjustment requirements included in the first prompt text, errors in the source text can be corrected, and the source text can be polished to obtain the target text, making text adjustment more flexible and diverse, and the adjusted target text more comprehensive. Clauses in the source text and clauses in the target text are paired to obtain matching clause pairs, aligning the source and target texts at the clause level. The correspondence between adjusted characters in the clause pairs is determined, achieving character-level alignment between clause pairs in the source and target texts, and confirming the correspondence between adjusted characters in the clause pairs. A second prompt text matching the corresponding relationship is generated. The second prompt text is input into the intelligent analysis model to obtain the text evaluation result output by the intelligent analysis model. The second prompt text includes at least an evaluation requirement for evaluating characters with corresponding relationships. The evaluation method corresponding to the evaluation requirement includes at least one of explanation and inquiry. By generating the evaluation requirement included in the second prompt text, the text evaluation results corresponding to all relationships can be comprehensively given. The evaluation method can include explanation to explain the basis for character adjustment to the user, and the evaluation method can also include inquiry to help the user understand the reason for character adjustment, thereby improving the flexibility and comprehensiveness of text evaluation. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:
[0010] Figure 1 This is a flowchart illustrating one implementation method of the text evaluation generation method of this application;
[0011] Figure 2 This is a flowchart illustrating another implementation of the text evaluation generation method of this application;
[0012] Figure 3 This is a schematic diagram of one embodiment of the text evaluation generation system of this application;
[0013] Figure 4 This is a schematic diagram of the structure of one embodiment of the electronic device of this application;
[0014] Figure 5This is a schematic diagram of one embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0015] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0016] In this paper, the terms "system" and "network" are often used interchangeably. The term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this paper means two or more.
[0017] The text evaluation generation method provided in this application is used to evaluate input source text. The executing entity is a processing terminal with communication capabilities and at least the ability to process text. The processing terminal can be a conventional computer device or a smart device such as a learning machine used in education; this application does not impose specific limitations on this. The source text can consist of at least one language, such as English or Chinese; this application does not impose specific limitations on this either. The text evaluation generation method provided in this application is preferably used in scenarios where the source text is an English essay.
[0018] Please see Figure 1 , Figure 1 This is a flowchart illustrating one embodiment of the text evaluation generation method of this application, which includes:
[0019] S101: In response to obtaining the source text, generate a first prompt text that matches the source text, input the first prompt text into the intelligent analysis model, and obtain the target text corresponding to the source text; wherein, the first prompt text includes at least the adjustment requirement for adjusting the source text.
[0020] Specifically, after obtaining the source text, a first prompt text matching the source text is generated. The first prompt text includes at least the adjustment requirements for adjusting the source text. The first prompt text is input into the intelligent analysis model to obtain the adjusted target text corresponding to the source text output by the intelligent analysis model.
[0021] Understandably, by generating the adjustment requirements included in the first prompt text, it is possible to correct errors in the source text when they exist, and to polish the source text to obtain the target text, making the text adjustment methods more flexible and diverse, and the adjusted target text more comprehensive.
[0022] In one application method, the first prompt text corresponds to a first construction template. After obtaining the source text, the source text is added to the text position in the first construction template. The user's input requirements at the corresponding position in the first construction template are then obtained, resulting in adjustment requirements. The first prompt text is generated and input into an intelligent analysis model to obtain the target text corresponding to the source text output by the intelligent analysis model. The intelligent analysis model is derived from training data generated based on the first construction template.
[0023] In one application scenario, the first construction template includes an adjustment level requirement input position and a text output requirement input position, thereby constraining the level of text adjustment and the way the model outputs text. The user needs to input the adjustment level requirement at the adjustment level requirement input position or select a preset adjustment level requirement. The user needs to input the text output requirement at the text output requirement input position, add the source text to the text position in the first construction template, and merge the user-input adjustment level requirement and text output requirement into the first construction template to obtain the first prompt text.
[0024] In one specific application scenario, the source text is an English essay. The first template includes: Please adjust my English essay according to the English proficiency requirements of {xxx}. My essay content is {xxx}. Your answer should be output in the format {xxx}. The source text is added to the curly braces corresponding to the essay content; the content within the other curly braces needs to be entered by the user. In other specific application scenarios, the first template can be customized, and this application does not impose specific restrictions on it.
[0025] In one application method, the first prompt text corresponds to a first concatenation rule. This first concatenation rule constrains the concatenation method of the source text and the required content. After obtaining the source text, the user-inputted required content is acquired, resulting in adjustment requirements. The source text and the required content are then concatenated according to the first concatenation rule to obtain the first prompt text. This first prompt text is input into an intelligent analysis model, which outputs the target text corresponding to the source text. The intelligent analysis model is derived from training data generated based on the first concatenation rule.
[0026] In one application scenario, the first concatenation rule includes the distribution requirements of conjunctions and demand content, so as to make the first prompt text more coherent and accurate. After the user enters the demand content, the demand content is concatenated with the source text according to the first concatenation rule to obtain the first prompt text.
[0027] In a specific application scenario, the source text is a Chinese essay. The first concatenation rule includes the relative positions of the text adjustment requirements and the text output requirements to the source text, as well as the connecting words between the text adjustment requirements and the text output requirements. The user-inputted text adjustment requirements include: to perform text correction and polishing. The user-inputted text output requirements include: only the essay after correction and polishing is needed. The first prompt text obtained by concatenating according to the first concatenation rule is: Please perform text correction and polishing on my Chinese essay. My essay content is {xxx}. Your response only needs to include the essay after correction and polishing. In other specific application scenarios, the first concatenation rule can be customized, and this application does not impose specific restrictions on it.
[0028] S102: Obtain matching clause pairs in the source text and target text, and determine the correspondence between the adjusted characters in the clause pairs; wherein, the clause pairs include clauses in the source text and clauses in the target text.
[0029] Specifically, clauses in the source text and clauses in the target text are paired to obtain matching clause pairs between the source and target texts. This aligns the source and target texts at the clause level, determines the correspondence between adjusted characters in the clause pairs, and achieves character-level alignment between the clause pairs in the source and target texts.
[0030] In one application method, the source text is divided into at least one source text clause, and the target text is divided into at least one target text clause. Based on the overlap between characters in the source text clause and the target text clause, matching clause pairs in the source text and the target text are determined. Each clause pair includes one source text clause and one target text clause. The characters in the source text clause and the target text clause in each clause pair are aligned. Based on the aligned clause pairs, the correspondence between the adjusted characters in the clause pairs is determined.
[0031] In another application, the source text is divided into at least one source text clause, and the target text is divided into at least one target text clause. Based on the semantic similarity between the source text clause and the target text clause, matching clause pairs in the source text and target text are determined. Each clause pair includes one source text clause and one target text clause. Characters that distinguish the source text clause and the target text clause are obtained. Based on the semantics of the source text clause and the target text clause, as well as the position and part of speech of the distinguishing characters in the clauses, the correspondence between the adjusted characters in the clause pairs is determined.
[0032] In one application scenario, the source text is an English essay. A word-root dictionary is obtained to determine the root of each word in both the source and target text clauses. Based on the position of characters in the clauses and the parts of speech and root of the words they represent, the characters in each clause pair are aligned. The aligned clause pairs are analyzed to determine how the source text clauses are adjusted to obtain the target text clauses, thus revealing the correspondence between the adjusted characters in the clause pairs.
[0033] S103: Generate a second prompt text that matches the corresponding relationship, input the second prompt text into the intelligent analysis model, and obtain the text evaluation result; wherein, the second prompt text includes at least an evaluation requirement for evaluating characters with corresponding relationships, and the evaluation method corresponding to the evaluation requirement includes at least one of explanation and inquiry.
[0034] Specifically, a second prompt text matching the corresponding relationship is generated, and the second prompt text is input into the intelligent analysis model to obtain the text evaluation result output by the intelligent analysis model. The second prompt text includes at least an evaluation requirement for evaluating characters with corresponding relationships, and the evaluation method corresponding to the evaluation requirement includes at least one of explanation and inquiry.
[0035] It is understandable that by generating evaluation requirements included in the second prompt text, comprehensive text evaluation results corresponding to all relationships can be provided. Evaluation methods can include explanations to explain the basis for character adjustments to users, or questions to inspire users to understand the reasons for character adjustments, thereby improving the flexibility and comprehensiveness of text evaluation.
[0036] In one application method, the second prompt text corresponds to a second construction template. Once the correspondence is established, the source text and target text are added to the text positions in the second construction template, and the positions of the corresponding characters are marked. The evaluation method and requirements entered by the user at the corresponding positions in the second construction template are obtained, thus deriving the evaluation requirements. The second prompt text is then generated and input into an intelligent analysis model to obtain the text evaluation result output by the intelligent analysis model. The intelligent analysis model is derived by adjusting the training data generated based on the second construction template.
[0037] In one application scenario, the second construction template includes an input position for the evaluation method. The user needs to input the evaluation method or select at least one preset evaluation method at the input position. The source text and target text are added to the text position in the second construction template and the positions of the corresponding characters are marked. The evaluation method input by the user is then integrated into the second construction template to obtain the second prompt text.
[0038] In a specific application scenario, the source text is an English composition, and the recorded source text clause is: "Hello, everyone. Middle School at 10 o'clock to classroom." The recorded target text clause is: "Hello, everyone. I'm a student at Middle School. At 10 o'clock I go to the classroom." The recorded words with a corresponding relationship are "everyone" and "everyone." The second construction template includes: "An English teacher revised an English sentence written by a student. Before the revision, it was: {Hello, [everyone]. Middle School at 10 o'clock to classroom.}, and after the revision, it is: {Hello, [everyone]. I'm a student at Middle School. At 10 o'clock I go to the classroom.}. Please explain the error at the [] position, give the error type and the reason for the revision, and / or, to help students understand the reason for the error at the [] position, the teacher can ask the students in this way." In other specific application scenarios, the second construction template can be customized, and this application does not impose specific restrictions on it.
[0039] In one application method, the second prompt text corresponds to a second concatenation rule. This second concatenation rule constrains the concatenation method of the source text, target text, and required content. Once the correspondence is established, the user's input evaluation method and required content are obtained, the evaluation requirements are determined, and the source text, target text, and required content are concatenated according to the second concatenation rule to obtain the second prompt text. This second prompt text is then input into an intelligent analysis model to obtain the text evaluation result output by the intelligent analysis model. The intelligent analysis model is obtained by adjusting the training data generated based on the second concatenation rule.
[0040] In one application scenario, the second concatenation rule includes the distribution requirements of the demand content that match the evaluation method, so as to make the second prompt text more coherent and accurate. After the user inputs the evaluation method and demand content, the source text, target text and demand content are concatenated according to the second concatenation rule to obtain the second prompt text.
[0041] In a specific application scenario, the source text is an English essay, and the recorded source text clause is: "Hello, everyone. I'm a student at Middle School. At ten o'clock I go to the classroom." The recorded target text clause is: "Hello, everyone. I'm a student at Middle School. At ten o'clock I go to the classroom." The recorded corresponding words are "everyone" and "everyone." The second concatenation rule includes the position of the requirement content used for explanation relative to the source text and the requirement text, and the position of the requirement content used for querying relative to the source text and the requirement text. When the user selects "explanation" as the evaluation method and the requirement is to provide the error type and the reason for the correction, the second prompt text obtained according to the second concatenation rule is: "An English teacher corrected a student's English sentence. Before the correction, it was: {Hello, [everyone]. Middle School at 10 o'clock to classroom.} After the correction, it is: {Hello, [everyone]. I'm a student at Middle School. At 10 o'clock I go to the classroom.} Now the student is concerned about the error in the brackets []. Please provide the error type and the reason for the correction." When the user selects "question" as the evaluation method and the requirement is to inspire the student on why the correction was made, the second prompt text obtained according to the second concatenation rule is: "An English student wrote the sentence: {Hello, [everyone]. Middle School at 10 o'clock to classroom.} The teacher corrected it to: {Hello, [everyone]. I'm a student at Middle School. At 10 o'clock I go to the classroom.} To help the student understand the reason for the error in the brackets [], and to help the student understand why [everyone] should be changed to [everyone], the teacher asks the student: ." In other specific application scenarios, the second splicing rule can be customized, and this application does not impose specific restrictions on it.
[0042] Optionally, the intelligent analysis model is a generative large language model, which may include, but is not limited to, deep neural networks (DNNs), convolutional neural networks (CNNs), recurrent neural networks (RNNs), long short-term memory networks (LSTM), and generative pre-trained Transformer models. No specific restrictions are placed on the specific construction and deployment of the large language model.
[0043] The above scheme, upon obtaining the source text, generates a first prompt text matching the source text. This first prompt text includes at least the adjustment requirements for the source text. The first prompt text is input into an intelligent analysis model, which outputs the adjusted target text corresponding to the source text. By generating the adjustment requirements included in the first prompt text, errors in the source text can be corrected, and the source text can be polished to obtain the target text, making text adjustment more flexible and diverse, and the adjusted target text more comprehensive. Clauses in the source text and clauses in the target text are paired to obtain matching clause pairs, aligning the source and target texts at the clause level. The correspondence between adjusted characters in the clause pairs is determined, achieving character-level alignment between clause pairs in the source and target texts, and confirming the correspondence between adjusted characters in the clause pairs. A second prompt text matching the corresponding relationship is generated. The second prompt text is input into the intelligent analysis model to obtain the text evaluation result output by the intelligent analysis model. The second prompt text includes at least an evaluation requirement for evaluating characters with corresponding relationships. The evaluation method corresponding to the evaluation requirement includes at least one of explanation and inquiry. By generating the evaluation requirement included in the second prompt text, the text evaluation results corresponding to all relationships can be comprehensively given. The evaluation method can include explanation to explain the basis for character adjustment to the user, and the evaluation method can also include inquiry to help the user understand the reason for character adjustment, thereby improving the flexibility and comprehensiveness of text evaluation.
[0044] Please see Figure 2 , Figure 2 This is a flowchart illustrating another embodiment of the text evaluation generation method of this application, the method including:
[0045] S201: In response to obtaining the source text, generate a first prompt text that matches the source text, input the first prompt text into the intelligent analysis model, and obtain the target text corresponding to the source text; wherein, the first prompt text includes at least the adjustment requirement for adjusting the source text.
[0046] Specifically, after obtaining the source text, a first prompt text matching the source text is generated. This first prompt text is then input into the intelligent analysis model to obtain the target text corresponding to the source text, output by the intelligent analysis model. The first prompt text includes at least the adjustment requirements for modifying the source text.
[0047] Optionally, the source text is obtained after preprocessing. The preprocessing process corresponds to character-level format checks and adjustments, including but not limited to the removal of abnormal characters, adjustment of space positions, and character set conversion. The source text is obtained after correcting character errors and format errors in the input text.
[0048] In one application method, a first prompt text matching the source text is generated using a first construction rule; wherein, the first construction rule includes text correction requirements, source text position, and text output requirements, and the text correction requirements and text output requirements constitute adjustment requirements; the first prompt text is input into an intelligent analysis model adjusted using a first training dataset to obtain the target text corresponding to the source text; wherein, the first training dataset includes multiple sets of first training texts, and the first training texts match the first training prompt texts, and the first training prompt texts are generated based on the first construction rule.
[0049] Specifically, the first construction rule is a complete set of rules that includes text correction requirements, the position of the preprocessed source text, and the text output requirements of the intelligent analysis model, used to generate the first prompt text. Among them, the text correction requirements and the text output requirements together constitute the adjustment requirements in the first prompt text.
[0050] Furthermore, the intelligent analysis model is fine-tuned using the first training dataset to adapt to the text adjustment task. The first training dataset includes multiple sets of first training texts, and each first training text is matched with a first training prompt text. The first training prompt text is generated based on the first construction rule. That is, the same construction rule is used in the training and application phases to generate prompt texts. Supervised fine-tuning (SFT) is performed on the pre-trained intelligent analysis model to enable it to complete the text adjustment task more accurately. Supervised fine-tuning is only performed once during the training phase.
[0051] Optionally, the supervised fine-tuned model is exported as an Open Neural Network Exchange (ONNX) format and further optimized to obtain an intelligent analysis model adapted to the text adjustment task.
[0052] Understandably, the source text is used as the basic material for generating the first prompt text. The first construction rule is used to generate the first prompt text that matches the source text. The first prompt text is then input into the intelligent analysis model adjusted using the first training dataset to obtain the target text corresponding to the source text. This completes the adjustment of the source text and makes the adjustment of the source text more flexible.
[0053] For example, the source text is an English essay. The first prompt text constructed using the first construction rule includes: "Please correct the errors in my English essay according to the English proficiency requirements of {high school student}. My essay content is: {My name is Frank. My family name is Green. I'm 13 years old. I'm from America. Last year, I came to Beijing. I saw many places of interest in Beijing, such as the Great Wall, the Palace Museum, and so on. I think they are very interesting.}" andbeautiful.}. Your answer only needs to include the corrected essay; please add $$$ at the beginning and end of the essay. The phrase "Please correct my English essay according to the English proficiency requirements of {high school student}" is the text correction requirement. The text output requirement is indicated by the phrase "My essay content is..." followed by "The source text location is...". The identifiers at the beginning and end of the essay facilitate locating the target text, which is the content between the identifiers. This eliminates irrelevant general statements. In other application scenarios, the identifiers can be customized; this application does not impose specific restrictions on this.
[0054] In one application scenario, the first prompt text is input into an intelligent analysis model adjusted using the first training data to obtain the target text corresponding to the source text. This includes: obtaining a first word segmentation dictionary; wherein the first word segmentation dictionary stores the mapping relationship between characters and numbers, and is constructed based on the first training text and the first training prompt text; based on the first prompt text and the first word segmentation dictionary, obtaining a first input number sequence matching the first prompt text; inputting the first input number sequence into the intelligent analysis model adjusted using the first training data to obtain a first output number sequence; and based on the first output number sequence, the first word segmentation dictionary, and text output requirements, obtaining the target text corresponding to the source text; wherein the text output requirements include identifiers set at the start and end positions of the target text.
[0055] Specifically, a first word segmentation dictionary is obtained based on the first training text and the first training prompt text. The first word segmentation dictionary stores the mapping relationship between characters and numbers. Therefore, the first word segmentation dictionary is strongly associated with the prompt text used for text adjustment, so that the process of encoding the first prompt text into the first input number sequence based on the first word segmentation dictionary and decoding the first output number sequence output by the intelligent analysis model into text is more accurate.
[0056] Understandably, the characters in the first prompt text are matched with the mapping relationship between characters and numbers in the first word segmentation dictionary to obtain the first input number sequence that matches the first prompt text, and the first prompt text is converted into an expression that the intelligent analysis model can recognize.
[0057] Furthermore, the first input number sequence is input into the intelligent analysis model adjusted using the first training data to obtain a first output number sequence. The numbers in the first output number sequence are matched with the mapping relationship between characters and numbers in the first word segmentation dictionary to obtain the first output text matching the first output number sequence. The first output text is then adjusted according to text output requirements to determine the target text in the first output text. These text output requirements include identifiers set at the start and end positions of the target text to remove conventional expressions unrelated to the target text from the text output by the intelligent analysis model.
[0058] S202: Segment the source text to obtain multiple source text clauses, and segment the target text to obtain multiple target text clauses.
[0059] Specifically, the source text is divided into multiple source text clauses, and the target text is divided into multiple target text clauses.
[0060] In one application method, the source text is segmented into sentences to obtain multiple source text clauses, and the target text is segmented into sentences to obtain multiple target text clauses. This includes: determining the position identifier matching each character in the source text based on the characters and semantics of the source text; and determining the position identifier of each character in the target text based on the characters and semantics of the target text. The position identifier includes a sentence beginning identifier and a sentence middle identifier. The sentence beginning identifier identifies the first character in the sentence, and the sentence middle identifier identifies the characters following the first character. Multiple source text clauses are obtained based on the position identifier matching each character in the source text, and multiple target text clauses are obtained based on the position identifier matching each character in the target text.
[0061] Specifically, the system identifies characters and semantics in the source text. Based on these characteristics, it assigns either a sentence-beginning marker or a sentence-middle marker to each character to indicate whether it is at the beginning or in the middle of a sentence, thus distinguishing the characters in the source text. Similarly, it identifies characters and semantics in the target text, assigning either a sentence-beginning marker or a sentence-middle marker to each character to indicate whether it is at the beginning or in the middle of a sentence, thus distinguishing the characters in the target text. Based on these positional markers, both the source and target texts are segmented. The source text is divided into multiple source text clauses, and the target text is divided into multiple target text clauses. Therefore, by comprehensively judging character and semantic characteristics, the source and target texts are segmented into sentences to improve the accuracy of sentence segmentation and reduce the impact of incorrect punctuation on sentence segmentation.
[0062] In one application scenario, text segmentation is achieved using a trained first attention mechanism encoder-decoder network model to improve the efficiency of sentence segmentation. In order for the first attention mechanism encoder-decoder network model to recognize the source text and the target text, word segmentation is performed on the source text and the target text, and the text is processed into a numerical sequence. Using existing dictionaries, spaces or punctuation marks are used to segment the corpus into semantic units with characters as the basic unit. The character text sequence is mapped to the numerical sequence to obtain the numerical sequence corresponding to the source text and the numerical sequence corresponding to the target text.
[0063] Furthermore, the first attention mechanism encoder-decoder network model performs forward reasoning on the numerical sequences corresponding to the source text and the target text to obtain the sentence segmentation results. The characters at the beginning of the sentence are set as sentence beginning markers by the model, and the characters in the middle of the sentence are set as sentence middle markers by the model. The source text and the target text are segmented according to the position markers, and are segmented into multiple source text clauses and multiple target text clauses respectively.
[0064] S203: Obtain the pairing probability between each source text clause and each target text clause, determine the target text clause that matches each source text clause based on the pairing probability, and obtain clause pairs.
[0065] Specifically, each source text clause is paired with each target text clause to obtain the pairing probability between each source text clause and the target text clause. Based on the pairing probability, the target text clause matched by each source text clause is determined, thus obtaining the same number of clause pairs as the source text clauses.
[0066] Optionally, the pairing probability is achieved using a trained second attention mechanism encoder-decoder network model, thereby improving pairing efficiency. To enable the second attention mechanism encoder-decoder network model to recognize source and target text clauses, each source and target text clause undergoes digital serialization. Using existing dictionaries and glossaries, spaces or punctuation marks are used to segment the corpus into semantic units based on words, mapping the word text sequence to a numerical sequence. That is, all source text clauses can be converted into M numerical sequences (M corresponding to the number of clauses in the source text clause set), and all target text clauses can be converted into N numerical sequences (N corresponding to the number of clauses in the target text clause set).
[0067] Furthermore, the numerical sequences corresponding to all source text clauses and all target text clauses are input into the trained second attention mechanism encoder-decoder network model. Forward inference is performed on this data, and the output is an M*N two-dimensional matrix. Here, M rows correspond to the M clauses of the source text, and N columns correspond to the N clauses of the target text. The i-th row and j-th column (0 < i ≤ M, 0 < j ≤ N) represents the probability of pairing the i-th source text clause with the j-th target text clause. For each source text clause, the target text clause with the highest pairing probability is selected for pairing, resulting in M clause pairs.
[0068] S204: For each clause pair, align the characters in the source text clause with the characters in the target text clause, and determine the association between the characters in the clause pair; wherein the association includes at least one of adjustment and invariance.
[0069] Specifically, for each clause pair, the source text clause and the target text clause in the clause pair are aligned at the character level to determine whether the characters in the clause pair have been adjusted or remain unchanged, thereby obtaining the association relationship between the characters in the clause pair.
[0070] In one application method, aligning characters in a source text clause with characters in a target text clause to determine the association between characters in the clause pair includes: segmenting the source text clause and the target text clause in each clause pair into semantic units based on words; classifying the semantic units by part of speech to obtain the part-of-speech category of the semantic units, obtaining the root word matched by each semantic unit, and the position of each semantic unit in the corresponding clause, and obtaining the edit distance between at least some semantic units in the source text clause and the target text clause; aligning the semantic units in the source text clause with the semantic units in the target text clause based on the part-of-speech category, root word, and position of each semantic unit in the clause pair, as well as the edit distance between at least some semantic units, to obtain the semantic unit alignment result; and determining the association between characters in the clause pair based on the semantic unit alignment result.
[0071] Specifically, the source text clause and target text clause in each clause pair are segmented to obtain semantic units with words as the basic unit. Among them, the focus of the clause pair is on the relationship between words, while the relationship between punctuation marks can be determined based on the characters themselves. Therefore, obtaining semantic units with words as the basic unit can effectively improve the accuracy of word matching.
[0072] Furthermore, each semantic unit is classified by part of speech to determine its part-of-speech category. Based on the mapping relationship between words and roots, the root that matches each semantic unit is determined, and the position of each word in the corresponding clause is determined. The edit distance between at least some semantic units in the source text clause and the target text clause is obtained. The edit distance represents the minimum number of transformation steps required to convert characters in the source text clause into characters in the target text clause, thereby providing feedback on whether and how characters change.
[0073] Understandably, based on the part-of-speech category, root word, and position of each semantic unit in the clause pair, as well as the edit distance between at least some semantic units, a comprehensive judgment is made on how the semantic units in the source text clause and the target text clause units are adjusted and transformed. This leads to the alignment of semantic units in the source text clause and the target text clause, resulting in semantic unit alignment results. This improves the accuracy of semantic unit alignment results. Based on the semantic unit alignment results, it is analyzed whether the characters in the source text clause have been adjusted relative to the characters in the target text clause, and it is possible to clarify how the characters in the source text clause are adjusted through addition, deletion, and modification operations to form the target clause.
[0074] In one application scenario, part-of-speech classification is achieved using a trained third attention mechanism encoder-decoder network model to improve classification efficiency. In order for the third attention mechanism encoder-decoder network model to recognize characters in clause pairs, taking the number of clause pairs as M as an example, the extracted M clause pairs are processed into digital serialization. Using existing dictionaries, spaces or punctuation marks are used to segment the corpus into semantic units with words as the basic unit. The word text sequence is mapped to the number sequence to obtain 2*M number sequences.
[0075] Furthermore, the above 2*M number sequences are input into the trained third attention mechanism encoder-decoder network model, and forward reasoning is performed on the data to classify each semantic unit with words as the basic unit into the part-of-speech category with the highest probability. By performing this operation on the 2*M number sequences, the part-of-speech of each semantic unit in the 2*M clauses can be obtained.
[0076] It is understandable that there is a root mapping dictionary between words and roots. The root corresponding to each semantic unit can be found from the root mapping dictionary. If a word belongs to a clause of the source text, the position of the word is the order of the word in the clause of the source text. If a word belongs to a clause of the target text, the position of the word is the order of the word in the clause of the target text.
[0077] S205: Based on the characters and associations in the aligned clause pairs, determine the correspondence between the adjusted characters in the clause pairs.
[0078] Specifically, the association is determined by whether the characters have been adjusted. Based on the characters in the aligned clause pair and the association between the characters, the adjusted characters in the clause pair can be determined efficiently, and the correspondence between the adjusted characters in the clause pair can be obtained.
[0079] It is understandable that the correspondence is related to one of the operation methods among adding, deleting, and modifying.
[0080] S206: Generate a second prompt text that matches the corresponding relationship, input the second prompt text into the intelligent analysis model, and obtain the text evaluation result; wherein, the second prompt text includes at least an evaluation requirement for evaluating characters with corresponding relationships, and the evaluation method corresponding to the evaluation requirement includes at least one of explanation and inquiry.
[0081] Specifically, a second prompt text matching the corresponding relationship is generated. The second prompt text including the evaluation requirement is input into the intelligent analysis model to obtain the text evaluation result matching the evaluation requirement output by the intelligent analysis model. The second prompt text includes at least the evaluation requirement for evaluating characters with corresponding relationships. The evaluation method corresponding to the evaluation requirement includes at least one of explanation and inquiry.
[0082] In one application method, a second prompt text matching the corresponding relationship is generated using a second construction rule. The second construction rule includes evaluation method requirements, source and target text positions, position annotation requirements for characters with corresponding relationships, and evaluation output requirements. The evaluation method requirements and evaluation output requirements constitute the evaluation requirements. The second prompt text is input into an intelligent analysis model adjusted using a second training dataset to obtain text evaluation results. The second training dataset includes multiple sets of second training texts and their corresponding training evaluation texts, and the second training texts match second training prompt texts, which are generated based on the second construction rule.
[0083] Specifically, the second construction rule is a complete set of rules covering source text clauses and aligned characters, target text clauses and aligned characters, evaluation method requirements, and evaluation output requirements of the intelligent analysis model, used to generate the second prompt text. Among them, the evaluation method requirements and evaluation output requirements together constitute the evaluation requirements in the second prompt text.
[0084] Furthermore, the intelligent analysis model is fine-tuned using a second training dataset to adapt to the text evaluation task. The second training dataset includes multiple sets of second training texts, and each second training text is matched with a second training prompt text. The second training prompt text is generated based on the second construction rule. In other words, the same construction rule is used in both the training and application phases to generate prompt texts. Supervised fine-tuning (SFT) is then performed on the pre-trained intelligent analysis model to enable it to perform the text evaluation task more accurately. Supervised fine-tuning is performed only once during the training phase.
[0085] Optionally, the supervised fine-tuned model is exported as an Open Neural Network Exchange (ONNX) format and further optimized to obtain an intelligent analysis model adapted to the text evaluation task.
[0086] Understandably, the source text, target text, and characters with corresponding relationships in clause pairs are used as the basic materials for generating the second prompt text. The second construction rule is used to generate the second prompt text with corresponding relationships. The second prompt text is then input into the intelligent analysis model adjusted using the second training dataset to obtain the text evaluation result, thereby completing the evaluation of characters with corresponding relationships. The evaluation method can be at least one of interpretation and inquiry, which makes the text evaluation more flexible and can evaluate all characters with corresponding relationships in clause pairs at the character level, making the text evaluation more comprehensive.
[0087] For example, the source text is an English essay, and the recorded source text clause is: "Hello, everyone. I'm a student at Middle School. At ten o'clock I go to the classroom." The recorded corresponding words are "Sch" and "School." The second prompt text for explanation, constructed using the second construction rule, includes: "The English teacher revised a sentence written by Xiaohong. Before, it was: 'Hello, everyone. Middle [Sch] school at 10 to classroom.' After, it is: 'Hello, everyone. I'm a student at Middle [School]. At 10 o'clock I go to the classroom.' Now Xiaohong is concerned about the error at the [] position. Please give the error type and the reason for the revision." The second prompt text for inquiry, constructed using the second construction rule, includes: "An English student wrote the sentence: 'Hello, everyone. Middle [Sch] school at 10 to classroom.' The teacher revised it to: 'Hello, everyone. I'm a student at Middle [School]. At 10 o'clock I go to the classroom.'" In order to help students understand why the [] position is incorrect, and to help students understand why [Sch] should be changed to [School], the teacher asked the students: "Different evaluation methods correspond to different expressions. The source text and target text are both reflected in the second prompt text, and the corresponding characters are marked. The evaluation output requirements are related to the evaluation method. When the evaluation method is explanation, the evaluation output requirements are declarative expressions. When the evaluation method is inquiry, the evaluation output requirements are guided expressions."
[0088] In one application scenario, the second prompt text is input into an intelligent analysis model adjusted using a second training dataset to obtain a text evaluation result. This includes: obtaining a second word segmentation dictionary; wherein the second word segmentation dictionary stores the mapping relationship between characters and numbers, and is constructed based on the second training text and its corresponding training evaluation text, as well as the second training prompt text; based on the second prompt text and the second word segmentation dictionary, obtaining a second input number sequence matching the second prompt text, inputting the second input number sequence into the intelligent analysis model adjusted using the second training data to obtain a second output number sequence; and based on the second output number sequence, the second word segmentation dictionary, and the evaluation output requirements, obtaining a text evaluation result; wherein the evaluation output requirements include format requirements matching the evaluation method.
[0089] Specifically, a second word segmentation dictionary is obtained based on the second training text and the second training prompt text. The second word segmentation dictionary stores the mapping relationship between characters and numbers. Therefore, the second word segmentation dictionary is strongly associated with the prompt text used for text adjustment, so that the process of encoding the second prompt text into the second input number sequence based on the second word segmentation dictionary, and decoding the second output number sequence output by the intelligent analysis model into text is more accurate.
[0090] Understandably, the characters in the second prompt text are matched with the mapping relationship between characters and numbers in the second word segmentation dictionary to obtain the second input number sequence that matches the second prompt text, and the second prompt text is converted into an expression that the intelligent analysis model can recognize.
[0091] Furthermore, the second input number sequence is input into the intelligent analysis model adjusted using the second training data to obtain a second output number sequence. The numbers in the second output number sequence are matched with the mapping relationship between characters and numbers in the second word segmentation dictionary to obtain the second output text matching the second output number sequence. The second output text is then adjusted according to text output requirements to determine the text evaluation result. These evaluation output requirements include formatting requirements matching the evaluation method, facilitating explanations or guidance when questions are required.
[0092] In this embodiment, a first construction rule corresponds to the generation of the first prompt text, and a second construction rule corresponds to the generation of the second prompt text, thereby standardizing the generation of prompt text and the training of the intelligent analysis model. When obtaining matching clause pairs in the source and target texts, the source and target texts are segmented into sentences through a comprehensive judgment of characters and semantics to improve the accuracy of sentence segmentation. Based on the part-of-speech category, root word, and position of each semantic unit in the clause pair, as well as the edit distance between at least some semantic units, a comprehensive judgment is made on how the semantic units in the source text clauses and the target text clauses are adjusted and transformed, thereby aligning the semantic units in the source text clauses and the semantic units in the target text clauses to obtain semantic unit alignment results, thereby improving the accuracy of semantic unit alignment results. Based on the semantic unit alignment results, it is analyzed whether the characters in the source text clauses in the clause pair have been adjusted relative to the characters in the target text clauses, thereby improving the accuracy of the correspondence between the adjusted characters in the clause pairs.
[0093] Please see Figure 3 , Figure 3 This is a schematic diagram of an embodiment of the text evaluation generation system of this application. The text evaluation generation 30 includes: a text generation module 301, a character alignment module 302, and an evaluation generation module 303. The text generation module 301, in response to obtaining the source text, generates a first prompt text matching the source text, inputs the first prompt text into an intelligent analysis model, and obtains the target text corresponding to the source text. The first prompt text includes at least an adjustment requirement for adjusting the source text. The character alignment module 302 is used to obtain mutually matching clause pairs in the source text and the target text, and determine the correspondence between the adjusted characters in the clause pairs. The clause pairs include clauses in the source text and clauses in the target text. The evaluation generation module 303 generates a second prompt text matching the correspondence, inputs the second prompt text into the intelligent analysis model, and obtains the text evaluation result. The second prompt text includes at least an evaluation requirement for evaluating characters with a correspondence, and the evaluation method corresponding to the evaluation requirement includes at least one of explanation and inquiry.
[0094] In the above scheme, after obtaining the source text, the text generation module 301 generates a first prompt text that matches the source text. This first prompt text includes at least the adjustment requirements for the source text. The first prompt text is input into the intelligent analysis model to obtain the adjusted target text corresponding to the source text output by the intelligent analysis model. By generating the adjustment requirements included in the first prompt text, errors in the source text can be corrected, and the source text can be polished to obtain the target text, making the text adjustment methods more flexible and diverse, and the adjusted target text more comprehensive. The character alignment module 302 pairs clauses in the source text and clauses in the target text, obtaining matching clause pairs between the source and target texts, aligning the source and target texts at the clause level, determining the correspondence between the adjusted characters in the clause pairs, achieving character-level alignment between clause pairs in the source and target texts, and determining the correspondence between the adjusted characters in the clause pairs. The evaluation generation module 303 generates a second prompt text that matches the corresponding relationship. The second prompt text is input into the intelligent analysis model to obtain the text evaluation result output by the intelligent analysis model. The second prompt text includes at least an evaluation requirement for evaluating characters with corresponding relationships. The evaluation method corresponding to the evaluation requirement includes at least one of explanation and inquiry. By generating the evaluation requirement included in the second prompt text, the text evaluation results corresponding to all corresponding relationships can be given comprehensively. The evaluation method can include explanation to explain the basis for character adjustment to the user, and the evaluation method can also include inquiry to help the user understand the reason for character adjustment, thereby improving the flexibility and comprehensiveness of text evaluation.
[0095] Optionally, the text generation module 301 is further configured to generate a first prompt text matching the source text using a first construction rule; wherein, the first construction rule includes text correction requirements, source text position and text output requirements, and the text correction requirements and text output requirements constitute adjustment requirements; the first prompt text is input into the intelligent analysis model adjusted using the first training dataset to obtain the target text corresponding to the source text; wherein, the first training dataset includes multiple sets of first training texts, and the first training texts match the first training prompt texts, and the first training prompt texts are generated based on the first construction rule.
[0096] Optionally, the text generation module 301 is further configured to obtain a first word segmentation dictionary; wherein, the first word segmentation dictionary stores the mapping relationship between characters and numbers, and the first word segmentation dictionary is constructed based on the first training text and the first training prompt text; based on the first prompt text and the first word segmentation dictionary, a first input number sequence matching the first prompt text is obtained, and the first input number sequence is input into the intelligent analysis model adjusted using the first training data to obtain a first output number sequence; based on the first output number sequence, the first word segmentation dictionary and the text output requirements, the target text corresponding to the source text is obtained; wherein, the text output requirements include identifiers set at the start and end positions of the target text.
[0097] Optionally, the evaluation generation module 303 is further configured to generate a second prompt text that matches the corresponding relationship using the second construction rule; wherein, the second construction rule includes evaluation method requirements, source text and target text positions, position annotation requirements for characters with corresponding relationships, and evaluation output requirements, the evaluation method requirements and evaluation output requirements constituting the evaluation requirements; the second prompt text is input into the intelligent analysis model adjusted using the second training dataset to obtain the text evaluation result; wherein, the second training dataset includes multiple sets of second training texts and their corresponding training evaluation texts, and the second training texts match the second training prompt texts, the second training prompt texts being generated based on the second construction rule.
[0098] Optionally, the evaluation generation module 303 is further used to obtain a second word segmentation dictionary; wherein, the second word segmentation dictionary stores the mapping relationship between characters and numbers, and the second word segmentation dictionary is constructed based on the second training text and its corresponding training evaluation text, as well as the second training prompt text; based on the second prompt text and the second word segmentation dictionary, a second input number sequence matching the second prompt text is obtained, and the second input number sequence is input into the intelligent analysis model adjusted using the second training data to obtain a second output number sequence; based on the second output number sequence, the second word segmentation dictionary, and the evaluation output requirements, a text evaluation result is obtained; wherein, the evaluation output requirements include format requirements matching the evaluation method.
[0099] Optionally, the character alignment module 302 is further configured to segment the source text into sentences to obtain multiple source text clauses, segment the target text into sentences to obtain multiple target text clauses; obtain the pairing probability of each source text clause and each target text clause, determine the target text clause that matches each source text clause based on the pairing probability, and obtain clause pairs; for each clause pair, align the characters in the source text clauses with the characters in the target text clauses, and determine the association relationship between the characters in the clause pair; wherein, the association relationship includes at least one of adjustment and invariance; and determine the correspondence between the adjusted characters in the clause pair based on the characters in the aligned clause pair and the association relationship.
[0100] Optionally, the character alignment module 302 is further configured to determine the position identifier matching each character in the source text based on the characters in the source text and the semantics of the source text, and to determine the position identifier of each character in the target text based on the characters in the target text and the semantics of the target text; wherein, the position identifier includes a sentence beginning identifier and a sentence middle identifier, the sentence beginning identifier is used to identify the first character in the sentence, and the sentence middle identifier is used to identify the characters after the first character in the sentence; multiple source text clauses are obtained based on the position identifier matching each character in the source text, and multiple target text clauses are obtained based on the position identifier matching each character in the target text.
[0101] Optionally, the character alignment module 302 is further configured to segment the source text clause and the target text clause in each clause pair into semantic units with words as the basic unit; classify the semantic units by part of speech to obtain the part of speech category of the semantic units, obtain the root word matched by each semantic unit, and the position of each semantic unit in the corresponding clause, and obtain the edit distance between at least some semantic units in the source text clause and the target text clause; based on the part of speech category, root word and position corresponding to each semantic unit in the clause pair, and the edit distance between at least some semantic units, align the semantic units in the source text clause and the semantic units in the target text clause to obtain the semantic unit alignment result; and based on the semantic unit alignment result, determine the association relationship between characters in the clause pair.
[0102] Please see Figure 4 , Figure 4 This is a schematic diagram of one embodiment of the electronic device of this application. The electronic device 40 includes a memory 401 and a processor 402 coupled to each other. The memory 401 stores program instructions (not identified), and the processor 402 is used to execute the program instructions to implement the text evaluation generation method in any of the above embodiments. For related explanations, please refer to the detailed description of the above method embodiments, which will not be repeated here.
[0103] The above approach can improve the flexibility and comprehensiveness of text evaluation.
[0104] Please see Figure 5 , Figure 5 This is a schematic diagram of one embodiment of the computer-readable storage medium of this application. The computer-readable storage medium 50 stores program instructions 500, which, when executed by a processor, implement the text evaluation generation method described in any of the above embodiments. For further details on related content, please refer to the detailed description of the above method embodiments; it will not be repeated here.
[0105] The above approach can improve the flexibility and comprehensiveness of text evaluation.
[0106] It should be noted that the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0107] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0108] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0109] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for generating text evaluations, characterized in that, include: In response to obtaining the source text, a first prompt text matching the source text is generated, and the first prompt text is input into the intelligent analysis model to obtain the target text corresponding to the source text; wherein, the first prompt text at least includes the adjustment requirement for adjusting the source text; Obtain matching clause pairs in the source text and the target text, and determine the correspondence between adjusted characters in the clause pairs; wherein, the clause pairs include clauses in the source text and clauses in the target text, and the correspondence between adjusted characters in the clause pairs is determined based on the following steps: for each clause pair, align the characters in the source text clauses with the characters in the target text clauses, and determine the association relationship between the characters in the clause pairs; wherein, the association relationship includes at least one of adjustment and remaining unchanged; based on the aligned characters in the clause pairs and the association relationship, determine the correspondence between adjusted characters in the clause pairs; A second prompt text matching the correspondence is generated, and the second prompt text is input into the intelligent analysis model to obtain a text evaluation result; wherein, the second prompt text includes at least an evaluation requirement for evaluating characters with the correspondence, and the evaluation method corresponding to the evaluation requirement includes at least one of explanation and inquiry.
2. The method according to claim 1, characterized in that, The process of generating a first prompt text matching the source text, inputting the first prompt text into an intelligent analysis model, and obtaining the target text corresponding to the source text includes: A first prompt text matching the source text is generated using a first construction rule; wherein, the first construction rule includes text correction requirements, source text position, and text output requirements, and the text correction requirements and the text output requirements constitute the adjustment requirements; The first prompt text is input into the intelligent analysis model adjusted using the first training dataset to obtain the target text corresponding to the source text; wherein, the first training dataset includes multiple sets of first training texts, and the first training texts are matched with first training prompt texts, which are generated based on the first construction rules.
3. The method according to claim 2, characterized in that, The step of inputting the first prompt text into the intelligent analysis model adjusted using the first training data to obtain the target text corresponding to the source text includes: Obtain a first word segmentation dictionary; wherein the first word segmentation dictionary stores the mapping relationship between characters and numbers, and the first word segmentation dictionary is constructed based on the first training text and the first training prompt text; Based on the first prompt text and the first word segmentation dictionary, a first input number sequence matching the first prompt text is obtained. The first input number sequence is then input into the intelligent analysis model adjusted using the first training data to obtain a first output number sequence. Based on the first output number sequence, the first word segmentation dictionary, and the text output requirements, the target text corresponding to the source text is obtained; wherein, the text output requirements include identifiers set at the start and end positions of the target text.
4. The method according to claim 1, characterized in that, The process involves generating a second prompt text that matches the corresponding relationship, inputting the second prompt text into an intelligent analysis model, and obtaining a text evaluation result, including: The second construction rule is used to generate a second prompt text matching the correspondence; wherein, the second construction rule includes evaluation method requirements, source text and target text positions, position annotation requirements for characters with the correspondence, and evaluation output requirements, the evaluation method requirements and the evaluation output requirements constitute the evaluation requirements; The second prompt text is input into the intelligent analysis model adjusted using the second training dataset to obtain the text evaluation result; wherein, the second training dataset includes multiple sets of second training texts and their corresponding training evaluation texts, and the second training texts are matched with second training prompt texts, which are generated based on the second construction rule.
5. The method according to claim 4, characterized in that, The step of inputting the second prompt text into the intelligent analysis model adjusted using the second training dataset to obtain the text evaluation result includes: Obtain the second word segmentation dictionary; wherein, the second word segmentation dictionary stores the mapping relationship between characters and numbers, and the second word segmentation dictionary is constructed based on the second training text and its corresponding training evaluation text, as well as the second training prompt text; Based on the second prompt text and the second word segmentation dictionary, a second input number sequence matching the second prompt text is obtained. The second input number sequence is then input into the intelligent analysis model adjusted using the second training data to obtain a second output number sequence. Based on the second output number sequence, the second word segmentation dictionary, and the evaluation output requirements, the text evaluation result is obtained; wherein, the evaluation output requirements include format requirements that match the evaluation method.
6. The method according to claim 1, characterized in that, The step of obtaining matching clause pairs in the source text and the target text includes: The source text is segmented into sentences to obtain multiple source text clauses, and the target text is segmented into sentences to obtain multiple target text clauses; Obtain the pairing probability between each source text clause and each target text clause, and determine the target text clause that matches each source text clause based on the pairing probability to obtain the clause pair.
7. The method according to claim 6, characterized in that, The process of segmenting the source text into sentences to obtain multiple source text clauses, and segmenting the target text into sentences to obtain multiple target text clauses, includes: Based on the characters and semantics of the source text, a position identifier matching each character in the source text is determined. Based on the characters and semantics of the target text, a position identifier for each character in the target text is determined. The position identifier includes a sentence beginning identifier and a sentence middle identifier. The sentence beginning identifier is used to identify the first character in the sentence, and the sentence middle identifier is used to identify the characters after the first character in the sentence. Based on the position identifier matched by each character in the source text, multiple source text clauses are obtained; based on the position identifier matched by each character in the target text, multiple target text clauses are obtained.
8. The method according to claim 6, characterized in that, Aligning characters in the source text clause with characters in the target text clause, and determining the association between characters in the clause pair, includes: The source text clause and the target text clause in each clause pair are divided into semantic units with words as the basic unit; The semantic units are classified by part of speech to obtain the part of speech category of the semantic units, the root word matched by each semantic unit is obtained, and the position of each semantic unit in the corresponding clause is obtained. The edit distance between at least some of the semantic units in the source text clause and the target text clause is obtained. Based on the part-of-speech category, root word, and position corresponding to each semantic unit in the clause pair, and the edit distance between at least some semantic units, the semantic units in the source text clause and the semantic units in the target text clause are aligned to obtain the semantic unit alignment result; Based on the semantic unit alignment results, the association relationship between characters in the clause pair is determined.
9. A text evaluation generation system, characterized in that, include: The text generation module, in response to obtaining the source text, generates a first prompt text matching the source text, inputs the first prompt text into the intelligent analysis model, and obtains the target text corresponding to the source text; wherein, the first prompt text at least includes the adjustment requirement for adjusting the source text; A character alignment module is used to obtain matching clause pairs in the source text and the target text, and determine the correspondence between adjusted characters in the clause pairs; wherein, the clause pairs include clauses in the source text and clauses in the target text, and the correspondence between adjusted characters in the clause pairs is determined based on the following steps: for each clause pair, aligning the characters in the source text clauses with the characters in the target text clauses, and determining the association relationship between the characters in the clause pairs; wherein, the association relationship includes at least one of adjustment and remaining unchanged; and determining the correspondence between adjusted characters in the clause pairs based on the aligned characters in the clause pairs and the association relationship. An evaluation generation module is used to generate a second prompt text matching the correspondence, input the second prompt text into an intelligent analysis model, and obtain a text evaluation result; wherein, the second prompt text includes at least an evaluation requirement for evaluating characters with the correspondence, and the evaluation method corresponding to the evaluation requirement includes at least one of explanation and inquiry.
10. An electronic device, characterized in that, include: A memory and a processor are coupled to each other, the memory storing program instructions, and the processor executing the program instructions to implement the text evaluation generation method as described in any one of claims 1-8.
11. A computer-readable storage medium having program instructions stored thereon, characterized in that, When the program instructions are executed by the processor, they implement the text evaluation generation method as described in any one of claims 1-8.
Citation Information
Patent Citations
Evaluation object extraction method and device and electronic equipment
CN111966832A
Reading method, reading device, electronic equipment and computer readable storage medium
CN114358579A
