Tibetan text summary generation method and system

Through the double-layer bidirectional GRU neural network and encoding-decoding module, combined with TextRank and word vector model, the problem of low readability in Tibetan text summary generation is solved, and the readability and novelty of the summary are improved, especially in processing OOV words and redundant information.

CN111984782BInactive Publication Date: 2024-09-17MINZU UNIVERSITY OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010622638.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-01
Publication Date
2024-09-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology has the problem of low readability when generating Tibetan text summaries, mainly due to the difficulty of extracting key information by neural networks, vanishing and exploding gradient problems, the lack of large-scale text summarization label training data, and the vocabulary caused by word abstract summarization. external issues.

Method used

Using a double-layer bidirectional GRU neural network module and encoding-decoding module, the encoding end adds an attention mechanism, and the decoding end adds a pointer network. It combines the TextRank algorithm and word vector model to perform preprocessing and labeling of training clauses to generate understandable text. Abstract, solve the problems of OOV word processing accuracy and redundant information.

Benefits of technology

The readability and novelty of Tibetan text summaries are improved. By refining sentences that express the main idea of ​​the original text, removing redundant information, and using pointer networks to process OOV words on the decoding end, the quality and coverage of the summaries are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111984782B
    Figure CN111984782B
Patent Text Reader

Abstract

The present invention provides a Tibetan text summary generation method and system, and relates to the technical field of text information processing. The present invention performs preprocessing on the Tibetan text; based on a preset summary model and based on the preset summary model and the preprocessed Tibetan text, obtains an understandable text summary of the Tibetan text. Wherein: the summary model includes a double-layer bidirectional GRU neural network module and an encoding-decoding module; an attention mechanism is added to the encoding end of the encoding-decoding module, and a pointer network is added to the decoding end. The present invention uses the double-layer bidirectional GRU neural network module in the summary model to extract sentences that can express the main idea of ​​the original text from the preprocessed Tibetan text, remove redundant information, and facilitate the subsequent processing process, and then uses the encoding-decoding in the preset summary model to generate an understandable text summary. The present invention uses the pointer network at the decoding end of the encoding-decoding module to improve the processing accuracy of Tibetan OOV words, and improve the readability and novelty of the summary.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of text information processing, and in particular to a Tibetan text summary generation method and system. Background Art

[0002] With the explosive growth of information, people are facing the problem of information overload, and it is difficult to obtain valuable information efficiently, quickly and accurately. In order to solve this problem, automatic text summarization technology has emerged to generate a concise representation of the input text. Automatic text summarization is an important branch in the field of natural language processing. It is an information compression technology that uses computers to implement text analysis, content induction and automatic summary generation. It is closely related to text generation and information extraction. In addition, it can help analyze and summarize longer news and filter out redundant information, thereby increasing the speed of browsing news.

[0003] With the development of deep learning technology, the encoding-decoding module based on the attention mechanism has achieved good results in abstract summarization. First, it is difficult for neural networks to extract the key information of Tibetan news, which is prone to problems such as gradient disappearance and explosion. Secondly, there is a lack of large-scale text summary labeled training data. Finally, word-based abstract summarization may cause out-of-vocabulary (OOV out-of-vocabulary) problems, thus affecting the readability of the summary. Summary of the invention

[0004] 1. Technical issues to be resolved

[0005] In view of the deficiencies of the prior art, the present invention provides a Tibetan text summary generation method and system, which solves the technical problem that the summaries generated by the existing Tibetan text summary generation methods have low readability.

[0006] (II) Technical solution

[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions:

[0008] The present invention provides a Tibetan text summary generation method, comprising the following steps:

[0009] Get the Tibetan text for which the summary is to be generated;

[0010] Preprocessing the Tibetan text;

[0011] A comprehensible text summary of a Tibetan text is obtained based on a preset summary model and preprocessed Tibetan text; wherein: the preset summary model includes a two-layer bidirectional GRU neural network module and an encoding-decoding module; an attention mechanism is added to the encoding end of the encoding-decoding module, and a pointer network is added to the decoding end.

[0012] Preferably, the pretreatment comprises:

[0013] The CRF method is used to segment Tibetan text, filter out stop words, and build a vocabulary; and then segment sentences according to Tibetan marginal symbols to obtain clauses.

[0014] Preferably, the process of constructing the preset summary model includes:

[0015] Obtain the Tibetan text set required for training;

[0016] Preprocess the Tibetan text set to obtain initial clauses;

[0017] The preprocessed Tibetan text set is labeled based on the TextRank algorithm to obtain model training clauses;

[0018] The model training clause is input into the summary model to train the summary model.

[0019] Preferably, the step of labeling the preprocessed Tibetan text set based on the TextRank algorithm to obtain the model training clauses includes:

[0020] Each initial clause is added as a node to the topological graph G = (V, E); where G represents an undirected graph; V is a set of vertices, representing the initial clauses of the set in the Tibetan text; E is a set of edges, representing the relationship between the initial clauses;

[0021] Two different word vector models, word2vec and fasttext, are used to map the initial clauses to a high-dimensional vocabulary and represent them in vector form. Each initial clause is converted into a sentence vector according to the word vector file. The vector representation of the initial clause is the average value of all word vectors of the same dimension. The edge represents the similarity between the initial clauses. The formula is as follows:

[0022] WS(S i ,S j )=cos(S i1 ...S in ,S j1 ...S jn )

[0023] in:

[0024] WS(S i ,S j ) represents the similarity of words; S i and S j Represents word vector; cos represents the cosine distance between words; n represents the size of the word vector dimension;

[0025] The algorithm is iterated until convergence, and the calculation formula is as follows:

[0026]

[0027] WS(V i ) represents any word V i The weight of; d represents the Gini coefficient; W ij Represents node V i , V j The weight of the edge between i ) points to node V i The node set of Out(V i ) is point V i The set of nodes pointed to;

