A method for constructing a key degree judgment model for keyword extraction

By building a candidate keyword recognition model and a criticality representation model and utilizing neural network training features, we solved the problem of insufficient keyword extraction accuracy in existing technologies and achieved efficient keyword extraction in different language communities.

CN119150854BActive Publication Date: 2025-10-17HUAZHONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411174395.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2025-10-17
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

Existing keyword extraction methods have not yet systematically analyzed syntactic, semantic, and discourse features, resulting in insufficient keyword extraction accuracy and an inability to meet various application requirements.

Method used

Build a candidate keyword recognition model and a criticality representation model, use neural network training features, including syntactic and semantic information, independent and dependent criticality features, and improve the accuracy of keyword extraction by sharing the criticality judgment model of the language community and combining the positive sample label missing learning strategy.

Benefits of technology

It significantly improves the accuracy and efficiency of keyword extraction, simulates the criticality representation model shared by the language community through neural network methods, is applicable to different sub-domains, and meets various application needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119150854B_ABST
    Figure CN119150854B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of keyword extraction, and specifically relates to a method for constructing a criticality judgment model for keyword extraction, comprising: training a neural network to obtain a candidate keyword recognition model: each training sample includes a feature vector corresponding to an N-ary substring and a label indicating whether the N-ary substring is a keyword in a keyword extraction target text D; the feature vector corresponding to each N-ary substring is the morphological and syntactic information of the N-ary substring obtained for judging syntactic integrity; training a neural network to obtain a criticality representation model, each training sample includes independent and dependent criticality features corresponding to a candidate keyword t and a criticality label for t; the independent features include a subdomain type τ D and candidate keyword length ι t The dependent features include heuristic features, unique features and representative features. The above two models constitute a key judgment model, which is shared within the language community. The present invention can improve the accuracy of keyword extraction.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of keyword extraction, and more particularly relates to a key degree judgment model construction method for keyword extraction. BACKGROUND

[0002] The keyword extraction method can extract important keywords from a document, so that readers can quickly know the core content of the document, and is widely used in the fields of information retrieval, text classification and text clustering. Keyword extraction is essentially a ranking problem, rather than a classification problem (Jiang et al. 2009; Zhang et al. 2017). Taking keyword extraction as a ranking task is to construct a function that maps the features of candidate keywords to a key degree score (i.e. the probability of becoming a keyword).

[0003] The latest literature presents a trend of introducing neural networks into ranking tasks. Sarkar et al. (2010) trained a multi-layer perceptron neural network using a feature set consisting of the frequency, IDF, length and position information of candidate keywords. Mu et al. (2020) first obtained candidate keywords based on BERT, extracted feature vectors of candidate keywords using Bi-LSTM, and then ranked the candidates using a fully connected feedforward network containing a sigmoid activation function. Xiong et al. (2019) used word embeddings, position embeddings and visual features (such as position, font size and HTML-DOM features) to represent candidate keywords, applied a neural network based on a convolutional Transformer architecture to model the interaction between the words in the candidate keywords, and ranked the candidate keywords using a feedforward layer.

[0004] However, the existing keyword extraction methods have not theoretically clarified the interaction between different sub-varieties and word key degree, have not systematically analyzed and integrated the statistical information of syntactic, semantic and discourse level features that distinguish word key degree, have not found an effective general method for keyword extraction applicable to various sub-varieties, and the keyword extraction accuracy still cannot meet the application requirements of various types, which needs further research. SUMMARY

[0005] In view of the defects and improvement needs of the prior art, the application provides a key degree judgment model construction method for keyword extraction, which aims to improve the accuracy of keyword extraction.

[0006] To achieve the above-mentioned purpose, according to one aspect of the application, a key degree judgment model construction method for keyword extraction is provided, comprising:

[0007] training a neural network based on the training sample set, wherein each training sample comprises feature corresponding to an N-gram and a label indicating whether the N-gram is a key word in the text where the N-gram is located; each N-gram is a word fragment composed of n continuous words in the text where the N-gram is located; and the feature corresponding to each N-gram is the morphological information of the N-gram obtained by judging the syntactic integrity;

[0008] training a neural network based on the training sample set, wherein each training sample comprises independent and dependent key features corresponding to a candidate key word t and a key degree label of the candidate key word; the independent key features comprise subfield type τ D and candidate key word length ι t the dependent key features comprise heuristic feature uniqueness feature and representative feature The key degree representation model is represented as

[0009] The candidate key word recognition model and the key degree representation model constitute a key degree judgment model, and the key degree judgment model is shared within the language community to which the training text belongs.

[0010] Further, the specific training method of the candidate key word recognition model is as follows:

