A semantic component-based word vector learning method

By utilizing the HowNet knowledge base and Chinese text corpus to generate semantic component tables and initialize word embeddings, the randomness problem in the initialization of word vector models is solved, training efficiency and semantic information are improved, and the accuracy of word analogy tasks is enhanced.

CN116822528BActive Publication Date: 2026-11-20XIAMEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310993126.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-08
Publication Date
2026-11-20
Estimated Expiration
2043-08-08

AI Technical Summary

Technical Problem

Existing word vector models suffer from low training efficiency and insufficient semantic information due to the randomness of parameters during initialization. This is because semantically similar word vectors are far apart, while semantically different word vectors are close together.

Method used

Using a large-scale Chinese text corpus and the HowNet knowledge base, a semantic component table is generated. By combining word frequency information and semantic primitive hierarchical relationships, word embeddings are initialized and used as the initialization part for training models such as CBOW, Skip-Gram, and GloVe.

Benefits of technology

It accelerates the word vector training process, enhances the semantic information of word vectors, and improves the accuracy of word analogy tasks, outperforming traditional methods by 1-5 percentage points.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116822528B_ABST
    Figure CN116822528B_ABST
Patent Text Reader

Abstract

The application discloses a word vector learning method based on semantic components and relates to natural language processing. The method comprises the following steps: A. preparing a large-scale unlabeled corpus and a HowNet knowledge base; B. processing the corpus and the HowNet to obtain a corpus vocabulary, a HowNet vocabulary and a semantic primitive tree; C. generating a semantic component table by combining the corpus vocabulary and word frequency information according to the relationship among words, word meanings and semantic primitives in the HowNet and the hierarchical relationship among the semantic primitives; D. generating an initial word embedding according to the semantic component table and the hierarchical relationship among the semantic primitives contained in each word; and E. training the initial word embedding as an initialization part of an existing model. The application proposes the concept of semantic components and an algorithm for generating a semantic component table, and proposes an algorithm for generating an initial word embedding by combining HowNet semantic primitive information and the semantic component table. The CBOW, Skip-Gram and GloVe models are used as baseline models, and experiments show that the method is obviously superior to the baseline.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to natural language processing, specifically to a word vector learning method based on semantic components. Background Technology

[0002] Natural Language Processing (NLP) is an important branch of artificial intelligence. Its goal is to enable computers to understand human language, and it has many specific applications such as question-answering systems, machine translation, and named entity recognition. In recent years, deep learning has risen rapidly, and for most NLP applications, deep learning-based methods have significantly improved performance compared to previous methods.

[0003] Word embedding, also known as word vectors, refers to mapping a high-dimensional space containing all words (called one-hot vectors) to a much lower-dimensional continuous vector space. Each word or phrase is mapped to a vector in the real number field. Word embedding is the cornerstone of natural language processing based on deep learning. In deep learning networks, each word is first mapped to its corresponding word vector.

[0004] One-Hot vectors are very intuitive; they form a vocabulary of all words, with rows and columns composed of words from that vocabulary. However, using the One-Hot method to represent words leads to dimensionality explosion and data sparsity problems, and it ignores the semantic relationships between words, which is fatal. Harris (HARRIS Z S. Distributional structure[J]. Word, 1954, 10(2—3): 146-162.) proposed the distributed hypothesis in 1954, arguing that words with similar contexts have similar meanings. Firth (FIRTH J. A synopsis of linguistic theory [Z]. 1957.) further elaborated on the distributed hypothesis in 1957: the semantics of a word are determined by its context. That is, the meaning of a word should not be determined solely by the word itself, but rather by its surrounding context. In 1988, Rumelhart (David E Rumelhart, Geoffrey E Hinton, and Ronald J Williams. Learning representations by backpropagating errors[C]. Cognitive modeling, 1988: 5(3):1.) proposed the idea of ​​distributed representation, which projects all words into a continuous low-dimensional semantic space and considers each word as a vector, which is now called word embedding.