[0028] Calculate the similarity between each node and the nodes connected to it, and calculate the proportion of the similarity in the connected nodes and iterate;

[0029] The vectors of each word are superimposed and averaged to obtain the sentence vector, and then the weight of each initial clause in the Tibetan text set is iterated. The weights of the first k initial clauses with the highest weights are recalculated according to the following formula, and the first n sentences with the latest weight values ​​are selected as model training clauses, where n <k:

[0030] X i =(X1 f1+X2 f2+...X k f k ) / n

[0031] in:

[0032] X i Indicates the latest weight value of sentence i; f1+f2+...+f k =n,f1,f2,…,f k It is called weight; X1 to X k-1 represents the similarity between the initial clause and other k-1 initial clauses with high weights; X k Indicates the similarity between the initial clause and the topic sentence; f1 to f k Represents the weighted value, where f1 to f k-1 It represents the penalty coefficient, which has the effect of reducing the weight, f k It indicates the similarity with the topic sentence and has the effect of increasing the weight.

[0033] Preferably, the step of inputting the model training clause into the summary model to train the summary model includes:

[0034] Inputting the model training clause into the double-layer bidirectional GRU neural network, training the double-layer bidirectional GRU neural network, completing the training of the double-layer bidirectional GRU neural network, and obtaining the final training clause;

[0035] The final training clause is input into the encoding-decoding module to complete the training of the encoding-decoding module.

[0036] Preferably, the encoding-decoding module comprises:

[0037] Two recurrent neural networks, the first neural network is used to receive the final training sentence and encode the final training sentence into a content vector, and the second neural network is used to decode the content vector to generate an understandable text summary.

[0038] Preferably, the calculation formula of the attention mechanism is as follows:

[0039] Y i =softmax(S t )

[0040]

[0041] e i,j =a(s i-1 ,h j )

[0042]

[0043] in:

[0044] Y i is the i-th word of the generated summary, represented by Y i-1 ,s i , c i Three states determine; i Represents the hidden state at time i, represented by c i ,s i-1 , Y i-1 Decision; i represents the content vector after the attention mechanism weights; e i,j Represents the hidden state s in the decoding stage i With the encoding state h ij The linear combination of ij It represents the encoding state, representing the encoding vector from word i to word j; α i,j represents the weight of each word learned by the attention mechanism; e i,k Represents the hidden state s in the decoding stage i With the encoding state h ik The linear combination of ik It represents the encoding state, which represents the encoding vector from word i to word k.

[0045] Preferably, the pointer network comprises:

[0046] The softmax function is used to convert the attention distribution and the encoder hidden state into a pointer to the input sequence. The calculation formula is as follows:

[0047] p(C i |C1,...,C i-1 ,X)=soft max(e t )

[0048] in:

[0049] C i Represents the content vector after the attention mechanism weights;

[0050] X represents the input sequence;

[0051]

[0052] e t Represents the vector of the decoder's attention to the encoder at each moment at time t;

[0053] Indicates the attention of the decoder at time t1 to the encoder at time t1;

[0054] Indicates that the input is the e corresponding to the last moment t ;

[0055] S t is the output of the decoder at time t; h t1 is the output of the encoder at time t1;

[0056] v,W h , W s They all represent learnable parameters.

[0057] The present invention also provides a Tibetan text summary generation system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method when executing the computer program.

[0058] (III) Beneficial effects

[0059] The present invention provides a Tibetan text summary generation method and system. Compared with the prior art, it has the following beneficial effects:

[0060] The present invention first obtains a Tibetan text for which a summary is to be generated; then preprocesses the Tibetan text; and obtains an understandable text summary of the Tibetan text based on a preset summary model and the preprocessed Tibetan text. Wherein: the summary model includes a double-layer bidirectional GRU neural network module and an encoding-decoding module; an attention mechanism is added to the encoding end of the encoding-decoding module, and a pointer network is added to the decoding end. The present invention uses a double-layer bidirectional GRU neural network module in a preset summary model to extract sentences that can express the main idea of ​​the original text from the preprocessed Tibetan text, remove redundant information, and facilitate the subsequent processing process, and then uses the encoding-decoding in the preset summary model to generate an understandable text summary. The present invention uses a pointer network at the decoding end of the encoding-decoding module to improve the processing accuracy of Tibetan OOV words and improve the readability and novelty of the summary. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0062] Figure 1 A block diagram of a Tibetan text summary generation method according to an embodiment of the present invention;

[0063] Figure 2 Schematic diagram of the framework of the encoding-decoding module in an embodiment of the present invention;