[0011] S1, constructing a training sample set, including a positive sample set and a negative sample set, each sample comprising a feature vector corresponding to an N-gram and a label indicating whether the N-gram is a key word in the target text; the number of positive samples and the number of negative samples are both p;

[0012] S2, iteratively training a neural network recognition model based on the current training sample set, when the number of iterations reaches the round threshold, reacquiring p negative samples to form a new negative sample set; using the current neural network recognition model to identify and delete the positive samples from the new negative sample set to obtain an updated negative sample set; the updated negative sample set and the positive sample set constitute a new training sample set; repeating the step based on the new training sample set until the iteration termination condition is met, and the training of the candidate key word recognition model is completed.

[0013] Further, the network structure of the candidate key word recognition model comprises four parts:

[0014] The first part is an embedding layer for converting the input morphosyntactic features into embedded form; the second part includes two convolutional layers, two max-pooling layers and a Transformer encoder for capturing morphosyntactic patterns; the third part includes two linear layers and a nonlinear activation layer for converting the morphosyntactic patterns into a binary probability vector including structure non-intact probability i-prob and structure intact probability w-prob; the fourth part is a recognition unit for calculating the difference ω = (w-prob) - (i-prob) between the structure intact probability and the structure non-intact probability in the binary probability vector corresponding to each N-gram substring, and taking the N-gram substring with ω greater than 0 as a candidate keyword.

[0015] Further, the specific training method of the key degree representation model of the candidate keyword is as follows:

[0016] S1, construct a training sample set including a positive sample set and a negative sample set, each sample including an independent key feature and a dependent key feature corresponding to a candidate keyword and a key degree label of the candidate keyword in the text where the candidate keyword is located; the key degree label of the positive sample is 1, and the key degree of the negative sample is 0, and the number of negative samples is θ times the number of positive samples p;

[0017] S2, iteratively train the neural network ranking model based on the current training sample set, when the iteration times reach the round threshold, use a sampling method to obtain p x θ negative samples to form a new negative sample set; use the neural network ranking model obtained by the current training to identify and delete the positive samples from the new negative sample set to obtain an updated negative sample set; the updated negative sample set and the positive sample set form a new training sample set; repeat the step based on the new training sample set until the iteration termination condition is met, and the training of the neural network recognition model is completed.

[0018] Further, the network structure of the key degree representation model of the candidate keyword includes:

[0019] The first part includes two embedding layers and a dot product unit, the two embedding layers are respectively used to convert the subfield type and the length of the candidate keyword into embedded form, and the dot product unit is used to perform dot product operation on the dependent key feature and the embedded form of the subfield type and the length of the candidate keyword;

[0020] The second part includes two Transformer encoders, three convolutional layers and three pooling layers for capturing key degree information;

[0021] The third part includes a linear layer for calculating a negative keyness score N-score and a positive keyness score P-score corresponding to each candidate keyword based on the keyness information, and taking the difference r = (P-score) - (N-score) between the positive keyness score and the negative keyness score corresponding to each candidate keyword as the keyness of the candidate keyword.

[0022] Further, the heuristic features include: a case-sensitive key value, a first occurrence position key value, a frequency key value, and a context diversity key value.

[0023] The uniqueness features include: a TF-IDF key value, an effective difference key value, and a word uniqueness key value.

[0024] The representative features include: a dispersion, a word-based personalized centrality indicator, and a topic-based centrality indicator.

[0025] Further, the case-sensitive key value is represented as: In the formula, n is the number of occurrences of the candidate keyword t in the text where it is located, t i is the i-th instance of the candidate keyword t in the text where it is located, M t is the number of words in the candidate keyword t, i.e., the value of the number N of the candidate keyword t; is the number of capital words in t i ;

[0026] The first occurrence position key value is represented as: In the formula, is the position where the candidate keyword t first occurs in D, N S,D is the total number of sentences in D;

[0027] The frequency key value is represented as: In the formula, n t is the frequency of the candidate keyword t, is the average frequency of the N-gram to which the candidate keyword t belongs, σ ngram is the standard deviation of the N-gram to which the candidate keyword t belongs;

[0028] The TF-IDF key value s TF-IDF is represented as: In the formula, D| is the number of texts in the reference corpus used to construct the training sample set, d j is the j-th text in the reference corpus containing the candidate keyword t;

[0029] The effective difference key value s effect-size is represented as: wherein, is the probability of candidate keyword t in D, is the probability of candidate keyword t in the reference corpus;

[0030] the divergence s sentence-dispersion is represented as: wherein, C t is the number of sentences in which candidate keyword t appears in D, N D is the number of sentences in D;