[0005] There are many methods for generating continuous low-dimensional word representations. One method is matrix factorization, which uses matrix-based methods to obtain continuous word representations. For example, Latent Semantic Analysis (Deerwester, S., Dumais, ST, Furnas, GW, Landauer, TK, & Harshman, R. Indexing By Latent Semantic Analysis[C]. Journal of the American Society For Information Science, 1990: 391-407.) uses a word-text type matrix factorization to decompose corpus information. This method can collect statistical information for each word well, but it cannot effectively capture contextual information. In other words, this method is not good enough in terms of semantic expression. The GloVe model (Jeffrey Pennington, Richard Socher, and Christopher D. Manning. GloVe: Global Vectors for Word Representation[J]. In ACL, 2014.) utilizes a global co-occurrence matrix of "word-words", which not only has global statistical information for each word, but also captures the co-occurrence frequency information of words within a specific window size, effectively combining global word information with local "word-word" information.

[0006] The above describes matrix-based methods for obtaining word vectors. Other methods use neural networks. For example, Bengio (Yoshua Bengio, Rejean Ducharme, Pascal Vincent, and Christian Janvin. A neural probabilistic language model[C]. JMLR, 2003, 3:1137–1155.) proposed a neural language model in 2003 that addresses the task of predicting the next word in a text given existing words. This model uses a large number of neural network parameters, resulting in low efficiency. The paper uses parallel processing to improve efficiency. Mikolov (Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Efficient Estimation of Word Representations in Vector Space[J]. In ICLRWorkshop Papers, 2013a.) proposed two models in 2013: CBOW and Skip-Gram. The CBOW model aims to predict words given their context, while the Skip-Gram model aims to predict the context of a word given the word itself. These two models use negative samples to significantly reduce the number of parameters in the neural network model, achieving a good balance between efficiency and performance.

[0007] The models mentioned above all overlook the fact that their parameters are initialized randomly. This can result in semantically similar words having large word vector distances, while semantically dissimilar words have small word vector distances, contrary to the training objective of this invention, thus requiring more training to converge. Summary of the Invention

[0008] The purpose of this invention is to address the aforementioned technical problem caused by "random model initialization" by providing a word vector learning method based on semantic components. In the initialization of word vector training, this invention not only ensures that word vectors of semantically similar words are close together and word vectors of semantically dissimilar words are far apart, but also injects artificial knowledge into the word vectors, thereby accelerating the word vector training process and imbuing the word vectors with more semantic information.

[0009] This invention includes the following steps:

[0010] A. Prepare a large-scale unlabeled Chinese text corpus and the HowNet knowledge base;

[0011] B. Process the text corpus and HowNet to obtain the text corpus vocabulary, the CNKI vocabulary, and the semantic primitive tree;

[0012] C. Generate semantic component tables by utilizing the relationships between words, word meanings, and semantic primitives in HowNet, as well as the hierarchical relationships between semantic primitives, combined with the corpus vocabulary and word frequency information;

[0013] D. Based on the semantic component table obtained in step C, generate the initial word embedding by combining the semantic primitives of each word in the CNKI vocabulary and the hierarchical relationship between the semantic primitives;

[0014] E. Use the generated initial word embeddings as the initialization part of some existing models for training, such as the word vectors of classic models like CBOW, Skip-Gram, and GloVe.

[0015] In step A, the Chinese text corpus used is the SogouT webpage corpus, which is provided by Sohu.com and includes 130 million original webpages of various types from the Internet, with a size exceeding 5TB before compression. The HowNet knowledge base is a semantic-based knowledge base created by Dong Zhendong and his son Dong Qiang, and can be obtained from HowNet Technology Inc.

[0016] In step B, the processing of the text corpus and CNKI further includes the following sub-steps:

[0017] B1. The text corpus is processed by removing punctuation marks, converting between simplified and traditional Chinese characters, and segmenting words to obtain a corpus vocabulary, which is then sorted by word frequency.

[0018] B2. The HowNet knowledge base is structured according to the structure of words, word meanings, and semantic primitives to obtain the HowNet vocabulary.

[0019] B3. Construct a semantic primitive tree based on the hierarchical relationship between semantic primitives.

[0020] In step C, the generation of the semantic component table further includes the following sub-steps:

[0021] C1. Traverse the words in the corpus vocabulary: Determine whether the current word in the corpus vocabulary is in the CNKI vocabulary. If it is, proceed to step C2. If it is not, take the next word in the corpus vocabulary and continue the judgment in step C1.

