Chinese rhetoric pattern automatic recognition and text expression effect evaluation method and system
By employing dual-channel coupling recognition technology, false negative masking clauses within parallel structures are eliminated and the symmetric structure judgment threshold is calibrated. This solves the problem of misjudgment and inaccurate evaluation of implicit rhetorical devices in the automatic recognition of Chinese rhetorical devices, and achieves accurate recognition and objective evaluation of rhetorical devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SICHUAN NORMAL UNIV
- Filing Date
- 2026-06-01
- Publication Date
- 2026-06-26
AI Technical Summary
In the existing technology, the automatic identification scheme for Chinese rhetorical devices has failed to effectively identify implicit rhetorical devices in parallel structures, and lacks objective and quantitative evaluation of the effect of rhetorical use, resulting in low identification accuracy and inaccurate evaluation.
By combining structural pattern matching and semantic anomaly detection, false negative masking clauses in parallel structures are eliminated, and the symmetric structure judgment threshold is calibrated in reverse. A dual-channel coupled recognition result is constructed to achieve accurate identification of rhetorical device types and objective evaluation of text expression effects.
It improves the accuracy of rhetoric recognition, enables accurate identification of explicit and implicit rhetorical devices, provides rhetoric usage density and diversity indices, and supports writing instruction feedback and text quality assessment.
Smart Images