[0031] The word-based personalized centrality index is obtained by a graph method, including a position ranking key value, a TF-IDF ranking key value, a word ranking key value and a simple ranking key value.

[0032] The topic-based centrality index is obtained by a graph calculation method, including a feature vector centrality score, a closeness centrality score and a betweenness centrality score.

[0033] The application further provides a keyword extraction method, comprising:

[0034] The target text is sequentially subjected to normalization processing and dependency syntax analysis to generate an N-gram list, and each N-gram is a word fragment composed of consecutive n words in the target text.

[0035] The key degree judgment model of the language community to which the target text belongs constructed by the method is obtained, a candidate keyword recognition model in the key degree judgment model is used to recognize candidate keywords from the N-gram list, and each candidate keyword is an N-gram.

[0036] The independent type key feature and the dependent type key feature of each candidate keyword are calculated.

[0037] A key degree representation model in the key degree judgment model is used to represent the key degree of each candidate keyword.

[0038] The candidate keywords are sorted based on the key degree, and the keyword extraction is completed based on the sorting result and actual needs.

[0039] Further, the method further comprises:

[0040] All candidate keywords are clustered.

[0041] The classes are sorted according to the maximum key degree of the candidate keywords in each class, and the candidate keywords corresponding to the maximum key degree in the first k classes are determined as the final keyword extraction result according to the sorting result and actual needs.

[0042] The application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the method.

[0043] Overall, the above technical solutions conceived by the application can achieve the following beneficial effects:

[0044] (1) The application regards supervised keyword extraction as a keyword ranking task, proposes an assertion of a language community shared keyword degree judgment mode, and accordingly proposes a formal model of the ranking task, i.e., an implementation framework based on a convolutional neural network. Further, the keyword degree judgment model proposed by the application includes a candidate keyword recognition model and a keyword degree representation model. Regarding the keyword degree representation model, it is creatively designed to include three types of features, i.e., an independent feature, a dependent feature, and a heuristic feature. That is, given a candidate keyword t in a document D, the keyword degree of t is calculated as follows: The calculation depends on two types of features: independent features and dependent features. The independent features affect the dependent features, and the values of the dependent features change along the dimensions of the independent features. The above formula specifies two types of independent features: subfield types (τ D ) and candidate keyword lengths (ι t ), which have mutual transmission effects (indicated by multiplication signs x) on three types of dependent features. The three types of dependent features are: heuristic features uniqueness features and representative features The application theoretically proposes the above keyword degree judgment model, and based on the keyword degree calculation of the model, the keyword degree representation model shared by a specific language community is simulated through a neural network, which greatly improves the precision and efficiency of keyword extraction.

[0045] (2) The application further proposes a training strategy based on positive sample label missing learning. Since keywords are the results of individual subjective judgments, the training set inevitably contains unlabeled positive samples, i.e., candidate keywords that another individual may identify as keywords. Based on this, the positive sample label missing learning method proposed by the preferred mode ensures the accuracy of model training. BRIEF DESCRIPTION OF DRAWINGS

[0046] Figure 1 A keyword degree judgment model construction method flowchart for keyword extraction provided by an embodiment of the application;

[0047] Figure 2 A candidate keyword recognition model result graph provided by an embodiment of the application;

[0048] Figure 3A structure diagram of a key degree representation model of a candidate keyword provided for an embodiment of the present application is shown in the figure.

[0049] Figure 4 A general framework diagram of keyword extraction provided for an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.

[0051] Embodiment one

[0052] A key degree judgment model construction method for keyword extraction, as shown in the figure, comprises: Figure 1

[0053] Constructing a candidate keyword recognition model: constructing a training sample set, each training sample comprising a feature corresponding to an N-gram and a label of whether the N-gram is a keyword in the text where it is located; the feature corresponding to each N-gram is the syntactic semantic information of the N-gram obtained based on syntactic semantic integrity; training a neural network based on the training sample set to obtain a candidate keyword recognition model; each N-gram is a word fragment composed of n consecutive words in the text where it is located; n is any integer from 1 to m, m is preferably 4, and the values of n in different training samples in the training sample set can be different;

[0054] Constructing a key degree representation model of a candidate keyword: constructing a training sample set, each training sample comprising an independent key feature and a dependent key feature corresponding to a candidate keyword t and a key degree label of the candidate keyword; wherein the independent key feature comprises subfield type τ D and candidate keyword length ι t , the dependent key feature comprises heuristic feature uniqueness feature and representative feature Training a neural network based on the training sample set to obtain a key degree representation model, represented as

[0055] The candidate keyword recognition model and the candidate keyword key degree representation model constitute a key degree judgment model, which is shared within the language community of the training text.