[0022] C2. Query the first semantic origins of all the meanings of the word and query all the ancestral semantic origins of these semantic origins through the semantic origin tree. Add the frequency of these semantic origins and all the ancestral semantic origins of these semantic origins to the word frequency of the word in the corpus in the semantic origin table.

[0023] The primary semantic primitive of a word's meaning refers to the first semantic primitive from left to right in the DEF column of the word's meaning in HowNet. This semantic primitive is the class of the word's meaning; for example, the primary semantic primitive of the word "child" is "Human."

[0024] The initial value of the frequency of each semantic primitive in the semantic primitive table is 0.

[0025] C3. After performing step C1, sort the semantic primitives table by frequency, and generate a semantic component table from the semantic representations of the top n semantic primitives. ,in There are n semantic primitives, where n is the size of the word vector dimension.

[0026] The semantic component table G can be formally represented as follows:

[0027] Semantic component table Indicates the highest frequency Each semantic primitive, where n is the same size as the word vector dimension.

[0028]

[0029] in, Indicates the origin of meaning. Represents the set of semantic primitives. This refers to the CNKI vocabulary list. and Both represent words. Indicates the origin of meaning frequency, Indicator frequency, Indicator frequency, Indicates the origin of meaning The descendants of Yiyuan gathered together. Indicator The set consisting of the first meaning of each word. Indicator The set consisting of the first semantic units of each word's meaning; the meaning of this formula is a semantic unit. The frequency of a semantic primitive is the sum of the frequencies of all words whose primary semantic primitive is this primitive plus the sum of the frequencies of all words whose primary semantic primitive is a descendant of this primitive. All semantic primitives are sorted according to their frequencies, and the top n most frequent semantic primitives are used to form a semantic component table. Semantic component table Its size is consistent with the dimension of the word vector, and Each semantic primitive corresponds one-to-one with the dimension of the word vector;

[0030] Using the algorithm described above, the most important semantic primitives most relevant to the words in the corpus are obtained, and these semantic primitives constitute a semantic component table. Semantic component table In this context, n has the same dimension as the word vector, and each semantic primitive... It corresponds to the i-th dimension of the word vector.

[0031] In step D, generating the initial word embedding further includes the following sub-steps:

[0032] D1. Determine whether a word in the corpus vocabulary is also in the CNKI vocabulary. If not, randomly initialize each component (i.e., dimension) of the word's word vector (also called word embedding) to a small value. If it is, proceed to steps D2 and D3.

[0033] D2. Determine the meaning of the word. The semantic component table checks whether the primary semantic primitives and their ancestor semantic primitives of all word meanings appear. If they do, the word frequency is added to the corresponding component (i.e., dimension) for each occurrence. If the same semantic primitive appears multiple times, it is added multiple times. If it does not appear, the semantic primitive is not processed.

[0034] D3. This word If the first semantic primitives of all word meanings and their ancestor semantic primitives appear in the semantic component table, then the word frequencies accumulated on the corresponding components in the word embedding of that word are normalized. If there are no normalized components in the word embedding of that word, then they are randomly initialized to a small value.

[0035] Each word can be formally represented by the following formula. initial word vectors :

[0036]

[0037] in:

[0038]

[0039] It produces a random real numbers, Take the smaller value; G represents the semantic component table. . The index that represents a semantic component. It represents a certain semantic component. Representing words The set consisting of the first meaning of each word, where the same element can be repeated multiple times; express The set of all ancestral semantic primitives of all semantic primitives, in which the same element may be repeated multiple times. Representing words Word vectors, express The The value of the first component. If the semantic component table... If a component is the primary semantic primitive of the word or an ancestral semantic primitive of these semantic primitives, then the value of the dimension represented by that component is... semantic components The ratio of the frequency of the corresponding semantic primitive to the sum of the frequencies of the primary semantic primitives of all the meanings of the word and the ancestral semantic primitives of these semantic primitives; otherwise... Use the random value rand(-a, a) to initialize.

