Chinese composition scoring method and device, electronic equipment and readable storage medium
Through the semantic analysis of the big model and the comprehensive scoring of statistical dimensions, the evaluation problem of traditional composition scoring methods in the lack of high-quality data is solved, achieving more reasonable and comprehensive scoring.
Patent Information
- Application Number
- CN202410949122.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-11-08
AI Technical Summary
Traditional composition automation scoring methods rely on high-quality sample data, making it difficult to obtain reasonable evaluation results in the lack of high-quality data scenarios.
A large model was used for semantic analysis, and the semantic dimensions of central content, rhetorical expression, article structure, emotional expression and title matching were evaluated, and comprehensive scores were combined with the statistical dimensions of word count, vocabulary and text errors.
A more comprehensive and targeted scoring is achieved, which avoids dependence on high-quality sample data and improves the rationality of the evaluation results.
Smart Images

Figure CN118916475A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a Chinese composition scoring method, device, electronic device and readable storage medium. Background Art
[0002] AES (Automated Essay Scoring) is a method that uses computer technology to automatically evaluate and score student essays. It uses technologies such as NLP (Natural Language Processing), machine learning, and statistical analysis to imitate the scoring process of human scorers to achieve fast, objective, and consistent scoring of a large number of essays.
[0003] Traditional automated essay scoring methods generally use natural language processing technology and statistical analysis technology to perform text preprocessing and feature extraction on essays to obtain features such as vocabulary, grammar, semantics, and paragraph structure. These features are then used to train specialized machine learning models to score the essays, achieving efficient, consistent, and objective evaluation.
[0004] The accuracy of the evaluation results of this method of scoring essays through a trained model is limited by the quality of the sample data. For application scenarios where high-quality sample data is difficult to obtain, it is difficult to obtain reasonable evaluation results. Summary of the invention
[0005] The present invention uses a large model to perform semantic analysis and obtains a semantic score by evaluating the semantic dimensions of central content, rhetorical expression, article structure, emotional expression and title-text matching, avoiding the high-quality sample data required for training a special machine model. At the same time, it integrates the statistical score obtained by evaluating the text dimensions of word count, vocabulary and text errors, making the score more comprehensive and more targeted, and ultimately making the evaluation result more reasonable.
[0006] The embodiments of the present invention can be implemented as follows:
[0007] In a first aspect, the present invention provides a Chinese composition scoring method, the method comprising: obtaining a composition to be scored; performing statistical analysis on the composition to be scored in terms of text dimension to obtain a statistical score, the text dimension at least including the number of words, vocabulary and text errors; using a large model to perform semantic dimension analysis on the composition to be scored to obtain a semantic score, the semantic dimension at least including central content, rhetorical expression, article structure, emotional expression and topic-text matching; determining a final score for the composition to be scored based on the statistical score, the semantic score and preset scoring rules.
[0008] In an optional implementation manner, the statistical score includes a word completion score, a vocabulary level score, and a number of text errors, and the step of performing a statistical analysis of the text dimension of the composition to be scored to obtain a statistical score includes:
[0009] The number of words in the composition to be scored is counted, and a word completion score is calculated based on the total number of words obtained by counting; the vocabulary in the composition to be scored is counted according to preset vocabulary levels, and a vocabulary level score is calculated based on the number of words of each level obtained by counting; the text errors in the composition to be scored are counted to obtain the number of text errors.
[0010] In an optional implementation manner, the number of text errors includes the number of wrong characters, the number of vocabulary errors, the number of punctuation marks, and the number of grammatical errors. The step of counting the text errors in the composition to be scored to obtain the number of text errors includes:
[0011] Correcting text errors of the composition to be graded to obtain a reference composition text; comparing the composition to be graded with the reference composition text to obtain text differences, wherein the text differences include word differences, vocabulary differences and punctuation differences; counting the word differences in the text differences to obtain the number of wrong characters; counting the vocabulary differences in the text differences to obtain the number of vocabulary errors; counting the punctuation differences in the text differences to obtain the number of punctuation marks; counting other differences in the text differences except word differences, vocabulary differences and punctuation differences to obtain the number of grammatical errors.
[0012] In an optional implementation, the semantic score includes a semantic dimension score for each semantic dimension, and the step of using the large model to analyze the semantic dimension of the composition to be scored to obtain the semantic score includes:
[0013] Determine the semantic text required for each semantic dimension; construct the prompt words required for each semantic dimension based on the composition to be scored and the semantic text required for each semantic dimension; input the prompt words required for each semantic dimension into the large model to obtain the analysis result of each semantic dimension; process the analysis result of each semantic dimension to obtain the semantic dimension score of each semantic dimension.
[0014] In an optional implementation, the step of determining the semantic text required for each semantic dimension includes:
[0015] If the semantic dimension is the central content, the text representing the search central sentence is used as the semantic text required by the semantic dimension; if the semantic dimension is rhetorical expression, the rhetorical device definition and the text representing the extraction that conforms to the rhetorical device definition are used as the semantic text required by the semantic dimension; if the semantic dimension is article structure, the article structure type and its definition and the text representing the article structure type judgment of each paragraph in the composition to be graded according to the definition of the article structure type are used as the semantic text required by the semantic dimension; if the semantic dimension is emotional expression, the emotional definition and the text representing the emotional judgment of the composition to be graded according to the emotional definition are used as the semantic text required by the semantic dimension; if the semantic dimension is question-text matching, the question requirements and the text representing the judgment of the question requirement matching of the composition to be graded are used as the semantic text required by the semantic dimension.
[0016] In an optional implementation manner, the step of processing the analysis result of each semantic dimension to obtain a semantic dimension score of each semantic dimension includes:
[0017] For each of the semantic dimensions, if the semantic dimension is emotional expression or topic-text matching, the analysis result of the semantic dimension is directly used as the semantic dimension score of the semantic dimension; if the semantic dimension is central content, rhetorical expression or article structure, the semantic dimension score of the semantic dimension is calculated based on the analysis result of the semantic dimension.
[0018] In an optional implementation, the semantic dimension is the central content, the analysis result is the central sentence of the composition to be scored, and the step of calculating the semantic dimension score of the semantic dimension based on the analysis result of the semantic dimension includes:
[0019] Each paragraph of the composition to be scored, the central sentence and the semantic text representing whether the current paragraph and the central sentence are semantically related are input into the large model as prompt words in turn to obtain a relevance value of each paragraph, wherein the relevance value of each paragraph represents whether each paragraph is related to the central sentence; the centrality score is calculated based on the relevance values of all paragraphs of the composition to be scored, and the centrality score is used as the semantic dimension score.
[0020] In an optional implementation, the semantic dimension is a rhetorical expression, the analysis result is a candidate sentence and the rhetoric employed by the candidate sentence, and the step of calculating the semantic dimension score of the semantic dimension based on the analysis result of the semantic dimension includes:
[0021] The definition of rhetoric, the candidate sentence, the rhetoric used in the candidate sentence, and the semantic text representing whether the candidate sentence and the rhetoric used are correct are input as prompt words into the verification model to obtain a verification result; if the verification result represents that the candidate sentence and the rhetoric used are correct, the candidate sentence is determined as the target sentence; based on the number of the target sentences in the composition to be scored and the total number of sentences in the composition to be scored, the rhetoric score is calculated and the rhetoric score is used as the semantic dimension score.
[0022] In an optional implementation, the semantic dimension is article structure, the analysis result is the article structure type of each paragraph in the composition to be scored, and the step of calculating the semantic dimension score of the semantic dimension based on the analysis result of the semantic dimension includes:
[0023] Adjacent paragraphs of the same article structure type in all paragraphs are merged to obtain the overall structure type of the composition to be scored; based on the overall structure type and the preset structure type, the article structure score is determined and the article structure score is used as the semantic dimension score.
[0024] In an optional implementation manner, the preset scoring rules include a plurality of preset levels and a score range, a benchmark rule, and a floating rule corresponding to each preset level. The step of determining the final score of the composition to be scored according to the statistical score, the semantic score, and the preset scoring rules includes:
[0025] According to the statistical score, the semantic score and the benchmark rule, a target level is determined from the multiple preset levels; a basic score is determined according to the score range of the target level; a floating score is calculated according to the statistical score, the semantic score and the floating rule of the target level; and the final score is calculated according to the basic score and the floating score.
[0026] In a second aspect, the present invention provides a Chinese composition scoring device, the device comprising:
[0027] The acquisition module is used to obtain the essays to be graded;
[0028] An analysis module, used for performing statistical analysis of the text dimension of the composition to be scored to obtain a statistical score, wherein the text dimension at least includes the number of words, vocabulary and text errors;
[0029] The analysis module is further used to analyze the semantic dimension of the composition to be scored using the large model to obtain a semantic score, wherein the semantic dimension at least includes central content, rhetorical expression, article structure, emotional expression and topic-text matching;
[0030] The scoring module is used to determine the final score of the composition to be scored based on the statistical score, the semantic score and preset scoring rules.
[0031] In a third aspect, the present invention provides an electronic device, comprising a processor and a memory, wherein the memory is used to store a program, and the processor is used to implement a Chinese composition scoring method as described in any one of the aforementioned embodiments when executing the program.
[0032] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a Chinese composition scoring method as described in any one of the aforementioned embodiments.
[0033] Compared with the prior art, the present invention uses a large model for semantic analysis and obtains a semantic score by evaluating from the semantic dimensions of central content, rhetorical expression, article structure, emotional expression and title-text matching, avoiding the high-quality sample data required for training a special machine model. At the same time, it integrates the statistical score obtained from the text dimensions of word count, vocabulary and text errors, making the score more comprehensive and more targeted, and ultimately making the evaluation result more reasonable. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0035] Figure 1 Example of the process of Chinese essay scoring method provided for this implementation Figure 1 .
[0036] Figure 2 An example of the process of the Chinese composition scoring method provided in this embodiment Figure 2 .
[0037] Figure 3 This is a block diagram of an example of a Chinese composition scoring device provided in this embodiment.
[0038] Figure 4 An example block diagram of an electronic device provided in this embodiment.
[0039] Icons: 10 - electronic device; 11 - processor; 12 - memory; 13 - bus; 100 - Chinese composition scoring device; 110 - acquisition module; 120 - analysis module; 130 - scoring module. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0041] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0043] In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. appear to indicate an orientation or position relationship, they are based on the orientation or position relationship shown in the accompanying drawings, or are the orientation or position relationship in which the product of the invention is usually placed when used. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0044] In addition, the terms “first”, “second”, etc., if used, are merely used to distinguish between the descriptions and should not be understood as indicating or implying relative importance.
[0045] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.
[0046] Please refer to Figure 1 , Figure 1 Example of the process of Chinese essay scoring method provided for this implementation Figure 1 , the method comprises the following steps:
[0047] Step S101, obtaining the composition to be graded.
[0048] In this embodiment, the composition to be scored may be a text file, a picture file, or a PDF file formed by Chinese characters and punctuation marks.
[0049] Step S102, performing statistical analysis on the text dimension of the composition to be scored to obtain a statistical score, where the text dimension at least includes the number of words, vocabulary and text errors.
[0050] In this embodiment, in order to analyze the composition to be rated from the text dimension, for the composition to be rated in the form of a text file, the text of the composition to be rated can be directly extracted from it, and for the composition to be rated in the form of a non-text file, it can be converted into a text file, and then the text of the composition to be rated can be extracted from it. After obtaining the text of the composition to be rated, a statistical analysis is performed on it, including at least counting the number of words, counting vocabulary, counting text errors, etc. Of course, more text dimensions can be added on this basis according to actual needs, such as the number of paragraphs, the number of sentences, the number of quoted poems, etc.
[0051] Step S103, using the big model to analyze the semantic dimensions of the essay to be scored to obtain a semantic score, where the semantic dimensions at least include central content, rhetorical expression, article structure, emotional expression, and topic-text matching.
[0052] In this embodiment, a large model with strong semantic analysis capabilities is used to analyze the essays to be scored from a semantic dimension. The semantic dimension can be extracted and abstracted from the preset essay scoring criteria. For example, if the essay scoring criteria have requirements for language vividness, it can be extracted into rhetorical expression and used as a semantic dimension. For another example, if the essay scoring criteria have requirements for a clear center, it can be extracted into central content and used as a semantic dimension. This embodiment extracts at least the following five semantic dimensions based on the essay scoring criteria: central content, rhetorical expression, article structure, emotional expression, and topic-text matching. Of course, other semantic dimensions can also be added on this basis according to actual needs. For example, if the essay scoring criteria have requirements for the logic of the argument, it can be extracted into argument logic and used as a semantic dimension.
[0053] Step S104, determining the final score of the composition to be scored based on the statistical score, semantic score and preset scoring rules.
[0054] In this embodiment, the preset scoring rules are scoring rules for evaluating each text dimension and each semantic dimension determined according to the composition scoring standards. For composition scoring standards that include multiple levels, the scoring rules for the same text dimension or the same semantic dimension are different at different levels. For example, the higher the level, the higher the composition score, and the higher the requirements for the scoring rules.
[0055] The above method provided in this embodiment uses a large model to perform semantic analysis, and obtains a semantic score by evaluating from the semantic dimensions of central content, rhetorical expression, article structure, emotional expression and title-text matching, thereby avoiding the high-quality sample data required for training a special machine model, and at the same time integrating the statistical scores obtained from the text dimensions of word count, vocabulary and text errors, so that the score is more comprehensive and more targeted, and ultimately the evaluation result is more reasonable.
[0056] In an optional implementation, the text dimension can be evaluated from three dimensions: word count, vocabulary, and text errors, which correspond to the word count completion score, vocabulary level score, and text error number in the statistical score, respectively. The implementation method for obtaining the statistical score is as follows:
[0057] (1) Count the number of words in the essay to be scored and calculate the word completion score based on the total number of words obtained;
[0058] In this embodiment, the preset required number of words can be matched from the composition title by a regular matching method to obtain the required minimum number of words. For example, the composition title includes the following content: "Requirement: The number of words is not less than 450 words", and the regular matching method can be used to obtain the preset required number of words as 450 words. The word count completion score can be determined based on the total number of words in the composition to be scored and the preset required number of words. One calculation method is: word count completion = total number of words / preset required number of words. For example, the total number of words is 369, and the preset required number of words is 450, then the word count completion = 369 / 450 = 0.82. Of course, other methods can also be used according to actual needs. For example, if the total number of words is greater than the preset required number of words, the word count completion is 1, otherwise it is 0.
[0059] (2) Counting the vocabulary in the essay to be graded according to the preset vocabulary levels, and calculating the vocabulary level score based on the number of vocabulary at each level obtained by counting;
[0060] In this embodiment, since different grades have different requirements for vocabulary, in order to accurately evaluate vocabulary with a finer granularity according to the composition requirements of different grades, this embodiment pre-sets different levels of vocabulary according to the requirements of each grade, and then counts the number of vocabulary of each level in the composition to be scored, and finally, calculates the vocabulary level score based on the number of vocabulary of each level.
[0061] As an implementation method: first, the composition to be scored is segmented to obtain the vocabulary set of the composition to be scored; secondly, each word in the vocabulary set is traversed, and for each word, the vocabulary level described is determined, and the vocabulary level score is calculated using the following formula:
[0062]
[0063] Among them, d is the vocabulary set, w i is the i-th word in the vocabulary set, is the vocabulary level of the i-th word in the vocabulary set, S wordsis the vocabulary level score, and N is the total number of words in the composition to be scored. For example, there are 77 words at level 1, 23 words at level 2, 13 words at level 3, 1 word at level 4, 0 words at level 5, and 0 words at level 6, with a total of 207 words. The vocabulary level score is: (77*1+23*2+13*3+4*1) / 207=0.80.
[0064] (3) Count the text errors in the essays to be graded and obtain the number of text errors.
[0065] In this embodiment, according to different levels or grade requirements, the requirements for typos, punctuation marks, and vocabulary errors are different. In this embodiment, the number of text errors is divided into the number of typos, the number of vocabulary errors, the number of punctuation marks, and the number of grammatical errors, so as to facilitate the evaluation of typos, punctuation marks, and vocabulary requirements according to different evaluation rules according to different levels or grade requirements. One way to obtain the number of text errors is:
[0066] First, the text errors of the composition to be scored are corrected to obtain the reference composition text;
[0067] In this embodiment, the reference composition text can be obtained by using the error check of the word processing software, or by using the big model. Taking the big model as an example, the composition to be scored and the semantics representing the modification of the composition are input into the big model as prompt words to obtain the reference composition text. For example, the prompt words are:
[0068] Markdown
[0069] #Require
[0070] Modify the errors in the following composition, keeping the original content and structure unchanged.
[0071] #composition
[0072] """
[0073] Today, I crawled on the grass again, quietly watching the ants on the ground, forgetting the world and myself. Then, the space became bigger, and the grass turned into a forest. There was a little ant, walking around, and found a huge piece of bread crumbs. I think it must be a good chef, looking for something to cook. Now it has found it, but it can't move it. It turned around and walked back to the cave. After a while, the ant chef brought out a few porters, and they moved the food into the cave together. They have a lot of dinner tonight!
[0074] I seemed to smell the fragrance of the ants' food, and I wanted to go in and share it with them. But I was afraid of scaring these little spirits. The lives of ants are also very regular, and they do their own things: the little ants go to school, and the teachers teach. They are so serious and focused. When the little ants go to school, their parents are working. Ding-ling-ling, the school bell rings, and the little ants return home. When they get home, the little ants report to their parents what they have learned that day. The parents may compare and comment on them, or praise them.
[0075] A little ant that looks very proud. I think it must have done well in the exam.
[0076] """
[0077] The output of the large model is:
[0078] Markdown
[0079] Today, I lay on the grass again, quietly watching the ants on the ground, forgetting the world and myself. Then, the space became bigger, and the grass turned into a forest. There was a little ant, walking around, and found a huge piece of bread crumbs. I think it must be a good chef, looking for something to cook. Now it has found it, but it can't move it, so it turns around and walks back to the cave. After a while, the ant chef brought out a few porters, and they moved the food into the cave together. They have a lot of dinner tonight!
[0080] I seemed to smell the fragrance of the ants' food, and I wanted to go in and share it with them. But I was afraid of scaring these little elves. The lives of ants are also very regular, and they do their own things: the little ants go to school, and the teachers teach. They are so serious and focused. When the little ants go to school, their parents are working. Dinglingling, the school bell rings, and the little ants return home. When they get home, the little ants report to their parents what they have learned that day. Their parents may criticize them or praise them.
[0081] A little ant that looks very proud. I think it must have got good grades in the exam.
[0082] Secondly, compare the text of the composition to be graded with the reference composition to obtain text differences, which include word differences, vocabulary differences and punctuation differences;
[0083] In this embodiment, the text difference between the composition to be scored and the reference composition can be compared using the interface function provided by the text comparison software, or the Linux diff command can be used to compare the text differences between the two. The word difference is the difference between a single word, and the vocabulary difference is the difference between words composed of multiple words.
[0084] In the above example, there are the following differences:
[0085] 6: Crawl -> Lie prone
[0086] 13: of -> de (地 in Chinese, but here it seems like an incorrect or placeholder 'de' in the context)
[0087] 46: For -> del
[0088] 123: Comma -> Period
[0089] 126: Insert -> Er (儿 in Chinese, but here it seems like an incorrect or placeholder 'er' in the context)
[0090] 152 - 154: Went in -> Entered
[0091] 211: Qing -> Jing (精 in Chinese, but here it seems like an incorrect or placeholder 'jing' in the context)
[0092] 312: Le (了 in Chinese) -> del
[0093] 323: Return -> Remit
[0094] 337: Ratio -> Batch
[0095] 376: Calculate -> Performance
[0096] Among them, in 6: Crawl -> Lie prone, the number represents the position of the difference in the composition to be scored, that is, the 6th character. The 'Crawl' before '->' is the text in the composition to be scored, and the 'Lie prone' before '->' is the text in the reference composition. The other differences are similar, and will not be elaborated here.
[0097] Third, count the character differences in the text differences to obtain the number of typos; count the vocabulary differences in the text differences to obtain the number of vocabulary errors; count the punctuation differences in the text differences to obtain the number of punctuation marks;
[0098] Fourth, count the other differences in the text differences except for character differences, vocabulary differences, and punctuation differences to obtain the number of grammar errors.
[0099] In this embodiment, the other differences except for character differences, vocabulary differences, and punctuation differences are regarded as grammar error differences, and such errors are regarded as grammar errors.
[0100] In an alternative implementation, when using a large model for semantic analysis, in order to simplify the processing flow and unify the analysis processes of multiple semantic dimensions, this embodiment provides an implementation method:
[0101] First, determine the semantic text required for each semantic dimension;
[0102] In this embodiment, the semantic text is the text that expresses the semantic analysis method to the big model. For different semantic dimensions, the corresponding semantic text needs to be determined so that the big model can perform semantic analysis from the corresponding semantic dimensions.
[0103] Secondly, construct the prompt words required for each semantic dimension according to the essay to be scored and the semantic text required for each semantic dimension;
[0104] In this embodiment, prompt words are a way of interacting with the big model. The prompt words are used to help the big model understand the user's needs and generate output in a specified format.
[0105] Third, input the prompt words required for each semantic dimension into the large model to obtain the analysis results of each semantic dimension;
[0106] Fourth, the analysis results of each semantic dimension are processed to obtain a semantic dimension score for each semantic dimension.
[0107] In this embodiment, for different semantic dimensions, depending on the actual requirements, some can be used as semantic dimension scores after a single large model analysis and simple formatting of the analysis results. Some may require multiple large model analyses to obtain the desired final semantic dimension scores. For example, based on the current analysis results, new prompt words are constructed, and then processed based on the new prompt words to obtain the desired semantic dimension scores.
[0108] In this embodiment, for different semantic dimensions, when using a large model for semantic analysis, it is necessary to determine the semantic text that matches it, and then to construct the prompt words that match it based on the semantic text, and finally to obtain the desired analysis results. This embodiment provides an implementation method for determining the semantic text under different semantic dimensions:
[0109] (1) If the semantic dimension is the central content, the text representing the search central sentence is used as the semantic text required by the semantic dimension;
[0110] For example, the semantic text of the central content could be:
[0111] Markdown
[0112] #background
[0113] A central sentence is a sentence that can summarize the main content of an article.
[0114] #Require
[0115] The following is a composition. Please find the central sentence and return it. The composition is as follows:
[0116] (2) If the semantic dimension is rhetorical expression, the rhetorical device definition and representation are used to extract the text that meets the rhetorical device definition as the semantic text required by the semantic dimension;
[0117] For example, the semantic text of a rhetorical expression could be:
[0118] Markdown
[0119] #definition
[0120] - Metaphor. Metaphor is a figure of speech that refers to one thing or principle as another thing or principle when describing things or explaining principles. These two things or principles have something in common.
[0121] - Personification. Personification is a rhetorical device that makes things (including objects, animals, ideas or abstract concepts) look like people, giving them human appearance, personality or emotions. Personification can be expressed through adjectives, verbs or nouns. Personification is to humanize things. That is, to treat things as people and write them as having emotions, language and actions like people.
[0122] -Parallelism. Parallelism is a rhetorical method that arranges words or sentences with the same or similar structure, closely related meanings, and consistent tone in a series. It uses phrases (subject, predicate, verb, object) or sentences with related or similar meanings, the same or similar structure, and the same tone to be arranged side by side (three sentences or more), and paragraphs to be arranged side by side (two paragraphs are enough) to achieve an effect of strengthening the momentum of the language.
[0123] - Exaggeration: In order to achieve a certain expression effect, the image, characteristics, function, degree, etc. of an object are exaggerated or reduced.
[0124] - Rhetorical question. Asking a question from the opposite side, the answer lies in the question. This rhetorical device that uses a questioning tone to express affirmative or negative meanings and strong emotions is called a rhetorical question.
[0125] -Metonymy. Metonymy is a rhetorical device that refers to not directly saying the name of the thing to be mentioned, but using the name of another thing related to it to call it. Metonymy, as the name suggests, is to borrow one thing to replace another thing, so most metonymies are nouns. When using it, you must consider the legitimacy and universality of the substitution, try to simplify it, and make the text smooth.
[0126] #Require
[0127] The following is an essay. Based on the definition, please find the sentences that use the rhetorical devices used in the definition and return them according to the return format.
[0128] #Format
[0129] [{
[0130] "sentence":"xxxxxxxxxx",
[0131] "type":"xxx"#define type
[0132] }, ... ]
[0135] (3) If the semantic dimension is article structure, the article structure type and its definition and representation are used to judge the article structure type of each paragraph in the essay to be scored according to the definition of article structure type as the semantic text required for the semantic dimension;
[0136] For example, the semantic text of the article structure is:
[0137] Markdown
[0138] #Article Structure
[0139] -Generalize first, then divide and then summarize again. That is, first give a general discussion, then divide and discuss, and finally summarize again, which will go to a higher level and make the article logically rigorous, well-organized, and highlight the main point.
[0140] #Require
[0141] Based on the above definition, determine whether each paragraph of the following composition is general or specific, and return them in order.
[0142] (4) If the semantic dimension is emotional expression, the emotional definition and the text representing the emotional judgment of the essay to be scored based on the emotional definition are used as the semantic text required for the semantic dimension;
[0143] For example, the semantic text of sentiment expression is:
[0144] Markdown
[0145] True feelings refer to the real emotions and feelings expressed in the article. It is not only a true reflection of the author's inner thoughts, but also an emotional experience that can resonate with readers. True feelings are an important criterion for measuring the success of an essay. Only articles with true feelings can impress readers and arouse emotional resonance. Specifically, they are:
[0146] 1. Write about small things and use details to express the spirit: True feelings are often reflected in small things in life, and are shown through delicate details. The selection of small things should be close to life, and the details should be vivid, showing the beauty of human feelings and human nature. For example, Zhu Ziqing's "Back View", Ji Xianlin's "Magical Loofah", Lao She's "Little Sparrow", these works leave a deep impression on people through delicate descriptions of small things.
[0147] 2. Write about yourself and move people with true feelings: To express true feelings, the author must boldly show himself and truly express his inner feelings. Psychological description is an important means of expressing true feelings. Through detailed description of inner activities, readers can feel the author's emotional fluctuations. For example, the article "Teacher Teaches Me to Write" vividly shows the psychological changes of the characters through detailed description of the inner activities of the young author, allowing readers to empathize.
[0148] 3. Artistic processing, reasonable: Although the composition can be fictional and imaginative, it must be reasonable. Even a fictional story must be processed through art to make it look credible and feel real. Fairy tales, science fiction and other creations are no exception. Real emotions must be injected into the fiction to make it contagious.
[0149] 4. See the big picture from the small details and reveal the theme: When writing about small things, you should be able to reveal the beauty and meaning behind them, and show the theme by seeing the big picture from the small details. Discover and express profound emotions and truths in ordinary little things, and trigger readers' thinking and enlightenment. Select subtle life materials, touch people's hearts with details, and show true feelings.
[0150] #Require
[0151] Determine whether the composition is true and emotional according to the definition. If it is true and emotional, return 1, if not, return 0.
[0152] (5) If the semantic dimension is question-text matching, the question requirements and the text that represents the matching judgment of the essay to be graded will be regarded as the semantic text required for the semantic dimension.
[0153] For example, the semantic text for the title and text matching is:
[0154] Markdown
[0155] #Require
[0156] Determine whether the composition is related to the topic, if so, return 1, otherwise return 0
[0157] This embodiment also provides a method for processing each semantic dimension according to the analysis result to obtain the corresponding semantic dimension score for different semantic dimensions:
[0158] (1) If the semantic dimension is emotional expression or question-text matching, the analysis result of the semantic dimension is directly used as the semantic dimension score of the semantic dimension;
[0159] In this embodiment, for emotional expression or question-text matching, the analysis result can be marked with 0 or 1, 1 means that there is real emotion or the question-text is matched, and 0 means that there is no real emotion or the question-text is not matched. As an implementation method, 0 or 1 can be directly used as its semantic dimension score.
[0160] (2) If the semantic dimension is central content, rhetorical expression, or article structure, the semantic dimension score of the semantic dimension is calculated based on the analysis results of the semantic dimension.
[0161] In this embodiment, for the central content, the analysis result is the central sentence of the composition to be scored. At this time, in order to perform a more accurate analysis from the dimension of the central content, it is also necessary to determine whether each paragraph is related to the central sentence based on the central sentence, and calculate the semantic dimension score of each paragraph based on the relevance between the paragraph and the central sentence. One implementation method is:
[0162] First, each paragraph, central sentence, and semantic text that indicates whether the current paragraph and the central sentence are semantically related are input into the big model as prompt words in turn, and the relevance value of each paragraph is obtained. The relevance value of each paragraph indicates whether each paragraph is related to the central sentence.
[0163] In this embodiment, the semantic text representing whether the current paragraph and the central sentence are semantically related may be:
[0164] Markdown
[0165] #background
[0166] A central sentence is a sentence that can summarize the main content of an article.
[0167] #Require
[0168] The following paragraphs and central sentences are given. You need to determine whether the central sentence and paragraph are related. If they are related, return 1, otherwise return 0. For example, for the first paragraph in the above essay to be graded, the prompt word can be:
[0169] Markdown
[0170] #background
[0171] A central sentence is a sentence that can summarize the main content of an article.
[0172] #Require
[0173] The following will give a paragraph and a central sentence. You need to determine whether the central sentence and the paragraph are related. If so, return 1, otherwise return 0.
[0174] ##paragraph
[0175] Today, I crawled on the grass again, quietly watching the ants on the ground, forgetting the world and myself. Then, the space became bigger, and the grass turned into a forest. There was a little ant, walking around, and found a huge piece of bread crumbs. I think it must be a good chef, looking for something to cook. Now it has found it, but it can't move it. It turned around and walked back to the cave. After a while, the ant chef brought out a few porters, and they moved the food into the cave together. They have a lot of dinner tonight!
[0176] ##Central sentence
[0177] Today, I crawled on the grass again, quietly looking at the ants on the ground, forgetting the world and myself. The relevant value of the paragraph was 1, indicating that the paragraph is related to the central sentence.
[0178] Secondly, the centrality score is calculated based on the correlation values of all paragraphs of the essay to be scored, and the centrality score is used as the semantic dimension score.
[0179] In this embodiment, one implementation method is: if all paragraphs are related to the central sentence, the centrality score is 1, otherwise it is 0. Another implementation method is: the ratio of the number of paragraphs related to the central sentence to the total number of paragraphs is used as the centrality score.
[0180] In this embodiment, for rhetorical expressions, the analysis results are candidate sentences and the rhetorical devices used in the candidate sentences. Since the accuracy of the judgment of rhetorical devices by the large model is not perfect enough, in order to improve the reliability of the judgment results of rhetorical devices, this embodiment first uses the large model to make a preliminary judgment, and then uses a verification model different from the large model to make a more targeted judgment. This embodiment also provides an implementation method for calculating the rhetorical device score:
[0181] Firstly, the definition of rhetoric, candidate sentences, rhetoric adopted by the candidate sentences and semantic text representing the requirements for judging whether the candidate sentences and rhetoric adopted are correct are input into the verification model as prompt words to obtain the verification results;
[0182] In this embodiment, for example, the analysis result is:
[0183] JSON [
[0185] {
[0186] "sentence":"There was a little ant, walking around, and found a huge piece of bread crumbs. I think it must be a good chef, looking for something to cook. Now it has found it, but it can't move it. It turns around and walks back to the cave. After a while, the ant chef brought out a few porters, and they moved the food into the cave together. They have a lot of dinner tonight!",
[0187] "type":"Anthropomorphic"
[0188] },
[0189] {
[0190] "sentence":"I seem to smell the fragrance of ants' food. I really want to go in and share it with them.",
[0191] "type":"Anthropomorphic"
[0192] },
[0193] {
[0194] "sentence":"Ants also have a regular life, they do their own things: the little ants go to school, the teacher teaches, they are so serious and focused.",
[0195] "type":"Anthropomorphic"
[0196] },
[0197] {
[0198] "sentence":"When the little ants go to school, their parents are working.",
[0199] "type":"Anthropomorphic"
[0200] },
[0201] {
[0202] "sentence":"Ding-ling-ling, the school bell rang, and the little ants returned home. When they got home, the little ants reported to their parents what they had learned that day. Their parents might evaluate them or praise them.",
[0203] "type":"Anthropomorphic"
[0204] } ]
[0206] In this embodiment, the semantic text representing the requirement to judge whether the candidate sentence and the rhetoric adopted are correct may be:
[0207] Markdown
[0208] #Require
[0209] According to the definition, determine whether the request sentence belongs to the defined type. If yes, return 1, otherwise return 0.
[0210] For any sentence in the analysis results, you can construct the corresponding prompt word and input it into the verification model. For example, for the following sentence:
[0211] {
[0212] "sentence":"There was a little ant, walking around, and found a huge piece of bread crumbs. I think it must be a good chef, looking for something to cook. Now it has found it, but it can't move it. It turns around and walks back to the cave. After a while, the ant chef brought out a few porters, and they moved the food into the cave together. They have a lot of dinner tonight!",
[0213] "type":"Anthropomorphic"
[0214] }
[0215] The corresponding prompt words are:
[0216] Markdown
[0217] #definition
[0218] Personification. Personification is a rhetorical device that makes things (including objects, animals, ideas or abstract concepts) look like people, giving them human appearance, personality or emotions. Personification can be expressed through adjectives, verbs or nouns. Personification is to humanize things. That is, to treat things as people and write them as having emotions, language and actions like people.
[0219] #Require
[0220] According to the definition, determine whether the request sentence belongs to the defined type. If yes, return 1, otherwise return 0.
[0221] #Request sentence
[0222] There was a little ant walking around and found a huge piece of bread crumbs. I thought it must be a good chef, out looking for something to cook. Now it found it, but it couldn't move it. It turned around and walked back to the cave. After a while, the ant chef brought out a few porters, and together they moved the food into the cave. They will have a lot of dinner tonight!
[0223] For the above request sentence, the verification result is 1, indicating that the rhetorical device used in the request sentence is personification.
[0224] Secondly, if the verification result indicates that the candidate sentence and the rhetoric adopted are correct, the candidate sentence is determined as the target sentence;
[0225] Third, based on the number of target sentences in the composition to be scored and the total number of sentences in the composition to be scored, the rhetorical device score was calculated and used as the semantic dimension score.
[0226] In this embodiment, as an implementation method, the rhetorical device score = the number of target sentences / the total number of sentences in the composition to be scored.
[0227] In this embodiment, for the article structure, the analysis result is the article structure type of each paragraph in the composition to be graded. For example, the composition to be graded includes 3 paragraphs, and its analysis result is: total, sub, sub. The overall structure type of the composition to be graded can be determined based on the article structure type of each paragraph. One way to determine is:
[0228] First, the adjacent paragraphs with the same article structure type in all paragraphs are merged to obtain the overall structure type of the essay to be scored;
[0229] In this embodiment, for example, the composition to be graded includes three paragraphs, and the analysis results are: total, score, and score. The scores of the last two paragraphs are combined, and the overall structure type finally obtained is total-score.
[0230] Secondly, according to the overall structure type and the preset structure type, the article structure score is determined and the article structure score is used as the semantic dimension score.
[0231] According to different actual standards, the preset structure type can be total-specific-total, total-specific, specific-total, etc. As an implementation method, if the overall structure type is the same as the preset structure type, the article structure score is 1, otherwise it is 0.
[0232] After obtaining the statistical scores of each text dimension and the semantic scores of each semantic dimension, in order to achieve a more fine-grained score evaluation in any level of multiple preset levels, this embodiment provides an implementation method for calculating the final score based on the basic score and the floating score by determining the basic score and the floating score. Please refer to Figure 2 , Figure 2 An example of the process of the Chinese composition scoring method provided in this embodiment Figure 2 , step S104 includes the following sub-steps:
[0233] Sub-step S1041, determining a target level from a plurality of preset levels according to the statistical score, the semantic score and the benchmark rule;
[0234] Sub-step S1042, determining a basic score according to the score range of the target level;
[0235] Sub-step S1043, calculating a floating score according to the statistical score, the semantic score and the floating rule of the target level;
[0236] Sub-step S1044, calculating the final score according to the basic score and the floating score.
[0237] In this embodiment, if the sum of the basic score and the floating score is greater than the maximum value of the score range of the target level, the maximum value is used as the final score, otherwise, the sum of the basic score and the floating score is used as the final score.
[0238] In this embodiment, the preset scoring rules include multiple preset levels and the score range, benchmark rules and floating rules corresponding to each preset level. For example, there are 5 preset levels, and the preset scoring rules are:
[0239] YAML
[0240] rules:
[0241] -Level1:#Level 1
[0242] score:
[0243] max:40
[0244] min:35
[0245] condition_require_number:10
[0246] conditions:
[0247] words_coverage:'>1.0'
[0248] words_level:'>1.0'
[0249] center:'>=0.8'
[0250] rhetorical:'>0.2'
[0251] structure:'=1'
[0252] emotion:'=1'
[0253] prompt_match:'=1'
[0254] err_char:'<5'#Wrong characters and punctuation
[0255] err_word:'<3'
[0256] err_grammar:'<=1'
[0257] 调整
[0258] 词汇级别:'1 / 0.2'
[0259] 修辞:'1 / 0.1'
[0260] 错误字符:'-0.2 / 1'
[0261] 错误单词:'-1 / 1'
[0262] 错误标记:'-0.1 / 1'
[0263] 错误语法:'-2 / 1'
[0264] - 二级:#Level 2
[0265] 分数:
[0266] 最大值:34
[0267] 最小值:29
[0268] 条件要求数量:9
[0269] 条件:
[0270] 词汇覆盖率:'>1.0'
[0271] 词汇级别:'>0.9'
[0272] 中心:'>=0.7'
[0273] 修辞:'>0.18'
[0274] 结构:'=1'
[0275] 情感:'=1'
[0276] 提示匹配:'=1'
[0277] 错误字符:'<5'#错别字和标点
[0278] 错误单词:'<3'
[0279] 错误标记:'-0.1 / 1'
[0280] 错误语法:'<=3'
[0281] 调整
[0282] 单词级别:'1 / 0.2'
[0283] 修辞:'1 / 0.1'
[0284] 错误字符:'-0.2 / 1'
[0285] 错误单词:'-1 / 1'
[0286] 错误标记:'-0.1 / 1'
[0287] 错误语法:'-2 / 1'
[0288] - 级别3:#Level 3
[0289] 分数:
[0290] 最大值:28
[0291] 最小值:22
[0292] 条件要求数量:7
[0293] 条件:
[0294] 单词覆盖率:'>1.0'
[0295] 单词级别:'>1.0'
[0296] 中心:'>=0.7'
[0297] 修辞:'>0.15'
[0298] 结构:'=1'
[0299] 情感:'=1'
[0300] 提示匹配:'=1'
[0301] 错误字符:'<10' #Typos and punctuation
[0302] 错误单词:'<5'
[0303] 错误语法:'<=2'
[0304] 调整:
[0305] words_level:'1 / 0.2'
[0306] rhetorical:'1 / 0.1'
[0307] err_char:'-0.1 / 1'
[0308] err_word:'-0.5 / 1'
[0309] err_mark:'-0.1 / 1'
[0310] err_grammar:'-1 / 1'
[0311] -Level4:#Level 4
[0312] score:
[0313] max:16
[0314] min:21
[0315] condition_require_number:6
[0316] conditions:
[0317] words_coverage:'>0.7'
[0318] words_level:'>0.6'
[0319] center:'>=0.5'
[0320] rhetorical:'>0.1'
[0321] structure:'=1'
[0322] emotion:'=1'
[0323] prompt_match:'=1'
[0324] err_char:'<10'#Typographical errors and punctuation
[0325] err_word:'<5'
[0326] err_mark:'-0.1 / 1'
[0327] err_grammar:'<=3'
[0328] adjust:
[0329] words_level:'1 / 0.2'
[0330] rhetorical:'1 / 0.1'
[0331] err_char:'-0.1 / 1'
[0332] err_word:'-0.5 / 1'
[0333] err_mark:'-0.1 / 1'
[0334] err_grammar:'-1 / 1'
[0335] -Level5:# Level 5
[0336] score:
[0337] max:15
[0338] min:0
[0339] condition_require_number:0
[0340] conditions:
[0341] words_coverage:'>0.5'
[0342] words_level:'>0.5'
[0343] center:'>=0.8'
[0344] rhetorical:'>0.2'
[0345] structure:'=1'
[0346] emotion:'=1'
[0347] prompt_match:'=1'
[0348] err_char:'<10' # Typographical errors and punctuation
[0349] err_word:'<5'
[0350] err_mark:'-0.1 / 1'
[0351] err_grammar:'<=3'
[0352] adjust:
[0353] words_level:'1 / 0.2'
[0354] rhetorical:'1 / 0.1'
[0355] err_char:'-0.1 / 1'
[0356] err_word:'-0.5 / 1'
[0357] err_mark:'-0.1 / 1'
[0358] err_grammar:'-1 / 1'
[0359] Taking level 1 as an example, max and min are the maximum and minimum values of the score range of this level, which are 40 and 35 respectively. Conditions is the benchmark rule. In this embodiment, there are 10 benchmark rules, namely: words_coverage (word count completion), words_level (vocabulary level), center (centrality), rhetorical (rhetorical expression), structure (article structure), emotion (emotional expression), prompt_match (prompt text match), err_char (typo), err_word (vocabulary error), err_grammar (grammatical error). Condition_require_number indicates the number of benchmark rules that must be met at this level. If level1 is 10, it means that all 10 items of level 1 must be met. Adjust is a floating rule, which includes 5 items in total. The other levels are similar and will not be repeated here.
[0360] This embodiment uses an example to introduce the calculation method of the final score, and the scores of each item are as follows:
[0361] Word count completion score: 0.82
[0362] Vocabulary level score: 0.80
[0363] Centrality score: 1.0
[0364] Rhetorical device score: 5 / 9 = 0.56
[0365] Article structure score: 0
[0366] Emotional expression score: 1
[0367] ·Question-text matching score: 1
[0368] Number of typos: 9
[0369] Number of vocabulary errors: 0
[0370] Number of punctuation errors: 1
[0371] Number of grammatical errors: 1
[0372] According to the above scores and the benchmark rules of each level, the target level that is met is determined to be level 3, the score range of level 3 is (22, 28), and its basic score is the middle value of 22 and 28: 25. For floating scores: the rhetorical score is 0.56, rounded to 0.6, based on rhetorical:'1 / 0.1', the floating score of this item is: 0.6*1 / 0.1=6; the number of typos is 9, based on err_char:'-0.1 / 1', the floating score of this item is 9*(-0.1 / 1)=-0.9; the number of punctuation errors is 1, based on err_mark:'-0.1 / 1', the floating score of this item is 1*(-0.1 / 1)=-0.1; the number of grammatical errors is 1, based on err_grammar:'-1 / 1', the floating score of this item is 1*(-1 / 1)=-1. Therefore, floating score = +6-0.9-0.1-1=+4, floating score + basic score = 25+4=29, 29 exceeds the upper limit of the interval 28, so the final score is 28 points.
[0373] In order to execute the corresponding steps in the above embodiment and each possible implementation method, the following provides a method for implementing the Chinese composition scoring device 100. Figure 3 , Figure 3 This is a block diagram of the Chinese composition scoring device provided in this embodiment. It should be noted that the basic principles and technical effects of the Chinese composition scoring device 100 provided by the present invention are the same as those of the corresponding above-mentioned embodiments, and are not mentioned in this embodiment for the sake of brief description.
[0374] The Chinese composition scoring device 100 includes an acquisition module 110 , an analysis module 120 and a scoring module 130 .
[0375] An acquisition module 110 is used to acquire the composition to be graded;
[0376] An analysis module 120 is used to perform statistical analysis on the text dimension of the composition to be scored to obtain a statistical score, where the text dimension at least includes the number of words, vocabulary, and text errors;
[0377] The analysis module 120 is also used to use the big model to analyze the semantic dimension of the composition to be scored to obtain a semantic score, where the semantic dimension at least includes the central content, rhetorical expression, article structure, emotional expression and topic-text matching;
[0378] The scoring module 130 is used to determine the final score of the composition to be scored based on the statistical score, semantic score and preset scoring rules.
[0379] In an optional embodiment, the statistical score includes a word completion score, a vocabulary level score and a number of text errors, and the analysis module 120 is specifically used to: count the number of words in the composition to be scored, and calculate the word completion score based on the total number of words obtained by statistics; count the vocabulary in the composition to be scored according to preset vocabulary levels, and calculate the vocabulary level score based on the number of words at each level obtained by statistics; count the text errors in the composition to be scored to obtain the number of text errors.
[0380] In an optional implementation, the number of text errors includes the number of wrong characters, the number of vocabulary errors, the number of punctuation marks and the number of grammatical errors, and the analysis module 120 is specifically used to: correct text errors in the composition to be scored to obtain a reference composition text; compare the composition to be scored and the reference composition text to obtain text differences, and the text differences include word differences, vocabulary differences and punctuation mark differences; count the word differences in the text differences to obtain the number of wrong characters; count the vocabulary differences in the text differences to obtain the number of vocabulary errors; count the punctuation mark differences in the text differences to obtain the number of punctuation marks; count the other differences in the text differences except word differences, vocabulary differences and punctuation mark differences to obtain the number of grammatical errors.
[0381] In an optional embodiment, the semantic score includes a semantic dimension score for each semantic dimension, and the analysis module 120 is specifically used to: determine the semantic text required for each semantic dimension; construct the prompt words required for each semantic dimension based on the composition to be scored and the semantic text required for each semantic dimension; input the prompt words required for each semantic dimension into the large model to obtain the analysis result of each semantic dimension; process the analysis result of each semantic dimension to obtain the semantic dimension score of each semantic dimension.
[0382] In an optional embodiment, the analysis module 120 is also specifically used for: if the semantic dimension is the central content, then the text representing the central sentence to be searched is used as the semantic text required for the semantic dimension; if the semantic dimension is rhetorical expression, then the text that defines the rhetorical device and represents the extraction of the text that conforms to the rhetorical device definition is used as the semantic text required for the semantic dimension; if the semantic dimension is article structure, then the article structure type and its definition and the text that represents the article structure type judgment for each paragraph in the composition to be scored according to the definition of the article structure type are used as the semantic text required for the semantic dimension; if the semantic dimension is emotional expression, then the text that defines the emotion and represents the emotion judgment for the composition to be scored according to the emotion definition is used as the semantic text required for the semantic dimension; if the semantic dimension is question-text matching, then the question requirements and the text that represents the matching judgment for the question requirements for the composition to be scored are used as the semantic text required for the semantic dimension.
[0383] In an optional embodiment, the analysis module 120 is also specifically used for: for each semantic dimension, if the semantic dimension is emotional expression or topic-text matching, the analysis result of the semantic dimension is directly used as the semantic dimension score of the semantic dimension; if the semantic dimension is central content, rhetorical expression or article structure, the semantic dimension score of the semantic dimension is calculated based on the analysis result of the semantic dimension.
[0384] In an optional implementation, the semantic dimension is the central content, and the analysis result is the central sentence of the composition to be scored. The analysis module 120 is specifically used to: input each paragraph, the central sentence and the semantic text representing whether the current paragraph and the central sentence are semantically related as prompt words into the large model in turn to obtain the relevance value of each paragraph, and the relevance value of each paragraph represents whether each paragraph and the central sentence are related; calculate the centrality score according to the relevance values of all paragraphs of the composition to be scored, and use the centrality score as the semantic dimension score.
[0385] In an optional implementation, the semantic dimension is rhetorical expression, and the analysis results are candidate sentences and the rhetorical devices used in the candidate sentences. The analysis module 120 is also specifically used to: input the rhetorical device definition, candidate sentences, the rhetorical devices used in the candidate sentences, and the semantic text that represents the requirements for judging whether the candidate sentences and the rhetorical devices used are correct as prompt words into the verification model to obtain the verification result; if the verification result represents that the candidate sentence and the rhetorical devices used are correct, the candidate sentence is determined as the target sentence; based on the number of target sentences in the composition to be scored and the total number of sentences in the composition to be scored, the rhetorical device score is calculated and the rhetorical device score is used as the semantic dimension score.
[0386] In an optional implementation, the semantic dimension is the article structure, and the analysis result is the article structure type of each paragraph in the composition to be scored. The analysis module 120 is also specifically used to: merge adjacent paragraphs with the same article structure type in all paragraphs to obtain the overall structure type of the composition to be scored; determine the article structure score based on the overall structure type and the preset structure type and use the article structure score as the semantic dimension score.
[0387] In an optional embodiment, the preset scoring rules include multiple preset levels and a score range, benchmark rules and floating rules corresponding to each preset level. The scoring module 130 is specifically used to: determine the target level from multiple preset levels based on the statistical score, semantic score and benchmark rules; determine the basic score based on the score range of the target level; calculate the floating score based on the statistical score, semantic score and floating rules of the target level; calculate the final score based on the basic score and the floating score.
[0388] The embodiment of the present invention also provides a block diagram of an electronic device 10, and the electronic device 10 implements the Chinese composition scoring method of the above embodiment, please refer to Figure 4 , Figure 4 This is a block diagram of an electronic device 10 provided in this embodiment. The electronic device 10 includes a processor 11, a memory 12 and a bus 13. The processor 11 and the memory 12 are connected via the bus 13.
[0389] The processor 11 can be an integrated circuit chip with signal processing capability. In the implementation process, each step of the Chinese composition scoring method of the above embodiment can be completed by the hardware integrated logic circuit in the processor 11 or the instructions in the form of software. The above processor 11 can be a general processor, including CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field Programmable Logic Gate Array) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0390] The memory 12 is used to store a program for implementing the Chinese composition scoring method. The program can be a software function module stored in the memory 12 in the form of software or firmware or solidified in the OS (Operating System) of the electronic device 10.
[0391] After receiving the execution instruction, the processor 11 executes the program to implement the Chinese composition scoring method of the above embodiment.
[0392] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the Chinese composition scoring method according to any one of the aforementioned embodiments is implemented.
[0393] In summary, the embodiments of the present invention provide a Chinese composition scoring method, device, electronic device and readable storage medium, the method comprising: obtaining a composition to be scored; performing statistical analysis on the text dimension of the composition to be scored to obtain a statistical score, the text dimension at least including the number of words, vocabulary and text errors; using a large model to perform semantic dimension analysis on the composition to be scored to obtain a semantic score, the semantic dimension at least including central content, rhetorical expression, article structure, emotional expression and topic-text matching; determining the final score of the composition to be scored based on the statistical score, semantic score and preset scoring rules. Compared with the prior art, the embodiments of the present invention have at least the following advantages: (1) The semantic score obtained by evaluating the semantic dimensions of the central content, rhetorical expression, article structure, emotional expression and topic text matching using a large model avoids the need for high-quality sample data required for training a special machine model, and at the same time integrates the statistical score obtained by evaluating the text dimensions of word count, vocabulary and text errors, making the score more comprehensive and targeted, and ultimately making the evaluation result more reasonable; (2) The evaluation is performed separately from the semantic dimensions of the central content, rhetorical expression, article structure, emotional expression and topic text matching and the text dimensions of word count, vocabulary and text errors, achieving a more reasonable explanation of the Chinese composition score; (3) The analysis of the semantic dimension using a large model can make full use of the generalization ability of the large model, and simply change or expand the semantic dimension in the Chinese composition evaluation system without additional development, which has strong applicability; (4) A more fine-grained composition evaluation is achieved through basic scores and floating scores, further improving the rationality of the evaluation results.
[0394] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A Chinese composition scoring method, characterized in that: The method comprises: Get the essays to be graded; Performing statistical analysis on the text dimension of the composition to be scored to obtain a statistical score, wherein the text dimension at least includes the number of words, vocabulary and text errors; Using the big model to analyze the semantic dimension of the composition to be scored to obtain a semantic score, wherein the semantic dimension at least includes central content, rhetorical expression, article structure, emotional expression and topic-text matching; The final score of the composition to be scored is determined based on the statistical score, the semantic score and preset scoring rules.
2. The Chinese composition scoring method according to claim 1, characterized in that: The statistical score includes a word completion score, a vocabulary level score and a number of text errors. The steps of performing a statistical analysis of the text dimension of the composition to be scored to obtain the statistical score include: Counting the number of words in the composition to be scored, and calculating a word completion score based on the total number of words obtained by counting; Counting the vocabulary in the composition to be graded according to preset vocabulary levels, and calculating the vocabulary level score according to the number of vocabulary at each level obtained by counting; The text errors in the composition to be graded are counted to obtain the number of text errors.
3. The Chinese composition scoring method according to claim 2, characterized in that: The number of text errors includes the number of wrong characters, the number of vocabulary errors, the number of punctuation marks and the number of grammatical errors. The step of counting the text errors in the composition to be scored to obtain the number of text errors includes: Correcting text errors of the composition to be graded to obtain a reference composition text; Comparing the composition to be graded with the reference composition text to obtain text differences, wherein the text differences include word differences, vocabulary differences, and punctuation mark differences; Counting the word differences in the text differences to obtain the number of wrong characters; Counting the vocabulary differences in the text differences to obtain the number of vocabulary errors; Counting the punctuation mark differences in the text differences to obtain the number of punctuation marks; The other differences in the text differences except for word differences, vocabulary differences and punctuation differences are counted to obtain the number of grammatical errors.
4. The Chinese composition scoring method according to claim 1, characterized in that: The semantic score includes a semantic dimension score of each semantic dimension. The step of using the big model to analyze the semantic dimension of the composition to be scored to obtain the semantic score includes: Determine the semantic text required for each semantic dimension; Constructing the prompt words required for each semantic dimension according to the composition to be scored and the semantic text required for each semantic dimension; Inputting the prompt words required for each semantic dimension into the large model to obtain the analysis result of each semantic dimension; The analysis results of each semantic dimension are processed to obtain a semantic dimension score for each semantic dimension.
5. The Chinese composition scoring method according to claim 4, characterized in that: The step of determining the semantic text required for each semantic dimension comprises: If the semantic dimension is the central content, the text representing the search central sentence is used as the semantic text required by the semantic dimension; If the semantic dimension is a rhetorical expression, the rhetorical device definition and representation are used to extract text that meets the rhetorical device definition as the semantic text required for the semantic dimension; If the semantic dimension is article structure, the article structure type and its definition and representation are used to determine the article structure type of each paragraph in the composition to be scored according to the definition of the article structure type as the semantic text required for the semantic dimension; If the semantic dimension is emotional expression, the emotional definition and the text representing the emotional judgment of the composition to be rated according to the emotional definition are used as the semantic text required for the semantic dimension; If the semantic dimension is question-text matching, the question requirement and the text representing the question requirement matching judgment for the composition to be graded will be used as the semantic text required for the semantic dimension.
6. The Chinese composition scoring method according to claim 4, characterized in that: The step of processing the analysis result of each semantic dimension to obtain a semantic dimension score of each semantic dimension includes: For each of the semantic dimensions, if the semantic dimension is sentiment expression or topic-text matching, the analysis result of the semantic dimension is directly used as the semantic dimension score of the semantic dimension; If the semantic dimension is the central content, rhetorical expression or article structure, a semantic dimension score of the semantic dimension is calculated based on the analysis result of the semantic dimension.
7. The Chinese composition scoring method according to claim 6, characterized in that: The semantic dimension is the central content, the analysis result is the central sentence of the composition to be scored, and the step of calculating the semantic dimension score of the semantic dimension based on the analysis result of the semantic dimension includes: Inputting each paragraph of the composition to be graded, the central sentence, and the semantic text representing whether the current paragraph and the central sentence are semantically related as prompt words into the large model in sequence, obtaining a relevance value of each paragraph, wherein the relevance value of each paragraph represents whether each paragraph is related to the central sentence; A centrality score is calculated based on the correlation values of all paragraphs of the composition to be scored, and the centrality score is used as the semantic dimension score.
8. The Chinese composition scoring method according to claim 6, characterized in that: The semantic dimension is a rhetorical expression, the analysis result is a candidate sentence and the rhetoric adopted by the candidate sentence, and the step of calculating the semantic dimension score of the semantic dimension based on the analysis result of the semantic dimension includes: The definition of rhetoric, the candidate sentence, the rhetoric used in the candidate sentence, and the semantic text representing the requirement to judge whether the candidate sentence and the rhetoric used are correct are input as prompt words into the verification model to obtain the verification result; If the verification result indicates that the candidate sentence and the rhetoric employed are correct, the candidate sentence is determined as the target sentence; According to the number of the target sentences in the composition to be scored and the total number of sentences in the composition to be scored, a rhetorical device score is calculated and the rhetorical device score is used as the semantic dimension score.
9. The Chinese composition scoring method according to claim 6, characterized in that: The semantic dimension is the article structure, the analysis result is the article structure type of each paragraph in the composition to be scored, and the step of calculating the semantic dimension score of the semantic dimension based on the analysis result of the semantic dimension includes: Merging adjacent paragraphs of the same article structure type in all paragraphs to obtain the overall structure type of the composition to be scored; According to the overall structure type and the preset structure type, the article structure score is determined and the article structure score is used as the semantic dimension score.
10. The Chinese composition scoring method according to claim 1, characterized in that: The preset scoring rules include a plurality of preset levels and a score range, a benchmark rule and a floating rule corresponding to each preset level. The step of determining the final score of the composition to be scored according to the statistical score, the semantic score and the preset scoring rules includes: Determining a target level from the plurality of preset levels according to the statistical score, the semantic score and a benchmark rule; Determine a base score based on the score range of the target level; Calculate a floating score according to the statistical score, the semantic score and the floating rule of the target level; The final score is calculated according to the basic score and the floating score.
11. A Chinese composition scoring device, characterized in that: The device comprises: The acquisition module is used to obtain the essays to be graded; An analysis module, used for performing statistical analysis of the text dimension of the composition to be scored to obtain a statistical score, wherein the text dimension at least includes the number of words, vocabulary and text errors; The analysis module is further used to analyze the semantic dimension of the composition to be scored using the large model to obtain a semantic score, wherein the semantic dimension at least includes central content, rhetorical expression, article structure, emotional expression and topic-text matching; The scoring module is used to determine the final score of the composition to be scored based on the statistical score, the semantic score and preset scoring rules.
12. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a program, and the processor is used to implement the Chinese composition scoring method according to any one of claims 1 to 10 when executing the program.
13. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the Chinese composition scoring method as described in any one of claims 1-10 is implemented.
Citation Information
Patent Citations
Chinese composition scoring method
CN111914532A
Cited By
English composition scoring method and device based on intelligent agent, equipment and storage medium
CN120218052A
Language learning ability evaluation system and method based on artificial intelligence assistance
CN120805923A
Story question and answer evaluation method and system based on multi-dimensional score and emotion association
CN121168638A