[0056] ​The embodiment takes the supervised keyword extraction as a keyword ranking task, proposes a language community shared keyword degree judgment mode, and accordingly proposes a formal model of the ranking task, i.e. an implementation framework based on a convolutional neural network. Further, regarding the keyword degree representation model, the embodiment creatively designs it as Given a candidate keyword t in a document D, its keyword degree is denoted as The calculation depends on two types of features: independent features and dependent features. The independent features affect the dependent features, and the values of the dependent features will change along the independent feature dimension. The above formula specifies two types of independent features: subfield type (τ D ) and candidate keyword length (ι t ), which have mutual transmission effects (indicated by the multiplication sign x) on three types of dependent features. The three types of dependent features are: heuristic feature uniqueness feature and representative feature

[0057] Currently, there is no classification of features for keyword extraction, and there is no overall understanding of the role of each type of feature (theoretically lacking). The embodiment theoretically proposes a keyword degree judgment model, and the keyword degree calculation based on the model is shared in a specific language community, which is used to determine which words in the text are keywords and which are not. The embodiment method simulates the keyword degree representation model shared by the community through a neural network method, greatly improving the precision and efficiency of keyword extraction.

[0058] As a preferred implementation, the specific training method of the candidate keyword recognition model is as follows:

[0059] S1, construct a training sample set, including a positive sample set and a negative sample set, each training sample including a feature vector corresponding to an N-gram and a label indicating whether the N-gram is a keyword in the text where it is located; the number of positive samples and the number of negative samples are both p; further, as a preferred embodiment, the feature vector corresponding to each N-gram is m four-feature groups, if n = m, the m four-feature groups are composed of four-feature groups of each word in the N-gram, if n is less than m, n four-feature groups in the m four-feature groups are composed of four-feature groups of each word in the N-gram, and the remaining m-n four-feature groups are filled with default labels; wherein each word's four-feature group is composed of part of speech, case, stop word and dependency relationship type;

[0060] S2, iteratively train the neural network recognition model based on the current training sample set, when the iteration number reaches the round threshold, reacquire p negative samples to form a new negative sample set; use the neural network recognition model obtained by the current training to identify and delete the positive samples from the new negative sample set, to obtain an updated negative sample set; the updated negative sample set and the positive sample set form a new training sample set; repeat the operation of the step based on the new training sample set until the iteration termination condition is obtained, and the training of the candidate keyword recognition model is completed.

[0061] The feature of each word is a four-tuple:

[0062] <part-of-speech, case, stop-word, dependency relation type>

[0063] For example, the symbol list of the three-word string Atlantic hurricane season is as follows:

[0064] <NNP, UPPER-CASE, NOT-STOP, amod>,

[0065] <NN, LOWER-CASE, NOT-STOP, compound>,

[0066] <NN, LOWER-CASE, NOT-STOP, nsubj>,

[0067] <UNK, UNK, UNK, UNK>]

[0068] Wherein, NNP and NN are word classes, amod, compound and nsubj are syntax dependency relation types, and UNK is a fill label.

[0069] Since the keyword is a subjective judgment result of individual, the training set inevitably contains untagged positive samples, that is, another individual may identify the candidate keyword as a keyword, and based on this, the preferred mode proposes a training strategy based on the related research of positive sample label missing learning (Positive Unlabelled Learning), which ensures the training accuracy.

[0070] As a preferred embodiment, as shown in Figure 2 The network structure of the candidate keyword recognition model includes four parts:

[0071] The first part is an embedding layer for converting morphosyntactic features into embedded form; the second part includes two convolutional layers, two max-pooling layers and a Transformer encoder for capturing morphosyntactic patterns; the third part includes two linear layers and a nonlinear activation layer for converting morphosyntactic patterns into a binary probability vector including structure imperfect probability i-prob and structure perfect probability w-prob; the fourth part is a recognition unit for calculating the difference ω = (w-prob) - (i-prob) between structure perfect probability and structure imperfect probability in the binary probability vector corresponding to each N-gram substring, and when ω is greater than 0, the N-gram substring is taken as a candidate keyword.

[0072] As a preferred embodiment, the specific training method of the key degree representation model of the candidate keyword is as follows:

[0073] S1, construct a training sample set including a positive sample set and a negative sample set, each training sample including a feature vector corresponding to a candidate keyword and a key degree label of the N-gram substring in the text where the N-gram substring is located; the key degree label of the positive sample is 1, which is a true keyword, and the key degree of the negative sample is 0, and the number of negative samples is θ times the number of positive samples p;