[0040] Initializing word embeddings using semantic components helps improve word embedding training because semantically similar words have similar semantic components. Therefore, initializing word embeddings using semantic components results in spatially similar initial embeddings for semantically similar words, which aligns with the training goal of "two words with similar meanings should also have similar embeddings." In contrast, randomly initializing word embeddings does not necessarily result in similar embeddings for semantically similar words. Furthermore, the semantic components of a word represent its meaning; initializing word embeddings using semantic components imbues the word vectors with more semantic information.

[0041] This invention statistically analyzes the vocabulary and word frequencies of text corpora. It then utilizes the relationships between words, meanings, and semantic primitives in the HowNet knowledge base, along with the hierarchical relationships between semantic primitives, to obtain a semantic component table based on the vocabulary and word frequency information. Next, based on the semantic component table and the semantic primitives of each word in the vocabulary, initial word embeddings are obtained. Finally, these initial word embeddings are used as the initialization part of some existing classic models for training, completing the learning of word vectors (also called word embeddings). The learned word vectors are then used for word analogy testing. Experiments show that in word analogy tasks, the model of this invention achieves an accuracy 1-5 percentage points higher than the baseline model. Attached Figure Description

[0042] Figure 1 This is a flowchart of an embodiment of the present invention. Detailed Implementation

[0043] The method of the present invention will be described in detail below with reference to the accompanying drawings and embodiments. This embodiment is implemented under the premise of the technical solution of the present invention, and provides implementation methods and specific operation processes. However, the protection scope of the present invention is not limited to the following embodiments.

[0044] See Figure 1 The implementation of this invention includes the following steps:

[0045] A. Prepare a large-scale unlabeled Chinese text corpus and the HowNet knowledge base.

[0046] B. Process the text corpus and HowNet to obtain the text corpus vocabulary, the CNKI vocabulary, and the semantic primitive tree. Specifically, this includes: removing punctuation marks, converting between simplified and traditional Chinese characters, and segmenting the text corpus to obtain a vocabulary and sorting it by word frequency; structuring the HowNet knowledge base according to the structure of words, word meanings, and semantic primitives to obtain the CNKI vocabulary; and constructing a semantic primitive tree based on the hierarchical relationships between semantic primitives.

[0047] C. Generate semantic component tables by utilizing the relationships between words, word meanings, and semantic primitives in HowNet, as well as the hierarchical relationships between semantic primitives, combined with the corpus vocabulary and word frequency information.

[0048] C1. Traverse the words in the vocabulary: Determine whether the current word in the vocabulary is in the CNKI vocabulary. If it is, proceed to step C2. If not, take the next word in the corpus vocabulary and continue with the determination in step C1.

[0049] C2. Query the first semantic origins of all the meanings of the word and query all the ancestral semantic origins of these semantic origins through the semantic origin tree. Add the frequency of these semantic origins and all the ancestral semantic origins of these semantic origins to the word frequency of the word in the corpus in the semantic origin table.

[0050] The primary semantic primitive of a word's meaning refers to the first semantic primitive from left to right in the DEF array of HowNet, which represents the class of that word's meaning. For example, the primary semantic primitive of the word "child" is "Human."

[0051] The initial value of the frequency of each semantic primitive in the semantic primitive table is 0.

[0052] C3. After performing step C1, sort the semantic primitives table by frequency, and take the semantic representations of the top n semantic primitives to form a semantic component table. ,in There are n semantic primitives, where n is the size of the word vector dimension.

[0053] The semantic component table G can be formally represented as follows:

[0054] Semantic component table Indicates the highest frequency Each semantic primitive, where n is the same size as the word vector dimension.

[0055]

[0056] in, Indicates the origin of meaning. Represents the set of semantic primitives. This refers to the CNKI vocabulary list. and Both represent words. Indicates the origin of meaning frequency, Indicator frequency, Indicator frequency, Indicates the origin of meaning The descendants of Yiyuan gathered together. Indicator The set consisting of the first meaning of each word. Indicator The set consisting of the first semantic units of each word's meaning; the meaning of this formula is a semantic unit. The frequency of a semantic primitive is the sum of the frequencies of all words whose primary semantic primitive is this primitive plus the sum of the frequencies of all words whose primary semantic primitive is a descendant of this primitive. All semantic primitives are sorted according to their frequencies, and the top n most frequent semantic primitives are used to form a semantic component table. Semantic component table Its size is consistent with the dimension of the word vector, and Each semantic primitive corresponds one-to-one with the dimension of the word vector.

