Ancient poetry rhythm automatic detection and analysis tool
Through the automatic detection and analysis tool of ancient poetry rhythm, the problems of low efficiency and single function of traditional analysis methods are solved, and efficient, intelligent and visual analysis of ancient poetry rhythm is achieved, which is suitable for ancient poetry research, teaching and cultural dissemination.
Patent Information
- Application Number
- CN202510644247.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-08-12
AI Technical Summary
The existing methods of ancient poetry rhythm detection and analysis rely on manual analysis to consume time and effort, are susceptible to subjective factors, the automation tool has a single function, it is difficult to process complex text, and lacks visual presentation methods, which cannot meet the needs of large-scale poetry data processing.
It provides an automatic detection and analysis tool for the rhythm of ancient poetry, including preprocessing module, level tone analysis module, rhyme analysis module, parallelism analysis module and rhythm analysis module. It combines with the visual report generation module to identify the boundaries of poems, attributes of the tone, rhyme status and rhythm types through technologies such as regular expressions, natural language processing, and dependent syntax analysis, and generate visual reports.
It realizes efficient and accurate automatic analysis of ancient poetry rhythms, can handle multi-tone characters and ancient and modern phonetic changes, provides intuitive visual results, improves analysis efficiency and accuracy, lowers the threshold for professional knowledge, and supports multilingual and cloud storage.
Smart Images