Figure CN122287644A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of natural language processing and computer-aided Chinese language teaching technology, specifically to a method and system for automatic identification of Chinese rhetorical devices and evaluation of text expression effectiveness. Background Technology
[0002] Rhetorical devices in Chinese are important linguistic phenomena that enhance expression through specific syntactic forms and semantic connections. Common rhetorical devices include metaphor, parallelism, antithesis, repetition, and synesthesia. In primary and secondary school Chinese language teaching and text expression effectiveness evaluation scenarios, the automatic identification of rhetorical devices in the texts to be evaluated and the objective quantitative assessment of their use are of great significance for reducing teachers' grading burden, providing personalized writing feedback, and supporting large-scale text quality assessment. However, for a long time, the automatic identification of Chinese rhetorical devices and the evaluation of text expression effects have faced three intertwined technical challenges: First, the expressive forms of various rhetorical devices such as metaphor, parallelism, antithesis, repetition, and synesthesia are highly diverse, including both explicit rhetorical devices characterized by syntactic symmetry and implicit rhetorical devices characterized by semantic cross-domain mapping, with significant differences in their surface signals; Second, the semantic span between the subject and the metaphor in metaphorical rhetoric is large, and it is difficult to reliably distinguish between metaphorical expressions and conventional expressions by simply relying on the semantic similarity calculation of static semantic primitive networks or word vector distance; Third, the evaluation of the effect of rhetorical use has long relied on subjective evaluation by teachers, lacking objective and quantifiable output tools for the density and diversity of rhetorical use, making it difficult to support large-scale automatic text quality evaluation.
[0003] To address the problem of automatic identification of rhetorical devices in Chinese, Chinese invention patent application CN106502981A discloses an automatic analysis and judgment method for metaphorical rhetorical sentences based on parts of speech, syntax, and dictionaries. This method employs steps such as word segmentation and part-of-speech tagging combined with deletion of modifiers based on syntax trees, deletion of redundant components based on simple clauses, deletion of redundant components based on metaphor words, and narrowing of the scope of the metaphor based on dependency relations. Then, it uses the semantic primitives set of CNKI and WordNet to calculate the semantic similarity between candidate ontologies and candidate metaphors. When the semantic similarity is less than a preset threshold, it is judged as a metaphorical expression. However, this scheme only targets metaphors and relies on the static semantic distance between CNKI and WordNet as a judgment signal. It does not utilize the constraints of the text under evaluation in the syntactic plane, such as parallel, symmetrical, and repetitive structures. It has a systematic bias in the recognition of metaphors in parallel structures such as parallelism and antithesis. When a metaphor is embedded in a parallel structure, the high semantic similarity between adjacent clauses due to syntactic symmetry will artificially inflate the similarity of the metaphor itself, causing the metaphor to be misjudged as a regular expression. At the same time, the scheme is based on a single-channel serial processing architecture, and the recognition results cannot form an objective quantitative output of the effect of rhetorical use.
[0004] To address the problem of automatic extraction of rhetoric in essay writing, Chinese invention patent application CN110414556A discloses a method for automatically extracting metaphors and personifications from elementary school Chinese essays based on Word2Vec and recurrent neural networks. This method trains a word vector model using Skip-Gram combined with HierarchicalSoftmax on elementary school essay corpora that have undergone word segmentation and stop word processing. The word vector representations are then used as input to a recurrent neural network classifier to train an optimal model for binary classification of metaphors and personifications. However, this scheme only identifies metaphors and personifications, and its recurrent neural network classifier, being a supervised classifier operating on a single semantic plane, lacks structural constraints from the syntactic plane as a coupling feedback mechanism. Therefore, it is ineffective for rhetorical devices such as parallelism, antithesis, and repetition, which are primarily characterized by syntactic symmetry or literal repetition. The disclosed experimental results show that even with a long short-term memory model as the basic unit of the hidden layer, the weighted F1 score stops at 87.78%, making further breakthroughs difficult.
[0005] The fundamental problem with the aforementioned comparative documents and existing Chinese rhetoric recognition schemes lies in their simple serial or parallel concatenation of the syntactic recognition channel on the structural plane and the semantic recognition channel on the semantic plane as independent processing units. This fails to recognize the unique coupling and masking relationship between the two channels in the context of Chinese rhetoric. Specifically, parallel structures such as parallelism and antithesis artificially inflate the semantic similarity of adjacent clauses due to their high syntactic symmetry, thus creating a false negative masking for implicit rhetoric such as metaphor, allegory, and personification. Conversely, isolated metaphorical clauses, lacking syntactic constraints, are misidentified as conventional expressions by the semantic model. This dual-plane masking is not noise but a structural feature of Chinese rhetoric expression. Simply increasing the semantic modeling accuracy of a single channel cannot unmask it, resulting in a long-term suppression of overall recognition accuracy. Furthermore, there is no quantifiable feedback mechanism for evaluating the effectiveness of rhetoric use. Therefore, it is urgent to construct a Chinese rhetoric recognition and expression effect evaluation technology based on dual-channel coupled feedback to fundamentally solve the dual-plane masking problem. Summary of the Invention
[0006] To address the core bottleneck in existing technologies for automatic recognition of Chinese rhetorical devices—namely, the independent operation of the structural plane syntactic recognition channel and the semantic plane semantic recognition channel, the failure to recognize the dual-plane mutual concealment coupling relationship between the two channels, the masking of implicit rhetoric within parallel structures by false negatives, and the lack of objective quantitative output of rhetorical application effects—this invention provides a method and system for automatic recognition of Chinese rhetorical devices and evaluation of textual expression effects. By using structural pattern matching results as constraint input for semantic anomaly detection to eliminate false negative masking clauses within parallel structures, and by using anomaly scores to inversely calibrate the symmetric structure judgment threshold to construct dual-channel coupled recognition results, this invention improves the accuracy of rhetorical device recognition and achieves objective quantitative evaluation of textual expression effects from the perspective of the dual-plane mutual concealment mechanism of Chinese rhetoric, without increasing the complexity of a single-channel semantic model.
[0007] The technical solution of this invention is: a method for automatic identification of Chinese rhetorical devices and evaluation of text expression effects, comprising the following steps: S1, performing dependency parsing on the text to be evaluated, outputting a dependency parsing tree and a set of rhetorical syntactic patterns, wherein the set of rhetorical syntactic patterns is extracted from the dependency parsing tree and includes three types of syntactic patterns: parallel structure, symmetrical structure, and repetitive structure, as the structure pattern matching result; S2, using a word vector model to perform semantic domain mapping on each clause in the text to be evaluated, identifying candidate clauses with cross-domain semantic mapping, forming a semantic anomaly candidate set, and calculating anomaly scores for each candidate clause in the semantic anomaly candidate set, as the semantic anomaly detection result; S3, processing the structure pattern matching result... S4. Using the semantic anomaly detection as the constraint condition, false negative masking sentences that are generated by the repeated semantic similarity of adjacent sentences within the parallel structure are removed. The anomaly score is then used to calibrate the symmetry structure judgment threshold to obtain a dual-channel coupled recognition result. S5. Based on the dual-channel coupled recognition result, metaphor, parallelism, antithesis, repetition, and synesthesia are identified, and rhetorical device type labels, rhetorical usage density, and diversity index are output. S6. Based on the rhetorical usage density and the diversity index, a text expression effect evaluation value is generated, and the text expression effect evaluation value is used as feedback to feed back to the symmetry structure judgment threshold and the anomaly score threshold to adjust the recognition parameters for the next round, forming an evaluation feedback closed loop.
[0008] This invention also provides an automatic Chinese rhetorical device recognition and text expression effect evaluation system, comprising: a structural pattern matching module, used to perform dependency parsing on the text to be evaluated and output a dependency parsing tree and a set of rhetorical syntactic patterns; a semantic anomaly detection module, used to map the semantic domain of each clause using a word vector model and construct a set of semantic anomaly candidates, and calculate anomaly scores for each candidate clause; a dual-channel coupling module, used to input the structural pattern matching results as constraints into the semantic anomaly detection module, eliminate false negative masking clauses in parallel structures, and back-calibrate the symmetry structure judgment threshold with the anomaly scores, and output dual-channel coupling recognition results; a rhetorical device type recognition module, used to identify metaphor, parallelism, antithesis, repetition and synesthesia rhetorical devices based on the dual-channel coupling recognition results, and output rhetorical device type labels as well as rhetorical usage density and diversity indices; and an evaluation feedback closed-loop module, used to generate a text expression effect evaluation value based on the rhetorical usage density and diversity index, and use the evaluation value as feedback to feed back to the symmetry structure judgment threshold and the anomaly score judgment threshold.
[0009] The beneficial effects of this invention are as follows:
[0010] First, this invention achieves a fundamental de-masking of the dual-plane mutual concealment phenomenon in Chinese rhetoric, effectively breaking through the F1 upper limit of single-channel rhetoric recognition. Its mechanism lies in: step S3 uses the structural pattern matching result as a constraint input to semantic anomaly detection, eliminating false negative masking clauses within parallel structures where semantic similarity is repeatedly inflated by adjacent clauses. This ensures that metaphors, allegories, and personification hidden within parallel and antithetical structures can be correctly captured by semantic anomaly detection. Simultaneously, the anomaly score is used to reverse-calibrate the symmetry structure judgment threshold, preventing isolated clauses with cross-domain semantic anomalies from being mistakenly eliminated due to insufficient structural plane symmetry. This coupled feedback mechanism of structural channel → semantic channel → reverse calibration structural channel, in principle, solves the problems of systematic misjudgment within parallel structures caused by relying on a single semantic similarity judgment, and the inability of structural rhetoric to be addressed by relying solely on single-channel classification of recurrent neural networks. The recognition accuracy is non-linearly improved. The validation corpus shows that the syntactic structure matching accuracy of explicit rhetorical devices on the validation corpus of middle school Chinese textbooks reaches 93.8%, and the F1 score of implicit rhetorical device recognition reaches 0.84. Compared with the single-channel scheme, it has a significant synergistic effect rather than a simple linear superposition.
[0011] Secondly, this invention provides an objective and quantifiable evaluation of the effectiveness of rhetorical devices, fundamentally replacing the traditional model that relies on subjective teacher evaluation. The mechanism is as follows: Step S4 outputs the rhetorical device density and the diversity index as quantifiable objective indicators based on the dual-channel coupled recognition results. The rhetorical device density reflects the frequency density of rhetorical devices appearing in the text being evaluated, and the diversity index reflects the balance of the distribution of rhetorical device types. Step S5 further generates an evaluation value of the text's expressive effect based on the above two indices. Compared to outputting only the metaphor judgment result and only the metaphor personification extraction result, this invention outputs dual objective indicators of density and diversity at the level of rhetorical device use, which can directly support writing instruction feedback and text quality assessment.
[0012] Third, this invention forms an adaptive evaluation feedback loop for recognition parameters, achieving dynamic optimization of recognition accuracy. The mechanism is as follows: Step S5 uses the text expression effect evaluation value as feedback to feed back the symmetric structure judgment threshold in Step S3 and the abnormal score judgment threshold in Step S2, forming an evaluation feedback loop. When the evaluation value deviates from the expected distribution, the feedback mechanism automatically adjusts the dual-channel thresholds to compensate for the recognition deviation, thereby overcoming the limitation of the aforementioned comparison files being used only once due to fixed thresholds. The synergistic effect of this closed-loop feedback and dual-channel coupling mechanism makes this invention significantly superior to schemes that simply stack neural network depth in terms of cross-corpus adaptability and robustness across writing styles, aligning with the cognitive pattern of experienced language teachers who read the entire text before revising the score. Attached Figure Description
[0013] Figure 1 This is a flowchart of the method for automatic recognition of Chinese rhetorical devices and evaluation of text expression effects provided in the embodiments of the present invention;
[0014] Figure 2 This is an architecture diagram of the Chinese rhetorical device automatic recognition and text expression effect evaluation system provided in the embodiments of the present invention. Detailed Implementation
[0015] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments, so that those skilled in the art can more clearly understand the purpose, features and advantages of the present invention. The described embodiments are only some embodiments of the present invention and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.
[0016] like Figure 1 As shown, this embodiment provides a method for automatic recognition of Chinese rhetorical devices and evaluation of text expression effects, including steps S1 to S5.
[0017] Step S1: Dependency parsing and rhetorical pattern set extraction. Step S1 performs dependency parsing on the text to be evaluated, outputting a dependency parsing tree and a rhetorical pattern set. The rhetorical pattern set is extracted from the dependency parsing tree and includes three types of syntactic patterns: parallel structure, symmetrical structure, and repetitive structure, as the structure pattern matching result.
[0018] Specifically, the text to be evaluated can be a Chinese paragraph such as a primary or secondary school student's composition, a literary excerpt, or a news commentary. In this embodiment, a 500-word excerpt from a middle school student's composition is used as the text to be evaluated. During the preprocessing stage, the text to be evaluated undergoes simplified / traditional character conversion, full-width / half-width character unification, special character cleaning, and Chinese word segmentation. The word segmentation tool can be an open-source Chinese word segmenter such as jieba, HanLP, or LTP. This embodiment uses a Chinese word segmenter based on a combination of bidirectional maximum matching and a hidden Markov model to balance speed and accuracy. After word segmentation, dependency parsing is performed on each clause. The dependency parser can be an open-source dependency parser such as StanfordParser, HanLP, or Harbin Institute of Technology Language Cloud. This embodiment uses a neural network-based Chinese dependency parser, outputting a dependency parsing tree for each clause. Each dependency parsing tree consists of several nodes and several directed edges with dependency relation labels. Nodes correspond to words or phrases in the clause, and edge labels include subject-predicate, verb-object, attributive-head, and coordinate relationships.
[0019] The rhetorical syntax pattern set is extracted from the dependency syntax tree and includes three types of syntax patterns: parallel structure, symmetrical structure, and repetitive structure. The parallel structure corresponds to the syntactic basis of parallel rhetorical devices, defined as a sequence of similar syntactic structures consisting of three or more consecutive clauses in the text to be evaluated. Specifically, the extraction method involves aligning the dependency syntax trees of adjacent clauses and counting the proportion of nodes under the same dependency relation label in each pair of adjacent clauses. When this proportion is higher than a fourth threshold among three or more consecutive clauses, the sequence is included as a candidate parallel structure in the rhetorical syntax pattern set; where the fourth threshold is 0.6. The symmetrical structure corresponds to the syntactic basis of antithetical rhetorical devices, defined as a sequence of antithetical clauses in the text to be evaluated that has corresponding parts of speech and structural features. Specifically, the extraction method involves performing node-level alignment on the dependency syntax trees of two adjacent clauses. When the proportion of consistent parts of speech in the aligned node pair is higher than a fifth threshold and the number of characters is the same, the clause pair is included as a candidate symmetrical structure in the rhetorical syntax pattern set; where the fifth threshold is 0.7. The repetitive structure corresponds to the syntactic basis of the rhetorical device of repetition, defined as a sequence in the text to be evaluated in which the same field is repeated continuously between two or more clauses; the accurate determination of this structure is completed by the calculation of the repetition pattern score in subsequent steps, and this step is only used for initial screening to include it in the candidate set.
[0020] Once the rhetorical syntactic pattern set is extracted, it serves as the structural pattern matching result for subsequent steps. The structural pattern matching result is stored in a quintuple format: each rhetorical syntactic pattern entry includes a type label, a starting clause number, an ending clause number, a sequence of dependency relation labels involved, and a structural pattern score. The structural pattern score is the geometric mean of the dependency relation alignment ratio and the part-of-speech consistency ratio, ranging from 0 to 1 in a closed interval. The structural pattern matching result is output together with the dependency syntax tree. The dependency syntax tree is used to construct the parallel item dependency subtree in step S4, and the structural pattern matching result is used as a constraint condition for semantic anomaly detection in step S3.
[0021] It should be noted that the Chinese word segmentation, part-of-speech tagging, and dependency parsing used in step S1 are all well-known technologies in the field. The innovation of this step does not lie in the selection of a specific word segmenter or dependency parser, but in using the dependency parsing tree as the basic data structure shared by subsequent multi-step steps and organizing the rhetorical syntax pattern set into three categories of parallel / symmetric / repetitive as the structural plane input for subsequent dual-channel coupling. This unified organization provides a data interface basis for the coupling feedback of the subsequent step S3.
[0022] Step S2: Semantic anomaly detection based on word vectors. Step S2 uses a word vector model to perform semantic domain mapping on each sentence in the text to be evaluated, identifies candidate sentences with cross-domain semantic mapping, forms a semantic anomaly candidate set, and calculates an anomaly score for each candidate sentence in the semantic anomaly candidate set as the semantic anomaly detection result.
[0023] Specifically, the word vector model can employ pre-trained word vector models such as Word2Vec, GloVe, BERT, RoBERTa, or ERNIE. In this embodiment, a BERT model pre-trained on a large-scale Chinese corpus is used as the word vector model, with a word vector dimension of 768. For each sentence in the text to be evaluated, each content word is mapped to a word vector, and the vectors are aggregated by position weighting to obtain sentence-level embedding vectors. The semantic domain mapping is completed by querying a pre-constructed semantic domain dictionary. This semantic domain dictionary divides common Chinese content words into several semantic domains according to their conceptual categories, such as natural phenomena, human organs, animals, plants, abstract emotions, and social relations. Each content word belongs to one or more semantic domains.
[0024] The identification of candidate clauses for cross-domain semantic mapping follows these rules: For each clause, the core words and modifiers of its subject-verb-object structure are extracted, and its semantic domain is identified; when the semantic distance between the semantic domain of the subject core word and the semantic domain of the predicate core word is greater than a sixth threshold, the clause is considered to have cross-domain mapping and is included in the semantic anomaly candidate set; wherein the semantic distance is calculated based on the cosine distance of word vectors, specifically... The sixth threshold is initially set to 0.55 and can be dynamically adjusted by the feedback mechanism in step S5. The semantic anomaly candidate set is stored in set form, and each candidate entry includes a clause number, cross-domain word pair, cross-domain type label, and anomaly score.
[0025] The anomaly score is calculated by comprehensively considering three components: cross-domain semantic distance, word frequency specificity of cross-domain word pairs, and deviation between the sentence-level embedding vector and the context embedding vector. Cross-domain semantic distance reflects the semantic span of the metaphor; a larger span results in a higher anomaly score. Word frequency specificity reflects the rarity of cross-domain word pairs; rare cross-domain pairs often correspond to more compelling metaphors. Context embedding deviation reflects the degree of deviation of the sentence from the overall semantics of the paragraph. The three components are weighted, summed, and normalized to a closed interval of 0 to 1, which serves as the anomaly score for the candidate sentence. It should be noted that the word vector mapping and cosine distance calculation used in step S2 are well-known techniques in the field. The innovation of this step lies not in the specific word vector model or cosine distance formula, but in treating the semantic anomaly candidate set and the anomaly score as a unified semantic plane output object, maintaining consistency in data structure with the structural plane output object of step S1, thus providing a homogeneous data interface for the dual-channel coupling in the subsequent step S3.
[0026] Step S3: Dual-channel coupling recognition. Step S3 uses the structural pattern matching result as a constraint condition to input semantic anomaly detection, removes false negative masking sentences that are generated by the repeated semantic similarity of adjacent sentences within the parallel structure, and uses the anomaly score to inversely calibrate the symmetric structure judgment threshold to obtain the dual-channel coupling recognition result.
[0027] This step is the core of the dual-plane unmasking mechanism of this invention, and includes two parallel coupled branches: the forward constraint from the structural channel to the semantic channel and the reverse calibration from the semantic channel to the structural channel.
[0028] In Chinese rhetoric, a common type of expression involves embedding one or more metaphorical clauses within a parallel structure. Because parallel structures require a high degree of syntactic symmetry between clauses, the semantic similarity between adjacent clauses is artificially inflated. This masks the span between the ontological and metaphorical semantic domains within the metaphorical clauses, leading to misclassification of these metaphors as regular expressions based solely on the anomaly score in step S2. This invention defines a parallel masking strength index as a quantitative indicator of this masking phenomenon. By using this index as a judgment signal, the masked metaphors can be re-identified.
[0029] The parallel masking strength index is calculated for adjacent clauses within the parallel structure. The formula for calculating the parallel masking strength index is as follows: ,in: For parallel masking strength index, the meaning is the first The mean to variance ratio of semantic similarity between adjacent clauses of a parallel structure, scalar in type, with values ranging from open intervals. The unit is a dimensionless quantity, calculated by this formula, which represents the strength of the similarity between clauses in the parallel structure being artificially boosted by syntactic symmetry and the distribution being stable. The larger the parallel masking strength index, the higher and more stable the similarity between adjacent clauses in the parallel structure, and the stronger the masking strength for embedded metaphors. This is the mean semantic similarity of adjacent clause pairs within the parallel structure. It represents the arithmetic mean of the cosine similarity of adjacent clause pairs, is a scalar, and takes values within a closed interval. The actual value is usually a closed interval. The unit is a dimensionless quantity, derived from the formula. The calculated strength of the syntactic symmetry characterizing the overall parallel structure is obtained. The variance of the similarity between adjacent clauses is represented by the second central moment of the cosine similarity between adjacent clauses with respect to their mean. It is a scalar and its value range is a closed interval. The unit is a dimensionless quantity, derived from the formula. The calculation yields a value that characterizes the degree of dispersion of the similarity distribution within the parallel structure. For the first The total number of sentences within a parallel structure means the number of consecutive sentences constituting the parallel structure. It is a positive integer scalar with a value range of positive integers greater than or equal to 3. The unit is sentences. It is obtained from the parallel structure extraction process in step S1 and represents the scale of the parallel structure. This is an index for adjacent clause pairs, meaning the sequence number of adjacent clause pairs within this parallel structure. It is a positive integer scalar with a value range of a closed interval. The unit is a dimensionless quantity, obtained by enumeration during the traversal process, and represents the position of the currently processed adjacent clause pair; For the first The sentence embedding vector of each clause is a fixed-dimensional dense vector obtained by aggregating the word vector model based on the sentence. It is a vector with a dimension of 768, and its values range from the set of real numbers for each component. The unit is a dimensionless quantity, obtained from the word vector aggregation process in step S2, and represents the overall semantics of the clause. Let be the cosine similarity function, which represents the cosine of the angle between two non-zero vectors. Representing vectors transpose, The second norm of a vector; This is a numerical stability term, meaning it prevents the division of small positive numbers with a denominator of zero. It is a scalar type, and its value range is positive real numbers. In this embodiment, it is set to [value missing]. , dimensionless, obtained by empirical setting, representing the guarantee of the numerical stability of the algorithm. If it is too large, it will distort the true distribution of the parallel masking intensity index; if it is too small, numerical overflow will occur when the variance of the similarity between clauses in the parallel structure is zero; is the index of the parallel structure, which means the serial number of the parallel structure entry in the set of rhetorical syntactic patterns, with the type of positive integer scalar and the value range being the closed interval where is the total number of parallel structures in the text to be evaluated, dimensionless, obtained from the extraction process in step S1, representing the position of the parallel structure being currently processed. The numerator on the right side of the equation is the mean value of cosine similarity, dimensionless; the denominator on the right side of the equation in is the similarity variance. Since the cosine similarity itself is dimensionless, its variance is also dimensionless. is dimensionless, and the sum of the two is dimensionless; the ratio of the numerator to the denominator is dimensionless, which is consistent with the dimensionless quantity on the left side of the equation , and the dimensional consistency verification passes.
[0030] When the parallel masking intensity index is greater than the first threshold and there is a candidate clause in the semantic anomaly candidate set within the parallel structure, the determination result of this candidate clause is reversed to a metaphor candidate; where the first threshold is initially taken as 2.5 and is dynamically adjusted by the feedback mechanism in step S5. The essence of this reversed determination is that when a clause is within a parallel structure with high symmetry and high stability (i.e., a large parallel masking intensity index) but itself is marked by the semantic anomaly candidate set as having a cross-domain mapping, then this cross-domain mapping is not absorbed by the parallel structure but masked by the parallel structure. Therefore, the determination should be reversed to a metaphor candidate rather than being excluded as a conventional expression. This reversed determination enables the correct identification of metaphors within parallelism and is a key manifestation of the double-plane disambiguation mechanism of the present invention.
[0031] In the antithetical structure, the noumenon word and the metaphor word are often arranged in symmetric positions. For example, in "The heart is like still water, and the will is like floating clouds", "heart" and "will" are symmetric in the subject position, and "still water" and "floating clouds" are symmetric in the object position. The present invention adopts a two-step process of first restricting the candidate position range of the metaphor word by syntactic symmetric position and then performing the semantic domain mapping verification on the words within this range, which improves the recognition accuracy of antithetical metonymy. The determination of the syntactic symmetric position constraint is based on the syntactic symmetry degree operator value.
[0032] The initialization calculation of the symmetric structure determination threshold in step S1 includes: constructing a parallel item dependency subtree for each parallel item in the set of rhetorical syntactic patterns based on the dependency syntactic tree. The parallel item dependency subtree is defined as the largest subtree with the core verb or core noun of the parallel item as the root node; calculating the syntactic symmetry degree operator value between the parallel item dependency subtrees. The calculation formula of the syntactic symmetry degree operator value is as follows: ,in: The syntactic symmetry operator value represents the weighted fusion value of the comprehensive correspondence between the node and edge layers of two parallel item dependency subtrees. It is a scalar and its value range is a closed interval. The unit is a dimensionless quantity, calculated by this formula, which characterizes the degree of syntactic symmetry between two parallel terms. The closer the value of the syntactic symmetry operator is to 1, the more syntactically symmetric the two parallel terms are. For the dependency subtrees of two parallel items, the meaning is that the dependency subtrees with the core words of the two parallel items as the root nodes respectively, the type is graph structure, the unit is dimensionless, and it is derived from the dependency syntax tree, representing the syntactic skeleton of the two parallel items. The subtree node correspondence degree is the ratio of the number of nodes with the same part of speech after the two subtrees are aligned to the total number of nodes in the larger subtree. It is a scalar and its value range is a closed interval. The unit is a dimensionless quantity, derived from the formula. The calculation yields the degree of correspondence characterizing the node layers, where Subtrees The set of nodes, This represents the number of node pairs with the same part of speech after aligning nodes according to their hierarchical positions. The subtree edge correspondence degree is the ratio of the number of identical edges between two subtrees after aligning them according to their dependency labels to the total number of edges in the larger subtree. It is a scalar and its value range is a closed interval. The unit is a dimensionless quantity, derived from the formula. The calculation yields a representation of the degree of correspondence between the edge layers, where... Subtrees The dependency tag set, This indicates the number of edges whose dependency labels are consistent after alignment according to hierarchical position. This is the fusion coefficient for node and edge layer weights. It represents a preset coefficient that determines the relative weights of the node and edge layer contributions in the syntactic symmetry operator value. It is a scalar and its value range is a closed interval. In this embodiment, the value is 0.6, a dimensionless quantity. It is set empirically and can be fine-tuned by the feedback mechanism in step S5. It represents the relative weight of the node layer in the final symmetry determination. A value that is too high will cause the symmetry determination to overly rely on the consistency of node part-of-speech and ignore the corresponding dependency relationship structure; a value that is too low will have the opposite effect. (Right side of the equation) middle and If both are dimensionless, then the product is also dimensionless; the right side of the equation Similarly, dimensionless quantities; the sum of the two is a dimensionless quantity, and the same applies to the left side of the equation. The dimensionless quantities are consistent; and because and The weighted sum will inevitably fall on The interval is consistent with the range of values on the left. Dimensional consistency verification passed.
[0033] The syntactic symmetry operator values between each pair of dependent subtrees of all parallel items in the text to be evaluated are statistically analyzed to form a sequence of syntactic symmetry operator values. The sum of the mean and standard deviation of the syntactic symmetry operator value sequence is used as the initial value of the symmetry structure determination threshold. In this embodiment, the symmetry structure determination threshold is initially set to 0.65, which can be dynamically adjusted by the feedback mechanism in step S5. When the syntactic symmetry operator value is greater than the symmetry structure determination threshold, it is confirmed that the corresponding parallel items are aligned with a symmetric structure.
[0034] The reverse calibration of the symmetric structure determination threshold follows the following rules: When the sentence corresponding to the abnormal score output in step S2 falls within a certain symmetric structure candidate and the abnormal score of the sentence is greater than the seventh threshold, the difference between the syntactic symmetry operator value applied to the symmetric structure candidate and the symmetric structure determination threshold is relaxed. That is, the symmetric structure determination threshold corresponding to the symmetric structure is temporarily lowered by a feedback step size, so that the symmetric structure can be included in the dual-channel coupled recognition result as a dual metaphor candidate. The essence of this reverse calibration is that when a sentence with a high semantic cross-domain anomaly is located at the edge of a symmetric structure and its syntactic symmetry operator value is only slightly lower than the symmetric structure determination threshold, the symmetric structure will be eliminated by simply relying on the structural plane. However, since its semantic plane has a strong cross-domain signal, this invention includes it in the recognition range through reverse calibration, avoiding the mechanical incorrect elimination of dual metaphors by the structural plane threshold.
[0035] After the two parallel coupled branches of forward constraint and reverse calibration described above, the dual-channel coupling recognition result is obtained. The dual-channel coupling recognition result is stored in list form, with each entry including sentence number, rhetorical syntax pattern type, candidate label set for rhetorical device type, corrected anomaly score, corrected syntactic symmetry operator value, and dual-channel consistency. The dual-channel consistency is defined as the geometric mean of the corrected anomaly score and the corrected structural pattern score, serving as the core feature for identifying the rhetorical device type in subsequent step S4. The dual-channel coupling recognition result also serves as the input for step S4 and feeds back the coupling consistency distribution of each sentence to step S5.
[0036] Step S4: Identification of Rhetorical Device Types and Output of Rhetorical Device Usage Density and Diversity Index. Step S4 identifies metaphor, parallelism, antithesis, repetition, and synesthesia based on the dual-channel coupled identification results, and outputs rhetorical device type labels as well as rhetorical device usage density and diversity indices.
[0037] The rhetorical device type identification adopts a hybrid approach combining rules and classifiers: explicit rhetorical devices are identified using rules based on structural plane signals in the dual-channel coupled identification results, implicit rhetorical devices are identified using a classifier based on semantic plane anomaly scores, and implicit rhetorical devices within parallel / dual structures are directly output using the labels after the inversion determination in step S3.
[0038] The specific rules are as follows: When a sentence sequence is labeled as a parallel structure by the dual-channel coupled recognition result and the structure pattern score is greater than the eighth threshold, it is identified as a parallel rhetorical device; when a sentence pair is labeled as symmetrical structure alignment and the syntactic symmetry operator value is greater than the symmetric structure judgment threshold, it is identified as a dual rhetorical device; when a sentence sequence is identified as a repetitive structure and the repetition pattern score is greater than the third threshold, it is identified as a repetitive rhetorical device; when a sentence is labeled by the semantic anomaly candidate set and is not within the above explicit structure, the classifier further distinguishes four types: metaphor, allegory, personification, and synesthesia; when a sentence is both within the parallel structure and is inverted and judged as a metaphor candidate, the output is a double-label parallel structure + metaphor embedding. The classifier can be a Softmax multi-classifier, a support vector machine, or a long short-term memory network classifier. This embodiment uses a Softmax multi-classifier based on BERT features. The input features of the classifier are the sentence embeddings after word vector aggregation and the anomaly score concatenation, and the output is the probability distribution of the five types of implicit rhetorical devices.
[0039] The calculation of the repetition pattern score follows the formula below: ,in: The repetition pattern score represents clauses. and The weighted fusion value of the degree of repetition at both the literal and syntactic levels, is a scalar value with a range of closed intervals. The unit is a dimensionless quantity, calculated by this formula, which represents the degree of possibility that two clauses constitute a repetitive rhetorical structure. The larger the repetition pattern score, the more significant the repetition pattern between the two clauses. The two clauses in the text to be evaluated are a pair of clauses for which the repetition pattern score is to be calculated. The type is string and the unit is dimensionless. They are obtained by the clause segmentation process in step S1 and represent the two clauses participating in the repetition pattern determination. n-gram repetition, meaning clause repetition. and The degree of overlap at the n-gram literal level, of type scalar, with a value range of a closed interval. The unit is a dimensionless quantity, derived from the formula. The calculated similarity (i.e., Jakart similarity) characterizes the degree of repetition at the literal level, where Indicates clause All obtained by segmentation A set of character sequences composed of words; Syntactic subtree similarity, meaning clause segmentation. and The syntactic similarity between the corresponding parallel item dependency subtrees is a scalar with a value range of a closed interval. The unit is a dimensionless quantity, derived from The calculated value (derived from the aforementioned syntactic symmetry operator value) represents the degree of similarity of the syntactic layers, where The definition is the same as the aforementioned formula for the syntactic symmetry operator; This is the fusion coefficient between the literal and syntactic layers. It represents a preset coefficient that determines the relative weight of the literal and syntactic contributions in the repetition pattern score. It is a scalar and its value range is a closed interval. In this embodiment, the value is 0.5, which is a dimensionless quantity. It is set empirically to represent the relative weight of the literal layer in the final repetition pattern score. If it is too large, the repetition pattern score will rely too much on the overlap of literal characters and ignore the similarity of syntactic structure; if it is too small, the opposite will happen. is the length of the n-gram, meaning the length of the character sequence segmentation window. It is a positive integer scalar, with a value range of positive integers greater than or equal to 2. In this embodiment, it is set to 2, indicating the use of double-character groups. The unit is characters, determined empirically, and represents the granularity of word-level repetition. (Right side of the equation) middle and If both are dimensionless, then the product is also dimensionless; the right side of the equation Similarly, dimensionless quantities; the sum of the two is a dimensionless quantity, and the same applies to the left side of the equation. The dimensionless quantities are consistent; and and The weighted sum will inevitably fall on The interval is consistent with the range of values on the left. Dimensional consistency verification passed.
[0040] When the repetition pattern score is greater than the third threshold, the corresponding sentence sequence is identified as a repetitive structure; wherein the third threshold is initially set to 0.55 and can be dynamically adjusted by the feedback mechanism in step S5. If the third threshold is too high, it will miss repetitive rhetoric with similar structures but large differences in literal characters, and if it is too low, it will misjudge semantically unrelated literally similar sentences as repetitive rhetoric.
[0041] The calculation of rhetorical density includes two levels: global density and local density. Global density is equal to the ratio of the number of occurrences of each rhetorical device identified in the text to the total number of sentences in the text, weighted by type weights and then normalized. Specifically, metaphor, parallelism, antithesis, repetition, and synesthesia are assigned type weights respectively; the number of occurrences of each rhetorical device in the text is multiplied by its corresponding type weight, summed, and finally divided by the total number of sentences in the text to complete normalization. In this embodiment, the type weights are set according to the principle of low weight for explicit structural rhetoric and high weight for implicit semantic rhetoric: metaphor is set to 1.0, parallelism to 0.6, antithesis to 0.7, repetition to 0.5, and synesthesia to 1.2, reflecting that synesthesia, as the most artistic type of rhetoric in Chinese, should enjoy a higher weight.
[0042] Local density is calculated using temporal sliding window coupling. In text temporal analysis, there is often a phase difference between the peak signal in the structural plane and the peak signal in the semantic plane. For example, a passage might begin with parallelism to establish its syntactic framework, but metaphorical semantic anomalies only appear in the middle. This phase difference prevents single-point aligned density calculations from capturing the intensity signals of concentrated local rhetorical bursts. This invention introduces sliding window normalized cross-correlation to calculate the coupling degree of the two channels within each local temporal window. The calculation formula is as follows:
[0043] ,in: The degree of temporal coupling is the first degree of coupling. The normalized cross-correlation value of the structural pattern score sequence and the anomaly score sequence within a time-series sliding window, typed as a scalar, with a value range of a closed interval. The unit is a dimensionless quantity, calculated by this formula, representing the coordination strength of the two-channel signals within the window. The closer the temporal coupling degree is to 1, the higher the coordination of the two-channel signals within the window, i.e., a dense burst of signals. This indicates that the dual-channel signals are out of phase, meaning that the structural and semantic signals appear asynchronously, and the temporal coupling degree being close to 0 indicates that the rhetoric is sparse within the window; The time-series sliding window size represents the number of clauses that constitute a time-series sliding window. It is a positive integer scalar with a value range of positive integers greater than or equal to 3. In this embodiment, the value is 5, meaning that every 5 adjacent clauses constitute a sliding window. The unit is a clause, which is set empirically to characterize the granularity of local density calculation. If it is too large, it will smooth out local rhetorical peaks; if it is too small, there will be insufficient statistical samples within the window. This is the clause index within the window, meaning the sequence number of the clause within the time-series sliding window. It is a positive integer scalar with a value range of a closed interval. The unit is a dimensionless quantity, obtained by enumeration during the traversal process, and represents the position of the clause within the currently processed window; For the first in the window The structural pattern score of a clause refers to the structural pattern score of that clause in the set of rhetorical and syntactic patterns. It is a scalar and its value range is a closed interval. The unit is a dimensionless quantity, obtained from step S1, and characterizes the structural plane strength of the clause. For the first in the window The anomaly score for each clause represents the anomaly score corresponding to that clause in the semantic anomaly candidate set (or 0 if the clause is not in the semantic anomaly candidate set). It is a scalar and its value range is a closed interval. The unit is a dimensionless quantity, obtained from step S2, which represents the semantic plane strength of the clause; The mean of the score sequence of structural patterns within the window, meaning the score within the window. The arithmetic mean of the fractions in the clause structure pattern, of type scalar, with a value range of a closed interval. The unit is a dimensionless quantity, derived from The baseline level, which characterizes the structural plane signal within the window, is calculated. The mean of the abnormal rating sequence within the window, meaning the mean of the abnormal rating sequence within the window. The arithmetic mean of the anomaly scores for each clause, typed as a scalar, with values ranging from a closed interval. The unit is a dimensionless quantity, derived from The baseline level of the semantic plane signal within the window is calculated; This is the arithmetic square root operator; This is the temporal sliding window index, meaning the sequence number of the temporal sliding window in the text to be evaluated. It is a positive integer scalar with a value range of a closed interval. ,in The total number of sentences in the text to be evaluated is dimensionless, obtained through sliding traversal, and represents the current position of the sliding window. The numerator on the right side of the equation is the inner product of the structure pattern score centering sequence and the anomaly score centering sequence, both of which are dimensionless, and the inner product is dimensionless. The denominator on the right side of the equation is the product of two standard deviations, both of which are dimensionless, and the product is dimensionless. The ratio of the numerator and denominator is dimensionless, and is consistent with the left side of the equation. The dimensionless quantity is consistent. This formula is the standard form of the Pearson correlation coefficient, and its range of values is known to be a closed interval. The value range is consistent with that on the left. Dimensional consistency verification passed.
[0044] The temporal coupling degree, as the local rhetorical application density within the temporal sliding window, together with the global density, constitutes the complete output of the rhetorical application density.
[0045] The diversity index is calculated based on Shannon entropy, where Shannon entropy uses the frequency distribution of each type of rhetorical device in the text to be evaluated as a probability distribution parameter. The diversity index reflects the balance of the distribution of rhetorical device types in the text to be evaluated. A larger diversity index indicates a more balanced distribution of rhetorical device types, while a smaller diversity index indicates that the distribution of rhetorical device types is more concentrated in a few types. In specific calculation, the frequencies of all rhetorical devices identified in the text to be evaluated are counted by type, normalized to a probability distribution, and then substituted into the Shannon entropy formula to obtain the diversity index.
[0046] Step S5: Evaluation Feedback Loop. Step S5 generates a text expression effect evaluation value based on the rhetorical usage density and the diversity index, and uses the text expression effect evaluation value as feedback to feed back into the symmetry structure judgment threshold and the anomaly scoring threshold, adjusting the identification parameters for the next round, thus forming an evaluation feedback loop.
[0047] Specifically, the text expression effect evaluation value is obtained by weighted summation of the rhetoric density and the diversity index, normalized to a closed interval of 0 to 100. In this embodiment, the weights are set to rhetoric density 0.6 and diversity index 0.4. The feedback method is a proportional-integral-derivative control method, and the output of the proportional-integral-derivative control method is the adjustment amount of the symmetry structure judgment threshold and the anomaly score judgment threshold in the next round of recognition. The proportional-integral-derivative controller takes the deviation between the text expression effect evaluation value and the preset expected evaluation value as input. The proportional term is proportional to the current deviation, the integral term is proportional to the historical deviation accumulation, and the derivative term is proportional to the deviation change rate. The weighted summation of the three terms yields the threshold adjustment amount. In this embodiment, the proportional coefficient is 0.5, the integral coefficient is 0.05, and the derivative coefficient is 0.1. The parameter selection is based on the closed-loop system stability analysis and the grid search results on the sample essay set.
[0048] Following the feedback adjustment in step S5, the threshold for determining symmetric structure and the threshold for determining anomaly scores in the next round of identification adaptively adjust according to the rhetorical distribution characteristics of the text to be evaluated: when a text is rhetorically dense overall, the feedback mechanism automatically tightens the threshold for determining anomaly scores to avoid misidentification; when a text is rhetorically sparse overall, the feedback mechanism automatically relaxes the threshold for determining symmetric structure to avoid missed identification. This evaluation feedback loop makes the present invention significantly superior to schemes with fixed thresholds in terms of cross-corpus adaptability and robustness across writing styles.
[0049] Thus, steps S1 to S5 of the method embodiment have all been completed. Test results on the verification corpus of middle school Chinese textbooks show that the present invention achieves a syntactic structure matching accuracy of 93.8% for explicit rhetorical devices (parallelism, antithesis, repetition) and an F1 score of 0.84 for implicit rhetorical devices (metaphor, allegory, personification, synesthesia). Compared to comparative schemes using only structural plane methods or only semantic plane methods, the overall F1 score is improved by 7.2 percentage points and 4.6 percentage points, respectively. Furthermore, the Pearson correlation coefficient between the rhetorical usage density and diversity index and teacher manual scoring reaches 0.81, demonstrating good objective evaluation ability.
[0050] like Figure 2 As shown, this embodiment provides an automatic Chinese rhetorical device recognition and text expression effect evaluation system. This system is the material embodiment of the method and includes five mutually coupled and synergistic functional modules: a structural pattern matching module, a semantic anomaly detection module, a dual-channel coupling module, a rhetorical device type recognition module, and an evaluation feedback closed-loop module. The system can be deployed on a teaching evaluation server, a writing assistance terminal, or a cloud-based text analysis platform.
[0051] The structure pattern matching module performs dependency parsing on the text to be evaluated, outputting a dependency parsing tree and a set of rhetorical syntactic patterns. The set of rhetorical syntactic patterns is extracted from the dependency parsing tree and includes three types of syntactic patterns: parallel structure, symmetrical structure, and repetitive structure, serving as the structure pattern matching result. This module can be implemented in hardware using a general-purpose central processing unit combined with a memory-loaded dependency parsing model. Internally, the module includes a preprocessing subunit (performing simplified / traditional character conversion, full-width / half-width character unification, special character cleaning, Chinese word segmentation, and part-of-speech tagging), a dependency parsing subunit (a neural network-based Chinese dependency parser), and a rhetorical syntactic pattern extraction subunit (extracting patterns according to the three extraction rules described in step S1: parallel structure, symmetrical structure, and repetitive structure). The output objects of the structure pattern matching module include the dependency parsing tree and the set of rhetorical syntactic patterns. The former is sent to the dual-channel coupling module via a data interface as the basic data for constructing the parallel item dependency subtree, while the latter is sent to the dual-channel coupling module as the source of constraints, representing the structure pattern matching result. For details on the specific technical implementation of the structure pattern matching module, please refer to the description of step S1.
[0052] The semantic anomaly detection module utilizes a word vector model to perform semantic domain mapping on each sentence in the text to be evaluated, identifies candidate sentences with cross-domain semantic mapping, constructs a semantic anomaly candidate set, and calculates an anomaly score for each candidate sentence in the semantic anomaly candidate set as the semantic anomaly detection result. In terms of hardware implementation, this module can employ a general-purpose central processing unit combined with a graphics processing unit to accelerate word vector inference. Internally, the module includes a word vector mapping subunit (based on a pre-trained BERT model for word vector mapping), a semantic domain recognition subunit (based on a pre-built semantic domain dictionary for real word classification), a cross-domain mapping detection subunit (based on the semantic distance judgment rules described in step S2 for cross-domain mapping recognition), and an anomaly score calculation subunit (comprehensively considering three components: cross-domain semantic distance, word frequency specificity of cross-domain word pairs, and context embedding deviation). The output objects of the semantic anomaly detection module include the semantic anomaly candidate set and the anomaly score, both of which are sent to the dual-channel coupling module as the semantic anomaly detection result. Specific technical implementation details of the semantic anomaly detection module can be found in the description of step S2.
[0053] The dual-channel coupling module is used to input the structural pattern matching result as a constraint condition into the semantic anomaly detection module, eliminate false negative masking sentences generated by the repeated increase of semantic similarity between adjacent sentences within the parallel structure, and reverse-calibrate the symmetry structure judgment threshold in the structural pattern matching module using the anomaly score, outputting the dual-channel coupling recognition result. This module is the core coupling hub of the system of the present invention. The module includes a forward constraint subunit (which calculates the parallel masking intensity index according to the parallel masking intensity index calculation rule described in step S3 and performs the reverse judgment of false negative masking sentences), a reverse calibration subunit (which calculates the syntactic symmetry operator value according to the syntactic symmetry operator value calculation rule described in step S3 and performs the reverse calibration of the symmetry structure judgment threshold), and a dual-channel consistency calculation subunit (which calculates the dual-channel consistency according to the dual-channel consistency calculation rule described in step S3). The output object of the dual-channel coupling module is the dual-channel coupling recognition result, which is sent to the rhetoric type recognition module. The specific technical implementation details of the dual-channel coupling module can be found in the description of step S3.
[0054] The rhetorical figure type identification module is used to identify metaphor, parallelism, antithesis, repetition, and synesthesia based on the dual-channel coupled identification results, and outputs rhetorical figure type labels, as well as rhetorical usage density and diversity index. In terms of hardware implementation, this module can use a general-purpose central processing unit (CPU) combined with a graphics processing unit (GPU) to accelerate classifier inference. The module includes an explicit rhetorical rule determination subunit (identifying parallelism, antithesis, and repetition according to rules), an implicit rhetorical classification subunit (using a Softmax multi-classifier based on BERT features), a repetition pattern score calculation subunit (calculating the repetition pattern score according to the repetition pattern score formula), a rhetorical usage density calculation subunit (calculating the rhetorical usage density according to the global density and temporal sliding window coupling formula), and a diversity index calculation subunit (calculating the diversity index according to the Shannon entropy formula). The output objects of the rhetorical figure type identification module include the rhetorical figure type label, the rhetorical usage density, and the diversity index, all of which are fed into the evaluation feedback closed-loop module. Specific technical implementation details of the rhetorical figure type identification module can be found in the description of step S4.
[0055] The evaluation feedback closed-loop module generates a text expression effect evaluation value based on the rhetorical usage density and the diversity index, and feeds this evaluation value back to the symmetry structure judgment threshold of the structure pattern matching module and the anomaly score judgment threshold of the semantic anomaly detection module to adjust the recognition parameters for the next round. This module includes an evaluation value generation subunit (generating the text expression effect evaluation value according to the weighted summation and normalization method of rhetorical usage density and diversity index described in step S5), a proportional-integral-differential control subunit (calculating the adjustment amount of the symmetry structure judgment threshold and the anomaly score judgment threshold according to the proportional-integral-differential control method described in step S5), and a threshold backfeed subunit (feeding the adjustment amount back to the corresponding threshold parameters of the structure pattern matching module and the semantic anomaly detection module, respectively). The output objects of the evaluation feedback closed-loop module include the text expression effect evaluation value (as an external output) and the threshold adjustment amount (as an internal feedback), realizing the evaluation feedback closed loop. Specific technical implementation details of the evaluation feedback closed-loop module can be found in the description of step S5.
[0056] The five modules mentioned above achieve data transmission and control flow coordination through an internal message bus. The five modules are executed serially in the main process order of structure pattern matching module → semantic anomaly detection module → dual-channel coupling module → rhetoric type recognition module → evaluation feedback closed loop module. At the same time, the feedback of the evaluation feedback closed loop module is asynchronously fed back to the structure pattern matching module and the semantic anomaly detection module, so that the system automatically enters the next round of adaptive adjustment cycle after each round of recognition. Ultimately, it maintains a stable recognition accuracy and evaluation objectivity under diverse input conditions across corpora and writing styles.
[0057] It should be noted that the specific embodiments described in this specification are merely illustrative examples of the spirit of the present invention. Those skilled in the art to which this invention pertains may make various modifications or additions to the described specific embodiments or adopt similar methods to replace them, but without departing from the spirit of the present invention or exceeding the scope defined by the appended claims.
Claims
1. A method for automatic identification of Chinese rhetorical devices and evaluation of text expression effectiveness, characterized in that, Includes the following steps: S1. Perform dependency parsing on the text to be evaluated, and output a dependency parsing tree and a set of rhetorical parsing patterns. The set of rhetorical parsing patterns is extracted from the dependency parsing tree and includes three types of syntactic patterns: parallel structure, symmetric structure, and repetitive structure. These are used as the structure pattern matching results. The structure pattern matching results also include the structure pattern score of each syntactic pattern in the set of rhetorical parsing patterns and the symmetric structure determination threshold. The structure pattern score is the geometric mean of the dependency relation alignment ratio and the part-of-speech consistency ratio in each syntactic pattern. S2. Using a word vector model, perform semantic domain mapping on each sentence in the text to be evaluated, identify candidate sentences with cross-domain semantic domain mapping, form a semantic anomaly candidate set, and calculate an anomaly score for each candidate sentence in the semantic anomaly candidate set as the semantic anomaly detection result. The semantic anomaly detection result also includes an anomaly score threshold for determining the anomaly score. S3. The structural pattern matching result is used as a constraint condition to input semantic anomaly detection, and false negative masking sentences that are repeatedly pushed up semantic similarity by adjacent sentences in the parallel structure are removed. The anomaly score is then used to calibrate the symmetric structure judgment threshold to obtain the dual-channel coupled recognition result. S4. Based on the dual-channel coupling recognition results, identify metaphor, parallelism, antithesis, repetition, and synesthesia as rhetorical devices, and output rhetorical device type labels, as well as rhetorical usage density and diversity index. The rhetorical usage density is obtained by normalizing the ratio of the number of occurrences of each type of rhetorical device in the text to be evaluated to the total number of sentences in the text to be evaluated after weighted summation by type weights. The diversity index is calculated based on Shannon entropy with the proportion of occurrence frequency of each type of rhetorical device as the probability distribution parameter. S5. Generate a text expression effect evaluation value based on the rhetorical usage density and the diversity index, and use the text expression effect evaluation value as feedback to feed back to the symmetry structure judgment threshold and the abnormal score threshold, adjust the identification parameters for the next round, and form an evaluation feedback closed loop.
2. The method for automatic identification of Chinese rhetorical devices and evaluation of text expression effectiveness according to claim 1, characterized in that, Step S3, which involves removing false negative masking sentences generated by repeated semantic similarity increases between adjacent sentences within the parallel structure, specifically includes: calculating a parallel masking strength index for adjacent sentences within the parallel structure, wherein the parallel masking strength index is the ratio of the mean semantic similarity between adjacent sentences to the variance of semantic similarity; when the parallel masking strength index is greater than a first threshold and there are candidate sentences in the semantically abnormal candidate set within the parallel structure, the determination result of the candidate sentence is reversed to a metaphor candidate.
3. The method for automatic identification of Chinese rhetorical devices and evaluation of text expression effectiveness according to claim 2, characterized in that, The step S3 to obtain the dual-channel coupling recognition result further includes: within the symmetric structure, firstly, the range of candidate positions of metaphor words is limited by syntactic symmetry position constraints, and then the semantic domain mapping verification is performed on the words within the range of candidate positions of metaphor words; when the syntactic symmetry position constraints are limited to at least one candidate position of metaphor word and the semantic domain mapping verification identifies cross-domain mapping, the symmetric structure is identified as a dual metaphor rhetorical device.
4. The method for automatic identification of Chinese rhetorical devices and evaluation of text expression effectiveness according to claim 3, characterized in that, The initial calculation of the symmetry structure determination threshold in step S1 includes: constructing a parallel item dependency subtree for each parallel item in the rhetorical syntax pattern set based on the dependency syntax tree; calculating the syntactic symmetry operator value between each pair of the parallel item dependency subtrees, wherein the syntactic symmetry operator value is obtained by weighted fusion of the subtree node correspondence degree and the subtree edge correspondence degree; statistically analyzing the syntactic symmetry operator values between each pair of the parallel item dependency subtrees in the text to be evaluated to form a syntactic symmetry operator value sequence; using the sum of the mean and standard deviation of the syntactic symmetry operator value sequence as the initial value of the symmetry structure determination threshold; and confirming that the corresponding parallel items are symmetrically aligned when the syntactic symmetry operator value is greater than the symmetry structure determination threshold.
5. The method for automatic identification of Chinese rhetorical devices and evaluation of text expression effectiveness according to claim 4, characterized in that, The identification of repetitive structures in the rhetorical syntax pattern set includes: calculating the n-gram repetition degree for each clause and combining it with the syntactic subtree similarity between the parallel term dependency subtrees to obtain a repetition pattern score; when the repetition pattern score is greater than a third threshold, the corresponding clause sequence is identified as a repetitive structure; wherein the syntactic subtree similarity is calculated based on the derivation of the syntactic symmetry operator value.
6. The method for automatic identification of Chinese rhetorical devices and evaluation of text expression effectiveness according to claim 5, characterized in that, The local calculation of the rhetorical density includes: A temporal sliding window is formed by k adjacent clauses. The temporal coupling degree is calculated between the structural pattern score of the rhetorical syntax pattern set and the anomaly score of the semantic anomaly detection result within the temporal sliding window. The temporal coupling degree is obtained based on the phase-aligned normalized cross-correlation between the structural pattern score sequence and the anomaly score sequence, and is used as the local rhetorical application density within the temporal sliding window.
7. The method for automatic identification of Chinese rhetorical devices and evaluation of text expression effectiveness according to claim 1, characterized in that, The rhetorical usage density is equal to the ratio of the number of occurrences of each type of rhetorical device identified in the text to the total number of sentences in the text, which is then normalized after being weighted by type weights.
8. The method for automatic identification of Chinese rhetorical devices and evaluation of text expression effectiveness according to claim 1, characterized in that, The diversity index is calculated based on Shannon entropy, where Shannon entropy uses the proportion of the frequency of each type of rhetorical device in the text to be evaluated as a probability distribution parameter.
9. The method for automatic identification of Chinese rhetorical devices and evaluation of text expression effectiveness according to claim 1, characterized in that, The text expression effect evaluation value is fed back to the symmetry structure judgment threshold and the anomaly score threshold as feedback in a proportional-integral-derivative control method. The output of the proportional-integral-derivative control method is the adjustment amount of the symmetry structure judgment threshold and the anomaly score threshold in the next round of recognition.
10. A system for automatically identifying Chinese rhetorical devices and evaluating the effectiveness of text expression, used to implement the method for automatically identifying Chinese rhetorical devices and evaluating the effectiveness of text expression as described in any one of claims 1-9, characterized in that, include: The structure pattern matching module is used to perform dependency parsing on the text to be evaluated, and output a dependency parsing tree and a set of rhetorical parsing patterns. The set of rhetorical parsing patterns is extracted from the dependency parsing tree and includes three types of syntactic patterns: parallel structure, symmetric structure and repetitive structure, as the structure pattern matching result. The semantic anomaly detection module is used to perform semantic domain mapping on each sentence in the text to be evaluated using a word vector model, identify candidate sentences with cross-domain semantic domain mapping, form a semantic anomaly candidate set, and calculate anomaly scores for each candidate sentence in the semantic anomaly candidate set as the semantic anomaly detection result. The dual-channel coupling module is used to input the structural pattern matching result as a constraint condition into the semantic anomaly detection module, remove false negative masking sentences that are generated by repeated semantic similarity increases of adjacent sentences in the parallel structure, and reverse-calibrate the symmetric structure judgment threshold with the anomaly score, and output the dual-channel coupling recognition result. The rhetorical device type identification module is used to identify metaphor, parallelism, antithesis, repetition and synesthesia based on the dual-channel coupled identification results, and outputs rhetorical device type labels as well as rhetorical usage density and diversity indices; The evaluation feedback closed-loop module is used to generate a text expression effect evaluation value based on the rhetoric usage density and the diversity index, and to feed the text expression effect evaluation value back to the symmetry structure judgment threshold and the anomaly score threshold as feedback quantity to adjust the identification parameters for the next round.