[0064] Figure 3 Schematic diagram of the framework of the attention mechanism in an embodiment of the present invention;

[0065] Figure 4 It is a flow chart of Tibetan news preprocessing in the verification process of the embodiment of the present invention;

[0066] Figure 5 A bar chart showing the time used by each model in the verification process of the embodiment of the present invention;

[0067] Figure 6 A bar chart showing the evaluation results of keyword coverage of extractive summaries in the verification process of an embodiment of the present invention;

[0068] Figure 7 It is a line chart of the Rouge-1 evaluation results during the verification process of the embodiment of the present invention;

[0069] Figure 8 It is a line chart of the Rouge-2 evaluation results during the verification process of the embodiment of the present invention;

[0070] Fig. 9It is a line chart of the Rouge-3 evaluation results during the verification process of the embodiment of the present invention;

[0071] Fig.10 It is a bar chart of the evaluation results of keyword coverage of comprehension-based summaries in the verification process of an embodiment of the present invention. DETAILED DESCRIPTION

[0072] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0073] The embodiment of the present application provides a Tibetan text summary generation method, which solves the technical problem that the readability of summaries generated by existing Tibetan text summary generation methods is low, thereby improving the readability of the summaries.

[0074] The technical solution in the embodiment of the present application is to solve the above technical problems, and the overall idea is as follows:

[0075] The embodiment of the present invention proposes a summary model, which divides the task into two stages. In the first stage, a two-layer bidirectional GRU neural network module extracts sentences that can represent and cover the information content of the original text, thereby greatly reducing the length of the input text of the encoding-decoding module. The second stage adopts an encoding-decoding module, and according to the results extracted in the first stage, the sentence set is encoded into a vector containing the semantics of the original text, and then the vector is decoded. In the process of generating the summary, a pointer network is introduced to solve the problem of unregistered words (unregistered words refer to some uncommon names of people, places, and names of organizations). Words that do not appear in the vocabulary can be generated in the summary, which improves the quality of the summary, and a coverage mechanism is introduced in the loss function to solve the problem of semantic duplication in the generated summary.

[0076] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0077] The embodiment of the present invention provides a Tibetan text summary generation method, such as Figure 1 As shown, it includes steps S1 to S3:

[0078] S1. Obtaining a Tibetan text for which a summary is to be generated;

[0079] S2, preprocessing the Tibetan text;

[0080] S3. Obtain an understandable text summary of the Tibetan text based on a preset summary model and the preprocessed Tibetan text; wherein: the summary model includes a two-layer bidirectional GRU neural network module and an encoding-decoding module; an attention mechanism is added to the encoding end of the encoding-decoding module, and a pointer network is added to the decoding end.

[0081] The embodiment of the present invention uses a two-layer bidirectional GRU neural network module in a preset summary model to extract sentences that can express the main idea of ​​the original text from the preprocessed Tibetan text, remove redundant information, and speed up the subsequent processing process, and then uses the encoding-decoding in the preset summary model to generate a comprehensible text summary. The embodiment of the present invention uses a pointer network at the decoding end of the encoding-decoding module to improve the processing accuracy of Tibetan OOV words and improve the readability and novelty of the summary.

[0082] Each step is described in detail below.

[0083] In one embodiment, S1, obtain a Tibetan text for which a summary is to be generated. The specific implementation process is as follows:

[0084] The Tibetan text for which the summary is to be generated is obtained by manual input or web crawler technology. In the embodiment of the present invention, the Tibetan text can be text content such as documents, news, microblogs, etc.

[0085] In one embodiment, S2, preprocessing the Tibetan text. The specific implementation process is as follows:

[0086] Considering the characteristics of Tibetan, the Tibetan text is preprocessed as follows:

[0087] The CRF method is used to segment Tibetan text, filter out stop words, build a vocabulary, and sort according to Tibetan marginal symbols. Perform sentence segmentation, that is, divide the Tibetan text into clauses to obtain clauses.

[0088] In one embodiment, S3, based on a preset summary model and the preprocessed Tibetan text, a comprehensible text summary of the Tibetan text is obtained; wherein: the preset summary model includes a two-layer bidirectional GRU neural network module and an encoding-decoding module; an attention mechanism is added to the encoding end of the encoding-decoding module, and a pointer network is added to the decoding end. The specific implementation process is as follows:

[0089] The construction process of the preset summary model includes:

[0090] A1. Obtain the Tibetan text set required for training. Specifically:

[0091] Acquire a Tibetan text set by using a web crawler technology (in the embodiment of the present invention, the Tibetan text is selected from news text);

[0092] A2. Preprocess the Tibetan text set to obtain the initial clauses. Specifically:

[0093] Filter out the news texts that contain garbled Chinese characters or contain only one or two sentences of noise by searching for utf8.

[0094] The CRF method is used to segment the news text, filter out stop words, build a vocabulary, and use Tibetan border symbols to identify the word list. Perform sentence segmentation, that is, divide the news text into clauses to obtain initial clauses.

[0095] A3. Based on TextRank, the pre-processed Tibetan text set is labeled to obtain model training clauses. Specifically:

