Automatic sentence segmentation and semantic analysis system for ancient Chinese based on deep learning
By integrating the deep learning models and image features of GRU and CNN, and combining ancient Chinese knowledge graphs with self-supervised learning, the problems of high segmentation error rate and limited long-distance dependency modeling capabilities in automatic segmentation and semantic analysis of ancient Chinese are solved, and efficient paragraph-level semantic analysis and domain adaptation are achieved, improving the robustness and accuracy of the system.
Patent Information
- Application Number
- CN202511177682.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-21
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-08-21
AI Technical Summary
Existing deep learning-based automatic segmentation and semantic analysis systems for ancient Chinese have problems such as high segmentation error rate, limited long-distance dependency modeling capabilities, lack of image feature fusion and domain adaptation mechanisms, and scarcity of annotated data when dealing with phenomena such as the absence of punctuation, complex grammatical structures, homophones and variant characters, making it difficult to achieve efficient paragraph-level semantic analysis.
A deep learning model that integrates gated recurrent units (GRU) and convolutional neural networks (CNN) is used to construct an ancient Chinese knowledge graph based on image and glyph features. Self-supervised learning and data enhancement methods are used to process homophones and variant characters, enhance the ability to capture long-distance dependencies, and perform semantic analysis in combination with domain knowledge.
It significantly reduces the error rate of sentence segmentation, improves the robustness and adaptability of the system, improves the accuracy of part-of-speech tagging and entity recognition, constructs a chapter-level semantic network, enhances the ability to process texts in different fields, and improves the efficiency of academic research.
Smart Images