Figure CN120471046A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sound detection, and in particular to a tool for automatic detection and analysis of the rhythm of ancient poetry. Background Art
[0002] With the inheritance and promotion of China's fine traditional culture, the rhythmic beauty of ancient poetry, as a shining pearl of classical literature, has increasingly attracted attention in academic research, education, and cultural communication. From an academic perspective, rhythmic analysis is an important way to explore the creative principles of ancient poetry and understand its artistic value. From an educational perspective, helping students master the rhythm of ancient poetry helps improve their literary appreciation and poetic creation skills. In the field of cultural communication, accurate rhythmic analysis can enhance the popularization of ancient poetry culture. At the same time, the rapid development of artificial intelligence and natural language processing technologies has provided technical possibilities for the automated detection and analysis of the rhythm of ancient poetry, promoting the development of traditional cultural research in an intelligent and efficient direction.
[0003] However, existing methods for detecting and analyzing the rhythm of ancient poetry have many shortcomings. Manual analysis relies on professional knowledge, is time-consuming and labor-intensive, and is easily influenced by subjective factors, making it difficult to meet the needs of large-scale poetry data processing. Some automated tools can only perform simple level or rhyme detection, and cannot fully cover complex rhythmic elements such as parallelism and rhythm. They also have low accuracy when processing polyphones, ancient and modern sound changes, and irregularly formatted texts. In addition, existing tools lack visual presentation methods, and analysis results are mostly output in text form, making it difficult to intuitively display the rhythmic structure of ancient poetry. They cannot provide users with an efficient interactive experience and in-depth analysis capabilities, which limits the modernization of ancient poetry rhythm research and teaching. Summary of the Invention
[0004] The purpose of this section is to summarize some aspects of the embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the abstract and title of this application to avoid obscuring the purpose of this section, the abstract and the title of the invention, and such simplifications or omissions should not be used to limit the scope of the present invention.
[0005] In view of the above existing problems, the present invention is proposed. Therefore, the present invention provides an automatic detection and analysis tool for the rhythm of ancient poetry. The existing problems of the rhythm detection and analysis of ancient poetry are low manual analysis efficiency, single function of the automatic tool, and difficulty in processing complex texts.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: In a first aspect, the present invention provides a tool for automatic detection and analysis of ancient poetry rhythm, comprising: The preprocessing module is used to analyze the input ancient poetry text and identify the boundaries of the poem and punctuation marks; The Pingze analysis module is used to automatically identify the Pingze attributes of each character in ancient poetry based on a preset Chinese character Pingze database and generate a Pingze format analysis report; Rhyme analysis module, used to detect the rhyme words of each couplet, determine the rhyme situation and generate a rhyme analysis report; The antithesis analysis module is used to analyze the grammatical structure of antithetical verses in ancient poetry and generate an antithetical analysis report; Rhythm analysis module, used to analyze the rhythm type of ancient poetry based on the number of syllables and the alternation of level and oblique tones in the poem, and generate a rhythm analysis report; The visual report generation module is used to integrate the results of prosody, rhyme, parallelism and rhythm analysis to generate a visual analysis report that intuitively presents the rhythmic structure of ancient poetry.
[0007] As a preferred solution of the automatic detection and analysis tool for ancient poetry rhythm of the present invention, the pre-processing module is used to analyze the input ancient poetry text and identify the boundaries of the poem and punctuation marks, including: Regular expressions are used to match common punctuation marks in ancient Chinese poetry, and the boundaries of verses are divided based on the number of words in the verses. For unpunctuated ancient poetry, we analyze the semantic relevance between characters based on statistical language models and identify potential verse breakpoints by calculating the cosine similarity of word vectors of adjacent characters. Standardize irregularly formatted text, unify full-width or half-width characters, automatically convert traditional Chinese characters to simplified Chinese, and remove irrelevant comments and special symbols in the text.
[0008] As a preferred solution of the automatic detection and analysis tool for ancient poetry rhythm of the present invention, the level and tone analysis module is used to automatically identify the level and tone attributes of each character in the ancient poetry based on a preset Chinese character level and tone database and generate a level and tone format analysis report, including: Build a dynamic database containing the level and tone information of polyphones, combine the contextual semantics of the poem, and use natural language processing technology to determine the correct level and tone attributes of polyphones; Comparing the basic sentence patterns of modern poetry with flat and oblique tones, a pattern matching algorithm is used to identify the flat and oblique tones of the poem. When generating a Pingze format analysis report, words that comply with or violate the standards are marked in different colors, and the positions of the characters that can be Ping or Ze are marked to intuitively display the Pingze distribution pattern.
[0009] As a preferred solution of the automatic detection and analysis tool for ancient poetry rhythm of the present invention, the rhyme analysis module is used to detect the rhyme word of each couplet, determine the rhyme situation and generate a rhyme analysis report, including: Establish a rhyme mapping table based on the Middle Chinese and modern pronunciations, and convert the rhyme characters into corresponding rhyme codes; The Levenshtein distance algorithm is used to calculate the phonetic similarity between rhyming characters, and fuzzy matching and prompting are performed for cases where the rhymes are not completely consistent but have similar pronunciations. In the rhyme analysis report, a rhyme character clustering chart is used to display the rhyme type (such as common rhyme and adjacent rhyme), and the rhyme part of the rhyme character in the corresponding rhyme book is marked. As a preferred embodiment of the automatic detection and analysis tool for ancient poetry rhythm of the present invention, the antithesis analysis module is used to analyze the grammatical structure of the antithetical verses in ancient poetry and generate an antithesis analysis report, including: Dependency parsing technology is used to analyze the grammatical relationship between words in the poem, and the structure matching algorithm is used to identify antithetical sentences; Perform fine-grained detection of part-of-speech parallelism, comparing nouns, verbs, adjectives, and other parts of speech with a preset parallelism rule library, and marking words that do not meet parallelism requirements; In the antithesis analysis report, the grammatical structure correspondence of antithetical sentences is displayed in a tree diagram, and the semantic antithesis is intelligently identified and highlighted.
[0010] As a preferred embodiment of the automatic detection and analysis tool for ancient poetry rhythm of the present invention, the rhythm analysis module is used to analyze the rhythm type of ancient poetry according to the number of syllables and the alternation of level and oblique tones in the poem, and generate a rhythm analysis report, including: Divide the verses into rhythmic units according to syllables, and verify the rationality of the rhythm by combining the rules of alternating level and oblique tones; A rhythmic beat model is introduced to quantitatively evaluate the rhythm and intonation of a poem by calculating the contrast between level and oblique tones of adjacent rhythmic units. In the rhythm analysis report, the changes in the level and tone of the poem are visualized using a waveform graph, and the key rhythm nodes and pause positions are marked.
[0011] As a preferred embodiment of the automatic detection and analysis tool for ancient poetry rhythm described in the present invention, a visual report generation module is used to integrate the results of the level and oblique tones, rhyme, parallelism and rhythm analysis to generate a visual analysis report, including: HTML5 Canvas technology is used to draw multi-dimensional analysis maps, integrating the level and oblique tone format, rhyme situation, antithesis structure, and rhythm distribution into a single visual interface; Provides interactive viewing capabilities, allowing users to click on specific analysis areas to obtain detailed explanations, and supports layered display and hiding of different analysis dimensions; Generate exportable reports in PDF or image format, automatically format key analysis results, and add directory indexes and term annotations for easy reading and sharing.
[0012] As a preferred solution of the tool for automatic detection and analysis of ancient poetry rhythms of the present invention, it also includes: The learning optimization module is used to collect user feedback on analysis results and dynamically optimize the pingze database, parallelism rule library, and analysis model parameters through machine learning algorithms; The cloud storage module supports cloud backup and cross-device synchronization of user analysis reports, and provides a historical version comparison function to facilitate users to trace the modification process of poetry rhythm analysis.
[0013] In a second aspect, the present invention provides a computing device, comprising: memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the ancient poetry rhythm automatic detection and analysis tool are implemented.
[0014] In a third aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the ancient poetry rhythm automatic detection and analysis tool.
[0015] Compared with the existing technology, the present invention has the following beneficial effects: the present invention solves the problem of irregular text processing through the preprocessing module, laying the foundation for subsequent analysis; the analysis modules such as level and oblique tones, rhyme, parallelism, and rhythm realize comprehensive and accurate analysis of the rhythmic elements of ancient poetry, breaking through the limitation of the single function of traditional tools and being able to handle complex situations such as polyphonic characters and ancient and modern sound changes; the visual report generation module presents the analysis results in the form of intuitive charts, enhancing the user's understanding of the rhythmic structure of ancient poetry; the learning optimization module continuously improves the analysis accuracy through machine learning, and the multi-language support module and cloud storage module further expand the application scenarios and convenience of the tool. The present invention effectively solves the shortcomings of traditional analysis methods and provides an efficient, intelligent and easy-to-use solution for the research, teaching and cultural dissemination of the rhythm of ancient poetry. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive effort. Among them: Figure 1 The figure is a schematic diagram of the general process of the automatic detection and analysis tool of ancient poetry rhythm according to one embodiment of the present invention. DETAILED DESCRIPTION
[0017] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, the following detailed description of the specific embodiments of the present invention is given in conjunction with the accompanying drawings. It is obvious that the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in this field without creative work should fall within the scope of protection of the present invention.
[0018] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0019] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive of other embodiments.
[0020] The present invention is described in detail with reference to schematic diagrams. For ease of illustration, cross-sectional views of device structures may be partially enlarged and not to scale when describing embodiments of the present invention. Furthermore, the schematic diagrams are merely illustrative and should not limit the scope of the present invention. Furthermore, in actual production, the three-dimensional dimensions of length, width, and depth should be included.
[0021] Furthermore, in the description of the present invention, it should be noted that the terms "upper, lower, inner, and outer" and other references to orientations or positional relationships are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the systems or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first, second, or third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0022] In this disclosure, unless otherwise specified or limited, the terms "mounted," "connected," and "connected" should be interpreted broadly. For example, they may refer to fixed, removable, or integral connections. They may also refer to mechanical, electrical, or direct connections, indirect connections through an intermediary, or internal communication between two components. Those skilled in the art will understand the specific meanings of these terms in this disclosure.
[0023] Example 1 Reference Figure 1 , as one embodiment of the present invention, provides an automatic detection and analysis tool for ancient poetry rhythm, comprising: The preprocessing module is used to analyze the input ancient poetry text and identify the boundaries of the poem and punctuation marks; The Pingze analysis module is used to automatically identify the Pingze attributes of each character in ancient poetry based on a preset Chinese character Pingze database and generate a Pingze format analysis report; Rhyme analysis module, used to detect the rhyme words of each couplet, determine the rhyme situation and generate a rhyme analysis report; The antithesis analysis module is used to analyze the grammatical structure of antithetical verses in ancient poetry and generate an antithetical analysis report; Rhythm analysis module, used to analyze the rhythm type of ancient poetry based on the number of syllables and the alternation of level and oblique tones in the poem, and generate a rhythm analysis report; The visual report generation module is used to integrate the results of prosody, rhyme, parallelism and rhythm analysis to generate a visual analysis report that intuitively presents the rhythmic structure of ancient poetry.
[0024] Furthermore, it also includes a learning optimization module for collecting user feedback on the analysis results and dynamically optimizing the prosody database, parallelism rule library, and analysis model parameters through machine learning algorithms; The cloud storage module supports cloud backup and cross-device synchronization of user analysis reports, and provides a historical version comparison function to facilitate users to trace the modification process of poetry rhythm analysis.
[0025] Furthermore, the pre-processing module is used to analyze the input ancient poetry text and identify the boundaries of the poem and punctuation marks, including: Regular expressions are used to match common punctuation marks in ancient Chinese poetry, and the boundaries of verses are divided based on the number of words in the verses. For unpunctuated ancient poetry, we analyze the semantic relevance between characters based on statistical language models and identify potential verse breakpoints by calculating the cosine similarity of word vectors of adjacent characters. Standardize irregularly formatted text, unify full-width or half-width characters, automatically convert traditional Chinese characters to simplified Chinese, and remove irrelevant comments and special symbols in the text.
[0026] Furthermore, the Pingze analysis module is used to automatically identify the Pingze attributes of each character in the ancient poem based on a preset Chinese character Pingze database and generate a Pingze format analysis report, including: Build a dynamic database containing the level and tone information of polyphones, combine the contextual semantics of the poem, and use natural language processing technology to determine the correct level and tone attributes of polyphones; Comparing the basic sentence patterns of modern poetry with flat and oblique tones, a pattern matching algorithm is used to identify the flat and oblique tones of the poem. When generating the level and oblique tones format analysis report, words that conform to the norms and those that violate the norms are marked with different colors, and at the same time, the positions of the middle characters that can be level or oblique are marked, visually showing the distribution rules of level and oblique tones.
[0027] It should be noted that by constructing a dynamic level and oblique tones database and combining natural language processing technology, the level and oblique tones analysis module can accurately handle the polyphonic word problems in ancient poems, significantly improving the accuracy of identifying the level and oblique tones attributes; the pattern matching algorithm compares with the basic sentence patterns of regulated verses to achieve rapid identification and judgment of the level and oblique tones format of verses, ensuring the analysis efficiency; while the visual annotation function differentiates compliant and non-compliant words with different colors and marks the positions of the "middle" characters that can be level or oblique, presenting the distribution rules of level and oblique tones in an intuitive way, making the analysis results more readable and valuable for reference. The three work together, not only solving the technical problem of polyphonic word ambiguity in traditional level and oblique tones analysis, but also reducing the threshold for users to understand the rhyme rules of ancient poems through visualization means, providing an efficient and reliable auxiliary tool for the creation and research of ancient poems.
[0028] Furthermore, the rhyme analysis module is used to detect the rhyming words in each couplet of the poem, judge the rhyming situation and generate a rhyme analysis report, including: Establish a rhyme department mapping table based on Middle Chinese and modern Chinese, and convert the rhyming words into corresponding rhyme department codes; Adopt the Levenshtein distance algorithm to calculate the phonetic similarity between rhyming words, and perform fuzzy matching and prompting for cases of incomplete rhyming but similar pronunciations; In the rhyme analysis report, show the rhyming types (such as general rhyming, adjacent rhyme rhyming) with a clustering chart of rhyming words, and mark the rhyme department attribution of the rhyming words in the corresponding rhyme books.
[0029] It should be noted that the rhyme analysis module has achieved the ability to detect rhymes across different eras and multiple standards by establishing a dual-track rhyme department mapping table of Middle Chinese and modern Chinese, meeting the analysis needs of different users for ancient rhymes or modern rhymes; the introduction of the Levenshtein distance algorithm enables the system to capture cases of similar pronunciations but not strict rhyming, enhancing the flexibility and applicability of the analysis, especially suitable for the analysis of ancient-style poems with relatively loose rhyming requirements; while the visual presentation of the clustering chart and rhyme department attribution annotation intuitively shows the rhyming types and phonetic relationships, helping users quickly grasp the rhyming characteristics and creation rules of poems. The combination of the three not only improves the accuracy and coverage of rhyme detection, but also reduces the professional knowledge threshold through a user-friendly display method, providing a comprehensive and easy-to-use auxiliary tool for poem creation, teaching and research.
[0030] Furthermore, the antithesis analysis module is used to analyze the grammatical structure of antithetical couplets in ancient poems and generate an antithesis analysis report, including: Use dependency syntax analysis technology to parse the grammatical relationships of words in the poem, and identify antithetical couplets through a structure matching algorithm; Perform fine-grained detection of part-of-speech parallelism, comparing nouns, verbs, adjectives, and other parts of speech with a preset parallelism rule library, and marking words that do not meet parallelism requirements; In the antithesis analysis report, the grammatical structure correspondence of antithetical sentences is displayed in a tree diagram, and the semantic antithesis is intelligently identified and highlighted.
[0031] It should be noted that the parallelism analysis module, with the help of dependency syntax analysis technology and structure matching algorithm, can accurately analyze the grammatical structure of poems, efficiently identify parallel sentences, avoid the subjectivity and omissions of manual judgment, and greatly improve the accuracy and efficiency of parallelism analysis; the fine-grained part-of-speech detection function strictly compares various parts of speech according to the preset parallelism rule library, and can accurately locate words that do not meet the parallelism requirements, thereby realizing the refinement of parallelism analysis; and the visualization method of presenting the correspondence between grammatical structures in a tree diagram and intelligently highlighting the semantic parallel parts can clearly and intuitively display complex parallelism relationships, allowing users to grasp the parallelism characteristics of poems at the grammatical and semantic levels at a glance. It not only provides professional and in-depth analysis results for the study of ancient poetry rhythm, but also helps poetry teaching and creation to better understand and use the important artistic technique of parallelism.
[0032] Furthermore, the rhythm analysis module is used to analyze the rhythm type of ancient poetry based on the number of syllables and the alternation of level and oblique tones in the poem, and generate a rhythm analysis report, including: Divide the verses into rhythmic units according to syllables, and verify the rationality of the rhythm by combining the rules of alternating level and oblique tones; A rhythmic beat model is introduced to quantitatively evaluate the rhythm and intonation of a poem by calculating the contrast between level and oblique tones of adjacent rhythmic units. In the rhythm analysis report, the changes in the level and tone of the poem are visualized using a waveform graph, and the key rhythm nodes and pause positions are marked.
[0033] It should be noted that the rhythm analysis module can accurately define the rhythm types of ancient poetry by scientifically dividing syllable rhythm units and verifying the rationality of the rules of alternating level and oblique tones. This avoids the arbitrariness and subjectivity of rhythm division. The introduction of the rhythm beat model transforms the abstract sense of rhythm into a quantifiable value. By calculating the level and oblique contrast, it accurately evaluates the ups and downs of the poem, upgrading rhythm analysis from perceptual cognition to rational judgment. The visual presentation of waveforms and key node annotations shows the level and oblique fluctuations and rhythm of the poem in an intuitive and vivid form, helping users quickly understand the rhythmic laws and musical beauty of ancient poetry. The synergy of the three not only improves the scientificity and accuracy of ancient poetry rhythm analysis, but also provides a clear and intuitive analysis tool with practical guidance for poetry appreciation, creation and recitation teaching, helping users to deeply appreciate the beauty of the rhythm of ancient poetry.
[0034] Furthermore, the visualization report generation module is used to integrate the results of the level, rhyme, parallelism and rhythm analysis to generate a visualization analysis report, including: HTML5 Canvas technology is used to draw multi-dimensional analysis maps, integrating the level and oblique tone format, rhyme situation, antithesis structure, and rhythm distribution into a single visual interface; Provides interactive viewing capabilities, allowing users to click on specific analysis areas to obtain detailed explanations, and supports layered display and hiding of different analysis dimensions; Generate exportable reports in PDF or image format, automatically format key analysis results, and add directory indexes and term annotations for easy reading and sharing.
[0035] The present invention solves the problem of irregular text processing through a pre-processing module, laying the foundation for subsequent analysis; analysis modules such as level and oblique tones, rhyme, parallelism, and rhythm achieve comprehensive and accurate analysis of the rhythmic elements of ancient poetry, breaking through the limitations of traditional tools with single functions and being able to handle complex situations such as polyphonic characters and ancient and modern sound changes; a visual report generation module presents analysis results in the form of intuitive charts, enhancing users' understanding of the rhythmic structure of ancient poetry; a learning optimization module continuously improves analysis accuracy through machine learning, and a multi-language support module and a cloud storage module further expand the application scenarios and convenience of the tool. The present invention effectively solves the shortcomings of traditional analysis methods and provides an efficient, intelligent, and easy-to-use solution for the research, teaching, and cultural dissemination of the rhythm of ancient poetry.
[0036] This embodiment further provides a computing device suitable for standardized visual intelligent assessment of talents, including: Memory and processor; the memory is used to store computer-executable instructions, and the processor is used to execute computer-executable instructions to implement the automatic detection and analysis tool for ancient poetry rhythm as proposed in the above embodiment.
[0037] This embodiment further provides a storage medium on which a computer program is stored. When the program is executed by a processor, the tool for automatic detection and analysis of the rhythm of ancient poetry as proposed in the above embodiment is implemented.
[0038] The storage medium proposed in this embodiment and the tool for realizing automatic detection and analysis of ancient poetry rhythm proposed in the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0039] Through the above description of the embodiments, those skilled in the art can clearly understand that the present invention can be implemented with the help of software and necessary general-purpose hardware. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various embodiments of the present invention.
[0040] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A tool for automatic detection and analysis of ancient poetry rhythm, characterized by: include: The preprocessing module is used to analyze the input ancient poetry text and identify the boundaries of the poem and punctuation marks; The Pingze analysis module is used to automatically identify the Pingze attributes of each character in ancient poetry based on a preset Chinese character Pingze database and generate a Pingze format analysis report; Rhyme analysis module, used to detect the rhyme words of each couplet, determine the rhyme situation and generate a rhyme analysis report; The antithesis analysis module is used to analyze the grammatical structure of antithetical verses in ancient poetry and generate an antithetical analysis report; Rhythm analysis module, used to analyze the rhythm type of ancient poetry based on the number of syllables and the alternation of level and oblique tones in the poem, and generate a rhythm analysis report; The visual report generation module is used to integrate the results of prosody, rhyme, parallelism and rhythm analysis to generate a visual analysis report that intuitively presents the rhythmic structure of ancient poetry.
2. The automatic detection and analysis tool for ancient poetry rhythm as claimed in claim 1, characterized in that: The preprocessing module is used to analyze the input ancient poetry text and identify the boundaries and punctuation marks of the poem, including: Regular expressions are used to match common punctuation marks in ancient Chinese poetry, and the boundaries of verses are divided based on the number of words in the verses. For unpunctuated ancient poetry, we analyze the semantic relevance between characters based on statistical language models and identify potential verse breakpoints by calculating the cosine similarity of word vectors of adjacent characters. Standardize irregularly formatted text, unify full-width or half-width characters, automatically convert traditional Chinese characters to simplified Chinese, and remove irrelevant comments and special symbols in the text.
3. The automatic detection and analysis tool for ancient poetry rhythm as claimed in claim 2, characterized in that: The Pingze analysis module is used to automatically identify the Pingze attributes of each character in ancient poetry based on a preset Chinese character Pingze database and generate a Pingze format analysis report, including: Build a dynamic database containing the level and tone information of polyphones, combine the contextual semantics of the poem, and use natural language processing technology to determine the correct level and tone attributes of polyphones; Comparing the basic sentence patterns of modern poetry with flat and oblique tones, a pattern matching algorithm is used to identify the flat and oblique tones of the poem. When generating a Pingze format analysis report, words that comply with or violate the standards are marked in different colors, and the positions of the characters that can be Ping or Ze are marked to intuitively display the Pingze distribution pattern.
4. The automatic detection and analysis tool for ancient poetry rhythm as claimed in claim 3, characterized in that: The rhyme analysis module is used to detect the rhyme words of each couplet, determine the rhyme situation and generate a rhyme analysis report, including: Establish a rhyme mapping table based on the Middle Chinese and modern pronunciations, and convert the rhyme characters into corresponding rhyme codes; The Levenshtein distance algorithm is used to calculate the phonetic similarity between rhyming characters, and fuzzy matching and prompting are performed for cases where the rhymes are not completely consistent but have similar pronunciations. In the rhyme analysis report, the rhyme type (such as common rhyme, adjacent rhyme) is displayed in a rhyme character clustering chart, and the rhyme part to which the rhyme character belongs in the corresponding rhyme book is marked.
5. The automatic detection and analysis tool for ancient poetry rhythm as claimed in claim 4, characterized in that: The antithesis analysis module is used to analyze the grammatical structure of antithetical verses in ancient poetry and generate an antithesis analysis report, including: Dependency parsing technology is used to analyze the grammatical relationship between words in the poem, and the structure matching algorithm is used to identify antithetical sentences; Perform fine-grained detection of part-of-speech parallelism, comparing nouns, verbs, adjectives, and other parts of speech with a preset parallelism rule library, and marking words that do not meet parallelism requirements; In the antithesis analysis report, the grammatical structure correspondence of antithetical sentences is displayed in a tree diagram, and the semantic antithesis is intelligently identified and highlighted.
6. The tool for automatic detection and analysis of ancient poetry rhythm as claimed in claim 5, characterized in that: The rhythm analysis module is used to analyze the rhythm type of ancient poetry based on the number of syllables and the alternation of level and oblique tones in the poem, and generate a rhythm analysis report, including: Divide the verses into rhythmic units according to syllables, and verify the rationality of the rhythm by combining the rules of alternating level and oblique tones; A rhythmic beat model is introduced to quantitatively evaluate the rhythm and intonation of a poem by calculating the contrast between level and oblique tones of adjacent rhythmic units. In the rhythm analysis report, the changes in the level and tone of the poem are visualized using a waveform graph, and the key rhythm nodes and pause positions are marked.
7. The tool for automatic detection and analysis of ancient poetry rhythm as claimed in claim 6, characterized in that: The visual report generation module is used to integrate the results of the level, rhyme, parallelism, and rhythm analysis to generate a visual analysis report, including: HTML5 Canvas technology is used to draw multi-dimensional analysis maps, integrating the level and oblique tone format, rhyme situation, antithesis structure, and rhythm distribution into a single visual interface; Provides interactive viewing capabilities, allowing users to click on specific analysis areas to obtain detailed explanations, and supports layered display and hiding of different analysis dimensions; Generate exportable reports in PDF or image format, automatically format key analysis results, and add directory indexes and term annotations for easy reading and sharing.
8. The automatic detection and analysis tool for ancient poetry rhythm as claimed in claim 1, characterized in that: Also includes: The learning optimization module is used to collect user feedback on analysis results and dynamically optimize the pingze database, parallelism rule library, and analysis model parameters through machine learning algorithms; The cloud storage module supports cloud backup and cross-device synchronization of user analysis reports, and provides a historical version comparison function to facilitate users to trace the modification process of poetry rhythm analysis.
9. An electronic device comprising: memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the automatic detection and analysis tool for ancient poetry rhythm as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the automatic detection and analysis tool for ancient poetry rhythm as claimed in any one of claims 1 to 7.