[0096] Generate a topological graph of Tibetan text, represented by G = (V, E). G represents an undirected graph, V is a set of vertices, that is, the initial clauses of the set in the Tibetan text. E is a set of edges, representing the relationship between the initial clauses. Use the TextRank algorithm to iterate until convergence. Then, each vertex has a score representing the importance of the sentence. The process mainly consists of the following steps:

[0097] A301. Add each initial clause as a node to the topology graph G = (V, E).

[0098] A302, using two different word vector models, word2vec and fasttext, maps the initial clauses to a high-dimensional word library and represents them in vector form, and converts each initial clause into a sentence vector according to the word vector file. The vector representation of the initial clause is the average of all word vectors of the same dimension. The edge represents the similarity between the initial clauses, and the formula is as follows:

[0099] WS(S i ,S j )=cos(S i1 ...S in ,S j1 ...S jn )

[0100] in:

[0101] WS(S i ,S j ) represents the similarity of words; S i and S j Represents word vector; cos represents the cosine distance between words; n represents the size of the word vector dimension.

[0102] S303, iterate the algorithm until convergence, the calculation formula is as follows:

[0103]

[0104] Wherein:

[0105] WS(V i ) represents the weight of any word (node) V i ; d represents the Gini coefficient, which is generally set to 0.85; W ij represents the weight of the edge between nodes V i , V j ; In(V i ) is the set of nodes pointing to node V i ; Out(V i ) is the set of nodes pointed to by node V i .

[0106] Calculate the similarity between each node and its connected nodes, and calculate the proportion of the similarity in its connected nodes and then iterate.

[0107] S304. During the process of sentence extraction, the vectors of each word are superimposed and averaged to obtain a sentence vector, and then iterate to obtain the weight of each initial clause in the Tibetan text set. The topic information is introduced during the process of sentence extraction, and the sentences with a large similarity to the title are assigned a greater weight. Finally, the sentence with the highest weight is selected as the summary clause. To avoid the problem of statement redundancy, a penalty coefficient is introduced, and the sentences with a higher similarity are multiplied by the penalty coefficient to reduce the weight. Specifically:

[0108] First, superimpose and average the vectors of each word to obtain a sentence vector, and then iterate to obtain the weight of each initial clause in the Tibetan text set. Then, sort according to the weights from high to low, and recalculate the weights of the top k initial clauses with the highest weights according to the following formula, and select the latest weight values of the first n sentences as the model training clauses, where n < k, and both k and n are set according to the actual situation:

[0109] X i =(X1 f1 + X2 f2 +... X k f k ) / n

[0110] Wherein:

[0111] f1 + f2 +... + f k =n, f1, f2,..., f k are called weights; X i represents the latest weight value of sentence i; X1 to X k-1 represent the similarities between this initial clause and the other k - 1 initial clauses with high weights, X k represents the similarity between this initial clause and the topic sentence, f1 to f k are the weighted weight values, where f1 to fk-1 represents the penalty coefficient, which has the effect of reducing the weight, f k Represents the similarity with the topic sentence, which has the effect of increasing the weight. k It is a weighted value and can be set according to actual conditions.

[0112] The training clauses extracted by TextRank are used to represent the preprocessed Tibetan text set as a high-dimensional vector consisting of 0 and 1, where 0 represents that the sentence is not selected and 1 represents that the sentence is selected, as the model training clause. In this way, the sentence extraction problem can be abstracted into a sequence labeling problem or a binary classification problem of a sentence.

[0113] A4. Input the training clause into the summary model to train the summary model. Specifically:

[0114] The summary clause is input into a two-layer bidirectional GRU neural network, and the two-layer bidirectional GRU neural network is trained.

[0115] The first layer of the bidirectional GRU neural network encodes the words in the summary clause to obtain word-level attention, and averages the hidden layer states of the words in each sentence to obtain the average pooling result. The result is input into the second layer of the bidirectional GRU neural network, and the word level is obtained by inputting the words in each sentence. represents the hidden layer state of the forward network, represents the hidden layer state of the reverse network. The two are added together and average pooled to obtain the word attention after average pooling. The generated summary d of the Tibetan news is obtained according to the hidden state of the second layer of the neural network. The formula is as follows:

[0116]

[0117] in:

[0118] and Represents the forward and backward hidden layer states at the sentence level; N d Indicates the number of sentences in the document.

[0119] After obtaining the generated summary d, the hidden layer state and position information are combined to jointly decide whether the sentence is selected to obtain the final training clause.

[0120] The probability calculation formula for sentence selection is as follows:

[0121]

[0122] in:

[0123] h jIt is a vector formed by concatenating the forward and backward states of the second hidden layer in the bidirectional GRU neural network; W d ,W c ,W s ,W r ,W ap ,W rp , b are all trainable parameters of the model. The model is trained by adjusting the trainable parameters (when the sentence selection probability changes very little and almost no longer changes, it means that the model has been trained); y i Indicates whether this sentence is selected by the summary (the selected result is 1); d indicates that a summary has been generated; W c h j is the code of the generated summary; is the product of the generated summary and the sentence-level hidden layer, which represents the significance of the extracted summary; minus This is to reduce the semantic duplication of the summaries generated later and the previously extracted sentences; is the absolute position vector; is the relative position vector; S j is the dynamic summary representation of the jth position, and its formula is as follows:

[0124]