[0074] S2, iteratively train the neural network ranking model based on the current training sample set, and when the number of iterations reaches the round threshold, obtain p x θ negative samples to form a new negative sample set; use the neural network ranking model obtained by the current training to identify and delete the positive samples from the new negative sample set to obtain an updated negative sample set; the updated negative sample set and the positive sample set form a new training sample set; repeat the step based on the new training sample set until the iteration termination condition is met, and the construction of the neural network recognition model is completed.

[0075] Similar to the training of the candidate keyword recognition model, since the keyword is a subjective judgment of an individual, it is inevitable that the training set contains unlabeled positive samples, i.e. a candidate keyword that another individual may identify as a keyword. Based on this, the preferred embodiment proposes a training strategy based on the related research of positive unlabelled learning to ensure the training accuracy.

[0076] As a preferred embodiment, as shown in Figure 3 The network structure of the key degree representation model of the candidate keyword includes:

[0077] The first part consists of two embedding layers and a dot product unit. The two embedding layers are used to convert the subdomain type and the candidate keyword length into embedding forms, respectively. The dot product unit is used to perform dot products on the dependent key features with the embedding forms of the subdomain type and the candidate keyword length.

[0078] The second part consists of two Transformer encoders, three convolutional layers, and three pooling layers to capture criticality information;

[0079] The third part includes a linear layer, which is used to calculate the negative criticality score N-score and the positive criticality score P-score corresponding to each candidate keyword; and calculate the difference r = (P-score) - (N-score) between the positive criticality score and the negative criticality score in the tuple corresponding to each candidate keyword as the criticality of the candidate keyword.

[0080] Depend on Figure 3 The neural network shown in the formula is executed. As mentioned above, the influence of independent features on dependent features is Figure 3 The dot product between the embeddings of the subdomain type and the candidate keyword length, expressed as , and the remaining 17 dependency key-value feature vectors is then encoded using the positional encoding method proposed in Vaswanie et al. (2017). The neural network consists of two Transformer Encoders, three convolutional layers, and three pooling layers to capture key-value patterns. The final linear layer (for dimensionality reduction) outputs a tuple consisting of a negative key-value score (N-score) and a positive key-value score (P-score). The final key-value score is calculated from this tuple as follows: r = P-score - N-score.

[0081] The above-mentioned various features proposed by the method of this embodiment are described as follows:

[0082] (1) Independent key features include subdomain type τ D and candidate keyword length ι t .

[0083] On the subdomain type τ D , changes in subdomain types will lead to changes in the properties of several key features. Ranking by key should involve a top-down cognitive process that brings expectations about the content and structure of the text type. Domain-specific algorithms can generate better keywords than general algorithms. Keyword extraction systems need to be parameterized according to different text types because term length limits, stop word lists, and the number of keywords are different in different text types.

[0084] About the length of candidate keywords tThe length of a candidate keyword is an independent feature because the length of a word is related to its position, morpho-syntactic form, and statistical distribution. Word length is important in keyword extraction. The distribution of keywords varies along the length dimension, with bivariate keywords dominating in several sub-language domains. TF-IDF provides very robust performance across different datasets, and many keyword extraction algorithms differ in their ability to identify keywords of different lengths, setting the correct length of keywords is as important as other design choices such as weighting schemes, length is an important but often overlooked factor for keywords.

[0085] (2) Dependent features of keyword importance include heuristic features uniqueness features and representativeness features As a preferred embodiment, the heuristic features include: case-sensitive value, first occurrence position value, frequency value, and context diversity value; the uniqueness features include: TF-IDF value, effective difference value, and word uniqueness value; the representativeness features include: dispersion, word-based personalized centrality indicator, and topic-based centrality indicator.

[0086] Regarding the heuristic features, the heuristic features are derived from empirical observations. This embodiment uses four indicators as heuristic features: case-sensitive value, first occurrence position value, frequency value, and context diversity value. Among them,

[0087] Case is important in keyword extraction because many keywords are capitalized terms. In addition, terms can form new keywords by combining with lowercase words. The case-sensitive value (hcase) in this embodiment is obtained by calculating the average percentage of capitalization of all t instances in the text D, and the case-sensitive value is expressed as: In the formula, n is the number of times the candidate keyword t appears in the text it is in, t i is the i-th instance of the candidate keyword t in the text it is in, M t is the number of words in the candidate keyword t, that is, the value of the number N corresponding to the candidate keyword t; is the number of capitalized words in t i .

[0088] The position of a word in a document is an important indicator of keyword importance. Preferably, the first occurrence position value is expressed as: In the formula, is the position of the first occurrence of the candidate keyword t in D, N S,D is the total number of sentences in D.