[0057] Using the algorithm described above, the most important semantic primitives most relevant to the words in the corpus are obtained. These semantic primitives constitute the semantic component table G. In this context, n has the same dimension as the word vector, and each semantic primitive... It corresponds to the i-th dimension of the word vector.

[0058] D. Generate initial word embeddings based on the semantic component table and the semantic primitives of each word in the CNKI lexicon, as well as the hierarchical relationships between semantic primitives.

[0059] D1. Determine whether a word in the corpus vocabulary is also in the CNKI vocabulary. If not, randomly initialize each component (i.e., dimension) of the word's word vector (also called word embedding) to a small value. If it is, proceed to steps D2 and D3.

[0060] D2. Determine the meaning of the word. The semantic component table checks if the primary semantic primitives of all word meanings and their ancestor semantic primitives appear. If they do, the word frequency is added to the corresponding component (i.e., dimension) for each occurrence. If the same semantic primitive appears multiple times, it is added multiple times. If it does not appear, the semantic primitive is not processed.

[0061] D3. This word If the first semantic primitives of all word meanings and their ancestor semantic primitives appear in the semantic component table, then the word frequencies accumulated on the corresponding components in the word embedding of that word are normalized. If there are no normalized components in the word embedding of that word, then they are randomly initialized to a small value.

[0062] Each word can be formally represented using the following formula. initial word vectors :

[0063]

[0064] in:

[0065]

[0066] It produces a random real numbers, Take the smaller value; G represents the semantic component table. ; The index that represents a semantic component. To represent a certain semantic component, Representing words The set consisting of the first meaning of each word, where the same element may appear multiple times; express The set consisting of all ancestral semantic primitives of all semantic primitives, where the same element is allowed to appear multiple times; Representing words Word vectors, express The The value of each component; Represents semantic components The corresponding semantic primitive frequency; if the semantic component table's first... If a component is the primary semantic primitive of the word or an ancestral semantic primitive of these semantic primitives, then the value of the dimension represented by that component is... semantic components The ratio of the frequency of the corresponding semantic primitive to the sum of the frequencies of the primary semantic primitives of all the meanings of the word and the ancestral semantic primitives of these semantic primitives; otherwise... Use the random value rand(-a, a) to initialize.

[0067] Initializing word embeddings using semantic components helps improve word embedding training because semantically similar words have similar semantic components. Therefore, initializing word embeddings with semantic components results in spatially similar initial embeddings for semantically similar words, which aligns with our training goal: "If two words are semantically similar, then their embeddings are also similar." In contrast, randomly initializing word embeddings does not necessarily result in similar embeddings for semantically similar words. Furthermore, the semantic components of a word represent its meaning; initializing word embeddings with semantic components imbues the word vectors with more semantic information.

[0068] E. Use the obtained initial word embeddings as the initialization part of some existing models for training, such as the word vectors of classic models like CBOW, Skip-Gram, and GloVe.

[0069] F. After training, the word vectors are obtained, and the word analogy task is used to test the performance of the word vectors.

[0070] The Chinese word analogy dataset proposed by Chen in 2015 (Xinxiong Chen, Lei Xu, Zhiyuan Liu, Maosong Sun, and Huan-Bo Luan. Joint learning of character and word embeddings[C]. In Proceedings of IJCAI, 2015: pages 1236–1242.) is a commonly used test dataset in Chinese word embedding research. For evaluation, this Chinese word analogy dataset was chosen to assess the performance of word analogy, for example... The word vector for the word "king" is: The dataset consists of 1124 analogical entities, including three entity types: (1) 677 groups of national capitals; (2) 175 groups of cities in provinces; and (3) 272 groups of family (relationship) words. During testing, a word class ratio is given... Assuming If it does not exist, calculate the following formula:

[0071]

[0072] Guess the word that best fits the proportion of this part of speech. ,like Exactly So the guess was correct.