[0125] h i and h j ,s i and j The parameters have similar meanings. i and j represent different positions, and positions can be understood as different words.

[0126] A5. Use the final training sentence as the input of the encoding-decoding module in the summary model to train the encoding-decoding module. Specifically:

[0127] The encoding-decoding module consists of two recurrent neural networks. Figure 2 As shown in Figure 1, a neural network is responsible for receiving the extracted final training sentence and encoding the final training sentence into a content vector for use by the subsequent decoder.

[0128] In the embodiment of the present invention, an attention mechanism is added to the recurrent neural network used for encoding. The framework of the attention mechanism is as follows Figure 3 As shown, the calculation formula is as follows:

[0129] Y i =soft max(S t )

[0130]

[0131] ei,j =a(s i-1 ,h j )

[0132]

[0133] Among them, Y i is the i-th word of the generated summary, represented by Y i-1 ,s i , c i Determined by three states; i Represents the hidden state at time i, represented by c i ,s i-1 , Y i-1 Decision; i represents the content vector after the attention mechanism weights; e i,j Represents the hidden state s in the decoding stage i With the encoding state h ij (h ij Represents the encoding state, representing the linear combination of the encoding vectors from i to j words); α i,j represents the weight of each word learned by the attention mechanism; e i,k Represents the hidden state s in the decoding stage i With the encoding state h ik (h ik It represents the encoding state, which represents the linear combination of the encoding vectors of words from i to k.

[0134] As for the Tibetan OOV (out-of-vocabulary) problem, the pointer network is used at the decoding end in the recurrent neural network used for decoding to solve it. By setting a pointer structure at the decoder end, it is determined whether the summary generated by the recurrent neural network is copied from the source text or selected from the vocabulary. If the decoder copies a word from the source text, and the word does not appear in the vocabulary, the summary contains unregistered words (referring to some uncommon names of people, places, and organizations), which increases the novelty and accuracy of the summary. The network structure has two modes, the copy mode P and the generation mode G. P means copying from the source text, and the generation mode G means copying from the vocabulary.

[0135] The pointer network has made some improvements on the attention mechanism. Instead of integrating the attention distribution and the encoder hidden state into a context vector, the pointer network directly uses the softmax function to convert it into a pointer to the input sequence, that is, the element in the input sequence that is most likely to be the output. The improved calculation formula is as follows:

[0136] p(C i |C1,...,C i-1,X)=soft max(e t )

[0137] in:

[0138] C i Represents the content vector after the attention mechanism weights;

[0139] X represents the input sequence;

[0140]

[0141] e t Represents the vector of the decoder's attention to the encoder at each moment at time t;

[0142] Indicates the attention of the decoder at time t1 to the encoder at time t1;

[0143] Indicates that the input is the e corresponding to the last moment t ;

[0144] S t is the output of the decoder at time t; h t1 is the output of the encoder at time t1;

[0145] v,W h , W s They all represent learnable parameters.

[0146] After using softmax to distribute the input words into a probability distribution, the word with the highest probability in the original text can be selected as the output of the current summary result. The successful training criterion of the encoding-decoding module is that the probability value tends to a stable value.

[0147] S401, obtaining the final summary clause based on the two-layer bidirectional GRU neural network module and the summary clause. Specifically:

[0148] The summary clause is output to the trained two-layer bidirectional GRU neural network to output the final summary clause.

[0149] S402: Obtain a comprehensible text summary based on the encoding-decoding module and the final summary clause. Specifically:

[0150] The output final summary clause is used as the input of the trained encoding-decoding module, and is processed by the encoding-decoding module to generate an understandable text summary.

[0151] To verify the effectiveness of the embodiments of the present invention, the following experiments were conducted:

[0152] 1. Parameter settings

[0153] In the experiment, it is necessary to set the parameters of TextRank and the two-layer bidirectional GRU neural network. The parameter setting results of the TextRank algorithm are shown in Table 1, and the parameter setting results of the two-layer bidirectional GRU neural network are shown in Table 2:

[0154] Table 1 Parameter settings of TextRank

[0155] parameter value Gini coefficient 0.75 Maximum number of iterations 1000 Stop iterating over values 0.001 Redundancy factor 0.5

[0156] Table 2 Parameter settings of two-layer bidirectional GRU neural network

[0157] parameter value Hidden size 64 N_layers 2 Batch_size 20 Learning Rate 0.01 Dropout 0.3 Epoch 50 Optimizer Adam

[0158] 2. Corpus Source and Experimental Dataset

[0159] The source of the corpus is the public opinion project of the Natural Language Processing Laboratory. The project uses a java crawler architecture to crawl the content and title of web news according to the front-end HTML / CSS code of different Tibetan news website pages, and crawl the categories of news for future Tibetan text classification tasks, and finally store them in the Mysql database in UTF-8 encoding. The crawler program is updated in real time every morning to ensure that the latest news will be collected, thereby ensuring the coverage of the corpus source in terms of time span. Each website will crawl about 100 news articles every day. A total of about 50,000 Tibetan news articles were collected from major websites for text summarization experiments. The news sources mainly include: People's Daily Tibetan version, China Tibetan Tietong Music Network, Xinhuanet Tibet Channel and Gannan Shambhala Online, etc.

[0160] Tibetan belongs to the Sino-Tibetan language family in linguistics and has its own language characteristics. The Tibetan used in the experiment of the embodiment of the present invention is the Tibetan small character set that is currently widely used. After the Tibetan news title pairs are obtained from the database, they are processed accordingly, including word segmentation, sentence segmentation, dictionary construction, etc. Data preprocessing is a very important and complex point in natural language processing. Many natural language processing tasks are concentrated in the preprocessing process. Moreover, since the deep learning-based method is data-driven, the preprocessing process greatly affects the quality of the experimental model results.

[0161] In the experiment of the embodiment of the present invention, the crawled Tibetan news and titles are processed as follows:

[0162] 1) First, use the open source Tibetan word segmentation tool tip-las for word segmentation. Tip-las has three modes: word segmentation, part-of-speech tagging, and word segmentation + part-of-speech tagging. Only the word segmentation mode is selected, and the top 5,000 words are selected according to word frequency as the Tibetan generated dictionary.