[0089] Frequency is another important key indicator, but their relationship is not proportional. The embodiment depends on the word length of the candidate key word, such as four types of candidate key words of one word string, two word string, three word string and four word string, and the frequency key value is expressed as: In the formula, n t is the frequency of the candidate key word t, is the average frequency of the N-gram to which the candidate key word t belongs, σ ngram is the standard deviation of the N-gram to which the candidate key word t belongs.

[0090] The term context diversity is referred to as the relevance of the term to the context. The intuitive idea is that the more diverse the context of a term, the less likely it is to be a key word.

[0091] Regarding the uniqueness feature. The embodiment preferably uses three indicators to measure the uniqueness of a candidate key word in a specific document compared to other documents, namely the TF-IDF key value, the effective difference key value and the vocabulary specificity key value.

[0092] The embodiment distinguishes different types of one-gram, two-gram, three-gram and four-gram, and calculates the TF-IDF key value by the following formula: In the formula, |D| is the number of texts in the reference corpus used to build the training sample set, d j is the jth text containing the candidate key word t in the reference corpus.

[0093] The effective difference key value is calculated by the KL divergence, expressed as: In the formula, is the probability of the candidate key word t in D, is the probability of the candidate key word t in the reference corpus. The KL divergence has a good foundation in information theory, and has little correlation with frequency.

[0094] Vocabulary specificity is defined as the negative logarithm of the hypergeometric distribution, defined as follows: Where P hypergeo is the probability of t appearing exactly k times in D, calculated according to the hypergeometric distribution parameterized by the number of words in the document (N D ), the frequency of words in the document (f D ), the frequency of words in the reference corpus (f R ) and the number of words in the reference corpus (N R ).

[0095] With respect to representativeness, representativeness refers to the ability of a candidate keyword to summarize the content of a document compared to other terms. Representativeness is measured with two subtypes: dispersion and centrality.

[0096] Dispersion refers to the uniformity of the occurrence of a term throughout the document. The dispersion s sentence-dispersion is expressed as: where C t is the number of sentences in which the candidate keyword t occurs in D, and N D is the number of sentences in D.

[0097] In keyword extraction, centrality is mainly captured by graph-based methods. The present embodiment distinguishes two classes of centrality measures: term-based personalized centrality measures (abbreviated as personalized measures) and topic-based centrality measures (abbreviated as topic measures). The personalized measures are computed with a graph constructed with all candidate keywords as nodes and sentence-internal co-occurrences as links. Then the nodes are individually scored using a first occurrence position score, a TF-IDF score, a lexical specificity or a default value of 1 (no scoring), and the nodes are ordered to obtain a position ordered key, a TF-IDF ordered key, a lexical ordered key, and a simple ordered key.

[0098] With respect to topic measures. To construct a graph from a document, the candidate keywords are first clustered into groups. Then each group is used as a node in the graph and the links between nodes are established by the sentence-internal co-occurrences of terms in the groups. The present embodiment preferably uses three topic-based centrality scores: eigenvector centrality score, closeness centrality score, and betweenness centrality score.

[0099] Eigenvector centrality and closeness centrality both belong to the category of radial centrality, while betweenness centrality belongs to the category of medial centrality. Radial centrality measures are meaningful in a network with a core-periphery assumption. Therefore, closeness centrality and eigenvector centrality are good ways to measure keywords that are consistent with a topic in a document.

[0100] Embodiment two

[0101] A keyword extraction method, comprising:

[0102] performing normalization processing and dependency syntax analysis on the target text in sequence to generate a list of N-gram subsequences, each N-gram subsequence being a word fragment composed of consecutive n words in the target text;

[0103] obtain a keyness judgment model of a language community to which the target text belongs constructed by the method of embodiment one, and use a candidate keyword recognition model therein to recognize candidate keywords from the list of N-gram subsequences, each candidate keyword being an N-gram subsequence;

[0104] computing the independent type of keyness feature and the dependent type of keyness feature of each candidate key word as described above;

[0105] adopting the keyness representation model in the keyness judgment model, and based on the keyness of each candidate key word;

[0106] sorting the candidate key words based on the keyness, and based on the sorting result, combining the actual needs to complete the key word extraction.

[0107] As a preferred embodiment, it further comprises:

[0108] clustering all candidate key words;

[0109] sorting the classes according to the maximum keyness of the candidate key words in each class, and according to the sorting result, combining the actual needs to determine the candidate key words corresponding to the maximum keyness in the first k classes as the final key word extraction result.

