Hypernym mining method and system based on deep learning
By combining unsupervised and supervised methods, the English hypernym automatic mining system explicitly models the spatial relationship of word embeddings, solves the low recall and confusion problems of hypernym recognition in traditional methods, and achieves high accuracy and coverage. Hypernym recognition.
Patent Information
- Application Number
- CN202310371998.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-10
- Publication Date
- 2024-10-15
AI Technical Summary
Traditional pattern-based unsupervised methods and distribution-based supervised methods have problems such as low recall rate, low language transferability, and confusion between hypernyms and synonyms and synonyms when identifying hypernyms in texts, making it difficult to accurately detect specific hyponym relationships. .
An automatic mining system for English hypernyms that combines unsupervised methods and supervised methods. By explicitly modeling the expression of relationships in the word embedding space, it uses unsupervised mining and supervised mining steps to obtain candidate hypernyms, and uses normalization and Merge the output by re-scoring and select the final hypernym.
It improves the accuracy and coverage of hypernyms, overcomes the problem of confusion between hypernyms and synonyms, and significantly improves the accuracy of the classification model.
Smart Images

Figure CN118780281A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of semantic recognition in natural language processing, and in particular to a method and system for automatically mining hypernyms of texts by combining an unsupervised method with a supervised method. Background Art
[0002] A hypernym is a relative concept. For a text word, a hypernym is a higher-level semantic generalization. At present, English has a mature and complete set of hypernym syntactic patterns (syntactic rules). For example, if the text word is "dog is akind of animal", "animal" is the hypernym of "dog". This hypernym relationship between words reflects the hierarchical relationship between words and is the basic semantic relationship in computational linguistics and the core of human cognition. Successfully identifying this lexical relationship can help improve question-answering applications and text entailment or semantic search systems.
[0003] The traditional pattern-based unsupervised method is that if x and y appear in the same sentence and satisfy a specific pattern, there is a hyponym relationship between the term pair (x, y). For example, "[E] is a [C]" and "[C] such as [E]" are typical patterns, where [E] and [C] are noun phrase placeholders, representing hyponyms and hypernyms, respectively. Fixed language patterns have the defects of low recall rate and low language transferability, and are prone to errors due to idiomatic expressions and language ambiguity. For example, the word "apple" has multiple meanings such as fruit, company, and song name. In different contexts, the corresponding hypernyms are also different.
[0004] Another supervised approach based on distribution uses word embeddings trained from context to represent words. Word embeddings allow machines to make predictions based on the entire corpus. However, distributional methods are less precise in detecting specific, strict hyponymy relationships and tend to exploit broad semantic similarities between terms. Summary of the invention
[0005] In order to solve the above problems, the present invention proposes an automatic mining system for English hypernyms that combines unsupervised methods and supervised methods. The system explicitly models the expression of relationships in word embedding space to automatically mine the corresponding hypernyms according to the input query words. The mined hypernyms have high accuracy and coverage. The mined hypernyms can be spliced and fused with the original sentence and then input into the classifier to obtain the classification results of the original sentence, so as to effectively improve the accuracy of the classification model.
[0006] The present invention proposes an automatic mining system for English hypernyms, which consists of two parts: an unsupervised learning unit based on pattern matching and a supervised learning unit based on word embedding projection. In order to merge the outputs of the two units, the system takes the top 100 candidate hypernyms from each unit, normalizes and sums their scores, and then reorders the candidate hypernyms according to the new scores, and selects the top n candidate hypernyms as the final output. This reordering function is conducive to both units finding the best candidate hypernyms. The method is combined with the pattern matching method, and overcomes the problem of confusion between hypernyms and synonyms and synonyms by explicitly modeling the expression of relations in the word embedding space, and has high accuracy and coverage.
[0007] Specifically, the present invention proposes a hypernym mining method based on deep learning, which includes:
[0008] The unsupervised mining step obtains the syntactic rules of the target text and the hypernyms of the target text language, extracts the words in the target text, expands the words by mining their co-hyponyms, uses the words and their expansion results as query words, retrieves the hypernyms of the query words in the corpus according to the syntactic rules, scores and sorts them, and selects the hypernym with the highest score as the unsupervised mining result;
[0009] The supervised mining step measures the possibility that the query term and the candidate hypernym are in a hyponymous relationship based on the embedding vectors of the query term and the candidate hypernym in the corpus, and selects the candidate hypernym corresponding to the embedding vector of the candidate hypernym with the greatest possibility as the supervised mining result;
[0010] The normalization step is to re-score the supervised mining result and the unsupervised mining result by normalization and summing, and select the supervised mining result and / or the unsupervised mining result with the highest ranking in the re-scoring result as the final hypernym mining result of the target text.
[0011] The hypernym mining method based on deep learning, wherein the unsupervised mining step comprises:
[0012] In the query expansion step, the co-hyponyms of the entity in the target text are obtained through the preset enumeration patterns X1, X2 and X3, and the entity in the target text and the co-hyponym are used as the query. The co-hyponym frequency is multiplied by the cosine similarity of the query and co-hyponym embeddings to score:
[0013] score=similarity×frequency
[0014]
[0015]
[0016] A hypernym recognition step, for the query word obtained in the query word expansion step, extracting corresponding hypernyms from the corpus through a preset hypernym pattern;
[0017] In the scoring step, the hypernyms are scored by multiplying their normalized frequencies by the cosine similarity between the query and candidate hypernym embeddings:
[0018]
[0019]
[0020]
[0021] The hypernym with the highest score is selected as the unsupervised mining result.
[0022] The hypernym mining method based on deep learning, wherein the supervised mining step comprises:
[0023] Word embedding is learned on the corpus to obtain a word embedding retrieval table; embeddings of a given query word and candidate hypernyms are retrieved on the word embedding retrieval table; the embedding of the query word is multiplied by multiple projection matrices respectively by the following formula to obtain multiple projections thereof;
[0024] Query word embedding q , candidate hypernym e h , e q Multiply by a 3D tensor containing k square projection matrices, producing E q The k×d projection vector of:
[0025] P i =(φ i ·e q ) T
[0026] i∈{1,...,k},φ i ∈R d×d
[0027] Among them, φ i is a d×d square projection matrix, which is initialized by adding random noise to the unit matrix; k is the number of projection matrices; P i for e q Corresponding to the square projection matrix φ i The projection of is a k×d vector;
[0028] The degree of proximity to the candidate hypernym embedding in each projection is calculated through dot product to form a column vector; the column vector is input into the activation layer to obtain the possibility that the query term and the candidate hypernym are in a hyponymous relationship; the possibility of all candidate hypernyms is calculated, and the candidate hypernym with the highest possibility is selected as the supervised mining result.
[0029] The hypernym mining system based on the hybrid method, wherein the normalization step includes: taking the proportion of the score of each unsupervised mining result in the total score of all unsupervised mining results as the re-scoring result of each unsupervised mining result; taking the proportion of the probability of each supervised mining result in the total probability of all supervised mining results as the re-scoring result of each supervised mining result.
[0030] The present invention also proposes a hypernym mining system based on deep learning, which includes:
[0031] The unsupervised mining module obtains the syntactic rules of the target text and the hypernyms of the target text language, extracts the words in the target text, expands the words by mining their co-hyponyms, uses the words and their expansion results as query words, retrieves the hypernyms of the query words in the corpus according to the syntactic rules, scores and sorts them, and selects the hypernym with the highest score as the unsupervised mining result;
[0032] A supervised mining module measures the possibility that the query term and the candidate hypernym are in a hyponym relationship based on the embedding vectors of the query term and the candidate hypernym in the corpus, and selects the candidate hypernym corresponding to the embedding vector of the candidate hypernym with the greatest possibility as the supervised mining result;
[0033] The normalization module re-scores the supervised mining result and the unsupervised mining result by normalization and summing, and selects the supervised mining result and / or the unsupervised mining result with the highest ranking in the re-score result as the final hypernym mining result of the target text.
[0034] The hypernym mining system based on deep learning, wherein the unsupervised mining module comprises:
[0035] The query expansion module obtains the co-hyponyms of the entity in the target text through the preset enumeration patterns X1, X2 and X3, takes the entity in the target text and the co-hyponym as the query, and scores them by multiplying the frequency of the co-hyponym by the cosine similarity of the query and co-hyponym embeddings:
[0036] score=similarity×frequency
[0037]
[0038]
[0039] A hypernym recognition module extracts corresponding hypernyms from the corpus through a preset hypernym pattern for the query word obtained by the query word expansion module;
[0040] The scoring module scores the hypernyms by multiplying the normalized frequency of the candidate hypernyms by the cosine similarity between the query term and the candidate hypernym embeddings:
[0041]
[0042]
[0043]
[0044] The hypernym with the highest score is selected as the unsupervised mining result.
[0045] The hypernym mining system based on deep learning, wherein the supervised mining module includes:
[0046] Word embedding is learned on the corpus to obtain a word embedding retrieval table; embeddings of a given query word and candidate hypernyms are retrieved on the word embedding retrieval table; the embedding of the query word is multiplied by multiple projection matrices respectively by the following formula to obtain multiple projections thereof;
[0047] Query word embedding q , candidate hypernym e h , e q Multiply by a 3D tensor containing k square projection matrices, producing E q The k×d projection vector of:
[0048] P i =(φ i ·e q ) T
[0049] i∈{1,...,k},φ i ∈R d×d
[0050] Among them, φ i is a d×d square projection matrix, which is initialized by adding random noise to the unit matrix; k is the number of projection matrices; P i for e q Corresponding to the square projection matrix φ i The projection of is a k×d vector;
[0051] The degree of proximity to the candidate hypernym embedding in each projection is calculated through dot product to form a column vector; the column vector is input into the activation layer to obtain the possibility that the query term and the candidate hypernym are in a hyponymous relationship; the possibility of all candidate hypernyms is calculated, and the candidate hypernym with the highest possibility is selected as the supervised mining result.
[0052] The hypernym mining system based on the hybrid method, wherein the normalization module includes: using the proportion of the score of each unsupervised mining result in the total score of all unsupervised mining results as the re-scoring result of each unsupervised mining result; using the proportion of the possibility of each supervised mining result in the total possibility of all supervised mining results as the re-scoring result of each supervised mining result.
[0053] The present invention also proposes a storage medium for storing a hybrid method-based hypernym mining program for executing any one of the methods.
[0054] The present invention also proposes a client, which is used for any hypernym mining system based on the hybrid method.
[0055] It can be seen from the above scheme that the advantages of the present invention are:
[0056] For the unsupervised module, a query term expansion part is introduced. By mining the co-hyponyms of the query term, the original single query term is expanded, alleviating the problem of low hypernym coverage in unsupervised technology retrieval.
[0057] For the supervised module, a fixed number of multiple parallel projection matrices are used, which can reflect richer semantic information compared to a single projection matrix. The projection matrix is initialized by adding random noise to the unit matrix instead of random initialization, which can improve the speed of model learning and the accuracy of hypernym retrieval results.
[0058] For the merging module, a suitable scheme is used to quantify and score the outputs of the supervised and unsupervised modules, so that the output results of the two parts are combined. This not only overcomes the problem that the supervised method easily confuses hypernyms with synonyms and synonyms, but also further alleviates the problem of low coverage of hypernyms in unsupervised methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Attached Figure 1 is an overall system block diagram of the present invention;
[0060] Attached Figure 2 Flowchart for the unsupervised pattern matching unit;
[0061] Attached Figure 3 Flowchart for the supervised embedding projection unit. DETAILED DESCRIPTION
[0062] The technical solution of the present invention includes:
[0063] 1. Unsupervised learning unit based on pattern matching, including: query expansion part, using common hyponyms to expand query words, which have similar semantics to query words; hypernym identification part, extracting corresponding hypernyms from text corpus for multiple hyponyms obtained in the previous part; scoring part, sorting these hypernyms by similarity measurement formula, and selecting the hypernyms with the highest ranking as candidate hypernyms. Including:
[0064] a. Create an empty query term set;
[0065] b. Add the original query term to the query term set;
[0066] c. Mining co-hyponyms in the corpus through co-hyponym patterns. Adding these co-hyponyms to the collection and storing their frequencies;
[0067] d. Score each co-hyponym by cosine similarity. Sort the co-hyponyms in the query set according to this score and keep the first n;
[0068] e. Create an empty hypernym set;
[0069] f. For each query word in the query word set, search for hypernym patterns in the corpus to mine its hypernyms. Add these hypernyms to the hypernym set.
[0070] g. Score each candidate hypernym by multiplying its normalized frequency by the cosine similarity between the candidate hypernym and the query term, and rank the candidate hypernyms according to the score, selecting the top 100 candidate hypernyms for output.
[0071] 2. Supervised learning unit based on word embedding projection, including: embedding retrieval part, which retrieves the embedding corresponding to the query word; embedding projection part, which projects the query word embedding to the vicinity of its candidate hypernyms through the projection matrix; sigmoid activation layer, which calculates the possibility that the query word and the candidate hypernyms are in a hyponym relationship, and selects the top-ranked part. Including:
[0072] a. Learn word embeddings on a large text corpus and obtain a word embedding retrieval table;
[0073] b. Retrieve the embeddings of the given query term and candidate hypernyms from the word embedding retrieval table;
[0074] c. Multiply the embedding of the query word by multiple projection matrices to obtain its projection;
[0075] d. Calculate the closeness of each projection to the candidate hypernym embedding through dot product to form a column vector;
[0076] e. Input the column vector into the sigmoid activation layer to calculate the possibility that the query term and the candidate hypernym are in a hyponym relationship;
[0077] f. Calculate the likelihood of all candidate hypernyms and select the top 100 candidate hypernyms for output.
[0078] In order to make the above features and effects of the present invention more clearly understood, embodiments are given below and described in detail with reference to the accompanying drawings.
[0079] like Figure 1 As shown in Figure 1, the system consists of two parts: an unsupervised learning unit based on pattern matching and a supervised learning unit based on word embedding projection. When a query word is input, the two parts will output the top 100 candidate hypernyms by scores, normalize them, sum them up, and re-rank them.
[0080] Since the dimensions of the scores of the two parts are not uniform, the system needs to normalize them to convert the dimensional values into dimensionless values, so that the two parts can be reordered. Normalization is actually to convert a number into a decimal between 0 and 1 to achieve geometric scaling of the original data. The calculation formula is:
[0081] w i =m i / (m1+m2+...+m n )×100% (1)
[0082] In formula (1), n is the number of candidate hypernyms in this part. In this system, the value of n is 100. For each candidate hypernym, it is divided by the sum of the scores of all candidate hypernyms in this part.
[0083] After that, the scores of the hypernyms need to be summed up. This summation is only for the case where a hypernym appears in both the unsupervised part and the supervised part of the output. If a hypernym is only in a certain part of the output, its summed score is its normalized score in that part.
[0084] Finally, the summed scores are reordered from large to small, and the top n candidate hypernyms are selected, where n is a hyperparameter defined by the user.
[0085] Figure 2 The flowchart of the unsupervised pattern matching unit is as follows:
[0086] First, expand the co-hyponyms for the query word. This step is to improve the recall rate of identifying hypernyms. This system uses the enumeration mode to mine co-hyponyms, such as:
[0087] X1, X2 and X3 (2)
[0088] When searching in the corpus, when the query word and other words appear simultaneously in the sentence pattern of formula (2), the other words are identified as co-hyponyms of the query word.
[0089] Afterwards, the co-hyponyms are scored by multiplying their frequency by the cosine similarity of the query and co-hyponym embeddings. The frequency of co-hyponyms is calculated as:
[0090]
[0091] Among them, n co-hyponnym is the number of times the co-hyponym appears in the enumeration pattern, n pattern is the number of times the enumeration pattern was searched in the corpus.
[0092] The calculation formula of cosine similarity is:
[0093]
[0094] Where q is the embedding of the query word, and q′ is the embedding of the co-hyponym. The word embedding is actually a set of high-dimensional vectors that represent the semantic information of the word. The embedding here is obtained from the supervised embedding projection unit. ||q|| and ||q′|| represent the modulus, q i and q′ i Represent the components of q and q′ respectively.
[0095] Then the system adds the top 5 co-hyponyms with similarity scores and the initial query term to the query term set Q.
[0096] At this point, the co-hyponym expansion part is completed, and the search for hypernyms begins. For each query word in the query word set Q, the system performs the following operations:
[0097] Search a corpus for hypernym patterns:
[0098] Y such as X,
[0099] Y other than X,
[0100] not all Y are X,
[0101] Y including X,
[0102] Y especially X,
[0103] Y like X,
[0104] Y for example X,
[0105] Y which includes X,
[0106] X is also Y,
[0107] X is all Y,
[0108] not Y as much as X (5)
[0109] Here, X represents the query word and Y represents the hypernym pair. If X appears in the sentence pattern in (5), then the word corresponding to Y in the sentence pattern is its hypernym.
[0110] Add the searched hypernyms to the candidate hypernym set H q . Afterwards, the candidate hypernyms are scored by multiplying their normalized frequencies by the cosine similarity of the query term and the candidate hypernym embeddings. The normalized frequencies of the candidate hypernyms are calculated as:
[0111]
[0112] in, represents the number of occurrences of the i-th candidate hypernym, Represents the number of all hypernyms in the hypernym set, and the normalized frequency range will be between [0.05, 1.0].
[0113] The calculation formula of cosine similarity is the same as (4). Finally, this system takes the top 10,000 candidate hypernyms ranked by similarity scores as the output of this unit.
[0114] Figure 3 The flowchart of the supervised word embedding projection unit is as follows:
[0115] First, the system uses the skip-gram algorithm with negative sampling on the corpus to learn embeddings for all query terms and candidate hypernyms.
[0116] Skip-gram is a method that uses a central word to predict context words. It requires the user to set a window value. If the window value is set to 3, the central word is used to predict the three words before and after it. Input a sentence, loop through each word in the sentence and use it as the central word to predict the context. The words in the window are positive samples, and the words outside the window are negative samples. The objective function of the algorithm is:
[0117]
[0118] Among them, w is the central word, c is the context word to be predicted, c′ is the word of the negative sample, and D represents the set of positive samples.
[0119] Since the window value is generally much smaller than the number of words in a sentence, the number of negative samples is generally much larger than the number of positive samples, which will lead to a very slow training speed. Therefore, the system will perform sampling calculations in the negative samples, that is, it will select a part of the negative samples each time, so that only part of the weights are updated, reducing the calculation time. The selection formula for negative sampling is:
[0120]
[0121] The above formula indicates that the 3 / 4 power of the number of times word i appears is divided by the sum of the 3 / 4 powers of the number of times all words appear, and the result is the probability that word i is a negative sample word.
[0122] At this point, word embedding training is completed.
[0123] Then given a query word q and a candidate hypernym h, the system uses a lookup table to retrieve their embeddings e q , e h , then, e q Multiply by a 3D tensor containing k square projection matrices, producing E q The k×d projection vector of:
[0124] P i =(φ i ·e q ) T
[0125] i∈{1,...,k},φ i ∈R d×d (9)
[0126] Among them, φ i is a d×d square projection matrix, which is initialized by adding random noise to the unit matrix; k is the number of projection matrices, which is 24; P i for e q Corresponding to the square projection matrix φ i The projection of is a k×d vector.
[0127] Each of the k projections is then checked for equality with the candidate hypernym embedding e by taking the dot product h How close:
[0128] s=P·e h (10)
[0129] The column vector s is then fed into the sigmoid layer to obtain an estimate of the likelihood that q and h are in a superior-female relationship through a linear transformation:
[0130] y=σ(W·s+b) (11)
[0131] To mine hypernyms for a given query, the system calculates the likelihood y of all candidate words and selects the top 100. h is the word vector of the candidate hypernym, s is the similarity between the new vector of the query word after mapping and the word vector of the candidate hypernym, W and b are the parameters for linear transformation, σ is the activation function, and y is the possibility that the query word and the candidate hypernym are in a hyponymous relationship.
[0132] This system uses negative sampling to train the model: for each positive sample (query term, hypernym) in the training data, the system generates a fixed number m of negative samples by replacing the hypernym with a word randomly drawn from the vocabulary. The system samples the positive samples using a function based on the frequency of the hypernym in the training data, and the sampling formula is:
[0133]
[0134] Where freq(h) is the frequency of the candidate hypernym h in the training data.
[0135] In this way, the system trains the model on random mini-batches containing 32 positive samples and 32×m negative samples. Then, the system trains the model to output the probability (y) of positive samples close to 1 and the probability of negative samples close to 0. This is achieved by minimizing the binary cross entropy of positive and negative training samples. The calculation formula is as follows:
[0136] H(q,h,t)=t×log(y)+(1-t)×log(1-y) (13)
[0137] Where q is the query, h is the candidate hypernym, t is the target (1 for positive samples, 0 for negative samples), and y is the likelihood of the model's prediction. If the system sums H for each sample in the training set D (containing positive and negative samples), the system will obtain the cost function:
[0138] J=∑ (q,h,t)∈D H(q,h,t) (14)
[0139] This function is minimized by gradient descent using the Adam optimizer.
[0140] This system combines supervised embedding projection methods and unsupervised pattern matching methods. On the basis of pattern matching methods, it explicitly models the expression of relations in word embedding space. In order to merge the outputs of the two units, the system takes the top 100 candidates from each system, normalizes and sums their scores, and then re-ranks the candidates according to this new score to select the top n words as the final output. This re-ranking function is beneficial to candidates found by both units, effectively overcoming the problem of confusion between hypernyms, synonyms, and synonyms, and the predicted hypernyms have high accuracy and coverage.
[0141] Taking the input word "ethanol" as an example, setting n to 5, the first 5 hypernyms will be output in the end. The output of the unsupervised part is: "chemical, chemical materials, chemicals, organic chemicals, chemical...", and the output of the supervised part is: "alcohol, fuel, person, fluid, resource...". Among them, the hypernyms output by the unsupervised part are relatively simple and repeated, with low coverage. The hypernyms output by the supervised part, such as "alcohol", are synonymous with "ethanol", and "person" is an incorrect hypernym. The final output after combining the two parts is: "chemicals, organic chemicals, fuel, fluid, organic solvent", which solves the problem of low coverage of the unsupervised part and confusion of the hypernym relationship with other semantic relationships in the supervised part.
[0142] The following is a system embodiment corresponding to the above method embodiment. This embodiment can be implemented in conjunction with the above embodiment. The relevant technical details mentioned in the above embodiment are still valid in this embodiment. In order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the above embodiment.
[0143] The present invention also proposes a hypernym mining system based on deep learning, which includes:
[0144] The unsupervised mining module obtains the syntactic rules of the target text and the hypernyms of the target text language, extracts the words in the target text, expands the words by mining their co-hyponyms, uses the words and their expansion results as query words, retrieves the hypernyms of the query words in the corpus according to the syntactic rules, scores and sorts them, and selects the hypernym with the highest score as the unsupervised mining result;
[0145] A supervised mining module measures the possibility that the query term and the candidate hypernym are in a hyponym relationship based on the embedding vectors of the query term and the candidate hypernym in the corpus, and selects the candidate hypernym corresponding to the embedding vector of the candidate hypernym with the greatest possibility as the supervised mining result;
[0146] The normalization module re-scores the supervised mining result and the unsupervised mining result by normalization and summing, and selects the supervised mining result and / or the unsupervised mining result with the highest ranking in the re-score result as the final hypernym mining result of the target text.
[0147] The hypernym mining system based on deep learning, wherein the unsupervised mining module comprises:
[0148] The query expansion module obtains the co-hyponyms of the entity in the target text through the preset enumeration patterns X1, X2 and X3, takes the entity in the target text and the co-hyponym as the query, and scores them by multiplying the frequency of the co-hyponym by the cosine similarity of the query and co-hyponym embeddings:
[0149] score=similarity×frequency
[0150]
[0151]
[0152] A hypernym recognition module extracts corresponding hypernyms from the corpus through a preset hypernym pattern for the query word obtained by the query word expansion module;
[0153] The scoring module scores the hypernyms by multiplying the normalized frequency of the candidate hypernyms by the cosine similarity between the query term and the candidate hypernym embeddings:
[0154]
[0155]
[0156]
[0157] The hypernym with the highest score is selected as the unsupervised mining result.
[0158] The hypernym mining system based on deep learning, wherein the supervised mining module includes:
[0159] Word embedding is learned on the corpus to obtain a word embedding retrieval table; embeddings of a given query word and candidate hypernyms are retrieved on the word embedding retrieval table; the embedding of the query word is multiplied by multiple projection matrices respectively by the following formula to obtain multiple projections thereof;
[0160] Query word embedding q , candidate hypernym e h , e q Multiply by a 3D tensor containing k square projection matrices, producing E q The k×d projection vector of:
[0161] P i =(φ i ·e q ) T
[0162] i∈{1,...,k},φ i ∈R d×d
[0163] Among them, φ i is a d×d square projection matrix, which is initialized by adding random noise to the unit matrix; k is the number of projection matrices; P i for e q Corresponding to the square projection matrix φ i The projection of is a k×d vector;
[0164] The degree of proximity to the candidate hypernym embedding in each projection is calculated through dot product to form a column vector; the column vector is input into the activation layer to obtain the possibility that the query term and the candidate hypernym are in a hyponymous relationship; the possibility of all candidate hypernyms is calculated, and the candidate hypernym with the highest possibility is selected as the supervised mining result.
[0165] The hypernym mining system based on the hybrid method, wherein the normalization module includes: using the proportion of the score of each unsupervised mining result in the total score of all unsupervised mining results as the re-scoring result of each unsupervised mining result; using the proportion of the possibility of each supervised mining result in the total possibility of all supervised mining results as the re-scoring result of each supervised mining result.
[0166] The present invention also proposes a storage medium for storing a hybrid method-based hypernym mining program for executing any one of the methods.
[0167] The present invention also proposes a client, which is used for any hypernym mining system based on the hybrid method.
Claims
1. A hypernym mining method based on deep learning, characterized in that: include: The unsupervised mining step obtains the syntactic rules of the target text and the hypernyms of the target text language, extracts the words in the target text, expands the words by mining their co-hyponyms, uses the words and their expansion results as query words, retrieves the hypernyms of the query words in the corpus according to the syntactic rules, scores and sorts them, and selects the hypernym with the highest score as the unsupervised mining result; The supervised mining step measures the possibility that the query term and the candidate hypernym are in a hyponymous relationship based on the embedding vectors of the query term and the candidate hypernym in the corpus, and selects the candidate hypernym corresponding to the embedding vector of the candidate hypernym with the greatest possibility as the supervised mining result; The normalization step is to re-score the supervised mining result and the unsupervised mining result by normalization and summing, and select the supervised mining result and / or the unsupervised mining result with the highest ranking in the re-scoring result as the final hypernym mining result of the target text.
2. The hypernym mining method based on deep learning as claimed in claim 1, characterized in that: The unsupervised mining steps include: In the query expansion step, the co-hyponyms of the entity in the target text are obtained through the preset enumeration patterns X1, X2 and X3, and the entity in the target text and the co-hyponym are used as the query. The co-hyponym frequency is multiplied by the cosine similarity of the query and co-hyponym embeddings to score: score=similarity×frequency A hypernym recognition step, for the query word obtained in the query word expansion step, extracting corresponding hypernyms from the corpus through a preset hypernym pattern; In the scoring step, the hypernyms are scored by multiplying their normalized frequencies by the cosine similarity between the query and candidate hypernym embeddings: The hypernym with the highest score is selected as the unsupervised mining result.
3. The hypernym mining method based on deep learning as claimed in claim 1, characterized in that: The supervised mining steps include: Word embedding is learned on the corpus to obtain a word embedding retrieval table; embeddings of a given query word and candidate hypernyms are retrieved on the word embedding retrieval table; the embedding of the query word is multiplied by multiple projection matrices respectively by the following formula to obtain multiple projections thereof; Query word embedding q , candidate hypernym e h , e q Multiply by a 3D tensor containing k square projection matrices, producing E q The k×d projection vector of: P i (ϕ i ·and a ) T i∈{1,…,k},φ i ∈R d×d Among them, φ i is a d×d square projection matrix, which is initialized by adding random noise to the unit matrix; k is the number of projection matrices; P i for e q Corresponding to the square projection matrix φ i The projection of is a k×d vector; The degree of proximity to the candidate hypernym embedding in each projection is calculated through dot product to form a column vector; the column vector is input into the activation layer to obtain the possibility that the query term and the candidate hypernym are in a hyponymous relationship; the possibility of all candidate hypernyms is calculated, and the candidate hypernym with the highest possibility is selected as the supervised mining result.
4. The hypernym mining system based on the hybrid method according to claim 1 is characterized in that: The normalization step includes: taking the proportion of the score of each unsupervised mining result in the total score of all unsupervised mining results as the re-scoring result of each unsupervised mining result; taking the proportion of the possibility of each supervised mining result in the total possibility of all supervised mining results as the re-scoring result of each supervised mining result.
5. A hypernym mining system based on deep learning, characterized in that: include: The unsupervised mining module obtains the syntactic rules of the target text and the hypernyms of the target text language, extracts the words in the target text, expands the words by mining their co-hyponyms, uses the words and their expansion results as query words, retrieves the hypernyms of the query words in the corpus according to the syntactic rules, scores and sorts them, and selects the hypernym with the highest score as the unsupervised mining result; A supervised mining module measures the possibility that the query term and the candidate hypernym are in a hyponym relationship based on the embedding vectors of the query term and the candidate hypernym in the corpus, and selects the candidate hypernym corresponding to the embedding vector of the candidate hypernym with the greatest possibility as the supervised mining result; The normalization module re-scores the supervised mining result and the unsupervised mining result by normalization and summing, and selects the supervised mining result and / or the unsupervised mining result with the highest ranking in the re-score result as the final hypernym mining result of the target text.
6. The hypernym mining system based on deep learning as claimed in claim 5, characterized in that: The unsupervised mining module includes: The query term expansion module obtains the co-hyponyms of the entity in the target text through the preset enumeration mode X1, X2 and X3, takes the entity in the target text and the co-hyponym as the query term, and scores the co-hyponym by multiplying the cosine similarity of the query term and the co-hyponym embedding: score=similarity×frequency A hypernym recognition module extracts corresponding hypernyms from the corpus through a preset hypernym pattern for the query word obtained by the query word expansion module; The scoring module scores the hypernyms by multiplying the normalized frequency of the candidate hypernyms by the cosine similarity between the query term and the candidate hypernym embeddings: The hypernym with the highest score is selected as the unsupervised mining result.
7. The hypernym mining system based on deep learning as claimed in claim 5, characterized in that: The supervised mining module includes: Word embedding is learned on the corpus to obtain a word embedding retrieval table; embeddings of a given query word and candidate hypernyms are retrieved on the word embedding retrieval table; the embedding of the query word is multiplied by multiple projection matrices respectively by the following formula to obtain multiple projections thereof; Query word embedding q , candidate hypernym e h , e q Multiply by a 3D tensor containing k square projection matrices, producing E q The k×d projection vector of: P i (ϕ i ·and q ) T i∈{1,…,k},φ i ∈R d×d Among them, φ i is a d×d square projection matrix, which is initialized by adding random noise to the unit matrix; k is the number of projection matrices; P i for e q Corresponding to the square projection matrix φ i The projection of is a k×d vector; The degree of proximity to the candidate hypernym embedding in each projection is calculated through dot product to form a column vector; the column vector is input into the activation layer to obtain the possibility that the query term and the candidate hypernym are in a hyponymous relationship; the possibility of all candidate hypernyms is calculated, and the candidate hypernym with the highest possibility is selected as the supervised mining result.
8. The hypernym mining system based on the hybrid method according to claim 5, characterized in that: The normalization module includes: taking the proportion of the score of each unsupervised mining result in the total score of all unsupervised mining results as the re-scoring result of each unsupervised mining result; taking the proportion of the possibility of each supervised mining result in the total possibility of all supervised mining results as the re-scoring result of each supervised mining result.
9. A storage medium for storing a program for executing any one of the hypernym mining methods based on a hybrid method as claimed in claims 1 to 4.
10. A client, used in any one of the hypernym mining systems based on the hybrid method according to claims 5 to 8.