[0163] 2) Use gensim to generate word2vec and fasttext word vectors using different representations of the vocabulary, and then use the Tibetan single vertical symbol Break the news into short sentences.

[0164] 3) Extract keywords from news using different methods for evaluating the effect of summarization. Figure 4 shown.

[0165] 3. Evaluation indicators

[0166] From a broad perspective, summary evaluation can be divided into internal evaluation method and external evaluation method. The internal evaluation method is to evaluate the result of generating summary using a unified standard, and the external evaluation method refers to using the result of text summary in downstream tasks to evaluate the quality of summary results. At present, the text summary evaluation method is mainly the ROUGE (Recall-Oriented Understudy for Gisting Evaluation) evaluation method proposed by Chin-Yew Lin et al. with reference to the automatic evaluation method BLEU of machine translation. This method first generates manual abstracts by multiple experts to form a standard abstract set. Then the automatic abstract generated by the system is compared with the standard abstract generated by the human, and the number of overlapping basic units between the two is counted to evaluate the quality of the abstract. This method has now become one of the general standards for abstract evaluation technology. The ROUGE series of evaluation indicators include ROUGE-N, ROUGE-L, ROUGE-S, and ROUGE-W. Among them, ROUGE-N is the most commonly used indicator. ROUNGE-N is based on n-gram co-occurrence statistics, n is generally [1, 4], and the calculation formula is as follows:

[0167]

[0168] Where Re fsummaries represents the reference summary, Count(n-gram) represents the number of n-grams in the reference summary, and Count match (n-gram) represents the number of n-grams in the generated abstract and the reference abstract. Different methods have different effects on different types of abstract evaluation. In the experiment of the embodiment of the present invention, the most commonly used ROUGE-1, ROUGE-2, and ROUGE-L are used as evaluation indicators for abstract results.

[0169] Abstract evaluation method based on keywords

[0170] At present, there are many controversies about the evaluation method based on Rouge, which may not be able to represent the content of the original text very well. In order to reflect whether the summary can cover the content of the original text, the keywords are extracted by the above-mentioned keyword extraction method, and then the percentage of the keywords appearing in the summary to all the keywords is used as the evaluation indicator of the summary.

[0171] 4. Experiment and result analysis

[0172] (1) Extractive Rouge Result Analysis

[0173] The two sentences with the highest scores are extracted from the news as summaries for evaluation. The evaluation indicators are Rouge-1, Rouge-2, and Rouge-1. The method used is:

[0174] TF-IDF: Use the TF-IDF-based method to calculate sentence weights and extract sentences.

[0175] TR+Tf: Uses the TextRank algorithm and the similarity calculation uses the traditional word co-occurrence matrix method.

[0176] TR+word2vec: Use the TextRank algorithm, and the sentence similarity calculation uses the weighted average of word2vec vectors.

[0177] TR+FastText: uses the TextRank algorithm and the sentence similarity calculation uses the weighted average of FastText vectors.

[0178] Bi-RNN: In the extractive neural network model, a bidirectional neural network model is used, in which the neuron cells are ordinary RNN structures.

[0179] Bi-RGRU: In the extractive neural network model, a bidirectional neural network model is used, in which the neuron cells are of GRU structure.

[0180] The evaluation results are shown in Table 3.

[0181] Table 3 Rouge test results (unit: %)

[0182]

[0183] As can be seen from the table, compared with FastText, Word2vec has better results, which is partly due to the fact that the official FastText vectors are mixed with many irrelevant English and Chinese word vectors. The TF-IDF-based method is similar to the TextRank method combined with word frequency, and their summaries are also roughly the same. Since only the sentence weight is considered and there is no requirement for sentence length, all algorithms extract two sentences from the original text as summaries, so the sentences extracted using the TF-IDF method are very long and have higher scores. However, if the sentence length factor is taken into account, the effect of the TextRank algorithm is the most prominent.

[0184] Although the performance of the neural network-based algorithm is not as good as that of the TextRank algorithm, the effect is poor in the case of error accumulation because the corpus used is the corpus annotated by the TextRank algorithm. Since the deep learning method based on neural networks mainly relies on big data, the effect will be improved if the annotated corpus is used. And the model using the GRU neural network unit is about two percentage points better than the neural network model based on the RNN unit.

[0185] (2) Time comparison