[0110] As Figure 1 The overall framework of the implementation of the present embodiment is given. The framework processes the input document through preprocessing, candidate key word generation and candidate key word keyness representation, sorting, etc., and outputs the sorted key word cluster for further processing. The preprocessing component normalizes the input document and uses a dependency syntax analyzer to perform syntax analysis. The candidate key word generation component generates N-grams from the input document, identifies candidate key words in the generated N-grams using a convolutional network model, and clusters these candidates into clusters. The keyness representation component obtains the keyness feature pattern of the candidate key words, and then uses a convolutional network to represent the keyness.

[0111] First, the document is normalized by replacing URLs, bullets (symbols used to represent lists) and various types of tags with specific tags, replacing fancy (unconventional) quotes with equivalent ASCII markers, and deleting unnecessary hyphens and spaces (deleting or replacing infrequently used symbols to improve word segmentation accuracy). Then, a dependency syntax analyzer is used to perform dependency syntax analysis on the document to obtain syntax information, including part of speech, case, dependency relationship type and whether it is a pause word, etc.

[0112] In the clustering of the identified candidate keywords, the candidate keywords can be first represented as phrase embeddings by using the SentenceTransformer model, the similarity between the phrase embeddings is calculated by cosine, and then hierarchical clustering is used for clustering. The preferred mode outputs not the terms with ranking scores, but the candidate keyword clusters after clustering, and the highest ranking score contained in the candidate keyword cluster is taken as the ranking score of the cluster. Therefore, the preferred mode outputs the key concepts represented by the keyword clusters, rather than the keywords, so that the keyword extraction result is more accurate.

[0113] The related technical solutions are the same as those of Embodiment One, and will not be described here.

[0114] Embodiment Three

[0115] A computer readable storage medium, comprising a stored computer program, wherein the computer program, when executed by a processor, controls a device in which the storage medium is located to perform the method of Embodiment One.

[0116] The related technical solutions are the same as those of Embodiment One, and will not be described here.

[0117] Those skilled in the art will easily understand that the above description is only a preferred embodiment of the present application, and is not intended to limit the present application. Any modification, equivalent replacement and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for constructing a criticality judgment model for keyword extraction, characterized in that: include: Construct a candidate keyword recognition model: This is obtained by training a neural network based on a training sample set, where each training sample includes a feature corresponding to an N-gram substring and a label indicating whether the N-gram substring is a keyword in the text in which it is located; each N-gram substring is a word fragment consisting of n consecutive words in the text in which it is located; the feature corresponding to each N-gram substring is the morphological and syntactic information of the N-gram substring obtained by judging syntactic integrity; Construct a key characterization model for candidate keywords: Train a neural network based on a training sample set, where each training sample includes a candidate keyword. t The corresponding independent key features and dependent key features and the key degree label of the candidate keyword; the independent key features include subdomain type and candidate keyword length , dependent key features include heuristic features , unique characteristics and representative characteristics ; The criticality representation model is expressed as ; The candidate keyword recognition model and the criticality representation model constitute a criticality judgment model to complete the construction, wherein the criticality judgment model is shared within the language community to which the training text belongs.

2. The method for constructing a criticality judgment model according to claim 1, characterized in that: The specific training method of the candidate keyword recognition model is: S1. Construct a training sample set, including a positive sample set and a negative sample set. Each sample includes a feature vector corresponding to an N-ary substring and a label indicating whether the N-ary substring is a keyword in the target text; The number of positive samples and the number of negative samples are both p; S2. Iteratively train the neural network recognition model based on the current training sample set. When the number of iterations reaches the round threshold, re-acquire p negative samples to form a new negative sample set; use the neural network recognition model obtained by the current training to identify and delete positive samples from the new negative sample set to obtain an updated negative sample set; the updated negative sample set and the positive sample set constitute a new training sample set; repeat this step based on the new training sample set until the iteration termination condition is obtained, and the training of the candidate keyword recognition model is completed.

3. The method for constructing a criticality judgment model according to claim 2, wherein: The network structure of the candidate keyword recognition model includes four parts: The first part is the embedding layer, which is used to convert the input morphological and syntactic features into an embedded form; the second part includes two convolutional layers, two maximum pooling layers and a Transformer encoder, which is used to capture morphological and syntactic patterns; the third part includes two linear layers and a nonlinear activation layer, which is used to convert the morphological and syntactic patterns into a binary probability vector, which includes the probability of structural imperfection. i-prob and the probability of structural integrity w-prob The fourth part is the recognition unit, which is used to calculate the difference between the probability of good structure and the probability of bad structure in the binary probability vector corresponding to each N-ary substring ω=( w-prob ) - ( i-prob ), and take the N-ary substring corresponding to ω greater than 0 as the candidate keyword.