Figure CN120764552A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ancient Chinese analysis, and in particular to an ancient Chinese automatic sentence segmentation and semantic analysis system based on deep learning. Background Art
[0002] The existing deep learning-based automatic segmentation and semantic analysis system for ancient Chinese still has the following drawbacks in actual use:
[0003] The existing public document - CN109829159B, discloses an integrated automatic lexical analysis method for ancient Chinese texts, including the following steps: using the Word2Vec model for pre-training to obtain word vectors with semantic characteristics of ancient Chinese; adding information data that appeared in documents from various dynasties to the ancient book proper noun database to form a number of proper noun entries; adjusting the parameters of the Bi-LSTM-CRF neural network model, pre-processing the final training corpus into a form readable by the model, loading it into the neural network model, continuously iterating learning, and automatically evaluating the annotation results of the test corpus. The present invention adopts an integrated tagging method of sentence segmentation, word segmentation and part-of-speech tagging, which eliminates the repeated tagging process of multiple subtasks of lexical analysis and avoids the multi-level diffusion of repeated tagging errors; the present invention adopts a deep learning model, which can automatically learn rich language features and eliminates the work of manually customizing feature templates in traditional machine learning; the tagging model described in the present invention adopts GPU hardware acceleration, which can greatly shorten the model training time and is much more efficient than traditional machine learning models; wherein, the input data is ancient Chinese training corpus, mainly in text form, and does not involve image data; the processing object focuses on the lexical analysis of proper nouns (personal names, place names, etc.), the text type does not explicitly include complex carriers such as inscriptions and bamboo slips, and does not mention the special processing of homophones and variant characters; only a database of ancient book proper nouns is constructed, which includes static proper nouns such as personal names and place names, and the entries are screened by confidence calculation and added to the training corpus. In essence, it is a corpus expansion, and no knowledge graph is formed, nor is there a deep fusion mechanism of knowledge and model; and it focuses on "sentence segmentation, word segmentation and part-of-speech tagging". The integrated lexical analysis does not involve paragraph-level semantic analysis, and the task is limited to basic lexical processing at the sentence level; there is no domain adaptation mechanism, and only common proper nouns are processed; there is no self-supervised learning mechanism, and data enhancement only supplements entries through the proper noun database, relies on manually annotated corpus, and makes insufficient use of unannotated data.
[0004] As an important carrier of Chinese civilization, the text of Ancient Chinese contains rich historical, cultural and academic value. However, the lack of punctuation, the complexity of grammatical structure, and the phenomena of homophones and variant characters formed by historical evolution of Ancient Chinese make traditional manual segmentation and semantic analysis inefficient, highly subjective and susceptible to academic controversy. With the development of digital technology, the use of artificial intelligence to realize automatic processing of Ancient Chinese has become a key requirement for academic research and cultural inheritance.
[0005] Polysemy and sentence omission are common in ancient Chinese, making it difficult for models to accurately determine sentence boundaries through local context. In addition, the logical relationships in long sentences may span dozens of characters, and the traditional BiLSTM model has limited ability to model long-distance dependencies. In particular, the existence of homophones and variant characters makes it difficult for the model to directly map semantics through character shape. Although existing models learn some homophone rules through pre-training, they still make misjudgments in unlabeled corpus. Texts such as inscriptions and bamboo slips are often accompanied by image data, and existing models are mostly based on pure text training and lack the fusion analysis of image features.
[0006] Semantic analysis of ancient Chinese relies on annotated corpora, but publicly available high-quality annotated data is extremely scarce. For example, semantic annotation of ancient Chinese medical texts requires the integration of professional terminology, and after existing models are trained on general corpora, the F1 value drops by more than 30% when migrated to the field of traditional Chinese medicine. In addition, although public data sets such as the "Twenty-Four Histories" contain nearly 20,000 entity annotations, their coverage is concentrated on historical figures and events, and there is insufficient support for semantic types such as literary allusions and philosophical concepts. Semantic understanding of ancient Chinese requires reliance on historical background knowledge (such as rituals and official systems) and cultural allusions (such as allusion analysis). Existing models mostly learn common sense indirectly through pre-training corpora, but lack explicit knowledge integration. Among them, semantic analysis mostly focuses on part-of-speech tagging and entity recognition at the sentence level, and lacks the construction of paragraph-level semantic networks. Summary of the Invention
[0007] The purpose of this invention is to provide an ancient Chinese automatic sentence segmentation and semantic analysis system based on deep learning to solve the above-mentioned problems.
[0008] To achieve the above objectives, the present invention provides the following technical solution: an ancient Chinese automatic sentence segmentation and semantic analysis system based on deep learning, comprising:
[0009] A data input module, for inputting unlabeled ancient Chinese text and corresponding image data, wherein the ancient Chinese text includes classics and inscriptions, and the image data includes image information of inscriptions and bamboo slips;
[0010] A pre-processing module, connected to the data input module, performs cleaning, word segmentation, and preliminary recognition of homophones and variant characters on the ancient Chinese text, and performs denoising, enhancement, and character feature extraction on the image data;
[0011] The sentence segmentation module is connected to the preprocessing module. The sentence segmentation module adopts a deep learning model that integrates the gated recurrent unit (GRU) and the convolutional neural network (CNN), and combines the preprocessed image and glyph features to automatically segment the preprocessed ancient Chinese text to deal with semantic ambiguity, long-distance dependency, and sentence segmentation problems caused by homophones and variant characters.
[0012] The calculation formula of GRU's update gate is ,
[0013] The reset gate calculation formula is ,
[0014] The candidate hidden state calculation formula is: ,
[0015] The hidden state calculation formula is: ;
[0016] A semantic analysis module is connected to the sentence segmentation module. The semantic analysis module constructs an ancient Chinese knowledge graph containing historical and cultural common sense. The module injects the vocabulary relationships and prior knowledge of allusions and cases in the knowledge graph into the deep learning model through the graph neural network, and performs part-of-speech tagging, entity recognition, and chapter-level semantic network construction on the ancient Chinese text after sentence segmentation.
[0017] An output module is connected to the sentence segmentation module and the semantic analysis module, and the output module outputs the sentence segmentation result and the semantic analysis result.
[0018] Furthermore, the data input module can also input bamboo slips texts, unearthed document texts and different types of unlabeled ancient Chinese texts, as well as corresponding image data of different carriers. The data input module transmits the input unlabeled ancient Chinese texts and corresponding image data to the preprocessing module.
[0019] Furthermore, in the preprocessing module, the recognition of homophones adopts a method based on the rules of ancient sound conversion, and the recognition of variant characters is combined with character structure analysis. The preprocessing module transmits the processed ancient Chinese text and image character features to the sentence segmentation module.
[0020] Furthermore, the deep learning model integrating GRU and CNN in the segmentation module is pre-trained with large-scale unlabeled ancient Chinese text and corresponding image data to enhance the segmentation robustness of the segmentation module for complex texts. The segmentation module transmits the segmented ancient Chinese text to the semantic analysis module.
[0021] Furthermore, when processing ancient Chinese texts with long-distance dependencies, the segmentation module uses an attention mechanism to enhance its ability to capture long-distance logical relationships. The calculation formula of the attention mechanism is:
[0022] , , ,
[0023] The sentence segmentation module completes the sentence segmentation based on this and transmits the result to the semantic analysis module.
[0024] Furthermore, the ancient Chinese text knowledge graph in the semantic analysis module also includes various dynamic relationships related to the historical evolution of vocabulary and semantic field associations. The semantic analysis module processes the ancient Chinese text after sentence segmentation based on the knowledge graph.
[0025] Furthermore, the semantic analysis module combines domain knowledge when performing part-of-speech tagging and entity recognition. When processing ancient Chinese texts in different fields of ancient Chinese medical books and historical classics, it calls the professional knowledge sub-graph of the corresponding field, and the semantic analysis module transmits the semantic analysis results to the output module.
[0026] Furthermore, the semantic analysis module adopts self-supervised learning and data enhancement methods, and uses unlabeled corpus to perform masked language modeling and contrastive learning to alleviate the problem of insufficient labeled data. In this way, the semantic analysis module optimizes the processing process and transmits the results to the output module.
[0027] Furthermore, the segmentation results output by the output module include the segmentation position and the segmentation basis, and the semantic analysis results output include the part-of-speech tagging results, entity recognition results and the chapter-level semantic network visualization display. The output module receives the segmentation results from the segmentation module and the semantic analysis results from the semantic analysis module and outputs them.
[0028] Furthermore, it also includes a feedback module connected to the output module, and the feedback module is used to receive user feedback information on the segmentation results and semantic analysis results, and use the feedback information to optimize the deep learning model in the segmentation module and the semantic analysis module. The feedback module forms data interaction with the segmentation module and the semantic analysis module.
[0029] Compared with the existing technology, the ancient Chinese automatic sentence segmentation and semantic analysis system based on deep learning provided by the present invention has the following beneficial effects:
[0030] This deep learning-based automatic sentence segmentation and semantic analysis system for ancient Chinese, which integrates gated recurrent units (GRUs) and convolutional neural networks (CNNs) through the sentence segmentation module and combines image and glyph features, can effectively handle semantic ambiguity, long-distance dependencies, and homophones and variant characters. GRU dynamically captures contextual associations, and CNN extracts local features, supplemented by image information, significantly reducing the error rate of sentence segmentation, especially in the processing of complex texts such as inscriptions and bamboo slips. Through large-scale data pre-training, the system's adaptability to texts of different types and fields is enhanced, and the robustness of the system is greatly improved.
[0031] Through the semantic analysis module, a knowledge graph containing historical and cultural common sense and dynamic vocabulary relationships is constructed, and prior knowledge is injected through the graph neural network to enhance the depth of semantic understanding; combining domain knowledge to call professional sub-graphs, the breadth of application in fields such as ancient Chinese medical books and historical classics is expanded, and part-of-speech tagging and entity recognition are more accurate; self-supervised learning and data enhancement alleviate the problem of insufficient labeled data, helping to build a more complete chapter-level semantic network.
[0032] The output module provides segmentation results with segmentation basis and visual semantic analysis results, allowing users to clearly understand the processing logic and improve trust and convenience; the feedback module forms an iterative optimization mechanism, which continuously improves performance with increasing usage; saves researchers a lot of man-hours and significantly improves academic research efficiency; and the system efficiently processes a large number of unannotated ancient Chinese texts, fully exploring the value of various cultural heritages such as classics and inscriptions; the constructed vocabulary relationship network provides new perspectives and tools for ancient Chinese research, promotes the progress of grammar and vocabulary research, and helps the inheritance and dissemination of ancient Chinese culture. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments described in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0034] Figure 1 It is a schematic diagram of the overall system flow of the present invention;
[0035] Figure 2 It is a schematic diagram of the local system flow of the present invention. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.
[0037] See also Figure 1 、 2, an ancient Chinese automatic sentence segmentation and semantic analysis system based on deep learning, including:
[0038] A data input module is used to input unlabeled ancient Chinese text and corresponding image data, the ancient Chinese text includes classics and inscriptions, and the image data includes image information of inscriptions and bamboo slips;
[0039] The preprocessing module is connected to the data input module. The preprocessing module cleans the ancient Chinese text, performs word segmentation, and performs preliminary recognition of homophones and variant characters, and performs denoising, enhancement, and character feature extraction on the image data.
[0040] The sentence segmentation module is connected to the preprocessing module. It uses a deep learning model that integrates the gated recurrent unit (GRU) and the convolutional neural network (CNN). It combines the preprocessed image and glyph features to automatically segment the preprocessed ancient Chinese text to deal with semantic ambiguity, long-distance dependencies, and sentence segmentation problems caused by homophones and variant characters.
[0041] The calculation formula of GRU's update gate is ,
[0042] The reset gate calculation formula is ,
[0043] The candidate hidden state calculation formula is: ,
[0044] The hidden state calculation formula is: ;
[0045] The semantic analysis module is connected to the sentence segmentation module. The semantic analysis module constructs an ancient Chinese knowledge graph that includes historical and cultural common sense. Through the graph neural network, the vocabulary relationships and prior knowledge of allusions and cases in the knowledge graph are injected into the deep learning model. After the sentence segmentation, the ancient Chinese text is subjected to part-of-speech tagging, entity recognition, and chapter-level semantic network construction.
[0046] The output module connects the sentence segmentation module and the semantic analysis module, and the output module outputs the sentence segmentation results and the semantic analysis results.
[0047] The data input module can also input bamboo slips texts, unearthed document texts and different types of unlabeled ancient Chinese texts, as well as corresponding image data of different carriers. The data input module transmits the input unlabeled ancient Chinese texts and corresponding image data to the preprocessing module.
[0048] The data input module uses a multi-source data interface and supports the input of unannotated ancient Chinese texts in formats such as TXT and PDF, such as classic texts such as "The Analects of Confucius" and "Records of the Grand Historian", as well as image data of inscriptions and bamboo slips in JPG and PNG formats; for the input text and image data, the module will perform format verification to ensure that the data meets the subsequent processing requirements, and then synchronously transmit it to the preprocessing module.
[0049] In the preprocessing module, the recognition of homophones adopts a method based on the ancient sound conversion rules, and the recognition of variant characters is combined with the character structure analysis. The preprocessing module transmits the processed ancient Chinese text and image character shape features to the segmentation module; for the ancient Chinese text, it is first cleaned to remove redundant symbols, garbled codes and other interference information; then the word segmentation method based on the dictionary and statistics is used for word segmentation; for homophones, a recognition rule library is constructed according to the ancient sound conversion rules in "Shuowen Jiezi" and "The Great Dictionary of Ancient Chinese Homophones" for preliminary recognition; for variant characters, combined with the character structure features, recognition is carried out by comparing with the standard character library; for image data, Gaussian filtering is used for denoising, histogram equalization is used for enhancement, and then the character shape features are extracted through the edge detection algorithm; after the processing is completed, the preprocessed ancient Chinese text and image character shape features are transmitted to the segmentation module.
[0050] The deep learning model that integrates GRU and CNN in the segmentation module is pre-trained using large-scale unlabeled ancient Chinese text and corresponding image data to enhance the segmentation robustness of the module for complex texts. The segmentation module transmits the segmented ancient Chinese text to the semantic analysis module.
[0051] When processing ancient Chinese texts with long-distance dependencies, the segmentation module uses an attention mechanism to enhance its ability to capture long-distance logical relationships. The calculation formula of the attention mechanism is:
[0052] , , ,
[0053] The segmentation module completes the segmentation based on this and transmits the results to the semantic analysis module.
[0054] The ancient Chinese text knowledge graph in the semantic analysis module also includes the historical evolution of vocabulary, various dynamic relationships related to semantic fields, and the semantic analysis module processes the ancient Chinese text after sentence segmentation based on this knowledge graph; it constructs an ancient Chinese knowledge graph, which includes historical and cultural common sense, such as ancient rituals, official systems, etc. The construction of the knowledge graph is completed by crawling authoritative ancient book databases, academic literature and other resources, and is completed through manual review and proofreading.
[0055] The semantic analysis module combines domain knowledge when performing part-of-speech tagging and entity recognition. When processing ancient Chinese texts in different fields such as ancient Chinese medical books and historical classics, the semantic analysis module calls the corresponding domain-specific knowledge sub-graph. The semantic analysis module transmits the semantic analysis results to the output module.
[0056] The graph neural network is used to inject prior knowledge from the knowledge graph into the deep learning model for part-of-speech tagging and entity recognition of ancient Chinese texts after sentence segmentation. When processing texts in different fields, such as ancient Chinese medical books, the domain-specific knowledge sub-graph is called, which contains professional information such as Chinese medical terms and acupoint names.
[0057] The semantic analysis module uses self-supervised learning and data augmentation methods to perform mask language modeling and contrastive learning using unlabeled data to alleviate the problem of insufficient labeled data. The semantic analysis module optimizes the processing process and transmits the results to the output module.
[0058] The output module outputs the sentence segmentation results, including the sentence segmentation positions and the basis for sentence segmentation. The semantic analysis results include part-of-speech tagging results, entity recognition results, and chapter-level semantic network visualization. The output module receives the sentence segmentation results from the sentence segmentation module and the semantic analysis results from the semantic analysis module and outputs them. The sentence segmentation results are organized and the sentence segmentation positions and basis are clearly marked, such as based on context semantics and grammar rules. The semantic analysis results are processed to generate part-of-speech tagging results and entity recognition results, and the chapter-level semantic network is displayed in a graphical format using visualization technology. Finally, these results are output to the user in a clear and understandable format.
[0059] The system also includes a feedback module connected to the output module. The feedback module receives user feedback on the sentence segmentation results and semantic analysis results and uses the feedback to optimize the deep learning models in the sentence segmentation module and semantic analysis module. The feedback module interacts with the sentence segmentation module and semantic analysis module.
[0060] I. Training and usage of the gated recurrent unit (GRU) and convolutional neural network (CNN) fusion model
[0061] Model training process
[0062] The sentence segmentation model training is divided into three stages:
[0063] Data preparation stage: Collect 100,000 pieces of ancient Chinese text with annotated sentence segmentation (covering classics, history, and children's books) and 30,000 pieces of stele and bamboo slip images. Construct training set (80%), validation set (10%), and test set (10%). The text part is annotated with sentence segmentation positions (such as “,” “.” “?”), and the image part is annotated with corresponding standard characters for different characters and ambiguous characters.
[0064] Pre-training: Using an unsupervised pre-training approach, the ancient Chinese text was converted into character vectors (using one-hot encoding combined with ancient Chinese glyph feature embedding, with a dimension of 256) and fed into a GRU-CNN fusion model. A two-layer GRU with a hidden layer dimension of 512 was used to capture sequential dependencies. The CNN layer used three convolutional kernels of different sizes (3×256, 5×256, and 7×256) to extract local glyph features. The pre-training objective was "masked segmentation prediction," which involved randomly masking 15% of the segmentation markers and using the model to predict the segmentation type at the masked location. The loss function used was cross-entropy.
[0065] Fine-tuning: Supervised fine-tuning was performed based on annotated data. Preprocessed text and image glyph features were input (image features were extracted using ResNet50 and concatenated with the text vector). The output layer used a softmax function to predict the probability of sentence segmentation. The learning rate was adjusted based on the F1 score (sentence segmentation accuracy) on the validation set (initial 0.001, decaying by 10% every three epochs). Training was iterated until performance on the validation set showed no improvement for five consecutive epochs. The model achieved a sentence segmentation F1 score of 92.3% on the test set.
[0066] How to use the model
[0067] For the input unlabeled ancient Chinese text and image data, the preprocessing module outputs the text word vector and image feature vector, which are then input into the trained GRU-CNN model:
[0068] The GRU layer is based on the formula Calculate the update gate and decide to keep the historical hidden state proportion; through Calculate the reset gate to control the use of historical information; finally, Generate the current hidden state to capture the long-range dependencies of the text sequence.
[0069] The CNN layer performs convolution operations on the text vector to extract the local features of function words such as "zhihuzheya", and after splicing them with the sequence features output by GRU, the fully connected layer predicts the sentence position.
[0070] 2. The relationship between the formula and the technical solution of this application is explained as follows:
[0071] Adaptation of the GRU formula
[0072] In the processing of ancient Chinese, the sentence segmentation weights of function words such as “之” and “而” need to be adjusted dynamically, so the update gate The weight matrix During training, the function word position will be tilted. For example, when inputting "学而时习之", the feature of "而" as a conjunction will make The value increases (close to 1), strengthening the capture of the subsequent "时习之", which is in line with the rule of "function words determine sentence reading" in ancient Chinese. The customization of the attention mechanism formula is based on the antithetical structure of ancient Chinese long sentences (such as parallel prose). The energy function of the attention mechanism middle, The function is designed to integrate the calculation of part-of-speech similarity: ,in is the position distance penalty term, It is an adjustable parameter (default 0.3). For example, when processing "The setting sun and the solitary wild goose fly together, and the autumn water and the sky are the same color", the model will use the attention weight Strengthen the connection between "sunset clouds" and "autumn water", "lone wild goose" and "long sky", and assist in sentence punctuation.
[0073] 3. Specific implementation of graph neural network (GNN) injection into knowledge graph:
[0074] Knowledge graph construction
[0075] The knowledge graph consists of an entity layer (vocabulary, allusions, historical events, etc.) and a relationship layer (semantic evolution, allusion associations, etc.), and is stored in Neo4j. Example nodes and relationships are as follows: Entity: "Wending" (allusion), "King Zhuang of Chu" (character), "Zuo Zhuan" (document); Relationship: "Wending → from → Zuo Zhuan", "Wending → involving → King Zhuang of Chu", "Wending → semantic evolution → coveting political power (after the Han Dynasty)"; Knowledge embedding fusion of GNN and deep learning model: The TransE algorithm is used to convert entities and relationships in the knowledge graph into low-dimensional vectors (dimension 128). For example, the vector of "Wending" contains semantic features such as "allusion" and "decline of the Zhou Dynasty". Graph convolution operation: In the semantic analysis module, the text sequence vector (from the GRU output) and the knowledge graph vector after sentence segmentation are input into the GNN, and the graph convolution formula is used:
[0076] Update node features, where For nodes Output fusion: The knowledge-enhanced vector output by the GNN is concatenated with the text vector and input into the Bi-GRU for part-of-speech tagging and entity recognition. For example, when identifying the metaphorical meaning of "asking for power" in a specific context, the knowledge vector will strengthen the feature weight of "political power covetousness."
[0077] 4. Specific operation methods of self-supervised learning and data enhancement:
[0078] Masked Language Modeling (MLM)
[0079] Unlabeled corpus (e.g., unpunctuated text from the Siku Quanshu) is randomly masked: 15% of the masking ratio is used, with 80% replaced with "[MASK]," 10% replaced with random ancient Chinese words, and 10% remaining unchanged. The training objective is to predict the words at the masked positions, and the loss function uses cross-entropy to enable the model to learn the contextual associations of words (e.g., in the sentence "学而时习之,不[MASK]说乎," the model needs to predict "亦"). Contrastive learning data augmentation:
[0080] Generate two positive samples for the same sentence (e.g., replace homophones: "罢歹" → "腹歹"; adjust word order: "吾谁与归" → "吾与谁归") and one negative sample (randomly replace core words: "吾谁与归" → "吾谁与战"). Training objectives:
[0081] By contrastive loss:
[0082] ;
[0083] is the cosine similarity, The temperature parameter is 0.07, which makes the similarity of positive sample pairs higher than that of negative sample pairs, and enhances the robustness of the model to homophones and sentence structure transformations.
[0084] Example 1: Automatic Sentence Segmentation and Semantic Analysis Based on Ordinary Classical Texts
[0085] Taking the quote from The Analects of Confucius, “Isn’t it a pleasure to learn with a constant practice? Is it not a joy to have friends coming from distant quarters? Is he not a gentleman who does not feel irritated when people do not know him?” as an example, the specific application process of the system is demonstrated.
[0086] The data input module receives the unlabeled ancient Chinese text (TXT format) and transmits it to the preprocessing module after format verification; the preprocessing module cleans the text and removes possible redundant spaces; a dictionary-based word segmentation method is used to preliminarily segment the text into "学 / 而 / 时 / 习 / 之 / 不 / 也 / 说 / 乎 / 有 / 的朋友 / 从 / 远 / 方 / 来 / / 是 / 亦 / 乐 / 乎 / 人 / 不 / 知 / 而 / 不 / 恨 / 不 / 不 / 儠 / 不 / 也 / 君 / 子 / 乎"; because there are no homophones or variant characters in the text, the preprocessed text is directly transmitted to the sentence segmentation module.
[0087] The sentence segmentation module uses a deep learning model that integrates GRU and CNN. GRU captures contextual associations according to its calculation formulas such as update gate and reset gate, and CNN extracts local features. The model combines text features to determine the sentence segmentation position. At the same time, because the text does not have long-distance dependency complexities, the attention mechanism is not activated. The final sentence segmentation result is "Isn't it a pleasure to learn and practice it from time to time? Isn't it a pleasure to have friends coming from afar? Isn't it a gentleman to not be upset when people don't know him?" and transmit the result to the semantic analysis module.
[0088] The semantic analysis module calls the ancient Chinese knowledge graph to perform part-of-speech tagging on the text after segmentation, such as "学 (verb), 而 (conjunction), 时 (noun)", etc.; it identifies entities such as "朋 (noun, referring to friends)"; it constructs a chapter-level semantic network to reflect the parallel relationship between sentences; the semantic analysis results are transmitted to the output module, and the output module displays the segmentation results, part-of-speech tagging, entity recognition and semantic network in a clear format; if the user has no feedback, the system maintains the current state; if there is feedback, the feedback module uses the information for model optimization.
[0089] Example 2: Automatic Sentence Segmentation and Semantic Analysis Based on Stele Inscription Image Text
[0090] Taking the text in a Tang Dynasty stele image (JPG format) as an example, the text contains some variant characters and blurred handwriting, and the content is "On a certain day of a certain month in the Kaiyuan period of the Tang Dynasty, the king's taboo name was so-and-so, his courtesy name was so-and-so, and he was from Hedong."
[0091] The data input module receives the stele image data and transmits it to the preprocessing module after format verification. The preprocessing module performs Gaussian filtering to remove noise and histogram equalization to enhance the image, and extracts glyph features using an edge detection algorithm. It also identifies the text content in the image and identifies variants of the character "taboo" (taboo) as "taboo" by comparing them with a standard glyph library. The preprocessed text and glyph features are then transmitted to the sentence segmentation module. The sentence segmentation module integrates GRU and CNN models. The GRU captures text sequence associations and the CNN extracts local features. Image glyph features are also introduced to assist in judgment. For the longer time expression "On a certain day of a certain month in the Kaiyuan period of the Tang Dynasty," the attention mechanism is used to enhance the capture of long-distance logical relationships. The final sentence segmentation is "On a certain day of a certain month in the Kaiyuan period of the Tang Dynasty, the taboo was so-and-so, the courtesy name was so-and-so, and he was from Hedong." The result is then transmitted to the semantic analysis module.
[0092] The semantic analysis module calls on the knowledge graph containing common knowledge such as ancient official positions and geography, and performs part-of-speech tagging and entity recognition on the text after sentence segmentation, such as "Datang (noun, referring to the Tang Dynasty), Hedong (noun, referring to a place name)", etc.; it constructs a semantic network to reflect the subordinate relationship of each part of information; the output module displays relevant results, and the feedback module receives user feedback and uses it to optimize the model.
[0093] Example 3: Automatic Sentence Segmentation and Semantic Analysis Based on Ancient Chinese Medical Texts
[0094] Take the text in an ancient Chinese medical book (PDF format) as an example: "Typhoid fever for five or six days with alternating chills and fever, fullness and pain in the chest and flanks, hoarseness, loss of appetite, irritability, and nausea, or chest discomfort without vomiting, or thirst, or abdominal pain, or hardness and distension under the flanks."
[0095] The data input module receives the text and transmits it to the preprocessing module after verification; the preprocessing module cleans the text, segments the words, identifies the professional terms of traditional Chinese medicine, and removes homophones and variant characters, and transmits the processed text to the sentence segmentation module.
[0096] The GRU and CNN models of the sentence segmentation module combine text features for sentence segmentation. For long sentences containing multiple symptom descriptions, the attention mechanism is enabled to capture the logical relationship between the symptoms. The sentence segmentation result is "Typhoid fever for five or six days, stroke, alternating chills and fever, bitter fullness and pain in the chest and flanks, loss of appetite, restlessness and nausea, or chest restlessness without vomiting, or thirst, or abdominal pain, or hardness and distension under the ribs." This is transmitted to the semantic analysis module.
[0097] The semantic analysis module calls the sub-graph of professional knowledge in the field of traditional Chinese medicine to perform part-of-speech tagging on the text, such as "typhoid fever (noun, TCM disease name), stroke (noun, TCM disease name)", etc.; identifies entities such as "chest and flank (noun, human body part), hardness of the abdomen (noun, TCM symptom)"; constructs a semantic network to reflect the parallel and association relationships between symptoms; the output module displays the results, and the feedback module collects user feedback on the processing of professional terms to optimize the sub-graph and model in the field of traditional Chinese medicine.
[0098] The above description is merely illustrative of certain exemplary embodiments of the present invention. It goes without saying that those skilled in the art will be able to modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the above drawings and description are illustrative in nature and should not be construed as limiting the scope of protection of the claims.
Claims
1. The ancient Chinese automatic sentence segmentation and semantic analysis system based on deep learning is characterized by: include: A data input module, for inputting unlabeled ancient Chinese text and corresponding image data, wherein the ancient Chinese text includes classics and inscriptions, and the image data includes image information of inscriptions and bamboo slips; A pre-processing module, connected to the data input module, performs cleaning, word segmentation, and preliminary recognition of homophones and variant characters on the ancient Chinese text, and performs denoising, enhancement, and character feature extraction on the image data; The sentence segmentation module is connected to the preprocessing module. The sentence segmentation module adopts a deep learning model that integrates the gated recurrent unit (GRU) and the convolutional neural network (CNN), and combines the preprocessed image and glyph features to automatically segment the preprocessed ancient Chinese text to deal with semantic ambiguity, long-distance dependency, and sentence segmentation problems caused by homophones and variant characters. The calculation formula of GRU's update gate is , The reset gate calculation formula is , The candidate hidden state calculation formula is: , The hidden state calculation formula is: ; A semantic analysis module is connected to the sentence segmentation module. The semantic analysis module constructs an ancient Chinese knowledge graph containing historical and cultural common sense. The module injects the vocabulary relationships and prior knowledge of allusions and cases in the knowledge graph into the deep learning model through the graph neural network, and performs part-of-speech tagging, entity recognition, and chapter-level semantic network construction on the ancient Chinese text after sentence segmentation. An output module is connected to the sentence segmentation module and the semantic analysis module, and the output module outputs the sentence segmentation result and the semantic analysis result.
2. The ancient Chinese automatic sentence segmentation and semantic analysis system based on deep learning according to claim 1 is characterized in that: The data input module can also input bamboo slips text, unearthed document text and different types of unlabeled ancient Chinese text, as well as corresponding image data of different carriers. The data input module transmits the input unlabeled ancient Chinese text and corresponding image data to the preprocessing module.
3. The ancient Chinese automatic sentence segmentation and semantic analysis system based on deep learning according to claim 1 is characterized in that: In the preprocessing module, the recognition of homophones adopts a method based on the rules of ancient pronunciation conversion, and the recognition of variant characters is combined with character shape structure analysis. The preprocessing module transmits the processed ancient Chinese text and image character shape features to the sentence segmentation module.
4. The ancient Chinese automatic sentence segmentation and semantic analysis system based on deep learning according to claim 1 is characterized in that: The deep learning model integrating GRU and CNN in the segmentation module is pre-trained with large-scale unlabeled ancient Chinese text and corresponding image data to enhance the segmentation robustness of the segmentation module for complex texts. The segmentation module transmits the segmented ancient Chinese text to the semantic analysis module.
5. The ancient Chinese automatic sentence segmentation and semantic analysis system based on deep learning according to claim 1 is characterized in that: When processing ancient Chinese texts with long-distance dependencies, the segmentation module uses an attention mechanism to enhance its ability to capture long-distance logical relationships. The calculation formula of the attention mechanism is: , , , The sentence segmentation module completes the sentence segmentation based on this and transmits the result to the semantic analysis module.
6. The ancient Chinese automatic sentence segmentation and semantic analysis system based on deep learning according to claim 1 is characterized in that: The ancient Chinese text knowledge graph in the semantic analysis module also includes various dynamic relationships related to the historical evolution of vocabulary and semantic field associations. The semantic analysis module processes the ancient Chinese text after sentence segmentation based on the knowledge graph.
7. The ancient Chinese automatic sentence segmentation and semantic analysis system based on deep learning according to claim 1 is characterized in that: The semantic analysis module combines domain knowledge when performing part-of-speech tagging and entity recognition. When processing ancient Chinese texts in various fields such as ancient Chinese medical books and historical classics, it calls the professional knowledge sub-graph of the corresponding field. The semantic analysis module transmits the semantic analysis results to the output module.
8. The ancient Chinese automatic sentence segmentation and semantic analysis system based on deep learning according to claim 1 is characterized in that: The semantic analysis module adopts the method of self-supervised learning and data enhancement, and uses unlabeled corpus to perform masked language modeling and contrastive learning to alleviate the problem of insufficient labeled data. The semantic analysis module optimizes the processing process in this way and transmits the results to the output module.
9. The ancient Chinese automatic sentence segmentation and semantic analysis system based on deep learning according to claim 1 is characterized in that: The segmentation results output by the output module include the segmentation position and the segmentation basis, and the semantic analysis results output include the part-of-speech tagging results, entity recognition results and chapter-level semantic network visualization display. The output module receives the segmentation results from the segmentation module and the semantic analysis results from the semantic analysis module and outputs them.
10. The ancient Chinese automatic sentence segmentation and semantic analysis system based on deep learning according to claim 1 is characterized in that: It also includes a feedback module connected to the output module. The feedback module is used to receive user feedback information on the segmentation results and semantic analysis results, and use the feedback information to optimize the deep learning models in the segmentation module and the semantic analysis module. The feedback module forms data interaction with the segmentation module and the semantic analysis module.
Citation Information
Patent Citations
An integrated automatic lexical analysis method and system for Classical Chinese texts
CN109829159B
integrated automatic lexical analysis method and system for ancient Chinese texts
CN109829159A
Method and device for sentence segmentation of ancient Chinese and storage medium
CN110909549A
Ancient book text sentence segmentation method and device and ancient book text sentence segmentation model training method
CN115577680A
Traditional Chinese medicine classics semantic analysis method and system combined with knowledge graph
CN117236342A
Cited By
Ancient book text labeling method and system based on graph neural network
CN121457439A