[0186] In the experiment, the time taken by each model in 1W corpus was counted as follows: Figure 5 As shown:

[0187] As can be seen from the figure, the calculation amount and time of using TF-IDF are the smallest, and the time complexity is also small when using the TextRank algorithm and using the word co-occurrence matrix for similarity calculation. The time complexity of using word vectors is very high, and the FastText word vector dimension is larger, so the time will increase more, and the maximum number of iterations is reached every time during the experiment. On the contrary, the experiments using the Bi-RNN and Bi-GRU (two-layer bidirectional GRU neural network) neural network algorithms take less time, and the Rouge evaluation value is higher, which is more suitable for the extraction of large-scale corpus. As long as the model is trained, the extraction results can be obtained quickly and once and for all.

[0188] (3) Extractive abstract keyword coverage

[0189] In addition to Rouge, keyword coverage is also used to evaluate the quality of Tibetan results. Figure 6 shown.

[0190] From each Tibetan news article, 20 keywords were extracted. The experimental results show that although the abstract extracted by the TF-IDF method is very long, its keyword coverage is poorer than that of other methods. In addition, although the TextRank method combined with word vectors obtained good results in the Rouge evaluation of Tibetan title abstracts, its keyword coverage is not much different from that of the neural network-based method.

[0191] (4) Understanding Rouge Evaluation

[0192] In the experiment, in order to highlight the advantages of the summary model of the embodiment of the present invention in combining the extractive method with the generative method, the three methods of directly using the encoding-decoding module, combining the attention mechanism, and the pointer network for Tibetan news are compared with the three methods after extracting sentences using the summary model of the embodiment of the present invention. The method that does not use the summary model of the embodiment of the present invention is called Default. The Rouge-1 evaluation results are as follows: Figure 7 As shown, the Rouge-2 evaluation results are as follows Figure 8 As shown, the Rouge-L test results are as follows Fig. 9 shown.

[0193] As can be seen from the figure, the method using the summary model of the embodiment of the present invention performs significantly better than the traditional method, greatly improving the accuracy and readability of the summary, and the results also prove from the side that the results of the extractive summary are better than the results of the understanding summary. In addition, due to the limitations of the corpus and the model, the results of the Tibetan news directly generated without sentence extraction are mostly 0. Only after combining with the attention mechanism will the evaluation results of Rouge1 have a result of about 0.4. The two evaluation indicators of Rouge-2 and Rouge-1, which best reflect the novelty and coherence of the summary, are 0. It can be considered that what is learned in the understanding of the chapter is 0. After adopting the summary model of the embodiment of the present invention, the value has changed significantly, and after the network based on the pointer network copies the vocabulary from the original text, the overlap with the title will be greatly improved, thereby improving the results by an average of about 2%.

[0194] (5) Evaluation of keyword coverage of comprehension-based abstracts

[0195] The keyword coverage method is also used to evaluate the quality of the summary results. Due to the gradient vanishing and explosion problems caused by the neural network decoding too long text, the results and readability of the summary output directly using Tibetan news are very poor, and the result is basically 0. In the output result, there is input text, but no output result, and the input text, the output is only a specific symbol, and it keeps repeating itself. Therefore, the experimental results in this aspect are not shown. Here are the keyword coverage of four methods after using the summary model of the embodiment of the present invention, using the Seq2Seq model, Seq2Seq+Attention model, and combining the pointer network with the coverage mechanism, such as Fig.10 shown.

[0196] From the results, we can analyze that after using the pointer network to copy words from the original text, the results obtained have a 7% improvement. This is because there are many keywords, such as people, place names, and organization names, which do not appear in the dictionary but are still critical and can express the content of the original text. Using a pointer network can solve this problem without being limited by the size of the dictionary.

[0197] An embodiment of the present invention also provides a Tibetan text summary generation system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0198] It can be understood that the Tibetan text summary generation system provided in the embodiment of the present invention corresponds to the Tibetan text summary generation method. The explanations, examples, beneficial effects and other parts of the relevant contents can refer to the corresponding contents in the Tibetan text summary generation method, which will not be repeated here.

[0199] In summary, compared with the prior art, the present invention has the following beneficial effects:

[0200] 1. The embodiment of the present invention uses a two-layer bidirectional GRU neural network module in a preset summary model to extract sentences that can express the main idea of ​​the original text from the preprocessed Tibetan text, remove redundant information, and speed up the subsequent processing process, and then uses the encoding-decoding in the preset summary model to generate a comprehensible text summary. The embodiment of the present invention uses a pointer network at the decoding end of the encoding-decoding module to improve the processing accuracy of Tibetan OOV words and improve the readability and novelty of the summary.

[0201] 2. The embodiment of the present invention introduces the TextRank algorithm to mark the pre-Tibetan text set used for training as the input of the summary model, thereby solving the problem of lack of Tibetan marked corpus.

[0202] It should be noted that, through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0203] In this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article, or apparatus.