4. The method for constructing a criticality judgment model according to claim 1, wherein: The specific training method of the key degree representation model of the candidate keywords is: S1. Construct a training sample set, including a positive sample set and a negative sample set. Each sample includes the independent key features and dependent key features corresponding to a candidate keyword and the key label of the candidate keyword in the text in which it is located. The key label of the positive sample is 1, the key label of the negative sample is 0, and the number of negative samples is θ times the number of positive samples p. S2. Iteratively train the neural network ranking model based on the current training sample set. When the number of iterations reaches the round threshold, use a sampling method to reacquire p×θ negative samples to form a new negative sample set; use the currently trained neural network ranking model to identify and delete positive samples from the new negative sample set to obtain an updated negative sample set; the updated negative sample set and the positive sample set constitute a new training sample set; Repeat this step based on the new training sample set until the iteration termination condition is obtained, completing the training of the neural network recognition model.

5. The method for constructing a criticality judgment model according to claim 4, wherein: The network structure of the key degree representation model of the candidate keywords includes: The first part consists of two embedding layers and a dot product unit. The two embedding layers are used to convert the subdomain type and the candidate keyword length into embedding forms, respectively. The dot product unit is used to perform dot products on the dependent key features with the embedding forms of the subdomain type and the candidate keyword length. The second part includes two Transformer encoders, three convolutional layers, and three pooling layers to capture criticality information; The third part includes a linear layer for calculating the negative key score of each candidate keyword based on the key information. N-score and positive criticality rating P-score , and the difference between the positive key score and the negative key score corresponding to each candidate keyword r =( P-score ) - ( N-score ), as the key degree of the candidate keyword.

6. The method for constructing a criticality judgment model according to claim 1, wherein: The heuristic features include: case key value, first occurrence key value, frequency key value, and context diversity key value; The unique features include: TF-IDF key value, effective difference key value, and vocabulary specific key value; The representative features include: divergence, word-based personalized centrality index, and topic-based centrality index.

7. The method for constructing a criticality judgment model according to claim 6, wherein: The case key value Expressed as: Where, Candidate keywords t The number of times it appears in the text. Candidate keywords t In the text in which it is located i instances, Candidate keywords t The number of words in the t The corresponding value of the number N; for The number of capitalized words; The first occurrence position key value Expressed as: , where Candidate keywords t exist D The first occurrence of for D The total number of sentences in The frequency key value Expressed as: Where, Candidate keywords t frequency, Candidate keywords t The average frequency of the N-ary substring, Candidate keywords t The standard deviation of the N-ary substring; The TF-IDF key value Expressed as: Where, is the number of texts in the reference corpus used to construct the training sample set, The candidate keywords in the reference corpus t No. j texts; The effective difference key value Expressed as: Where, Candidate keywords t exist D The probability in Candidate keywords t probability in the reference corpus; The vocabulary-specific key It is defined as the negative logarithm of the hypergeometric distribution and is defined as follows: , where Indicates candidate keywords t exist D It just happened to appear k The probability of the word in the document N D , the frequency of words in the document f D 、 f F and the number of words in the reference corpus N R Parameterized hypergeometric distribution calculations; The divergence Expressed as: Where, Candidate keywords t exist D The number of sentences that appear in for D The number of sentences in which The personalized centrality index based on words is obtained by graph, including position ranking key value, TF-IDF ranking key value, word ranking key value and simple ranking key value; The topic-based centrality index is obtained through graph calculation. Including eigenvector centrality score, closeness centrality score and betweenness centrality score.

8. A keyword extraction method, characterized in that: include: The target text is normalized and parsed in dependency syntax to generate a list of N-gram substrings, where each N-gram substring is a word fragment consisting of n consecutive words in the target text; Obtaining a criticality judgment model for the language community to which the target text belongs constructed by the criticality judgment model construction method according to any one of claims 1 to 7, and using the candidate keyword recognition model therein to identify candidate keywords from the N-gram substring list, each candidate keyword being an N-gram substring; Calculating the independent key features and the dependent key features of each candidate keyword as described in the method for constructing a key degree judgment model according to any one of claims 1 to 7; Adopting the key degree characterization model in the key degree judgment model based on the key degree of each candidate keyword; The candidate keywords are ranked based on their criticality, and keyword extraction is completed based on the ranking results and in combination with actual needs.

9. A keyword extraction method according to claim 8, characterized in that: Also includes: Cluster all candidate keywords; According to the maximum key degree of the candidate keywords in each class, the categories are sorted. Based on the sorting results and combined with actual needs, the candidate keywords corresponding to the maximum key degrees in the first k classes are determined as the final keyword extraction results.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for constructing a criticality judgment model according to any one of claims 1 to 7 and / or the method for extracting keywords according to any one of claims 8 to 9 are implemented.