[0073] Table 1 shows a comparison of the test results of the proposed method and the original model under the CBOW, Skip-Gram, and GloVe models. CBOW_IWE, Skip_Gram_IWE, and GloVe_IWE correspond to the three models mentioned above, incorporating the proposed method.

[0074] Ratio represents the proportion of semantic components used for initialization. That is, this invention does not use the entire semantic component table obtained in step C (the size of the table is the same as the dimension of the word embeddings), but only takes the most frequent semantic components from the semantic component table, initializing a portion of the word embeddings using semantic components, and randomly initializing the other portion. For example, assuming the word embedding dimension is 200 and the ratio Ratio = 0.75, then during model initialization, the first 200 * 0.75 = 150 dimensions of the word embeddings are initialized using semantic components, and the last 50 dimensions are randomly initialized. If Ratio = 0, then all are randomly initialized, which is the same as the initialization of the original model. If Ratio = 1, then the entire semantic component table is used for initialization.

[0075] Table 1

[0076]

[0077] Using CBOW, Skip-Gram, and GloVe models as baseline models, experiments show that the method of this invention is significantly superior to the baselines.

[0078] This invention proposes a semantic component-based method for learning word embeddings. Word embedding represents words as vectors in a vector space, where several dimensions represent semantic information, but the specific semantic information they represent is unknown. This invention proposes manually specifying the semantic information represented by some dimensions in the vector space to learn word embeddings. These dimensions and the semantic information they represent are collectively referred to as semantic components. In HowNet, a semantic primitive is defined as the smallest, indivisible unit of meaning. A word meaning has one or more semantic primitives, and a word has one or more word meanings. All semantic primitives in HowNet form a semantic primitive set. This invention uses methods to select some semantic primitives from this set as the semantic information represented by some dimensions in the vector space. These selected semantic primitives are arranged in an ordered manner, corresponding one-to-one with some dimensions in the vector space; this ordered semantic primitive table is called a semantic component table. Each semantic primitive in the semantic component table represents semantic information in some dimensions of the vector space. By using the semantic component table and the semantic information of each word in the vocabulary, we can initialize the word vector of each word to obtain the word embedding. This word embedding is used as the initialization part of the existing model for learning word embeddings. This word embedding used as the initialization part of the existing model is called the initial word embedding.

[0079] The method of this invention uses a semantic component table to specify semantic information represented by certain dimensions in the vector space, and combines it with HowNet to obtain initial word embeddings. Using the CBOW model, Skip-Gram model, and GloVe model as baseline models, experiments were conducted on a word analogy task using the training results of the initial word embeddings on the baseline models. Experimental results show that the method of this invention significantly outperforms the baselines. The results demonstrate that semantic components can improve word embeddings and also show the general usability of semantic components.

[0080] The above embodiments are merely preferred embodiments of the present invention and should not be considered as limiting the scope of the present invention. All equivalent variations and improvements made within the scope of the present invention should still fall within the patent coverage of the present invention.

Claims