[0204] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A Tibetan text summary generation method, characterized in that: The following steps are involved: Get the Tibetan text for which the summary is to be generated; Preprocessing the Tibetan text; Obtaining a comprehensible text summary of a Tibetan text based on a preset summary model and preprocessed Tibetan text; wherein: the preset summary model includes a two-layer bidirectional GRU neural network module and an encoding-decoding module; an attention mechanism is added to the encoding end of the encoding-decoding module, and a pointer network is added to the decoding end; The construction process of the preset summary model includes: Obtain the Tibetan text set required for training; Preprocess the Tibetan text set to obtain initial clauses; The preprocessed Tibetan text set is labeled based on the TextRank algorithm to obtain model training clauses; Input the model training clause into the summary model to train the summary model; The method of labeling the preprocessed Tibetan text set based on the TextRank algorithm to obtain model training clauses includes: Each initial clause is added as a node to the topological graph G = (V, E); where G represents an undirected graph; V is a set of vertices, representing the initial clauses of the set in the Tibetan text; E is a set of edges, representing the relationship between the initial clauses; Two different word vector models, word2vec and fasttext, are used to map the initial clauses to a high-dimensional vocabulary and represent them in vector form. Each initial clause is converted into a sentence vector according to the word vector file. The vector representation of the initial clause is the average value of all word vectors of the same dimension. The edge represents the similarity between the initial clauses. The formula is as follows: WS(S i ,S j )=cos(S i1 ...S in ,S j1 ...S jn ) in: WS(S i ,S j ) indicates the similarity of words; S i and S j Represents word vectors; cos represents the cosine distance between words; n represents the size of the word vector dimension; The algorithm is iterated until convergence, and the calculation formula is as follows: WS(V i ) represents node V i The weight of WS(V j ) represents the node V j The weight of d represents the Gini coefficient; W ij Represents node V i , V j The weight of the edge between them; W kj Represents node V k , V j The weight of the edge between them; In(V i ) points to node V i A collection of nodes; Out(V j ) is point V j The set of nodes pointed to; Calculate the similarity between each node and the nodes connected to it, and calculate the proportion of the similarity in the connected nodes and iterate; The vectors of each word are superimposed and averaged to obtain the sentence vector, and then the weight of each initial clause in the Tibetan text set is iterated. The weights of the first K initial clauses with the highest weights are recalculated according to the following formula, and the first N sentences with the latest weight values ​​are selected as the model training clauses, where N <K: X I =(X1f1+X2f2+...X K f K ) / N in: X I Represents the latest weight value of sentence I; f1+f2+...+f K =N,f1,f2,…,f K It is called power; X1 to X K-1 Indicates the similarity between the initial clause K and other K-1 initial clauses with high weights; X K Indicates the similarity between the initial clause K and the topic sentence; f1 to f K Represents the weighted value, where f1 to f K-1 It represents the penalty coefficient, which has the effect of reducing the weight, f K It indicates the similarity with the topic sentence and has the effect of increasing the weight.

2. The Tibetan text summary generation method as claimed in claim 1, characterized in that: The pre-processing comprises: The CRF method is used to segment Tibetan text, filter out stop words, and build a vocabulary; and then segment sentences according to Tibetan marginal symbols to obtain clauses.

3. The Tibetan text summary generation method according to claim 1, characterized in that: The step of inputting the model training clause into the summary model to train the summary model includes: Inputting the model training clause into the double-layer bidirectional GRU neural network, training the double-layer bidirectional GRU neural network, completing the training of the double-layer bidirectional GRU neural network, and obtaining the final training clause; The final training clause is input into the encoding-decoding module to complete the training of the encoding-decoding module.

4. The Tibetan text summary generation method according to any one of claims 1 to 3, characterized in that: The encoding-decoding module comprises: Two recurrent neural networks, the first neural network is used to receive the final training sentence and encode the final training sentence into a content vector, and the second neural network is used to decode the content vector to generate an understandable text summary.

5. The Tibetan text summary generation method according to any one of claims 1 to 3, characterized in that: The calculation formula of the attention mechanism is as follows: AND i =softmax(S t ) e i,j =a(s t1-1 ,h j ) in: Y i is the i-th word of the generated summary, represented by Y i-1 ,s i , c i Three states determine; S t is the output of the decoder at time t; S t1 Represents the hidden state at time t1, represented by c i , S t1-1 , Y i-1 Decide; c i Represents the content vector after the attention mechanism weights; e i,j Represents the hidden state s in the decoding stage i With the encoding state h ij The linear combination of ij It represents the encoding state, representing the encoding vector from word i to word j; α i,j Represents the weight of each word learned by the attention mechanism; e iz Represents the hidden state S in the decoding stage t1 With the encoding state h iz The linear combination of iz It represents the encoding state, which represents the encoding vector of words from i to z.

6. The Tibetan text summary generation method according to any one of claims 1 to 3, characterized in that: The pointer network comprises: The softmax function is used to convert the attention distribution and the encoder hidden state into a pointer to the input sequence. The calculation formula is as follows: p(C i |C1,...,C i-1 ,X)=softmax(e t ) in: C i Represents the content vector after the attention mechanism weights; X represents the input sequence; e t Represents the vector of the decoder's attention to the encoder at each moment at time t; Indicates the attention of the decoder at time t1 to the encoder at time t1; Indicates that the input is the e corresponding to the last moment t ; S t is the output of the decoder at time t; h t1 is the output of the encoder at time t1; v,W h , W s They all represent learnable parameters.

7. A Tibetan text summary generation system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.