Small sample OOV learning method and system based on Chinese character structure
Through the small sample OOV learning method based on Chinese character structure, the semantic features of OOV words are extracted, and the problem of poor OOV word recognition effect in the prior art is solved, and more accurate word embedding representation and higher downstream task accuracy are achieved.
Patent Information
- Application Number
- CN202111173367.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-08
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2041-10-08
AI Technical Summary
The existing word embedding learning model has poor recognition effect when processing OOV words, mainly due to insufficient extraction of important features of OOV words.
A small sample OOV learning method based on Chinese character structure is adopted. By obtaining word embedding and Chinese character structure information of the word list, a small sample OOV word embedding learning model is constructed, and a neural network is used to model the relationship between Chinese character components to extract the semantic characteristics of OOV words.
The word embedding representation of OOV words is effectively learned, which improves the applicability of the pre-trained model and improves recognition accuracy in downstream tasks.
Smart Images

Figure CN113901803B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and more specifically, to a small sample OOV learning method and system based on Chinese character structure. Background Art
[0002] Word embedding learning is a very important technology for text information processing. Models such as word2vec and Bert have been proven to be effective in learning grammatical and semantic relationships between words in many application tasks. However, existing word embedding learning models often require an assumption: the pre-training corpus is large enough and the words appear in the corpus frequently enough, so that the trained word embedding can achieve good results. However, if some words appear very rarely in the pre-training corpus, or in downstream tasks, some words appear very rarely or even never in the pre-training corpus, these words are collectively referred to as OOV words (Out-Of-Vocabulare) in the task.
[0003] The publication number CN108417210A (publication date 2018-08-17) proposes a word embedding language model training method, a word recognition method and a system, which utilize some common semantic features of words and, through the parameter sharing method, allow OOV words to utilize the parameters of words already in the vocabulary, and comprehensively consider the common features of words belonging to the same part-of-speech classification, so that when the trained language model encounters OOV words in actual applications, it can identify them through the morphological information of the OOV words and the syntactic-level information of the part-of-speech classification.
[0004] However, the above method simply extracts and utilizes the morphological information features of OOV words, and has poor recognition effect for complex semantic processing problems. Summary of the invention
[0005] In order to overcome the defect of the above-mentioned prior art that the important features of OOV words are not sufficiently extracted, resulting in poor OOV word recognition effect, the present invention provides a small sample OOV learning method and system based on the structure of Chinese characters.
[0006] In order to solve the above technical problems, the technical solution of the present invention is as follows:
[0007] In a first aspect, the present invention provides a small sample OOV learning method based on Chinese character structure, comprising the following steps:
[0008] S1: Obtain a common vocabulary and the word embedding of the vocabulary from the corpus, and crawl the Chinese character structure information of all words in the vocabulary;
[0009] S2: Use the word embedding of the vocabulary, the Chinese character structure information of the word, and the sentences in the corpus to construct the training set and the validation set;
[0010] S3: using the training set and the validation set respectively, under the framework of small sample OOV word learning based on Chinese character structure information, constructing a small sample OOV word embedding learning model based on Chinese character structure information and training the learning model, updating the parameters in the learning model, and obtaining an OOV word embedding learning model for effectively learning OOV words;
[0011] S4: Construct a test set of downstream task corpus, input the test set into the trained OOV word embedding learning model, and obtain the word embedding of OOV words.
[0012] Preferably, the step S2 specifically includes:
[0013] S2.1: In the obtained vocabulary V T Select N target words w that appear enough times i , and their word embedding sets In addition, for words containing two or more Chinese characters, they are recorded as c i,m ; Where T represents the pre-trained word embedding, and m represents the target word w i The mth Chinese character in ;
[0014] S2.2: Sample K sentences containing the target word w from the corpus i , and shield the target word in the sentence to obtain the context set of the target word Among them, k represents the kth adopted sentence;
[0015] S2.3: Construct a training set and a validation set for small sample OOV word learning, where each training set and validation set includes Chinese characters, Chinese character structure information, target words, a word embedding set of the target words, and a context set of the target words.
[0016] Preferably, the step S3 specifically includes:
[0017] S3.1: Initialize the OOV word embedding learning model F θ (.) parameters;
[0018] S3.2: Based on the Chinese character structure information of the target word, extract the Chinese character structure information embedding of the target word, and concatenate all the extracted Chinese character structure information embeddings to obtain the morphological information of the target word;
[0019] S3.3: Based on the context information of the target word, obtain the word embedding of the context word, denoted as Where S is the number of words in the sentence other than the target word; then the feature extraction network is used to extract the features of the context information of the target word;
[0020] S3.4: The features of the context information of the target word are concatenated with the morphological information of the target word, and then a spatial projection is performed to obtain the final semantic feature extraction vector of the target word. The formula is as follows:
[0021]
[0022] S3.5: Use the target word vector obtained by the traditional pre-training model and the semantic feature vector of the target word The cosine value of is used as the Loss value of the learning model, and its formula is as follows:
[0023]
[0024] The goal of training the learning model is to maximize the Loss value. The training objective function of the small sample OOV word learning framework is:
[0025]
[0026] Preferably, in step S3.2, for the mth Chinese character, if the Chinese character is a pictographic character or an indicative character, the Chinese character is input into the ResNet skeleton network, the regular script structure information of the Chinese character is extracted, and then the regular script structure information is concatenated with the character category embedding to obtain the Chinese character structure information embedding The formula is as follows:
[0027]
[0028] Among them, Concat(.) is a concatenation function, which concatenates two vector dimensions into a vector function. G m Represents the graphic input of Chinese characters, t m Embeddings representing character categories;
[0029] Then, each Chinese character structural information embedding is additively concatenated to obtain the Chinese character structural information embedding after additive concatenation. The formula is as follows:
[0030]
[0031] Among them, M 1 Indicates the number of pictographic or indicative characters contained in a word.
[0032] Preferably, in step S3.2, for the mth Chinese character, if the Chinese character is a phono-semantic character or an ideographic character, a finer-grained component embedding of the Chinese character is used as input and input into a fully connected feed-forward neural network FFN to obtain a Chinese character structure embedding; then the Chinese character structure embedding is concatenated with the character category embedding to obtain a Chinese character structure information embedding C m2; The formula is as follows:
[0033]
[0034] Among them, p e represents the e-th component embedding of a Chinese character; if the variant of a finer-grained component is a learned pictographic or ideographic character, the variant embedding is used as the component embedding;
[0035] Then, each Chinese character structural information embedding is additively concatenated to obtain the Chinese character structural information embedding after additive concatenation. The formula is as follows:
[0036]
[0037] Among them, M 2 Indicates the number of phono-semantic characters or ideographic characters contained in a word.
[0038] Preferably, the step S3.3 specifically includes:
[0039] S3.3.1: Input the word embedding of the context information and the position information of the context words into a layer of position attention mechanism network PA, the formula of which is as follows:
[0040]
[0041] S3.3.2: The output of the position attention mechanism network Input to a layer of multi-head self-attention mechanism network SA, the formula is as follows:
[0042]
[0043] Among them, h is the number of multi-head attention, and the h results after self-attention are multiplied by W O Do a linear transformation to get the final network output, W O represents the output layer weight matrix;
[0044] S3.3.3: The output of the multi-head self-attention mechanism network Input to a layer of fully connected feedforward neural network FFN, the formula is as follows:
[0045] FFN wi =FFN(SA wi ).
[0046] Preferably, in step S3.4, the target word semantic feature extraction vector The calculation formula is as follows:
[0047]
[0048] Among them, W p Represents the spatial projection matrix.
[0049] Preferably, in step S4, downstream tasks include sentiment analysis, dialogue question answering system, text classification clustering and machine translation.
[0050] In a second aspect, the present invention further proposes a small sample OOV learning system based on Chinese character structure, which is applied to the small sample OOV learning method based on Chinese character structure described in any of the above schemes, comprising:
[0051] The acquisition module is used to obtain a common vocabulary and word embeddings of the vocabulary from the corpus, and crawl the Chinese character structure information of all words in the vocabulary;
[0052] A small sample OOV learning module, wherein the small sample OOV learning module is provided with an OOV word embedding learning model for performing OOV learning on word embeddings of an input vocabulary, Chinese character structure information of a word, and sentences in a corpus, and outputting word embeddings of OOV words;
[0053] A training module is used to train a small sample OOV learning module, update parameters in the learning module, and obtain an OOV word embedding learning model for effectively learning OOV words;
[0054] The test module is used to construct a test set of downstream task corpus and input the test set into the trained small sample OOV learning module to obtain the word embedding of OOV words.
[0055] Preferably, in the test module, downstream tasks include sentiment analysis, dialogue question-answering system, text classification and clustering, and machine translation.
[0056] Compared with the prior art, the beneficial effects of the technical solution of the present invention are as follows: based on the structural rules of Chinese character formation, the present invention uses neural networks to model the relationship between Chinese character components, migrates OOV words to the Chinese OOV word semantic information modeling task, and establishes an OOV word embedding learning model; the OOV word embedding learning model is trained, the structural information embedding of Chinese characters is spliced and fused with the features of contextual information, thereby obtaining important features of the semantic information of OOV words. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 Flowchart of the small sample OOV learning method based on Chinese character structure.
[0058] Figure 2 Flowchart for extracting morphological information of target words.
[0059] Figure 3 Diagram of the network framework for OOV word embedding learning.
[0060] Figure 4 Schematic diagram of a small sample OOV learning system based on the structure of Chinese characters. DETAILED DESCRIPTION
[0061] The drawings are for illustrative purposes only and should not be construed as limiting the present patent;
[0062] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0063] Example 1
[0064] See also Figure 1-Figure 3 This embodiment proposes a small sample OOV learning method based on Chinese character structure, including the following steps:
[0065] S1: Obtain a common vocabulary and the word embedding of the vocabulary from the corpus, and crawl the Chinese character structure information of all words in the vocabulary;
[0066] Chinese characters include pictographic characters, indicative characters, phono-semantic characters and ideographic characters. They are a kind of ideographic writing system, which uses symbolic writing symbols to record information and each character can express semantics. Therefore, the semantic information features of Chinese character components are a very important part of learning OOV words.
[0067] In this embodiment, the Chinese Wikipedia large-scale prediction library is used as a general large-scale corpus data set. After preprocessing of word segmentation, stop word removal, punctuation and numbers, the SGNS training method in the word2vec model is used to learn the word embedding vector in the corpus. In order to ensure the quality of word embedding, words with a frequency of less than 20 need to be removed. This operation may aggravate the OOV word phenomenon in downstream tasks for other classic word embeddings; but in the method of the present invention, the pre-training process learns more efficient word embeddings, which can better infer the OOV word embedding vectors in downstream tasks, so the OOV word problem can be better solved. This embodiment crawls and organizes the categories of words, the components of words and the writing pictures of words from the web Chinese dictionary, the online Chinese dictionary and the Chinese character standard regular script.
[0068] S2: Use the word embedding of the vocabulary, the Chinese character structure information of the word, and the sentences in the corpus to construct the training set and the validation set;
[0069] S2.1: In the obtained vocabulary V T Select N target words w that appear enough times i , and their word embedding sets In addition, for words containing two or more Chinese characters, they are recorded as c i,m ; Where T represents the pre-trained word embedding, and m represents the target word w ithe m-th Chinese character in;
[0070] S2.2: Sample K sentences containing the target word w i from the corpus, and mask the target word in the sentences to obtain the context set of the target word where k represents the k-th sampled sentence;
[0071] S2.3: Construct a training set and a validation set for small-sample OOV word learning, where each training set and validation set includes Chinese characters, Chinese character structure information, target words, the word embedding set of the target word, and the context set of the target word.
[0072] In this embodiment, 80% of the samples are selected as the training set, and 20% of the samples are selected as the validation set.
[0073] S3: Respectively use the training set and the validation set, under the small-sample OOV word learning framework based on Chinese character structure information, construct a small-sample OOV word embedding learning model based on Chinese character structure information and train the learning model, update the parameters in the learning model, and obtain an OOV word embedding learning model for effectively learning OOV words;
[0074] For pictographs and ideographs, directly use their handwritten character datasets as inputs, use the ResNet backbone network to extract the graphic structure information of Chinese characters, and splice it with a character category embedding to obtain the final Chinese character morphological structure information embedding. Among them, the character category embedding represents the semantic information contained in different character formation types. Generally, pictographs describe specific objects in nature, and ideographs describe abstract things, and their character category embeddings can assist the model in understanding the semantics of the characters.
[0075] For phono-semantic compounds and associative compounds, their character formation is composed of two or more components. For the character formation structures of associative compounds and phono-semantic compounds, use a feed-forward neural network FFN to extract the semantic information of the Chinese character structure components, and crawl the variant forms of pictographs and ideographs. Variant forms are the writings outside the standard form of a character, a group of characters with the same pronunciation and meaning but different glyphs. In the Chinese character structure component layer of associative compounds and phono-semantic compounds, there may be pictographs or ideographs and their variant forms, such as the variant form "忄" of "心". Therefore, for a certain Chinese character structure component, if it or its variant form is a pictograph or an ideograph, then the semantic feature embedding of this pictograph or ideograph is used as the semantic feature embedding of this component. The semantic feature embeddings of other structure components are randomly initialized during training and then learned and updated according to the training objective. Finally, the output of the feed-forward neural network is spliced with a character category embedding to obtain the final Chinese character morphological structure information embedding.
[0076] In this embodiment, for three different values of K, three different model parameters are trained, denoted as The specific steps include:
[0077] S3.1: Initialize the OOV word embedding learning model F θ (.); the parameters that need to be initialized include the hyperparameters {K,N}.
[0078] S3.2: Based on the Chinese character structure information of the target word, extract the Chinese character structure information embedding of the target word, and concatenate all the extracted Chinese character structure information embeddings to obtain the morphological information of the target word;
[0079] In this embodiment, for the mth Chinese character, if the Chinese character is a pictographic character or an indicative character, the Chinese character is input into the ResNet skeleton network, the regular script structure information of the Chinese character is extracted, and then the regular script structure information is concatenated with the character category embedding to obtain the Chinese character structure information embedding The formula is as follows:
[0080]
[0081] Among them, Concat(.) is a concatenation function, which concatenates two vector dimensions into a vector function. G m Represents the graphic input of Chinese characters, t m Embeddings representing character categories;
[0082] Then, each Chinese character structural information embedding is additively concatenated to obtain the Chinese character structural information embedding after additive concatenation. The formula is as follows:
[0083]
[0084] Among them, M 1 Indicates the number of pictographic or indicative characters contained in a word.
[0085] If the Chinese character is a phono-semantic character or an ideographic character, the finer-grained component embedding of the Chinese character is used as input and input into the fully connected feedforward neural network FFN to obtain the Chinese character structure embedding; then the Chinese character structure embedding is concatenated with the character category embedding to obtain the Chinese character structure information embedding C m2 ; The formula is as follows:
[0086]
[0087] Among them, p e represents the e-th component embedding of a Chinese character; if the variant of a finer-grained component is a learned pictographic or ideographic character, the variant embedding is used as the component embedding;
[0088] Then, each Chinese character structural information embedding is additively concatenated to obtain the Chinese character structural information embedding after additive concatenation. The formula is as follows:
[0089]
[0090] Among them, M 2 Indicates the number of phono-semantic characters or ideographic characters contained in a word.
[0091] Finally, the Chinese character structure information is embedded and Perform concatenation to obtain the morphological information of the target word. Figure 2 , Figure 2 Flowchart for extracting morphological information of target words.
[0092] S3.3: Based on the context information of the target word, extract the word embedding of the context word according to the method described in step S1, denoted as Where S is the number of words in the sentence other than the target word. Then, the feature extraction network is used to extract the features of the context information of the target word. Specifically, the following steps are included:
[0093] S3.3.1: Input the word embedding of the context information and the position information of the context words into a layer of position attention mechanism network PA, the formula of which is as follows:
[0094]
[0095] The position information of the context word is determined by the subscript distance from the target word and the left and right direction. For example, the context word is the second to the left of the target word, which is recorded as -2.
[0096] S3.3.2: The output of the position attention mechanism network Input to a layer of multi-head self-attention mechanism network SA, the formula is as follows:
[0097]
[0098] Among them, h is the number of multi-head attention, and the h results after self-attention are multiplied by W O Do a linear transformation to get the final network output, W O Represents the output layer weight matrix.
[0099] S3.3.3: The output of the multi-head self-attention mechanism network Input to a layer of fully connected feedforward neural network FFN, the formula is as follows:
[0100] FFN wi =FFN(SAwi ).
[0101] S3.4: We need to build an OOV word embedding learning model F(.) to obtain the semantic feature vector of the target word The features of the context information of the target word are concatenated with the Chinese character structure information embedding of the target word after additive concatenation, and then a spatial projection is performed to obtain the final semantic feature extraction vector of the target word. The formula is as follows:
[0102]
[0103] Among them, W p Represents the spatial projection matrix.
[0104] S3.5: Use the target word vector obtained by the traditional pre-training model and the semantic feature vector of the target word The cosine value of is used as the Loss value of the learning model, and its formula is as follows:
[0105]
[0106] The goal of training the learning model is to maximize the Loss value. The training objective function of the small sample OOV word learning framework is:
[0107]
[0108] S4: Construct a test set of downstream task corpus and input the test set into the trained OOV word embedding learning model In the above example, inference is performed in the learning model to obtain word embeddings for OOV words.
[0109] In this embodiment, according to the method of step S1 and step S2, a test set of the downstream task corpus is constructed.
[0110] In this embodiment, in order to keep the number of small samples during training and testing relatively consistent as much as possible, that is, the learning situation during training and testing remains similar, for the sample sentences with less than 5 OOV words, use For sample sentences with less than 10 OOV words, use For sample sentences with OOV words greater than or equal to 10, use
[0111] The small sample OOV learning method based on the structure of Chinese characters proposed in this embodiment is based on the structural law of Chinese character formation, uses neural networks to model the relationship between Chinese character components, migrates OOV words to the Chinese OOV word semantic information modeling task, and establishes an OOV word embedding learning model; trains the OOV word embedding learning model, and splices and fuses the structural information embedding of Chinese characters with the features of context information, thereby obtaining the important features of the semantic information of OOV words. The small sample OOV learning method based on the structure of Chinese characters can effectively learn the word embedding representation of OOV words, making the pre-training model more applicable. At the same time, for downstream tasks, by having more accurate word embedding representations, the accuracy of downstream tasks can be improved at a lower cost. Therefore, the small sample OOV learning method based on the structure of Chinese characters can be more widely used in existing text processing tasks, such as sentiment analysis, dialogue question-answering systems, text classification and clustering, and machine translation. For the downstream task of named entity recognition of Chinese medical electronic medical records, the OOV ratio is about 55%. Compared with the existing OOV technologies mimick and HiCE, our model has achieved the best effect on this Chinese OOV task.
[0112] Example 2
[0113] See also Figure 4 This embodiment proposes a small sample OOV learning system based on Chinese character structure, which is applied to the small sample OOV learning method based on Chinese character structure proposed in Example 1, including: an acquisition module, a small sample OOV learning module, a training module and a testing module.
[0114] In the specific implementation process, the acquisition module obtains a general vocabulary and the word embedding of the vocabulary from the corpus, and crawls the Chinese character structure information of all words in the vocabulary; the small sample OOV learning module performs OOV learning on the word embedding of the input vocabulary, the Chinese character structure information of the words and the sentences in the corpus, and outputs the word embedding of the OOV words; the training module is used to train the small sample OOV learning module, update the parameters in the learning module, and obtain the OOV word embedding learning model for effective learning of OOV words; the testing module is used to construct a test set of downstream task corpus, input the test set into the trained small sample OOV learning module, and obtain the word embedding of OOV words.
[0115] The terms used in the drawings to describe positional relationships are only used for illustrative purposes and should not be construed as limiting this patent;
[0116] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A small sample OOV learning method based on Chinese character structure, characterized in that: The following steps are involved: S1: Obtain a common vocabulary and word embeddings of the vocabulary from the corpus, and crawl the Chinese character structure information of all words in the vocabulary; S2: Use the word embedding of the vocabulary, the Chinese character structure information of the word, and the sentences in the corpus to construct the training set and the validation set, including: S2.1: In the obtained vocabulary V T Select N target word with sufficient occurrences w i , and their word embedding sets ; In addition, for words containing two or more Chinese characters, they are recorded as c i,m ;in T represents the pre-trained word embedding, m Indicates the target word w i The m Chinese characters; S2.2: Sampling from a Corpus K contains the target word w i , and shield the target word in the sentence to obtain the context set of the target word ;in, k Indicates k The sentences obtained are adopted; S2.3: Construct a training set and a validation set for small sample OOV word learning, where each training set and validation set includes Chinese characters, Chinese character structure information, target words, word embedding sets of target words, and context sets of target words; S3: Using the training set and the validation set respectively, under the framework of small sample OOV word learning based on Chinese character structure information, construct a small sample OOV word embedding learning model based on Chinese character structure information and train the learning model, update the parameters in the learning model, and obtain an OOV word embedding learning model for effectively learning OOV words, including: S3.1: Initialize the OOV word embedding learning model Parameters; S3.2: Based on the Chinese character structure information of the target word, extract the Chinese character structure information embedding of the target word, and concatenate all the extracted Chinese character structure information embeddings to obtain the morphological information of the target word; S3.3: Based on the context information of the target word, obtain the word embedding of the context word, denoted as ,in S is the number of words in the sentence other than the target word; then the feature extraction network is used to extract the features of the context information of the target word; S3.4: The features of the context information of the target word are concatenated with the morphological information of the target word, and then a spatial projection is performed to obtain the final semantic feature extraction vector of the target word. , the formula is as follows: S3.5: Use the target word vector obtained by the traditional pre-training model and the semantic feature vector of the target word The cosine value of Loss The value is expressed as follows: The goal of training a learning model is to maximize Loss Value, the training objective function of the small sample OOV word learning framework is: S4: Construct a test set of downstream task corpus, input the test set into the trained OOV word embedding learning model, and obtain the word embedding of OOV words.
2. The small sample OOV learning method based on Chinese character structure according to claim 1 is characterized in that: In step S3.2, for the m If the Chinese character is a pictographic character or an indicative character, enter the Chinese character into ResNet The skeleton network extracts the regular script structure information of Chinese characters, and then concatenates the regular script structure information with the character category embedding to obtain the Chinese character structure information embedding ; The formula is as follows: ; in, Concat (.) is a concatenation function, which concatenates two vector dimensions into a function of a vector. G m Represents graphic input of Chinese characters, t m Embeddings representing character categories; Then, each Chinese character structural information embedding is additively concatenated to obtain the Chinese character structural information embedding after additive concatenation. , the formula is as follows: in, M 1 indicates the number of pictographic characters or indicative characters contained in a word.
3. The small sample OOV learning method based on Chinese character structure according to claim 2 is characterized in that: In step S3.2, for the m If the Chinese character is a phono-semantic character or an ideographic character, the finer-grained component embedding of the Chinese character is used as input to a fully connected feedforward neural network. FFN , get the Chinese character structure embedding; Then concatenate the Chinese character structure embedding with the character category embedding to get the Chinese character structure information embedding C m2 ; The formula is as follows: 。 in, p e Represents the first e component embedding; if the variant of the finer-grained component is a learned pictographic or indicative character, the variant embedding is used as the component embedding; Then, each Chinese character structural information embedding is additively concatenated to obtain the Chinese character structural information embedding after additive concatenation. , the formula is as follows: 。 in, M 2 indicates the number of phono-semantic characters or ideographic characters contained in a word.
4. The small sample OOV learning method based on Chinese character structure according to claim 1, characterized in that: The step S3.3 specifically includes: S3.3.1: Input the word embedding of context information and the position information of context words into a layer of position attention mechanism network PA , the formula is as follows: ; S3.3.2: The output of the position attention mechanism network Input to a layer of multi-head self-attention mechanism network SA , the formula is as follows: ; in, h is the number of multi-head attention, h The result of self-attention is multiplied by Do a linear transformation to get the final network output, represents the output layer weight matrix; S3.3.3: The output of the multi-head self-attention mechanism network Input to a layer of fully connected feedforward neural network FFN , the formula is as follows: 。 5. The small sample OOV learning method based on Chinese character structure according to claim 4 is characterized in that: In step S3.4, the target word semantic feature extraction vector The calculation formula is as follows: in, Represents the spatial projection matrix.
6. The small sample OOV learning method based on Chinese character structure according to claim 1, characterized in that: In step S4, downstream tasks include sentiment analysis, conversational question-answering system, text classification and clustering, and machine translation.
7. A small sample OOV learning system based on Chinese character structure, applied to a small sample OOV learning method based on Chinese character structure as claimed in any one of claims 1 to 6, characterized in that: include: The acquisition module is used to obtain a common vocabulary and word embeddings of the vocabulary from the corpus, and crawl the Chinese character structure information of all words in the vocabulary; A small sample OOV learning module, wherein the small sample OOV learning module is provided with an OOV word embedding learning model for performing OOV learning on word embeddings of an input vocabulary, Chinese character structure information of a word, and sentences in a corpus, and outputting word embeddings of OOV words; A training module is used to train the small sample OOV learning module, update the parameters in the learning module, and obtain an OOV word embedding learning model for effectively learning OOV words; The test module is used to construct a test set of downstream task corpus and input the test set into the trained small sample OOV learning module to obtain the word embedding of OOV words.
8. The small sample OOV learning system based on Chinese character structure according to claim 7 is characterized in that: In the test module, downstream tasks include sentiment analysis, dialogue question-answering system, text classification and clustering, and machine translation.
Citation Information
Patent Citations
Word embedding language model training method, word recognition method and system
CN108417210A
Chinese word vector modeling method
CN109992783A