1. A word vector learning method based on semantic components, characterized in that... Includes the following steps: A. Prepare a large-scale unlabeled Chinese text corpus and the HowNet knowledge base; B. Process the text corpus and HowNet to obtain the text corpus vocabulary, the CNKI vocabulary, and the semantic primitive tree; C. Generate semantic component tables by utilizing the relationships between words, word meanings, and semantic primitives in HowNet, as well as the hierarchical relationships between semantic primitives, combined with the corpus vocabulary and word frequency information; The generation of the semantic component table further includes the following sub-steps: C1. Traverse the words in the corpus vocabulary: Determine whether the current word in the corpus vocabulary is in the CNKI vocabulary. If it is, proceed to step C2. If it is not, take the next word in the corpus vocabulary and continue the judgment in step C1. C2. Query the first semantic origins of all the meanings of the word and query all the ancestral semantic origins of these semantic origins through the semantic origin tree. Add the frequency of these semantic origins and all the ancestral semantic origins of these semantic origins to the word frequency in the corpus in the semantic origin table; C3. After performing step C1, sort the semantic primitives table by frequency, and generate a semantic component table from the semantic representations of the top n semantic primitives. ,in There are n semantic primitives, where n is the size of the word vector dimension; The semantic component table G is formally represented as follows: Semantic component table Indicates the highest frequency Each semantic primitive, where n is the same size as the word vector dimension. in, Indicates the origin of meaning. Represents the set of semantic primitives. This refers to the CNKI thesaurus. and Both represent words. Indicates the origin of meaning frequency, Indicator frequency, Indicator frequency, Indicates the origin of meaning The descendants of Yiyuan gathered together. Indicator The set consisting of the first meaning of each word. Indicator The set consisting of the first semantic units of each word's meaning; the meaning of this formula is a semantic unit. The frequency of a semantic primitive is the sum of the frequencies of all words whose primary semantic primitive is this primitive plus the sum of the frequencies of all words whose primary semantic primitive is a descendant of this primitive. All semantic primitives are sorted according to their frequencies, and the top n most frequent semantic primitives are used to form a semantic component table. Semantic component table Its size is consistent with the dimension of the word vector, and Each semantic primitive corresponds one-to-one with the dimension of the word vector; Using the algorithm described above, the most important semantic primitives most relevant to the words in the corpus are obtained, and these semantic primitives constitute a semantic component table. Semantic component table In this context, n has the same dimension as the word vector, and each semantic primitive... Corresponds to the i-th dimension of the word vector; D. Based on the semantic component table obtained in step C, generate the initial word embedding by combining the semantic primitives of each word in the CNKI vocabulary and the hierarchical relationship between the semantic primitives; The generation of initial word embeddings includes the following sub-steps: D1. Determine whether a word in the corpus vocabulary is also in the CNKI vocabulary. If not, randomly initialize each component of the word vector to a small value. If it is, proceed to steps D2 and D3. D2. Determine the meaning of the word. Check whether the primary semantic primitives of all word meanings and their ancestor semantic primitives appear in the semantic component table; if they appear, add the word frequency of the word to the corresponding component of the word embedding once for each occurrence; if the same semantic primitive appears multiple times, add it multiple times; if it does not appear, do not process the semantic primitive. D3. This word If the first semantic primitives of all word meanings and their ancestor semantic primitives appear in the semantic component table, then the word frequency accumulated on the corresponding component in the word embedding of the word is normalized; if there is no normalized component in the word embedding of the word, then it is randomly initialized to a small value. Each word is formally represented by the following formula. initial word vectors : in: It produces a random real numbers, Take the smaller value; G represents the semantic component table. ; The index that represents a semantic component. To represent a certain semantic component, Representing words The set consisting of the first meaning of each word, where the same element may appear multiple times; express The set consisting of all ancestral semantic primitives of all semantic primitives, where the same element is allowed to appear multiple times; Representing words Word vectors, express The The value of each component; Represents semantic components The corresponding semantic primitive frequency; if the semantic component table's first... If a component is the primary semantic primitive of the word or an ancestral semantic primitive of these semantic primitives, then the value of the dimension represented by that component is... semantic components The ratio of the frequency of the corresponding semantic primitive to the sum of the frequencies of the primary semantic primitives of all the meanings of the word and the ancestral semantic primitives of these semantic primitives; otherwise... Initialize using the random value rand(-a, a); E. Use the generated initial word embeddings as the initialization part of some existing models for training.

2. The word vector learning method based on semantic components as described in claim 1, characterized in that... In step A, the Chinese text corpus is the SogouT webpage corpus, which includes 130 million original webpages of various types from the Internet, with a size of over 5TB before compression.

3. The word vector learning method based on semantic components as described in claim 1, characterized in that... In step B, the processing of the text corpus and CNKI includes the following sub-steps: B1. The text corpus is processed by removing punctuation marks, converting between simplified and traditional Chinese characters, and segmenting words to obtain a corpus vocabulary, which is then sorted by word frequency; B2. The HowNet knowledge base is structured according to words, meanings, and semantic primitives to obtain the HowNet vocabulary; B3. Construct a semantic primitive tree based on the hierarchical relationship between semantic primitives.

4. The word vector learning method based on semantic components as described in claim 1, characterized in that... In step E, the existing models include CBOW, Skip-Gram, and GloVe models.

Citation Information

Patent Citations

  • Method and device for extracting key words

    CN103150388A

  • Sememe classification method and device

    CN104699819A